mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
Bug #4619: Fix labels for Virtual Routers
(cherry picked from commit 8a1621ef7e74014a9e2e4ac519d08337eec8dc01)
This commit is contained in:
parent
35f9b6a4c9
commit
856180bd81
@ -73,7 +73,11 @@ module OpenNebulaJSON
|
||||
end
|
||||
|
||||
def update(params=Hash.new)
|
||||
super(params['template_raw'])
|
||||
if !params['append'].nil?
|
||||
super(params['template_raw'], params['append'])
|
||||
else
|
||||
super(params['template_raw'])
|
||||
end
|
||||
end
|
||||
|
||||
def chown(params=Hash.new)
|
||||
|
@ -52,6 +52,10 @@ define(function(require) {
|
||||
var action_obj = {"template_raw" : params.data.extra_param};
|
||||
OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj);
|
||||
},
|
||||
"append": function(params) {
|
||||
var action_obj = {"template_raw" : params.data.extra_param, append : true};
|
||||
OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj);
|
||||
},
|
||||
"rename" : function(params) {
|
||||
var action_obj = params.data.extra_param;
|
||||
OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj);
|
||||
|
@ -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 = "VirtualRouter";
|
||||
var XML_ROOT = "VROUTER";
|
||||
var TAB_NAME = require('./tabId');
|
||||
var LABELS_COLUMN = 5;
|
||||
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,
|
||||
@ -58,7 +62,8 @@ define(function(require) {
|
||||
Locale.tr("ID"),
|
||||
Locale.tr("Owner"),
|
||||
Locale.tr("Group"),
|
||||
Locale.tr("Name")
|
||||
Locale.tr("Name"),
|
||||
Locale.tr("Labels")
|
||||
];
|
||||
|
||||
this.selectOptions = {
|
||||
@ -70,6 +75,8 @@ define(function(require) {
|
||||
"you_selected_multiple": Locale.tr("You selected the following virtual routers:")
|
||||
};
|
||||
|
||||
this.labels = [];
|
||||
|
||||
TabDataTable.call(this);
|
||||
}
|
||||
|
||||
@ -93,7 +100,8 @@ define(function(require) {
|
||||
element.ID,
|
||||
element.UNAME,
|
||||
element.GNAME,
|
||||
element.NAME
|
||||
element.NAME,
|
||||
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||'')
|
||||
];
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user