diff --git a/src/sunstone/etc/sunstone-views/kvm/admin.yaml b/src/sunstone/etc/sunstone-views/kvm/admin.yaml
index f847642fec..628ba2ebb5 100644
--- a/src/sunstone/etc/sunstone-views/kvm/admin.yaml
+++ b/src/sunstone/etc/sunstone-views/kvm/admin.yaml
@@ -102,6 +102,9 @@ features:
# True to show schedule actions section to instantiate VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
dashboard-tab:
# The following widgets can be used inside any of the '_per_row' settings
diff --git a/src/sunstone/etc/sunstone-views/kvm/cloud.yaml b/src/sunstone/etc/sunstone-views/kvm/cloud.yaml
index caca25b61c..446189419b 100644
--- a/src/sunstone/etc/sunstone-views/kvm/cloud.yaml
+++ b/src/sunstone/etc/sunstone-views/kvm/cloud.yaml
@@ -44,6 +44,9 @@ features:
# True to show schedule actions section to instantiate VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
provision-tab:
panel_tabs:
diff --git a/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml b/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml
index ee4372ee16..abcdafedfe 100644
--- a/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml
+++ b/src/sunstone/etc/sunstone-views/kvm/groupadmin.yaml
@@ -252,7 +252,7 @@ tabs:
Template.refresh: true
Template.create_dialog: false
Template.import_dialog: false
- Template.update_dialog: false
+ Template.update_dialog: true
Template.instantiate_vms: true
Template.rename: true
Template.chown: true
diff --git a/src/sunstone/etc/sunstone-views/kvm/user.yaml b/src/sunstone/etc/sunstone-views/kvm/user.yaml
index dea9d15a86..cf6f2ac9be 100644
--- a/src/sunstone/etc/sunstone-views/kvm/user.yaml
+++ b/src/sunstone/etc/sunstone-views/kvm/user.yaml
@@ -96,6 +96,9 @@ features:
# True to show schedule actions section to instantiate VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
dashboard-tab:
# The following widgets can be used inside any of the '_per_row' settings
diff --git a/src/sunstone/etc/sunstone-views/mixed/admin.yaml b/src/sunstone/etc/sunstone-views/mixed/admin.yaml
index aed18fd5a9..c0f7eff166 100644
--- a/src/sunstone/etc/sunstone-views/mixed/admin.yaml
+++ b/src/sunstone/etc/sunstone-views/mixed/admin.yaml
@@ -102,6 +102,9 @@ features:
# True to show schedule actions to instantiate a VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
dashboard-tab:
# The following widgets can be used inside any of the '_per_row' settings
diff --git a/src/sunstone/etc/sunstone-views/mixed/cloud.yaml b/src/sunstone/etc/sunstone-views/mixed/cloud.yaml
index ff54e29059..f5fe6ec6ef 100644
--- a/src/sunstone/etc/sunstone-views/mixed/cloud.yaml
+++ b/src/sunstone/etc/sunstone-views/mixed/cloud.yaml
@@ -44,6 +44,9 @@ features:
# True to show schedule actions section to instantiate VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
provision-tab:
panel_tabs:
diff --git a/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml b/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml
index d998cab7e1..4a76e9f81a 100644
--- a/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml
+++ b/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml
@@ -102,6 +102,9 @@ features:
# True to show schedule actions section to instantiate VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
dashboard-tab:
# The following widgets can be used inside any of the '_per_row' settings
@@ -252,7 +255,7 @@ tabs:
Template.refresh: true
Template.create_dialog: false
Template.import_dialog: false
- Template.update_dialog: false
+ Template.update_dialog: true
Template.instantiate_vms: true
Template.rename: true
Template.chown: true
diff --git a/src/sunstone/etc/sunstone-views/mixed/user.yaml b/src/sunstone/etc/sunstone-views/mixed/user.yaml
index 6d7fda8972..bc56f602fd 100644
--- a/src/sunstone/etc/sunstone-views/mixed/user.yaml
+++ b/src/sunstone/etc/sunstone-views/mixed/user.yaml
@@ -96,6 +96,9 @@ features:
# True to show schedule actions section to instantiate VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
dashboard-tab:
# The following widgets can be used inside any of the '_per_row' settings
diff --git a/src/sunstone/etc/sunstone-views/vcenter/admin.yaml b/src/sunstone/etc/sunstone-views/vcenter/admin.yaml
index 8fa6ba56ff..331c0cfb06 100644
--- a/src/sunstone/etc/sunstone-views/vcenter/admin.yaml
+++ b/src/sunstone/etc/sunstone-views/vcenter/admin.yaml
@@ -102,6 +102,9 @@ features:
# True to show schedule actions section to instantiate VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
dashboard-tab:
# The following widgets can be used inside any of the '_per_row' settings
diff --git a/src/sunstone/etc/sunstone-views/vcenter/cloud.yaml b/src/sunstone/etc/sunstone-views/vcenter/cloud.yaml
index 16e9513610..e820265062 100644
--- a/src/sunstone/etc/sunstone-views/vcenter/cloud.yaml
+++ b/src/sunstone/etc/sunstone-views/vcenter/cloud.yaml
@@ -44,6 +44,9 @@ features:
# True to show schedule actions section to instantiate VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
provision-tab:
panel_tabs:
diff --git a/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml b/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml
index 02a68d1e33..52df7942e0 100644
--- a/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml
+++ b/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml
@@ -102,6 +102,9 @@ features:
# True to show schedule actions section to instantiate VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
dashboard-tab:
# The following widgets can be used inside any of the '_per_row' settings
@@ -252,7 +255,7 @@ tabs:
Template.refresh: true
Template.create_dialog: false
Template.import_dialog: false
- Template.update_dialog: false
+ Template.update_dialog: true
Template.instantiate_vms: true
Template.rename: true
Template.chown: true
diff --git a/src/sunstone/etc/sunstone-views/vcenter/user.yaml b/src/sunstone/etc/sunstone-views/vcenter/user.yaml
index 51c1bb772a..195d3ed357 100644
--- a/src/sunstone/etc/sunstone-views/vcenter/user.yaml
+++ b/src/sunstone/etc/sunstone-views/vcenter/user.yaml
@@ -96,6 +96,9 @@ features:
# True to show schedule actions section to instantiate VM
show_sched_actions_instantiate: true
+
+ # True to show boot order section to instantiate VM
+ show_boot_order: true
tabs:
dashboard-tab:
# The following widgets can be used inside any of the '_per_row' settings
diff --git a/src/sunstone/public/app/tabs/provision-tab.js b/src/sunstone/public/app/tabs/provision-tab.js
index 7db8bacee3..50dc19cd49 100644
--- a/src/sunstone/public/app/tabs/provision-tab.js
+++ b/src/sunstone/public/app/tabs/provision-tab.js
@@ -51,6 +51,11 @@ define(function(require) {
var TemplateDashboardGroupVms = require("hbs!./provision-tab/dashboard/group-vms");
var TAB_ID = require("./provision-tab/tabId");
var FLOW_TEMPLATE_LABELS_COLUMN = 2;
+
+ var distinct = function(value, index, self){
+ return self.indexOf(value)===index;
+ };
+
var povision_actions = {
"Provision.Flow.instantiate" : {
type: "single",
@@ -632,6 +637,7 @@ define(function(require) {
$("#provision_create_vm .provision_add_vmgroup").show();
$("#provision_create_vm .provision_vmgroup").hide();
$("#provision_create_vm .provision_ds").hide();
+ $("#provision_create_vm .provision_boot").hide();
$("#provision_create_vm .provision_custom_attributes_selector").html("");
$("#provision_create_vm li:not(.is-active) a[href='#provision_dd_template']").trigger("click");
$("#provision_create_vm .total_cost_div").hide();
@@ -851,6 +857,153 @@ define(function(require) {
}
return true;
}
+
+ //----------------------------------------------------------------------------
+ // Boot order
+ //----------------------------------------------------------------------------
+
+ function _retrieveBootValue(context) {
+ return $("table.boot-order-instantiate-provision", context).attr("value");
+ }
+
+ function _fillBootValue(context, value) {
+ return $("table.boot-order-instantiate-provision", context).attr("value", value);
+ }
+
+ function _refreshBootValue(context) {
+ var table = $("table.boot-order-instantiate-provision", context);
+
+ var devices = [];
+
+ $.each($("tr", table), function(){
+ if ($("input", this).is(":checked")){
+ devices.push( $(this).attr("value") );
+ }
+ });
+
+ table.attr("value", devices.join(","));
+ }
+
+ function _addBootRow(context, value, label) {
+ $("table.boot-order-instantiate-provision tbody", context).append(
+ "