This is an automated email from the ASF dual-hosted git repository.

DaanHoogland pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.20 by this push:
     new 3dc23056b73 server: fix lastpinged of hosts (#13030)
3dc23056b73 is described below

commit 3dc23056b73c28dde436717b990399060dc1c224
Author: Wei Zhou <[email protected]>
AuthorDate: Wed Sep 2 09:09:36 2026 +0200

    server: fix lastpinged of hosts (#13030)
---
 server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java | 2 +-
 ui/public/locales/en.json                                         | 1 +
 ui/src/config/section/infra/hosts.js                              | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java 
b/server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java
index 42966435d4a..4f6afa7fb15 100644
--- a/server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java
+++ b/server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java
@@ -126,7 +126,7 @@ public class HostJoinDaoImpl extends 
GenericDaoBase<HostJoinVO, Long> implements
             hostResponse.setHypervisor(hypervisorType);
         }
         hostResponse.setHostType(host.getType());
-        hostResponse.setLastPinged(new Date(host.getLastPinged()));
+        hostResponse.setLastPinged(new Date(host.getLastPinged() << 10));
         Long mshostId = host.getManagementServerId();
         if (mshostId != null) {
             ManagementServerHostVO managementServer = 
managementServerHostDao.findByMsid(host.getManagementServerId());
diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json
index 008bf59b3ca..99178b64cb6 100644
--- a/ui/public/locales/en.json
+++ b/ui/public/locales/en.json
@@ -1311,6 +1311,7 @@
 "label.lastupdated": "Last update",
 "label.lastannotated": "Last annotation date",
 "label.lastheartbeat": "Last heartbeat",
+"label.lastpinged": "Last connected",
 "label.lastsuccessfuljob": "Last successful job",
 "label.lastboottime": "Boot time of the management server machine",
 "label.lastname": "Last name",
diff --git a/ui/src/config/section/infra/hosts.js 
b/ui/src/config/section/infra/hosts.js
index f81d19b136d..2a147656120 100644
--- a/ui/src/config/section/infra/hosts.js
+++ b/ui/src/config/section/infra/hosts.js
@@ -44,7 +44,7 @@ export default {
     fields.push('zonename')
     return fields
   },
-  details: ['name', 'id', 'resourcestate', 'ipaddress', 'hypervisor', 'arch', 
'type', 'clustername', 'podname', 'zonename', 'disconnected', 'created'],
+  details: ['name', 'id', 'resourcestate', 'ipaddress', 'hypervisor', 'arch', 
'type', 'clustername', 'podname', 'zonename', 'lastpinged', 'disconnected', 
'created'],
   tabs: [{
     name: 'details',
     component: shallowRef(defineAsyncComponent(() => 
import('@/components/view/DetailsTab.vue')))

Reply via email to