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

feature #4184: Add labels support to clusters-tab

This commit is contained in:
Daniel Molina 2015-12-17 17:42:19 +01:00 committed by Ruben S. Montero
parent 4b9956cd93
commit 8931dffb58
4 changed files with 11 additions and 2 deletions

View File

@ -317,6 +317,7 @@ tabs:
- 3 # Hosts
- 4 # VNets
- 5 # Datastores
#- 6 # Labels
actions:
Cluster.refresh: true
Cluster.create_dialog: true

View File

@ -317,6 +317,7 @@ tabs:
- 3 # Hosts
- 4 # VNets
- 5 # Datastores
#- 6 # Labels
actions:
Cluster.refresh: true
Cluster.create_dialog: true

View File

@ -318,6 +318,7 @@ tabs:
- 3 # Hosts
- 4 # VNets
- 5 # Datastores
#- 6 # Labels
actions:
Cluster.refresh: true
Cluster.create_dialog: true

View File

@ -22,6 +22,7 @@ define(function(require) {
var TabDataTable = require('utils/tab-datatable');
var SunstoneConfig = require('sunstone-config');
var Locale = require('utils/locale');
var LabelsUtils = require('utils/labels/utils');
/*
CONSTANTS
@ -30,6 +31,8 @@ define(function(require) {
var RESOURCE = "Cluster";
var XML_ROOT = "CLUSTER";
var TAB_NAME = require('./tabId');
var LABELS_COLUMN = 6;
var TEMPLATE_ATTR = 'TEMPLATE';
/*
CONSTRUCTOR
@ -41,6 +44,7 @@ define(function(require) {
this.dataTableId = dataTableId;
this.resource = RESOURCE;
this.xmlRoot = XML_ROOT;
this.labelsColumn = LABELS_COLUMN;
this.dataTableOptions = {
"bAutoWidth": false,
@ -59,7 +63,8 @@ define(function(require) {
Locale.tr("Name"),
Locale.tr("Hosts"),
Locale.tr("VNets"),
Locale.tr("Datastores")
Locale.tr("Datastores"),
Locale.tr("Labels")
];
this.selectOptions = {
@ -95,7 +100,8 @@ define(function(require) {
element.NAME,
_lengthOf(element.HOSTS.ID),
_lengthOf(element.VNETS.ID),
_lengthOf(element.DATASTORES.ID)
_lengthOf(element.DATASTORES.ID),
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||'')
];
}