diff --git a/src/sunstone/etc/sunstone-views/kvm/admin.yaml b/src/sunstone/etc/sunstone-views/kvm/admin.yaml index 844edb23e3..3844c2f0df 100644 --- a/src/sunstone/etc/sunstone-views/kvm/admin.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/admin.yaml @@ -284,11 +284,12 @@ tabs: table_columns: - 0 # Checkbox - 1 # ID - - 2 # Name - - 3 # Owner - - 4 # Group - #- 5 # Labels - #- 6 # Search data + - 2 # Owner + - 3 # Group + - 4 # Name + #- 5 # Registration time + #- 6 # Labels + #- 7 # Search data actions: ServiceTemplate.refresh: true ServiceTemplate.create_dialog: true diff --git a/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml b/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml index 00109e9ec1..b0cc72fa83 100644 --- a/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml @@ -283,11 +283,12 @@ tabs: table_columns: - 0 # Checkbox - 1 # ID - - 2 # Name - - 3 # Owner - - 4 # Group - #- 5 # Labels - #- 6 # Search data + - 2 # Owner + - 3 # Group + - 4 # Name + #- 5 # Registration time + #- 6 # Labels + #- 7 # Search data actions: ServiceTemplate.refresh: true ServiceTemplate.create_dialog: false diff --git a/src/sunstone/etc/sunstone-views/kvm/user.yaml b/src/sunstone/etc/sunstone-views/kvm/user.yaml index bbe7dd0b44..fc02969bcf 100644 --- a/src/sunstone/etc/sunstone-views/kvm/user.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/user.yaml @@ -279,8 +279,9 @@ tabs: - 2 # Owner - 3 # Group - 4 # Name - #- 5 # Labels - #- 6 # Search data + #- 5 # Registration time + #- 6 # Labels + #- 7 # Search data actions: ServiceTemplate.refresh: true ServiceTemplate.create_dialog: true diff --git a/src/sunstone/etc/sunstone-views/mixed/admin.yaml b/src/sunstone/etc/sunstone-views/mixed/admin.yaml index cfeacde20d..08dbd56682 100644 --- a/src/sunstone/etc/sunstone-views/mixed/admin.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/admin.yaml @@ -284,11 +284,12 @@ tabs: table_columns: - 0 # Checkbox - 1 # ID - - 2 # Name - - 3 # Owner - - 4 # Group - #- 5 # Labels - #- 6 # Search data + - 2 # Owner + - 3 # Group + - 4 # Name + #- 5 # Registration time + #- 6 # Labels + #- 7 # Search data actions: ServiceTemplate.refresh: true ServiceTemplate.create_dialog: true diff --git a/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml b/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml index b3f062ebe2..919706e7bd 100644 --- a/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml @@ -283,11 +283,12 @@ tabs: table_columns: - 0 # Checkbox - 1 # ID - - 2 # Name - - 3 # Owner - - 4 # Group - #- 5 # Labels - #- 6 # Search data + - 2 # Owner + - 3 # Group + - 4 # Name + #- 5 # Registration time + #- 6 # Labels + #- 7 # Search data actions: ServiceTemplate.refresh: true ServiceTemplate.create_dialog: false diff --git a/src/sunstone/etc/sunstone-views/mixed/user.yaml b/src/sunstone/etc/sunstone-views/mixed/user.yaml index 121f8804d2..c3bdf760bd 100644 --- a/src/sunstone/etc/sunstone-views/mixed/user.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/user.yaml @@ -279,8 +279,9 @@ tabs: - 2 # Owner - 3 # Group - 4 # Name - #- 5 # Labels - #- 6 # Search data + #- 5 # Registration time + #- 6 # Labels + #- 7 # Search data actions: ServiceTemplate.refresh: true ServiceTemplate.create_dialog: true diff --git a/src/sunstone/etc/sunstone-views/vcenter/admin.yaml b/src/sunstone/etc/sunstone-views/vcenter/admin.yaml index 20b6d538bb..cfd90f729b 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/admin.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/admin.yaml @@ -282,11 +282,12 @@ tabs: table_columns: - 0 # Checkbox - 1 # ID - - 2 # Name - - 3 # Owner - - 4 # Group - #- 5 # Labels - #- 6 # Search data + - 2 # Owner + - 3 # Group + - 4 # Name + #- 5 # Registration time + #- 6 # Labels + #- 7 # Search data actions: ServiceTemplate.refresh: true ServiceTemplate.create_dialog: true diff --git a/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml b/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml index a5524c7d7b..098dc82022 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml @@ -283,11 +283,12 @@ tabs: table_columns: - 0 # Checkbox - 1 # ID - - 2 # Name - - 3 # Owner - - 4 # Group - #- 5 # Labels - #- 6 # Search data + - 2 # Owner + - 3 # Group + - 4 # Name + #- 5 # Registration time + #- 6 # Labels + #- 7 # Search data actions: ServiceTemplate.refresh: true ServiceTemplate.create_dialog: false diff --git a/src/sunstone/etc/sunstone-views/vcenter/user.yaml b/src/sunstone/etc/sunstone-views/vcenter/user.yaml index 121f8804d2..c3bdf760bd 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/user.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/user.yaml @@ -279,8 +279,9 @@ tabs: - 2 # Owner - 3 # Group - 4 # Name - #- 5 # Labels - #- 6 # Search data + #- 5 # Registration time + #- 6 # Labels + #- 7 # Search data actions: ServiceTemplate.refresh: true ServiceTemplate.create_dialog: true diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/datatable.js b/src/sunstone/public/app/tabs/oneflow-templates-tab/datatable.js index 193e401f17..2ba50e3cdb 100644 --- a/src/sunstone/public/app/tabs/oneflow-templates-tab/datatable.js +++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/datatable.js @@ -20,6 +20,7 @@ define(function(require) { */ var TabDataTable = require('utils/tab-datatable'); + var Humanize = require('utils/humanize'); var SunstoneConfig = require('sunstone-config'); var Locale = require('utils/locale'); var LabelsUtils = require('utils/labels/utils'); @@ -33,8 +34,8 @@ define(function(require) { var RESOURCE = "ServiceTemplate"; var XML_ROOT = "DOCUMENT"; var TAB_NAME = require('./tabId'); - var LABELS_COLUMN = 5; - var SEARCH_COLUMN = 6; + var LABELS_COLUMN = 6; + var SEARCH_COLUMN = 7; var TEMPLATE_ATTR = 'TEMPLATE'; /* @@ -67,6 +68,7 @@ define(function(require) { Locale.tr("Owner"), Locale.tr("Group"), Locale.tr("Name"), + Locale.tr("Registration time"), Locale.tr("Labels"), "search_data" ]; @@ -113,6 +115,7 @@ define(function(require) { element.UNAME, element.GNAME, element.NAME, + Humanize.prettyTime(element.TEMPLATE.BODY['registration_time']), (LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''), btoa(unescape(encodeURIComponent(JSON.stringify(search)))) ]; diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info.js b/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info.js index fded69040f..517bb1483b 100644 --- a/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info.js +++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info.js @@ -20,6 +20,7 @@ define(function(require) { */ var Locale = require('utils/locale'); + var Humanize = require('utils/humanize'); var RenameTr = require('utils/panel/rename-tr'); var PermissionsTable = require('utils/panel/permissions-table'); @@ -66,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 customAttrs = []; if ( ! $.isEmptyObject( this.element.TEMPLATE.BODY['custom_attrs'] ) ) { @@ -103,6 +104,7 @@ define(function(require) { return TemplateHTML({ 'element': this.element, + 'prettyRegTime': prettyRegTime, 'renameTrHTML': renameTrHTML, 'permissionsTableHTML': permissionsTableHTML, 'customAttrs': customAttrs diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info/html.hbs b/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info/html.hbs index 3d2a45ac90..19a44110b7 100644 --- a/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info/html.hbs +++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/panels/info/html.hbs @@ -28,6 +28,11 @@