From c3598dae6112d830c234965819f785c8ab88d75d Mon Sep 17 00:00:00 2001 From: Frederick Borges Date: Fri, 30 Apr 2021 19:47:50 +0200 Subject: [PATCH] B #5340: Fix start time on services without registration time (#1174) Signed-off-by: Frederick Borges --- .../public/app/tabs/oneflow-services-tab/datatable.js | 2 +- .../public/app/tabs/oneflow-services-tab/panels/info.js | 4 ++-- .../public/app/tabs/oneflow-services-tab/panels/info/html.hbs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sunstone/public/app/tabs/oneflow-services-tab/datatable.js b/src/sunstone/public/app/tabs/oneflow-services-tab/datatable.js index 4233dda83d..2fb379407a 100644 --- a/src/sunstone/public/app/tabs/oneflow-services-tab/datatable.js +++ b/src/sunstone/public/app/tabs/oneflow-services-tab/datatable.js @@ -256,7 +256,7 @@ define(function(require) { element.GNAME, element.NAME, state, - Humanize.prettyTime(element.TEMPLATE.BODY["registration_time"]), + Humanize.prettyTime(element.TEMPLATE.BODY["start_time"]), (LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||""), leasesClock(element), btoa(unescape(encodeURIComponent(JSON.stringify(search)))) diff --git a/src/sunstone/public/app/tabs/oneflow-services-tab/panels/info.js b/src/sunstone/public/app/tabs/oneflow-services-tab/panels/info.js index 6cc81d8dc9..3a113da00d 100644 --- a/src/sunstone/public/app/tabs/oneflow-services-tab/panels/info.js +++ b/src/sunstone/public/app/tabs/oneflow-services-tab/panels/info.js @@ -66,14 +66,14 @@ define(function(require) { function _html() { var renameTrHTML = RenameTr.html(TAB_ID, RESOURCE, this.element.NAME); var permissionsTableHTML = PermissionsTable.html(TAB_ID, RESOURCE, this.element); - var prettyRegTime = Humanize.prettyTime(this.element.TEMPLATE.BODY['registration_time']); + var prettyStartTime = Humanize.prettyTime(this.element.TEMPLATE.BODY['start_time']); return TemplateHTML({ 'element': this.element, 'renameTrHTML': renameTrHTML, 'permissionsTableHTML': permissionsTableHTML, 'stateStr': OpenNebulaService.stateStr(this.element.TEMPLATE.BODY.state), - 'prettyRegTime': prettyRegTime + 'prettyStartTime': prettyStartTime }); } diff --git a/src/sunstone/public/app/tabs/oneflow-services-tab/panels/info/html.hbs b/src/sunstone/public/app/tabs/oneflow-services-tab/panels/info/html.hbs index 53bb4882bc..63000da622 100644 --- a/src/sunstone/public/app/tabs/oneflow-services-tab/panels/info/html.hbs +++ b/src/sunstone/public/app/tabs/oneflow-services-tab/panels/info/html.hbs @@ -30,7 +30,7 @@ {{{renameTrHTML}}} {{tr "Start time"}} - {{prettyRegTime}} + {{prettyStartTime}}