1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Bug #4553: In vCenter import results dialog there are two import

buttons
This commit is contained in:
Jaime Melis 2016-08-31 10:32:20 +02:00 committed by Tino Vazquez
parent 0c3b229a91
commit dda2dffa1d
5 changed files with 12 additions and 61 deletions

View File

@ -108,7 +108,6 @@ define(function(require) {
var that = this;
Sunstone.hideFormPanelLoading(TAB_ID);
Sunstone.disableFormPanelSubmit(TAB_ID);
this.vCenterDatastores.import(context);

View File

@ -81,7 +81,7 @@ define(function(require) {
$.each(response, function(datacenter_name, datastores){
var content;
if (datastores.length == 0) {
content =
content =
'<fieldset>' +
'<legend>' +
'<ul class="menu simple">' +
@ -100,18 +100,13 @@ define(function(require) {
$(".vcenter_datacenter_list", context).append(content);
} else {
var tableId = "vcenter_datastore_table" + UniqueId.id();
content =
content =
'<fieldset>' +
'<legend>' +
'<ul class="menu simple">' +
'<li> ' +
datacenter_name + ' ' + Locale.tr("DataCenter") +
'</li>' +
'<li> ' +
'<button class="button small success import_selected">' +
Locale.tr("Import Selected Datastores") +
'</button>' +
'</li>' +
'<li> ' +
'<button class="button small secondary clear_imported">' +
Locale.tr("Clear Imported Datastores") +
@ -195,13 +190,6 @@ define(function(require) {
_recountCheckboxes($('table', newdiv));
});
context.off('click', '.import_selected');
context.on('click', '.import_selected', function() {
tableContext = $(this).closest('fieldset');
_import(tableContext);
return false;
});
context.off('click', '.clear_imported');
context.on('click', '.clear_imported', function() {
_fillVCenterDatastores(opts);

View File

@ -43,7 +43,7 @@ define(function(require) {
}
/*
Retrieve the list of images from a vCenter DS and fill
Retrieve the list of images from a vCenter DS and fill
the container with them
opts = {
@ -77,7 +77,7 @@ define(function(require) {
$(".vcenter_datacenter_list", context).html("");
if (response.length == 0) {
content =
content =
'<fieldset>' +
'<legend>' +
'<ul class="menu simple">' +
@ -96,18 +96,13 @@ define(function(require) {
$(".vcenter_datacenter_list", context).append(content);
} else {
var tableId = "vcenter_image_table_" + UniqueId.id();
content =
content =
'<fieldset>' +
'<legend>' +
'<ul class="menu simple">' +
'<li> ' +
opts.vcenter_datastore + ' ' + Locale.tr("Datastore") +
'</li>' +
'<li> ' +
'<button class="button small success import_selected">' +
Locale.tr("Import Selected Images") +
'</button>' +
'</li>' +
'<li> ' +
'<button class="button small secondary clear_imported">' +
Locale.tr("Clear Imported Images") +
@ -148,7 +143,7 @@ define(function(require) {
$(".check_item", trow).data("datastore_id", image.dsid)
$(".check_item", trow).data("one_template", image.one)
});
var imageDataTable = new DomDataTable(
@ -185,13 +180,6 @@ define(function(require) {
_recountCheckboxes($('table', newdiv));
});
context.off('click', '.import_selected');
context.on('click', '.import_selected', function() {
tableContext = $(this).closest('fieldset');
_import(tableContext);
return false;
});
context.off('click', '.clear_imported');
context.on('click', '.clear_imported', function() {
_fillVCenterImages(opts);
@ -256,7 +244,7 @@ define(function(require) {
{
error_message_str = error_message_str + ". Please disable DATASTORE_CAPACITY_CHECK in /etc/one/oned.conf and restart OpenNebula "
}
$(".vcenter_image_result", image_context).html('<p style="font-size:12px" class="error-color">' +
(error_message_str || Locale.tr("Cannot contact server: is it running and reachable?")) +
'</p>');

View File

@ -80,7 +80,7 @@ define(function(require) {
$.each(response, function(datacenter_name, networks) {
var content;
if (networks.length == 0) {
content =
content =
'<fieldset>' +
'<legend>' +
'<ul class="menu simple">' +
@ -99,7 +99,7 @@ define(function(require) {
$(".vcenter_datacenter_list", context).append(content);
} else {
var tableId = "vcenter_network_table_" + UniqueId.id();
content =
content =
'<fieldset>' +
'<legend>' +
'<ul class="menu simple">' +
@ -118,11 +118,6 @@ define(function(require) {
Locale.tr("Expand Advanced Sections") +
'</label>' +
'</li>' +
'<li> ' +
'<button class="button small success import_selected">' +
Locale.tr("Import Selected Networks") +
'</button>' +
'</li>' +
'<li> ' +
'<button class="button small secondary clear_imported">' +
Locale.tr("Clear Imported Networks") +
@ -166,13 +161,6 @@ define(function(require) {
networksTable.addData(networks);
context.off('click', '.import_selected');
context.on('click', '.import_selected', function() {
tableContext = $(this).closest('fieldset');
_import(tableContext);
return false;
});
context.off('click', '.clear_imported');
context.on('click', '.clear_imported', function() {
_fillVCenterNetworks(opts);

View File

@ -81,7 +81,7 @@ define(function(require) {
$.each(response, function(datacenter_name, templates){
var content;
if (templates.length == 0) {
content =
content =
'<fieldset>' +
'<legend>' +
'<ul class="menu simple">' +
@ -100,7 +100,7 @@ define(function(require) {
$(".vcenter_datacenter_list", context).append(content);
} else {
var tableId = "vcenter_template_table_" + UniqueId.id();
content =
content =
'<fieldset>' +
'<legend>' +
'<ul class="menu simple">' +
@ -119,11 +119,6 @@ define(function(require) {
Locale.tr("Expand Advanced Sections") +
'</label>' +
'</li>' +
'<li> ' +
'<button class="button small success import_selected">' +
Locale.tr("Import Selected Templates") +
'</button>' +
'</li>' +
'<li> ' +
'<button class="button small secondary clear_imported">' +
Locale.tr("Clear Imported Templates") +
@ -176,13 +171,6 @@ define(function(require) {
templatesTable.addData(templates);
context.off('click', '.import_selected');
context.on('click', '.import_selected', function() {
tableContext = $(this).closest('fieldset');
_import(tableContext);
return false;
});
context.off('click', '.clear_imported');
context.on('click', '.clear_imported', function() {
_fillVCenterTemplates(opts);
@ -260,7 +248,7 @@ define(function(require) {
userInputs.push('RESOURCE_POOL="' + rpUserInputs + '"');
}
}
// Append new attrs and user inputs if necessary
var template = $(this).data("one_template");