File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 4343 //'path' => '/var/run/redis/redis-server.sock', // Unix domain socket (optional).
4444 //'databases' => 16, // Number of databases, use this if the CONFIG command is disabled (optional).
4545 //'scansize' => 1000, // Number of keys, the server will use the SCAN command instead of KEYS (optional).
46+ //'separator' => ':', // Separator for tree view (optional)
4647 ],
4748 ],
4849 'memcached ' => [
Original file line number Diff line number Diff line change @@ -394,18 +394,20 @@ private function keysTableView(array $keys): array {
394394 private function keysTreeView (array $ keys ): array {
395395 $ keys_array = array_column ($ keys , 'key ' );
396396 $ pipeline = $ this ->redis ->pipelineKeys ($ keys_array );
397+ $ separator = $ this ->servers [$ this ->current_server ]['separator ' ] ?? ': ' ;
398+ $ this ->template ->addGlobal ('separator ' , $ separator );
397399
398400 $ tree = [];
399401
400402 foreach ($ keys_array as $ key ) {
401- $ parts = explode (' : ' , $ key );
403+ $ parts = explode ($ separator , $ key );
402404 /** @var array<int|string, mixed> $current */
403405 $ current = &$ tree ;
404406 $ path = '' ;
405407
406408 foreach ($ parts as $ i => $ p_value ) {
407409 $ part = $ p_value ;
408- $ path = $ path ? $ path .' : ' .$ part : $ part ;
410+ $ path = $ path ? $ path .$ separator .$ part : $ part ;
409411
410412 if ($ i === count ($ parts ) - 1 ) {
411413 $ ttl = $ pipeline [$ key ]['ttl ' ];
Original file line number Diff line number Diff line change 66 <div class =" flex items-center gap-1 py-1 px-6 hover:bg-gray-50 dark:hover:bg-white/5" style =" padding-left: calc({{ level }} * 20px + 1.5rem)" >
77 <button class =" tree-toggle flex gap-1 items-center" data-path =" {{ item .path }}" >
88 {{ svg(' down' , 10 , ' -rotate-90' ) }}
9- <span class =" tree" >{{ item .name }}: *</span >
9+ <span class =" tree" >{{ item .name }}{{ separator }} *</span >
1010 </button >
1111 <span class =" items-count text-gray-500 dark:text-gray-400 text-xs" >({{ item .count }})</span >
1212 </div >
You can’t perform that action at this time.
0 commit comments