1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #5714: Fix registration time and start time on services (#1727)

This commit is contained in:
Frederick Borges 2022-01-28 14:21:47 +01:00 committed by GitHub
parent 8ec165da26
commit 3a201337b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 4 deletions

View File

@ -244,6 +244,7 @@ define(function(require) {
};
var color_html = Status.state_lock_to_color("SERVICE",state, element_json[XML_ROOT]["LOCK"]);
var start_time = element.TEMPLATE.BODY["start_time"] ? Humanize.prettyTime(element.TEMPLATE.BODY["start_time"]) : "-";
return [
"<input class=\"check_item\" type=\"checkbox\" "+
@ -255,7 +256,7 @@ define(function(require) {
element.GNAME,
element.NAME,
state,
Humanize.prettyTime(element.TEMPLATE.BODY["start_time"]),
start_time,
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||""),
leasesClock(element),
btoa(unescape(encodeURIComponent(JSON.stringify(search))))

View File

@ -101,7 +101,7 @@ define(function(require) {
var that = this;
var renameTrHTML = RenameTr.html(TAB_ID, RESOURCE, this.element.NAME);
var permissionsTableHTML = PermissionsTable.html(TAB_ID, RESOURCE, this.element);
var prettyStartTime = Humanize.prettyTime(this.element.TEMPLATE.BODY["start_time"]);
var prettyStartTime = this.element.TEMPLATE.BODY["start_time"] ? Humanize.prettyTime(this.element.TEMPLATE.BODY["start_time"]) : "-";
var errorMessageHTML = "";
var async = false;

View File

@ -108,6 +108,7 @@ define(function(require) {
}
var color_html = Status.state_lock_to_color("SERVICE_TEMPLATE",false, element_json[XML_ROOT]["LOCK"]);
var registration_time = element.TEMPLATE.BODY['registration_time'] ? Humanize.prettyTime(element.TEMPLATE.BODY['registration_time']) : "-";
return [
'<input class="check_item" type="checkbox" style="vertical-align: inherit;" id="'+this.resource.toLowerCase() + '_' + element.ID + '" name="selected_items" value="' + element.ID + '"/>'+color_html,
@ -115,7 +116,7 @@ define(function(require) {
element.UNAME,
element.GNAME,
element.NAME,
Humanize.prettyTime(element.TEMPLATE.BODY['registration_time']),
registration_time,
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];

View File

@ -67,7 +67,7 @@ define(function(require) {
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 prettyRegTime = this.element.TEMPLATE.BODY['registration_time'] ? Humanize.prettyTime(this.element.TEMPLATE.BODY['registration_time']) : "-";
var customAttrs = [];
if ( ! $.isEmptyObject( this.element.TEMPLATE.BODY['custom_attrs'] ) ) {