diff --git a/app/Console/Commands/NodeStatusDetection.php b/app/Console/Commands/NodeStatusDetection.php index 31496299..463a5fb2 100644 --- a/app/Console/Commands/NodeStatusDetection.php +++ b/app/Console/Commands/NodeStatusDetection.php @@ -43,7 +43,7 @@ class NodeStatusDetection extends Command { $offlineCheckTimes = sysConfig('offline_check_times'); $onlineNode = NodeHeartbeat::recently()->distinct()->pluck('node_id')->toArray(); - foreach (Node::whereIsRelay(0)->whereStatus(1)->whereNotIn('id', $onlineNode)->get() as $node) { + foreach (Node::whereRelayNodeId(null)->whereStatus(1)->whereNotIn('id', $onlineNode)->get() as $node) { // 近期无节点负载信息则认为是后端炸了 if ($offlineCheckTimes) { // 已通知次数 @@ -74,7 +74,7 @@ class NodeStatusDetection extends Command { $detectionCheckTimes = sysConfig('detection_check_times'); - foreach (Node::whereIsRelay(0)->whereStatus(1)->where('detection_type', '<>', 0)->get() as $node) { + foreach (Node::whereRelayNodeId(null)->whereStatus(1)->where('detection_type', '<>', 0)->get() as $node) { $node_id = $node->id; // 使用DDNS的node先通过gethostbyname获取ipv4地址 foreach ($node->ips() as $ip) { diff --git a/resources/views/admin/node/index.blade.php b/resources/views/admin/node/index.blade.php index 98fe24e0..bf74a0b0 100644 --- a/resources/views/admin/node/index.blade.php +++ b/resources/views/admin/node/index.blade.php @@ -19,8 +19,8 @@ @canany(['admin.node.geo', 'admin.node.create'])
@can('admin.node.geo') - @endcan @can('admin.node.create') @@ -254,7 +254,7 @@ @can('admin.node.geo') // 刷新节点地理信息 - function refreshGeo(id = 0) { + function refreshGeo(id) { $.ajax({ method: 'GET', url: '{{route('admin.node.geo', '')}}/' + id,