mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09:00
Bug #4619: Fix labels for Virtual Routers
This commit is contained in:
1 parent
f218afa390
commit
8a1621ef7e
3 files changed
+19
-3
No files matched your search
@@ -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])||'')
|
||||
];
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user