File tree Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 7575 <td ><code >{{ $key [0 ] } } </code ></td >
7676 <td >
7777 @php ($type = $key [1 ]-> getPayload () )
78- <span class =" label label-{{ \Encore \Admin \RedisManager \RedisManager:: $ typeColor[ $type ] } }" >{{ $type } } </span >
78+ <span class =" label label-{{ \Encore \Admin \RedisManager \RedisManager:: typeColor ( $type ) } }" >{{ $type } } </span >
7979 </td >
8080 <td >{{ $key [2 ] } } </td >
8181 <td >
Original file line number Diff line number Diff line change 4444 @foreach ($connections [$conn ] as $name => $value )
4545 <tr >
4646 <td width =" 160px" >{{ $name } } </td >
47- <td ><span class =" label label-primary" >{{ $value } } </span ></td >
47+ <td ><span class =" label label-primary" >{{ is_array ( $value ) ? json_encode ( $value ) : $value } } </span ></td >
4848 </tr >
4949 @endforeach
5050 </table >
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function index()
2525 $ connection = request ('conn ' , 'default ' );
2626
2727 $ manager = $ this ->manager ();
28-
28+ //dd($manager->getConnections());
2929 $ variables = [
3030 'conn ' => $ connection ,
3131 'info ' => $ manager ->getInformation (),
Original file line number Diff line number Diff line change 1111use Encore \Admin \RedisManager \DataType \Strings ;
1212use Illuminate \Http \Request ;
1313use Illuminate \Redis \Connections \Connection ;
14+ use Illuminate \Support \Arr ;
1415use Illuminate \Support \Collection ;
1516use Illuminate \Support \Facades \Redis ;
1617use Predis \Collection \Iterator \Keyspace ;
@@ -267,4 +268,14 @@ public function execute($command)
267268
268269 return $ this ->getConnection ()->executeRaw ($ command );
269270 }
271+
272+ /**
273+ * @param string $type
274+ *
275+ * @return mixed
276+ */
277+ public static function typeColor ($ type )
278+ {
279+ return Arr::get (static ::$ typeColor , $ type , 'default ' );
280+ }
270281}
You can’t perform that action at this time.
0 commit comments