From 1f5f93d58346344d2971ab2d2f4a757439313dca Mon Sep 17 00:00:00 2001 From: zhaoke Date: Fri, 17 Mar 2023 09:00:16 +0800 Subject: [PATCH 1/2] * Fix bug #32870. --- module/zanode/css/view.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zanode/css/view.css b/module/zanode/css/view.css index adb03140cd..12eec6037e 100644 --- a/module/zanode/css/view.css +++ b/module/zanode/css/view.css @@ -18,4 +18,4 @@ .btn-info {background-color: unset;} .btn.disabled i {color: #fff;} #serviceContent{min-height: 120px;} -.btn-snap-create{width: 100px;height: 30px;} \ No newline at end of file +.btn-snap-create{height: 30px;} \ No newline at end of file From d95057d9a20d718bbec71a488e1ad7f7d9a08414 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Fri, 17 Mar 2023 10:42:08 +0800 Subject: [PATCH 2/2] * Fix vm status error. --- api/v1/entries/hostheartbeat.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/v1/entries/hostheartbeat.php b/api/v1/entries/hostheartbeat.php index 38ae856782..9220e77b8a 100644 --- a/api/v1/entries/hostheartbeat.php +++ b/api/v1/entries/hostheartbeat.php @@ -37,7 +37,7 @@ class hostHeartbeatEntry extends baseEntry $conditionValue = $secret ? $secret : $token; $this->dao = $this->loadModel('common')->dao; - $hostInfo = $this->dao->select('id,tokenSN,hostType')->from(TABLE_ZAHOST) + $hostInfo = $this->dao->select('id,tokenSN,hostType,type')->from(TABLE_ZAHOST) ->beginIF($secret)->where('secret')->eq($secret)->fi() ->beginIF(!$secret)->where('tokenSN')->eq($token) ->andWhere('tokenTime')->gt($now)->fi() @@ -45,7 +45,7 @@ class hostHeartbeatEntry extends baseEntry if(empty($hostInfo->id)) { if(empty($token)) return $this->sendError(400, 'Secret error.'); - $hostInfo = $this->dao->select('id,tokenSN')->from(TABLE_ZAHOST) + $hostInfo = $this->dao->select('id,tokenSN,hostType,type')->from(TABLE_ZAHOST) ->where('oldTokenSN')->eq($token) ->andWhere('tokenTime')->gt(date(DT_DATETIME1, strtotime($now) - 30))->fi() ->fetch(); @@ -83,7 +83,7 @@ class hostHeartbeatEntry extends baseEntry if($heartbeat > 0) $vmData['heartbeat'] = date("Y-m-d H:i:s", $heartbeat); - if($hostInfo->hostType == 'physics') + if($hostInfo->type == 'node' && $hostInfo->hostType == 'physics') { unset($vmData['extranet']); $this->dao->update(TABLE_ZAHOST)->data($vmData)->where('id')->eq($hostInfo->id)->exec();