diff --git a/framework/ndn-testbed-status/src/App.vue b/framework/ndn-testbed-status/src/App.vue
index 396cf91..528db7c 100644
--- a/framework/ndn-testbed-status/src/App.vue
+++ b/framework/ndn-testbed-status/src/App.vue
@@ -8,6 +8,8 @@
HTTPS |
Revision |
+ Status |
+
NFD Version |
NLSR Version |
@@ -37,6 +39,8 @@
{{ router.status?.revision }}
+ {{ getFromNow(router.status?.timestamp) }} |
+
{{ router.status?.nfd?.version }} |
{{ router.status?.nlsr?.version }} |
@@ -172,6 +176,13 @@ export default defineComponent({
getRevUrl(router: IRouter) {
return `${TESTBED_REPO}/commit/${router.status!.revision}`;
},
+
+ getFromNow(timestamp: number | undefined) {
+ if (!timestamp) return String();
+
+ const diff = Math.round(Date.now() / 1000 - timestamp);
+ return `${diff}s`;
+ },
},
});