diff --git a/src/sunstone/public/app/tabs/clusters-tab/panels/info.js b/src/sunstone/public/app/tabs/clusters-tab/panels/info.js index 8228d98ba4..40bbcc219f 100644 --- a/src/sunstone/public/app/tabs/clusters-tab/panels/info.js +++ b/src/sunstone/public/app/tabs/clusters-tab/panels/info.js @@ -101,7 +101,8 @@ define(function(require) { dialog.setParams( { element: that.element, action : "Cluster.append_template", - resourceName : Locale.tr("Cluster") + resourceName : Locale.tr("Cluster"), + tabId : TAB_ID }); dialog.show(); diff --git a/src/sunstone/public/app/tabs/groups-tab/actions.js b/src/sunstone/public/app/tabs/groups-tab/actions.js index 3b00cb1889..331128aa75 100644 --- a/src/sunstone/public/app/tabs/groups-tab/actions.js +++ b/src/sunstone/public/app/tabs/groups-tab/actions.js @@ -81,8 +81,8 @@ define(function(require) { "Group.set_quota" : { type: "multiple", call: OpenNebulaResource.set_quota, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); }, callback: function(request) { Sunstone.getDialog(QUOTAS_DIALOG_ID).hide(); diff --git a/src/sunstone/public/app/tabs/groups-tab/dialogs/quotas/html.hbs b/src/sunstone/public/app/tabs/groups-tab/dialogs/quotas/html.hbs index d92edcbec5..ac56288335 100644 --- a/src/sunstone/public/app/tabs/groups-tab/dialogs/quotas/html.hbs +++ b/src/sunstone/public/app/tabs/groups-tab/dialogs/quotas/html.hbs @@ -18,6 +18,7 @@

{{tr "Update Quota"}}

+
diff --git a/src/sunstone/public/app/tabs/hosts-tab/actions.js b/src/sunstone/public/app/tabs/hosts-tab/actions.js index 58ea9f3571..513cb25b65 100644 --- a/src/sunstone/public/app/tabs/hosts-tab/actions.js +++ b/src/sunstone/public/app/tabs/hosts-tab/actions.js @@ -95,8 +95,8 @@ define(function(require) { }); } }, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); } } }; diff --git a/src/sunstone/public/app/tabs/hosts-tab/panels/info.js b/src/sunstone/public/app/tabs/hosts-tab/panels/info.js index a254f2cf96..1a7939dd6b 100644 --- a/src/sunstone/public/app/tabs/hosts-tab/panels/info.js +++ b/src/sunstone/public/app/tabs/hosts-tab/panels/info.js @@ -129,7 +129,8 @@ define(function(require) { dialog.setParams( { element: that.element, action : "Host.append_template", - resourceName : Locale.tr("Host") + resourceName : Locale.tr("Host"), + tabId : TAB_ID }); dialog.show(); diff --git a/src/sunstone/public/app/tabs/images-tab/dialogs/clone.js b/src/sunstone/public/app/tabs/images-tab/dialogs/clone.js index 9b06643356..12888cb49d 100644 --- a/src/sunstone/public/app/tabs/images-tab/dialogs/clone.js +++ b/src/sunstone/public/app/tabs/images-tab/dialogs/clone.js @@ -113,7 +113,10 @@ define(function(require) { } function _onShow(dialog) { - var sel_elems = Sunstone.getDataTable(IMAGES_TAB_ID).elements(); + var sel_elems = Sunstone.getDataTable(IMAGES_TAB_ID).elements({names: true}); + + this.setNames(sel_elems); + //show different text depending on how many elements are selected if (sel_elems.length > 1) { $('.clone_one', dialog).hide(); @@ -122,7 +125,7 @@ define(function(require) { } else { $('.clone_one', dialog).show(); $('.clone_several', dialog).hide(); - $('input[name="image_clone_name"]', dialog).val('Copy of ' + OpenNebulaImage.getName(sel_elems[0])); + $('input[name="image_clone_name"]', dialog).val('Copy of ' + sel_elems[0].name); }; this.datastoreTable.resetResourceTableSelect(); diff --git a/src/sunstone/public/app/tabs/images-tab/dialogs/clone/html.hbs b/src/sunstone/public/app/tabs/images-tab/dialogs/clone/html.hbs index bf0fe49395..ea7568a3eb 100644 --- a/src/sunstone/public/app/tabs/images-tab/dialogs/clone/html.hbs +++ b/src/sunstone/public/app/tabs/images-tab/dialogs/clone/html.hbs @@ -18,6 +18,7 @@

{{tr "Clone Image"}}

+
diff --git a/src/sunstone/public/app/tabs/images-tab/panels/snapshots.js b/src/sunstone/public/app/tabs/images-tab/panels/snapshots.js index 4a119330a9..66560e8f3b 100644 --- a/src/sunstone/public/app/tabs/images-tab/panels/snapshots.js +++ b/src/sunstone/public/app/tabs/images-tab/panels/snapshots.js @@ -33,6 +33,7 @@ define(function(require){ CONSTANTS */ + var TAB_ID = require('../tabId'); var PANEL_ID = require('./snapshots/panelId'); var RESOURCE = "Image"; var XML_ROOT = "IMAGE"; @@ -126,6 +127,7 @@ define(function(require){ Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({ //header : + headerTabId: TAB_ID, body : Locale.tr("This will delete all the other image snapshots"), //question : submit : function(){ @@ -158,6 +160,7 @@ define(function(require){ Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({ //header : + headerTabId: TAB_ID, body : Locale.tr("This will delete the image snapshot "+snapshot_id), //question : submit : function(){ diff --git a/src/sunstone/public/app/tabs/marketplaceapps-tab/actions.js b/src/sunstone/public/app/tabs/marketplaceapps-tab/actions.js index 616790792e..17917c8e87 100644 --- a/src/sunstone/public/app/tabs/marketplaceapps-tab/actions.js +++ b/src/sunstone/public/app/tabs/marketplaceapps-tab/actions.js @@ -82,8 +82,8 @@ define(function(require) { OpenNebulaAction.clear_cache("IMAGE"); OpenNebulaAction.clear_cache("VMTEMPLATE"); }, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); }, error: function(request, response){ // without tab id param to work for both templates and vms tab @@ -101,8 +101,8 @@ define(function(require) { window.open("http://localhost:9869/marketplaceapp/"+this+"/download?csrftoken="+csrftoken, "_blank"); }); }, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); }, error: Notifier.onError }, diff --git a/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale.js b/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale.js index b39d27a85c..b3edd5e5a2 100644 --- a/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale.js +++ b/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale.js @@ -64,6 +64,7 @@ define(function(require) { } function _onShow(context) { + this.setNames( Sunstone.getDataTable(TAB_ID).elements({names: true}) ); } function _setup(context) { diff --git a/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale/html.hbs b/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale/html.hbs index f8b1f801c1..7aaf65c972 100644 --- a/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale/html.hbs +++ b/src/sunstone/public/app/tabs/oneflow-services-tab/dialogs/scale/html.hbs @@ -18,6 +18,7 @@

{{tr "Scale"}}

+
diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/actions.js b/src/sunstone/public/app/tabs/oneflow-templates-tab/actions.js index 49e98b42f7..b75abad94b 100644 --- a/src/sunstone/public/app/tabs/oneflow-templates-tab/actions.js +++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/actions.js @@ -68,8 +68,8 @@ define(function(require) { Notifier.notifyCustom(Locale.tr("Service created"), " ID: " + response.DOCUMENT.ID, false); }, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); }, error: function(request, response){ Sunstone.hideFormPanelLoading(TAB_ID); diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/dialogs/clone.js b/src/sunstone/public/app/tabs/oneflow-templates-tab/dialogs/clone.js index 7817c6f4db..342eacd1dc 100644 --- a/src/sunstone/public/app/tabs/oneflow-templates-tab/dialogs/clone.js +++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/dialogs/clone.js @@ -93,7 +93,10 @@ define(function(require) { } function _onShow(context) { - var sel_elems = Sunstone.getDataTable(ONEFLOW_TEMPLATES_TAB_ID).elements(); + var sel_elems = Sunstone.getDataTable(ONEFLOW_TEMPLATES_TAB_ID).elements({names: true}); + + this.setNames(sel_elems); + //show different text depending on how many elements are selected if (sel_elems.length > 1) { $('.clone_one', context).hide(); @@ -102,7 +105,7 @@ define(function(require) { } else { $('.clone_one', context).show(); $('.clone_several', context).hide(); - $('input[name="name"]', context).val('Copy of ' + OpenNebulaServiceTemplate.getName(sel_elems[0])); + $('input[name="name"]', context).val('Copy of ' + sel_elems[0].name); }; $("input[name='name']", context).focus(); diff --git a/src/sunstone/public/app/tabs/oneflow-templates-tab/dialogs/clone/html.hbs b/src/sunstone/public/app/tabs/oneflow-templates-tab/dialogs/clone/html.hbs index 1fdbfdd8d7..c3f48428f4 100644 --- a/src/sunstone/public/app/tabs/oneflow-templates-tab/dialogs/clone/html.hbs +++ b/src/sunstone/public/app/tabs/oneflow-templates-tab/dialogs/clone/html.hbs @@ -18,6 +18,7 @@

{{tr "Clone Service Template"}}

+
diff --git a/src/sunstone/public/app/tabs/secgroups-tab/actions.js b/src/sunstone/public/app/tabs/secgroups-tab/actions.js index 29bdd22456..69004f72df 100644 --- a/src/sunstone/public/app/tabs/secgroups-tab/actions.js +++ b/src/sunstone/public/app/tabs/secgroups-tab/actions.js @@ -75,6 +75,7 @@ define(function(require) { call: function() { Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({ //header : + headerTabId: TAB_ID, body : Locale.tr( "Please note: each time the rules are edited, the commit operation is done automatically. "+ "

"+ diff --git a/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone.js b/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone.js index 9c0812fdf6..c7758d3e94 100644 --- a/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone.js +++ b/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone.js @@ -93,7 +93,9 @@ define(function(require) { } function _onShow(context) { - var sel_elems = Sunstone.getDataTable(TAB_ID).elements(); + var sel_elems = Sunstone.getDataTable(TAB_ID).elements({names: true}); + + this.setNames(sel_elems); //show different text depending on how many elements are selected if (sel_elems.length > 1) { @@ -104,7 +106,7 @@ define(function(require) { $('.clone_one', context).show(); $('.clone_several', context).hide(); - $('input',context).val('Copy of ' + OpenNebulaSecurityGroup.getName(sel_elems[0])); + $('input',context).val('Copy of ' + sel_elems[0].name); } $("input[name='name']",context).focus(); diff --git a/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone/html.hbs b/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone/html.hbs index 69d0899f77..83343915f9 100644 --- a/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone/html.hbs +++ b/src/sunstone/public/app/tabs/secgroups-tab/dialogs/clone/html.hbs @@ -18,6 +18,7 @@

{{tr "Clone Security Group"}}

+
diff --git a/src/sunstone/public/app/tabs/templates-tab/actions-common.js b/src/sunstone/public/app/tabs/templates-tab/actions-common.js index ff82c07b7f..dc7b303a7f 100644 --- a/src/sunstone/public/app/tabs/templates-tab/actions-common.js +++ b/src/sunstone/public/app/tabs/templates-tab/actions-common.js @@ -82,8 +82,8 @@ define(function(require) { var elementId = request.request.data[0][0].toString(); Sunstone.getDataTable(TAB_ID).deleteElement(elementId); }, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); }, error: Notifier.onError, notify: true @@ -106,8 +106,8 @@ define(function(require) { callback : function(request, response) { Sunstone.runAction(RESOURCE+".show", req.request.data[0][0]); }, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); }, error: Notifier.onError, notify: false @@ -127,8 +127,8 @@ define(function(require) { callback : function(request, response) { Sunstone.runAction(RESOURCE+".show", req.request.data[0][0]); }, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); }, error: Notifier.onError, notify: false @@ -157,8 +157,8 @@ define(function(require) { Notifier.notifyCustom(Locale.tr("VM created"), " ID: " + response, false); }, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); }, error: function(request, response){ // without tab id param to work for both templates and vms tab diff --git a/src/sunstone/public/app/tabs/templates-tab/dialogs/clone.js b/src/sunstone/public/app/tabs/templates-tab/dialogs/clone.js index 36431b2ae5..186c67a4de 100644 --- a/src/sunstone/public/app/tabs/templates-tab/dialogs/clone.js +++ b/src/sunstone/public/app/tabs/templates-tab/dialogs/clone.js @@ -114,7 +114,10 @@ define(function(require) { } function _onShow(context) { - var sel_elems = Sunstone.getDataTable(this.tabId).elements(); + var sel_elems = Sunstone.getDataTable(this.tabId).elements({names: true}); + + this.setNames(sel_elems); + //show different text depending on how many elements are selected if (sel_elems.length > 1) { $('.clone_one', context).hide(); @@ -123,7 +126,7 @@ define(function(require) { } else { $('.clone_one', context).show(); $('.clone_several', context).hide(); - $('input[name="name"]', context).val('Copy of ' + OpenNebulaTemplate.getName(sel_elems[0])); + $('input[name="name"]', context).val('Copy of ' + sel_elems[0].name); }; $("input[name='name']", context).focus(); diff --git a/src/sunstone/public/app/tabs/templates-tab/dialogs/clone/html.hbs b/src/sunstone/public/app/tabs/templates-tab/dialogs/clone/html.hbs index 25de7b7b53..df7c0c7978 100644 --- a/src/sunstone/public/app/tabs/templates-tab/dialogs/clone/html.hbs +++ b/src/sunstone/public/app/tabs/templates-tab/dialogs/clone/html.hbs @@ -18,6 +18,7 @@

{{tr "Clone Template"}}

+
diff --git a/src/sunstone/public/app/tabs/users-tab/actions.js b/src/sunstone/public/app/tabs/users-tab/actions.js index 11e354acad..1f3c203693 100644 --- a/src/sunstone/public/app/tabs/users-tab/actions.js +++ b/src/sunstone/public/app/tabs/users-tab/actions.js @@ -245,8 +245,8 @@ define(function(require) { "User.set_quota" : { type: "multiple", call: OpenNebulaResource.set_quota, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); }, callback: function(request) { Sunstone.getDialog(QUOTAS_DIALOG_ID).hide(); diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js b/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js index 28268b43cd..6352e28424 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js @@ -95,6 +95,7 @@ define(function(require) { } function _onShow(context) { + this.setNames( Sunstone.getDataTable(TAB_ID).elements({names: true}) ); return false; } diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver/html.hbs b/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver/html.hbs index bc48879c05..aaecd0cc1f 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver/html.hbs +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver/html.hbs @@ -18,6 +18,7 @@

{{tr "Change authentication"}}

+
diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/groups.js b/src/sunstone/public/app/tabs/users-tab/dialogs/groups.js index 62f00aa65e..2a03df1c27 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/groups.js +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/groups.js @@ -34,6 +34,7 @@ define(function(require) { */ var DIALOG_ID = require('./groups/dialogId'); + var TAB_ID = require('../tabId'); /* CONSTRUCTOR @@ -121,6 +122,8 @@ define(function(require) { } function _onShow(dialog) { + this.setNames( Sunstone.getDataTable(TAB_ID).elements({names: true}) ); + this.groupsTable.refreshResourceTableSelect(); if (this.originalGroupIds !== undefined && this.originalGroupIds.length > 0) { diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/groups/html.hbs b/src/sunstone/public/app/tabs/users-tab/dialogs/groups/html.hbs index 73b79c6703..a4810049c1 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/groups/html.hbs +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/groups/html.hbs @@ -18,6 +18,7 @@

{{tr "Select Secondary Groups"}}

+
diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/password.js b/src/sunstone/public/app/tabs/users-tab/dialogs/password.js index 5b6f94a631..1a5ed8a9e5 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/password.js +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/password.js @@ -105,6 +105,7 @@ define(function(require) { } function _onShow(context) { + this.setNames( Sunstone.getDataTable(TAB_ID).elements({names: true}) ); return false; } diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/password/html.hbs b/src/sunstone/public/app/tabs/users-tab/dialogs/password/html.hbs index 1f64b62f95..2f16565523 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/password/html.hbs +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/password/html.hbs @@ -18,6 +18,7 @@

{{tr "Update Password"}}

+
diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/quotas/html.hbs b/src/sunstone/public/app/tabs/users-tab/dialogs/quotas/html.hbs index 883f1528fd..cf9a6d368c 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/quotas/html.hbs +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/quotas/html.hbs @@ -18,6 +18,7 @@

{{tr "Update Quota"}}

+
diff --git a/src/sunstone/public/app/tabs/vms-tab/actions.js b/src/sunstone/public/app/tabs/vms-tab/actions.js index cb12f2f9e1..ca7172870b 100644 --- a/src/sunstone/public/app/tabs/vms-tab/actions.js +++ b/src/sunstone/public/app/tabs/vms-tab/actions.js @@ -217,8 +217,8 @@ define(function(require) { Sunstone.runAction("VM.refresh"); }, - elements: function() { - return Sunstone.getDataTable(TAB_ID).elements(); + elements: function(opts) { + return Sunstone.getDataTable(TAB_ID).elements(opts); }, error: function(request, response) { Sunstone.hideFormPanelLoading(TAB_ID); diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-disk.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-disk.js index 9b2f0e4dcb..412e0b2a06 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-disk.js +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-disk.js @@ -90,8 +90,10 @@ define(function(require) { } function _onShow(context) { + this.setNames( Sunstone.getDataTable(TAB_ID).elements({names: true}) ); + this.diskTab.onShow(context); - $("#vm_id", context).val(this.element.ID); + return false; } diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-disk/html.hbs b/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-disk/html.hbs index e686bb005d..866874560f 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-disk/html.hbs +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/attach-disk/html.hbs @@ -20,14 +20,9 @@

{{tr "Attach new disk"}}

+
-
-
- - -
-
{{{diskTabHTML}}} +
-
-
- - -
-
{{{nicTabHTML}}} +
diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-saveas.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-saveas.js index c1bcacb5c8..6f09c183c2 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-saveas.js +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-saveas.js @@ -92,7 +92,7 @@ define(function(require) { } function _onShow(context) { - $("#vm_id", context).val(this.element.ID); + this.setNames( Sunstone.getDataTable(TAB_ID).elements({names: true}) ); $("#disk_id", context).val(this.diskId); $("#snapshot_id", context).val(this.snapshotId); $("#image_name", context).focus(); diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-saveas/html.hbs b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-saveas/html.hbs index cfbc0ddbcd..d996e037fd 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-saveas/html.hbs +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-saveas/html.hbs @@ -20,20 +20,15 @@

{{tr "Disk Saveas"}}

+
-
- - -
-
-
-
+
diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot.js index 37f31a8cce..94634a97a5 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot.js +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot.js @@ -84,7 +84,7 @@ define(function(require) { } function _onShow(context) { - $("#vm_id", context).val(this.element.ID); + this.setNames( Sunstone.getDataTable(TAB_ID).elements({names: true}) ); $("#disk_id", context).val(this.diskId); $("#snapshot_name", context).focus(); return false; diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot/html.hbs b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot/html.hbs index fce2545266..3cc2f81851 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot/html.hbs +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/disk-snapshot/html.hbs @@ -20,13 +20,10 @@

{{tr "Disk Snapshot"}}

+
-
- - -
diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate.js index 95ef044184..ac554fae91 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate.js +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate.js @@ -133,11 +133,11 @@ define(function(require) { var element = vm_json.VM; var hostname = OpenNebulaVM.hostnameStr(element); - $("#current_hosts_of_vms").append( + $('.confirm-resources-header', context).append( '' + - Locale.tr("VM") + ' [' + element.ID + '] ' + + Locale.tr("VM") + ' ' + element.ID + ' '+ element.NAME +' ' + Locale.tr("is currently running on Host") + - ' [' + hostname + ']
' + ' ' + hostname + '
' ); } }); diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate/html.hbs b/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate/html.hbs index 03a62a6b69..abab01173c 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate/html.hbs +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/migrate/html.hbs @@ -20,11 +20,10 @@

{{tr "Migrate Virtual Machine"}}

+
+
-
-
-
{{tr "Select a Host"}} @@ -34,7 +33,7 @@
-
+
-
- -
-
+
-
-
- - -
-
diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/snapshot.js b/src/sunstone/public/app/tabs/vms-tab/dialogs/snapshot.js index 62835c0ae2..baaae8222b 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/snapshot.js +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/snapshot.js @@ -83,7 +83,7 @@ define(function(require) { } function _onShow(context) { - $("#vm_id", context).val(this.element.ID); + this.setNames( Sunstone.getDataTable(TAB_ID).elements({names: true}) ); $("#snapshot_name", context).focus(); return false; } diff --git a/src/sunstone/public/app/tabs/vms-tab/dialogs/snapshot/html.hbs b/src/sunstone/public/app/tabs/vms-tab/dialogs/snapshot/html.hbs index 664bcb6994..2803ddff13 100644 --- a/src/sunstone/public/app/tabs/vms-tab/dialogs/snapshot/html.hbs +++ b/src/sunstone/public/app/tabs/vms-tab/dialogs/snapshot/html.hbs @@ -20,14 +20,9 @@

{{tr "Snapshot"}}

+
-
-
- - -
-
diff --git a/src/sunstone/public/app/tabs/vms-tab/panels/network.js b/src/sunstone/public/app/tabs/vms-tab/panels/network.js index 68c6463538..c999fab83b 100644 --- a/src/sunstone/public/app/tabs/vms-tab/panels/network.js +++ b/src/sunstone/public/app/tabs/vms-tab/panels/network.js @@ -392,6 +392,7 @@ define(function(require) { Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({ //header : + headerTabId: TAB_ID, body : Locale.tr("This will detach the nic immediately"), //question : submit : function(){ diff --git a/src/sunstone/public/app/tabs/vms-tab/panels/storage.js b/src/sunstone/public/app/tabs/vms-tab/panels/storage.js index 92de967e43..241ad0d538 100644 --- a/src/sunstone/public/app/tabs/vms-tab/panels/storage.js +++ b/src/sunstone/public/app/tabs/vms-tab/panels/storage.js @@ -350,6 +350,7 @@ define(function(require) { Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({ //header : + headerTabId: TAB_ID, body : Locale.tr("This will detach the disk immediately"), //question : submit : function(){ @@ -453,6 +454,7 @@ define(function(require) { Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({ //header : + headerTabId: TAB_ID, body : Locale.tr("This will delete the disk snapshot "+snapshot_id), //question : submit : function(){ diff --git a/src/sunstone/public/app/tabs/vnets-tab/dialogs/add-ar.js b/src/sunstone/public/app/tabs/vnets-tab/dialogs/add-ar.js index ae116e2408..1b532d9afc 100644 --- a/src/sunstone/public/app/tabs/vnets-tab/dialogs/add-ar.js +++ b/src/sunstone/public/app/tabs/vnets-tab/dialogs/add-ar.js @@ -31,6 +31,7 @@ define(function(require) { */ var DIALOG_ID = require('./add-ar/dialogId'); + var TAB_ID = require('../tabId'); /* CONSTRUCTOR @@ -91,8 +92,9 @@ define(function(require) { } function _onShow(context) { + this.setNames( Sunstone.getDataTable(TAB_ID).elements({names: true}) ); + this.arTab.onShow(); - $('#vnet_id', this.dialogElement).text(this.vnetId); } function _setId(id) { diff --git a/src/sunstone/public/app/tabs/vnets-tab/dialogs/add-ar/html.hbs b/src/sunstone/public/app/tabs/vnets-tab/dialogs/add-ar/html.hbs index 2e07c0be84..44a4c0d5b7 100644 --- a/src/sunstone/public/app/tabs/vnets-tab/dialogs/add-ar/html.hbs +++ b/src/sunstone/public/app/tabs/vnets-tab/dialogs/add-ar/html.hbs @@ -18,14 +18,11 @@
-
-

- {{tr "New Address Range"}} -
- {{tr "Virtual Network"}} -

-
+

+ {{tr "New Address Range"}} +

+
{{{arTabHTML}}}