mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Small UIs fixes
Improve certain requests in Sunstone which worked but were malformed. Fix dashboard links in SelfService. Increase menu column size. Fix vm show for machines with no history (not deployed). (cherry picked from commit 195c22b1691a86dcffe2caa7317c318d2bb7c1cd)
This commit is contained in:
parent
3c000bbcf1
commit
9b1c967bdb
@ -133,7 +133,7 @@ $(document).ready(function () {
|
||||
applyDefaultStyles: false
|
||||
, center__paneSelector: ".outer-center"
|
||||
, west__paneSelector: ".outer-west"
|
||||
, west__size: 133
|
||||
, west__size: 160
|
||||
, north__size: 26
|
||||
, south__size: 26
|
||||
, spacing_open: 0 // ALL panes
|
||||
|
@ -149,14 +149,14 @@ $(document).ready(function(){
|
||||
});
|
||||
|
||||
$('.tab_link').click(function(){
|
||||
var to= $(this).attr('href');
|
||||
$('.outer-west ul li.topTab a[href="'+to+'"]').trigger("click");
|
||||
var to= $(this).attr('href').slice(1);
|
||||
$('.outer-west ul li#li_'+to).trigger("click");
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.action_link').click(function(){
|
||||
var to= $(this).attr('href');
|
||||
$('.outer-west ul li.topTab a[href="'+to+'"]').trigger("click");
|
||||
var to= $(this).attr('href').slice(1);
|
||||
$('.outer-west ul li#li_'+to).trigger("click");
|
||||
var action = $(this).attr('action');
|
||||
Sunstone.runAction(action);
|
||||
|
||||
|
@ -331,10 +331,6 @@ function datastoreElements() {
|
||||
return getSelectedNodes(dataTable_datastores);
|
||||
}
|
||||
|
||||
function vmShow(req) {
|
||||
Sunstone.runAction("Datastore.show",req.request.data[0]);
|
||||
}
|
||||
|
||||
function datastoreElementArray(element_json){
|
||||
var element = element_json.DATASTORE;
|
||||
|
||||
|
@ -415,7 +415,7 @@ var image_actions = {
|
||||
type: "single",
|
||||
call: OpenNebula.Image.chtype,
|
||||
callback: function (req) {
|
||||
Sunstone.runAction("Image.show",req.request.data[0]);
|
||||
Sunstone.runAction("Image.show",req.request.data[0][0]);
|
||||
},
|
||||
elements: imageElements,
|
||||
error: onError,
|
||||
@ -804,6 +804,7 @@ function setupCreateImageDialog(){
|
||||
action: 'upload',
|
||||
multiple: false,
|
||||
params: {},
|
||||
sizeLimit: 0,
|
||||
showMessage: function(message){
|
||||
//notifyMessage(message);
|
||||
},
|
||||
@ -813,7 +814,7 @@ function setupCreateImageDialog(){
|
||||
file: fileName
|
||||
});
|
||||
var pos_top = $(window).height() - 120;
|
||||
var pos_left = 140;
|
||||
var pos_left = 190;
|
||||
var pb_dialog = $('<div id="pb_dialog" title="'+
|
||||
tr("Uploading...")+'">'+
|
||||
'<div id="upload-progress"></div>'+
|
||||
|
@ -839,7 +839,7 @@ function templateElements(){
|
||||
|
||||
//Runs a show action on the template with from a prev request
|
||||
function templateShow(req){
|
||||
Sunstone.runAction("Template.show",req.request.data[0]);
|
||||
Sunstone.runAction("Template.show",req.request.data[0][0]);
|
||||
}
|
||||
|
||||
// Returns an array containing the values of the template_json and ready
|
||||
|
@ -141,7 +141,7 @@ var user_actions = {
|
||||
type: "multiple",
|
||||
call: OpenNebula.User.chgrp,
|
||||
callback : function(req){
|
||||
Sunstone.runAction("User.show",req.request.data[0]);
|
||||
Sunstone.runAction("User.show",req.request.data[0][0]);
|
||||
},
|
||||
elements : userElements,
|
||||
error: onError,
|
||||
@ -152,7 +152,7 @@ var user_actions = {
|
||||
type: "multiple",
|
||||
call: OpenNebula.User.chauth,
|
||||
callback : function(req){
|
||||
Sunstone.runAction("User.show",req.request.data[0]);
|
||||
Sunstone.runAction("User.show",req.request.data[0][0]);
|
||||
},
|
||||
elements: userElements,
|
||||
error: onError,
|
||||
|
@ -598,7 +598,7 @@ var vm_info_panel = {
|
||||
title: tr("History information"),
|
||||
content: "",
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var vms_tab = {
|
||||
title: tr("Virtual Machines"),
|
||||
@ -606,7 +606,7 @@ var vms_tab = {
|
||||
buttons: vm_buttons,
|
||||
tabClass: 'subTab',
|
||||
parentTab: 'vres_tab'
|
||||
}
|
||||
};
|
||||
|
||||
Sunstone.addActions(vm_actions);
|
||||
Sunstone.addMainTab('vms_tab',vms_tab);
|
||||
@ -615,11 +615,11 @@ Sunstone.addInfoPanel('vm_info_panel',vm_info_panel);
|
||||
|
||||
function vmElements() {
|
||||
return getSelectedNodes(dataTable_vMachines);
|
||||
}
|
||||
};
|
||||
|
||||
function vmShow(req) {
|
||||
Sunstone.runAction("VM.show",req.request.data[0]);
|
||||
}
|
||||
};
|
||||
|
||||
// Returns a human readable running time for a VM
|
||||
function str_start_time(vm){
|
||||
@ -740,11 +740,12 @@ function generateHistoryTable(vm){
|
||||
<tbody>';
|
||||
|
||||
var history = [];
|
||||
|
||||
if ($.isArray(vm.HISTORY_RECORDS.HISTORY))
|
||||
history = vm.HISTORY_RECORDS.HISTORY;
|
||||
else if (vm.HISTORY_RECORDS.HISTORY.SEQ)
|
||||
history = [vm.HISTORY_RECORDS.HISTORY];
|
||||
if (vm.HISTORY_RECORDS.HISTORY){
|
||||
if ($.isArray(vm.HISTORY_RECORDS.HISTORY))
|
||||
history = vm.HISTORY_RECORDS.HISTORY;
|
||||
else if (vm.HISTORY_RECORDS.HISTORY.SEQ)
|
||||
history = [vm.HISTORY_RECORDS.HISTORY];
|
||||
};
|
||||
|
||||
var now = Math.round(new Date().getTime() / 1000);
|
||||
|
||||
|
@ -473,7 +473,7 @@ function vnElements(){
|
||||
}
|
||||
|
||||
function vnShow(req){
|
||||
Sunstone.runAction("Network.show",req.request.data[0]);
|
||||
Sunstone.runAction("Network.show",req.request.data[0][0]);
|
||||
}
|
||||
|
||||
//returns an array with the VNET information fetched from the JSON object
|
||||
|
Loading…
x
Reference in New Issue
Block a user