mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
M #~: Fix sunstone performance (#1144)
(cherry picked from commit 3af2aa2da6b63aac95b02f19258ca5715916dfff)
This commit is contained in:
parent
8c87780c32
commit
f543fab68c
@ -20,13 +20,14 @@ define(function(require) {
|
||||
*/
|
||||
|
||||
var BaseFormPanel = require("utils/form-panels/form-panel");
|
||||
var Sunstone = require("sunstone");
|
||||
var OpenNebulaError = require("opennebula/error");
|
||||
var Notifier = require("utils/notifier");
|
||||
var Locale = require("utils/locale");
|
||||
var WizardFields = require("utils/wizard-fields");
|
||||
var TemplateTabsHTML = require("hbs!./create/tabs");
|
||||
var CustomTagsTable = require("utils/custom-tags-table");
|
||||
var Locale = require("utils/locale");
|
||||
var Notifier = require("utils/notifier");
|
||||
var OpenNebulaError = require("opennebula/error");
|
||||
var Sunstone = require("sunstone");
|
||||
var TemplateTabsHTML = require("hbs!./create/tabs");
|
||||
var Tips = require("utils/tips");
|
||||
var WizardFields = require("utils/wizard-fields");
|
||||
|
||||
/*
|
||||
CONSTANTS
|
||||
@ -209,7 +210,7 @@ define(function(require) {
|
||||
}
|
||||
});
|
||||
Foundation.reflow(context, "tabs");
|
||||
Foundation.reflow(context, "tooltip");
|
||||
Tips.setup(context);
|
||||
}
|
||||
|
||||
function _submitWizard(that, context) {
|
||||
|
@ -22,6 +22,7 @@ define(function(require) {
|
||||
var Sunstone = require("sunstone");
|
||||
var Locale = require("utils/locale");
|
||||
var TemplateUtils = require("utils/template-utils");
|
||||
var Tips = require("utils/tips");
|
||||
var WizardFields = require("utils/wizard-fields");
|
||||
var OpenNebulaAction = require("opennebula/action");
|
||||
var OpenNebulaTemplate = require("opennebula/template");
|
||||
@ -148,7 +149,7 @@ define(function(require) {
|
||||
});
|
||||
|
||||
Foundation.reflow(context, "tabs");
|
||||
Foundation.reflow(context, "tooltip");
|
||||
Tips.setup(context);
|
||||
}
|
||||
|
||||
function _onShow(context) {
|
||||
|
@ -142,7 +142,9 @@ define(function(require) {
|
||||
"VM.deploy" : {
|
||||
type: "custom",
|
||||
call: function() {
|
||||
Sunstone.getDialog(DEPLOY_DIALOG_ID).show();
|
||||
Sunstone.getDialog(DEPLOY_DIALOG_ID)
|
||||
.reset()
|
||||
.show();
|
||||
}
|
||||
},
|
||||
"VM.silent_deploy_action" : {
|
||||
@ -153,41 +155,41 @@ define(function(require) {
|
||||
"VM.migrate" : {
|
||||
type: "custom",
|
||||
call: function() {
|
||||
var dialog = Sunstone.getDialog(MIGRATE_DIALOG_ID);
|
||||
dialog.reset();
|
||||
dialog.setLive(false);
|
||||
dialog.setType(0);
|
||||
dialog.show();
|
||||
Sunstone.getDialog(MIGRATE_DIALOG_ID)
|
||||
.reset()
|
||||
.setLive(false)
|
||||
.setType(0)
|
||||
.show();
|
||||
}
|
||||
},
|
||||
"VM.migrate_poff" : {
|
||||
type: "custom",
|
||||
call: function() {
|
||||
var dialog = Sunstone.getDialog(MIGRATE_DIALOG_ID);
|
||||
dialog.reset();
|
||||
dialog.setLive(false);
|
||||
dialog.setType(1);
|
||||
dialog.show();
|
||||
Sunstone.getDialog(MIGRATE_DIALOG_ID)
|
||||
.reset()
|
||||
.setLive(false)
|
||||
.setType(1)
|
||||
.show();
|
||||
}
|
||||
},
|
||||
"VM.migrate_poff_hard" : {
|
||||
type: "custom",
|
||||
call: function() {
|
||||
var dialog = Sunstone.getDialog(MIGRATE_DIALOG_ID);
|
||||
dialog.reset();
|
||||
dialog.setLive(false);
|
||||
dialog.setType(2);
|
||||
dialog.show();
|
||||
Sunstone.getDialog(MIGRATE_DIALOG_ID)
|
||||
.reset()
|
||||
.setLive(false)
|
||||
.setType(2)
|
||||
.show();
|
||||
}
|
||||
},
|
||||
"VM.migrate_live" : {
|
||||
type: "custom",
|
||||
call: function() {
|
||||
var dialog = Sunstone.getDialog(MIGRATE_DIALOG_ID);
|
||||
dialog.reset();
|
||||
dialog.setLive(true);
|
||||
dialog.setType(0);
|
||||
dialog.show();
|
||||
Sunstone.getDialog(MIGRATE_DIALOG_ID)
|
||||
.reset()
|
||||
.setLive(true)
|
||||
.setType(0)
|
||||
.show();
|
||||
}
|
||||
},
|
||||
"VM.save_rdp" : {
|
||||
@ -388,8 +390,9 @@ define(function(require) {
|
||||
"VM.save_as_template" : {
|
||||
type: "single",
|
||||
call: function() {
|
||||
var dialog = Sunstone.getDialog(SAVE_AS_TEMPLATE_DIALOG_ID);
|
||||
dialog.show();
|
||||
Sunstone.getDialog(SAVE_AS_TEMPLATE_DIALOG_ID)
|
||||
.reset()
|
||||
.show();
|
||||
},
|
||||
error: function(req, resp) {
|
||||
Notifier.onError(req, resp);
|
||||
|
@ -110,6 +110,7 @@ define(function(require) {
|
||||
context.off("click", "#resize_capacity");
|
||||
context.on("click", "#resize_capacity", function() {
|
||||
var dialog = Sunstone.getDialog(RESIZE_DIALOG_ID);
|
||||
dialog.reset();
|
||||
dialog.setElement(that.element);
|
||||
dialog.show();
|
||||
dialogContext = dialog.dialogElement;
|
||||
|
@ -522,6 +522,7 @@ define(function(require) {
|
||||
context.off("click", "#attach_nic");
|
||||
context.on("click", "#attach_nic", function() {
|
||||
var dialog = Sunstone.getDialog(ATTACH_NIC_DIALOG_ID);
|
||||
dialog.reset();
|
||||
dialog.setElement(that.element);
|
||||
dialog.setNicsNames(nics_names);
|
||||
dialog.show();
|
||||
|
@ -162,6 +162,7 @@ define(function(require) {
|
||||
context.off('click', '#take_snapshot');
|
||||
context.on('click', '#take_snapshot', function() {
|
||||
var dialog = Sunstone.getDialog(SNAPSHOT_DIALOG_ID);
|
||||
dialog.reset();
|
||||
dialog.setElement(that.element);
|
||||
dialog.show();
|
||||
return false;
|
||||
@ -173,6 +174,7 @@ define(function(require) {
|
||||
context.on('click', '.snapshot_revert', function() {
|
||||
var dialog = Sunstone.getDialog(REVERT_DIALOG_ID);
|
||||
that.element.snapshot_id = $(this).parents('tr').attr('snapshot_id');
|
||||
dialog.reset();
|
||||
dialog.setElement(that.element);
|
||||
dialog.show();
|
||||
return false;
|
||||
|
@ -479,6 +479,7 @@ define(function(require) {
|
||||
$('.hypervisor.only_kvm').hide();
|
||||
$('.hypervisor.only_vcenter').show();
|
||||
}
|
||||
dialog.reset();
|
||||
dialog.show();
|
||||
return false;
|
||||
});
|
||||
|
@ -131,7 +131,7 @@ define(function(require) {
|
||||
}
|
||||
}
|
||||
})
|
||||
$(".describeCharter").on("mouseleave").on("mouseleave", function(e){
|
||||
$(".describeCharter").off("mouseleave").on("mouseleave", function(e){
|
||||
$(this).find("."+classInfo).remove();
|
||||
});
|
||||
}
|
||||
|
@ -126,6 +126,7 @@ define(function(require) {
|
||||
context.off('click', '.attach_nic');
|
||||
context.on('click', '.attach_nic', function() {
|
||||
var dialog = Sunstone.getDialog(ATTACH_NIC_DIALOG_ID);
|
||||
dialog.reset();
|
||||
dialog.setElement(that.element);
|
||||
dialog.show();
|
||||
return false;
|
||||
|
@ -76,6 +76,7 @@ define(function(require) {
|
||||
}
|
||||
|
||||
function _reset() {
|
||||
$('.reveal-overlay').remove();
|
||||
this.dialogElement.remove();
|
||||
this.dialogElement = this.insert();
|
||||
return false;
|
||||
|
@ -24,7 +24,15 @@ define(function(require) {
|
||||
require('flot.resize');
|
||||
// TODO Check if necessary require('flot.tooltip');
|
||||
require('flot.time');
|
||||
|
||||
var Humanize = require('utils/humanize');
|
||||
|
||||
/*
|
||||
VARIABLES
|
||||
*/
|
||||
|
||||
var currentGraph = undefined;
|
||||
|
||||
/*
|
||||
CONSTRUCTOR
|
||||
*/
|
||||
@ -120,7 +128,10 @@ define(function(require) {
|
||||
//options.xaxis.zoomRange = false;
|
||||
options.yaxis.panRange = false;
|
||||
if (series.length > 0) {
|
||||
$.plot(info.div_graph, series, options);
|
||||
currentGraph && currentGraph.shutdown();
|
||||
info.div_graph.removeData('plot').empty();
|
||||
|
||||
currentGraph = $.plot(info.div_graph, series, options);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,8 @@ define(function(require) {
|
||||
context = $(document);
|
||||
}
|
||||
|
||||
$('.tooltip').remove();
|
||||
|
||||
//For each tip in this context
|
||||
$('.tip', context).each(function() {
|
||||
var obj = $(this);
|
||||
|
@ -100,9 +100,10 @@ define(function (require) {
|
||||
|
||||
var response = {};
|
||||
response[object] = event_data.HOOK_MESSAGE[object];
|
||||
|
||||
var request = {
|
||||
"request": {
|
||||
"data": [response.ID],
|
||||
"data": [response[object].ID],
|
||||
"method": "show",
|
||||
"resource": object
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user