Browse Source

update server stat

Tokumeikoi 4 years ago
parent
commit
397436761f

+ 1 - 1
app/Console/Commands/V2boardCache.php

@@ -63,7 +63,7 @@ class V2boardCache extends Command
                 'd' => $serverLog->d,
                 'online' => $serverLog->online
             ];
-            Cache::put(CacheKey::get('SERVER_STAT', $serverLog->server_id), json_encode($data), 3600);
+            dd(Cache::put(CacheKey::get('SERVER_STAT', $serverLog->server_id), json_encode($data), 3600));
             ServerStat::create($data);
         }
     }

+ 1 - 1
app/Http/Controllers/Admin/ServerController.php

@@ -26,7 +26,7 @@ class ServerController extends Controller
                 $server[$i]['tags'] = json_decode($server[$i]['tags']);
             }
             $server[$i]['group_id'] = json_decode($server[$i]['group_id']);
-            $serverStat = Cache::get(CacheKey::get('SERVER_STAT', $server[$i]['id']));
+            $serverStat = Cache::get(CacheKey::get('SERVER_STAT', $server[$i]['parent_id'] ? $server[$i]['parent_id'] : $server[$i]['id']));
             if ($serverStat) {
                 $serverStat = json_decode($serverStat, true);
                 $server[$i]['u'] = $serverStat['u'];

File diff suppressed because it is too large
+ 0 - 0
public/assets/admin/umi.css


File diff suppressed because it is too large
+ 0 - 0
public/assets/admin/umi.js


Some files were not shown because too many files changed in this diff