<commit_before><?php

use Mmeyer2k\RedisTree\RedisTreeModel;

$controller = '\Mmeyer2k\RedisTree\RedisTreeController';
?>
@extends('redistree::layout')

@section('title') RedisTree{{ strlen($path) ? ' - ' . $path  : '' }} @endsection

@section('content')
    <div class="panel panel-default">
        <?php
        echo \view('redistree::keys.header', ['segs' => $segs, 'path' => $path]);
        ?>
        <div id="divRowData" class="panel-body">
            {{-- List folders at this node --}}
            @foreach ($data as $node)
                @if(ends_with($node, $dirs))
                    <?php
                    $nodeLink = '?node=' . bin2hex($path . $node);
                    ?>
                    <div class="row">
                        <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
                            <a href="{!! $nodeLink !!}" class="btn btn-default monospace">
                                <span class="glyphicon glyphicon-folder-close" aria-hidden="true"></span>
                                {{ $node }}
                            </a>
                        </div>
                        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                            @if (!RedisTreeModel::option('view_keys_only'))
                                <textarea
                                        placeholder="Node value"
                                        style="resize: vertical; height: 53px;"
                                        class="form-control monospace">{{ \Redis::get($path . $node) }}</textarea>
                            @endif
                        </div>
                        <div class="col-xs-12 col-sm-2 col-md-2 col-lg-2 text-right">
                            @if (!RedisTreeModel::option('view_keys_only'))
                                <button
                                        onclick="ajaxUpdate($(this).attr('data-node'), $(this).parent().parent().find('textarea').val())"
                                        data-node="{{ $path . $node }}"
                                        class="btn btn-default">
                                    <span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span>
                                </button>
                            @endif
                            <button
                                    onclick="ajaxDeleteNode($(this).attr('data-node'))"
                                    data-node="{{ $path . $node }}"
                                    class="btn btn-danger">
                                <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span>
                            </button>
                        </div>
                    </div>
                @endif
            @endforeach
            <?php

            foreach ($data as $key) {
            if (ends_with($key, $dirs)) {
                continue;
            }
            ?>
            <div class="row">
                <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 monospace divKeyNameCell">
                    {{ $key }}
                </div>
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    @if (!RedisTreeModel::option('view_keys_only'))
                        @if (\Redis::type($path . $key) === 'string')
                            <textarea
                                    placeholder="Key value"
                                    style="resize: vertical; height: 53px;"
                                    class="form-control monospace">{{ \Redis::get($path . $key) }}</textarea>
                        @else
                            Non-string type.
                        @endif
                    @endif
                </div>
                <div class="col-xs-12 col-sm-2 col-md-2 col-lg-2 text-right">
                    @if (!RedisTreeModel::option('view_keys_only'))
                        <button
                                onclick="ajaxUpdate($(this).attr('data-key'), $(this).parent().parent().find('textarea').val())"<commit_msg>Update index.blade.php<commit_after><?php

use Mmeyer2k\RedisTree\RedisTreeModel;

$controller = '\Mmeyer2k\RedisTree\RedisTreeController';
?>
@extends('redistree::layout')

@section('title') RedisTree{{ strlen($path) ? ' - ' . $path  : '' }} @endsection

@section('content')
    <div class="panel panel-default">
        <?php
        echo \view('redistree::keys.header', ['segs' => $segs, 'path' => $path]);
        ?>
        <div id="divRowData" class="panel-body">
            {{-- List folders at this node --}}
            @foreach ($data as $node)
                @if(ends_with($node, $dirs))
                    <?php
                    $nodeLink = '?node=' . bin2hex($path . $node);
                    ?>
                    <div class="row">
                        <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
                            <a href="{!! $nodeLink !!}" class="btn btn-default monospace">
                                <span class="glyphicon glyphicon-folder-close" aria-hidden="true"></span>
                                {{ $node }}
                            </a>
                        </div>
                        <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                            @if (!RedisTreeModel::option('view_keys_only'))
                                <textarea
                                        placeholder="Node value"
                                        style="resize: vertical; height: 53px;"
                                        class="form-control monospace">{{ \Redis::get($path . $node) }}</textarea>
                            @endif
                        </div>
                        <div class="col-xs-12 col-sm-2 col-md-2 col-lg-2 text-right">
                            @if (!RedisTreeModel::option('view_keys_only'))
                                <button
                                        onclick="ajaxUpdate($(this).attr('data-node'), $(this).parent().parent().find('textarea').val())"
                                        data-node="{{ $path . $node }}"
                                        class="btn btn-default">
                                    <span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span>
                                </button>
                            @endif
                            <button
                                    onclick="ajaxDeleteNode($(this).attr('data-node'))"
                                    data-node="{{ $path . $node }}"
                                    class="btn btn-danger">
                                <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span>
                            </button>
                        </div>
                    </div>
                @endif
            @endforeach
            <?php

            foreach ($data as $key) {
            if (ends_with($key, $dirs)) {
                continue;
            }
            ?>
            <div class="row">
                <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 monospace divKeyNameCell">
                    {{ $key }}
                </div>
                <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
                    @if (!RedisTreeModel::option('view_keys_only'))
                        <?php
                        $type = (string)\Redis::type($path . $key);
                        ?>
                        @if ($type === 'string')
                            <textarea
                                    placeholder="Key value"
                                    style="resize: vertical; height: 53px;"
                                    class="form-control monospace">{{ \Redis::get($path . $key) }}</textarea>
                        @else
                            Non-string type ({!! $type !!}) not supported, yet.
                        @endif
                    @endif
                </div>
                <div class="col-xs-12 col-sm-2 col-md-2 col-lg-2 text-right">
                    @if (!RedisTreeModel::option('view_keys_only'))
                        <button
                                onclick="ajaxUpdate($(this).attr('data-key'), $(this).parent().parent().find('textarea').val())"
{'fraction_non_alphanumeric': 0.14117364117364117, 'fraction_numerical': 0.008898508898508899, 'mean_word_length': 1.005546177959971, 'pattern_counts': {'":': 0, '<': 78, '<?xml version=': 0, '>': 80, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6314558', 'n_tokens_mistral': 2136, 'n_tokens_neox': 1996, 'n_words': 367}