From f417dc7fb6fdb5d1095234bb3dd6f9207b621a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=94=E5=A7=AC=E6=A1=91?= <867057410@qq.com> Date: Thu, 16 Jun 2022 23:49:36 +0800 Subject: [PATCH] =?UTF-8?q?Fixed=20=E6=A3=80=E6=B5=8B=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=9B=A0=E4=B8=BA=E4=B8=AD=E8=BD=AC=E5=AD=97=E6=AE=B5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=80=8C=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/NodeStatusDetection.php | 4 ++-- resources/views/admin/node/index.blade.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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,