From d2baba6ff77a04e1ec1101cc32fee10cc0213107 Mon Sep 17 00:00:00 2001 From: Jorge Miguel Lobo Escalona <47326048+jloboescalona2@users.noreply.github.com> Date: Wed, 26 Aug 2020 18:24:20 +0200 Subject: [PATCH] B #5016 fix schedule action instantiate (#167) Signed-off-by: Jorge Lobo Co-authored-by: Jorge Lobo (cherry picked from commit 3c3b237fd47ae7626c01316ae57734733b890920) --- .../app/tabs/templates-tab/form-panels/instantiate.js | 9 ++++++++- src/sunstone/public/app/utils/leases.js | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate.js index 9038389329..3508392998 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/instantiate.js @@ -483,7 +483,14 @@ define(function(require) { usersDatatable: that.usersTable.dataTableHTML, groupDatatable: that.groupTable.dataTableHTML, table_sched_actions: ScheduleActions.htmlTable(RESOURCE, Leases.html()) - }) ); + } + ) + ); + var objLeases = $.extend(true, {}, that); + objLeases.formContext = templatesContext; + objLeases.resource = "template"; + objLeases.__proto__ = FormPanel.prototype; + Leases.actions(objLeases); $(".provision_host_selector" + template_json.VMTEMPLATE.ID, context).data("hostsTable", that.hostsTable); $(".provision_ds_selector" + template_json.VMTEMPLATE.ID, context).data("dsTable", that.datastoresTable); diff --git a/src/sunstone/public/app/utils/leases.js b/src/sunstone/public/app/utils/leases.js index 3065efd334..3ce7038131 100644 --- a/src/sunstone/public/app/utils/leases.js +++ b/src/sunstone/public/app/utils/leases.js @@ -52,7 +52,7 @@ define(function(require) { config.system_config.leases && (config.system_config.leases.suspense || config.system_config.leases.terminate) ){ - return $("