From 7101d2f331f9157c75b6ba0a18f11ea11b1e408f Mon Sep 17 00:00:00 2001 From: Sergio Betanzos Date: Tue, 26 May 2020 15:16:38 +0200 Subject: [PATCH] M #~: Add force option to quota widgets (#4814) --- src/sunstone/public/app/utils/quotas/quota-widgets.js | 3 +++ src/sunstone/public/app/utils/resource-select.js | 1 + 2 files changed, 4 insertions(+) diff --git a/src/sunstone/public/app/utils/quotas/quota-widgets.js b/src/sunstone/public/app/utils/quotas/quota-widgets.js index e237750d22..78b89da181 100644 --- a/src/sunstone/public/app/utils/quotas/quota-widgets.js +++ b/src/sunstone/public/app/utils/quotas/quota-widgets.js @@ -495,6 +495,7 @@ define(function(require) { ResourceSelect.insert({ context: $('.image_select', $(".image_quota_table tbody tr", context).last()), resourceName: 'Image', + force: true, emptyValue: true }); @@ -650,6 +651,7 @@ define(function(require) { ResourceSelect.insert({ context: $('.ds_select', $(".ds_quota_table tbody tr", context).last()), resourceName: 'Datastore', + force: true, emptyValue: true }); @@ -802,6 +804,7 @@ define(function(require) { ResourceSelect.insert({ context: $('.network_select', $(".network_quota_table tbody tr", context).last()), resourceName: 'Network', + force: true, emptyValue: true }); diff --git a/src/sunstone/public/app/utils/resource-select.js b/src/sunstone/public/app/utils/resource-select.js index a271094a11..2a936c77a0 100644 --- a/src/sunstone/public/app/utils/resource-select.js +++ b/src/sunstone/public/app/utils/resource-select.js @@ -47,6 +47,7 @@ define(function(require) { opts.context.html(''); Resource.list({ + options: { force: opts.force || false }, timeout: true, success: function (request, elemList) { var elemId = '';