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 images-tab

This commit is contained in:
Daniel Molina 2015-12-16 18:41:41 +01:00 committed by Ruben S. Montero
parent e091512640
commit a5fc775e7f
4 changed files with 10 additions and 1 deletions

View File

@ -251,6 +251,7 @@ tabs:
- 10 # Status
- 11 # #VMs
#- 12 # Target
#- 13 # Labels
actions:
Image.refresh: true
Image.create_dialog: true

View File

@ -251,6 +251,7 @@ tabs:
- 10 # Status
- 11 # #VMs
#- 12 # Target
#- 13 # Labels
actions:
Image.refresh: true
Image.create_dialog: true

View File

@ -252,6 +252,7 @@ tabs:
- 10 # Status
- 11 # #VMs
#- 12 # Target
#- 13 # Labels
actions:
Image.refresh: true
Image.create_dialog: true

View File

@ -25,6 +25,7 @@ define(function(require) {
var Humanize = require('utils/humanize');
var Notifier = require('utils/notifier');
var OpenNebulaImage = require('opennebula/image');
var LabelsUtils = require('utils/labels/utils');
/*
CONSTANTS
@ -33,6 +34,8 @@ define(function(require) {
var RESOURCE = "Image"
var XML_ROOT = "IMAGE"
var TAB_NAME = require('./tabId');
var LABELS_COLUMN = 13;
var TEMPLATE_ATTR = 'TEMPLATE';
/*
CONSTRUCTOR
@ -44,6 +47,7 @@ define(function(require) {
this.dataTableId = dataTableId;
this.resource = RESOURCE;
this.xmlRoot = XML_ROOT;
this.labelsColumn = LABELS_COLUMN;
this.dataTableOptions = {
"bAutoWidth": false,
@ -70,6 +74,7 @@ define(function(require) {
Locale.tr("Status"),
Locale.tr("#VMS"),
Locale.tr("Target"),
Locale.tr("Labels")
]
this.selectOptions = {
@ -125,7 +130,8 @@ define(function(require) {
parseInt(element.PERSISTENT) ? "yes" : "no",
OpenNebulaImage.stateStr(element.STATE),
element.RUNNING_VMS,
element.TEMPLATE.TARGET ? element.TEMPLATE.TARGET : '--'
element.TEMPLATE.TARGET ? element.TEMPLATE.TARGET : '--',
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||'')
];
}