summaryrefslogtreecommitdiffstats
path: root/src/main/resources
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-05-23 15:48:44 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-05-23 15:48:44 +0200
commit090d9eadb13e5833bd179ede05d9b158e524ae54 (patch)
treed6db551e894ab5d63a2c2236049a6b4d329d7328 /src/main/resources
parent0aa84da908ba688d78cd15b7789985d9a6eb4d18 (diff)
Fix issue with targetResourceId field
The targetResourceId is not always properly provisioned. Issue-ID: CLAMP-172 Change-Id: I5fd827633f07d12d8e14febc744c5fe0669c13d7 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html
index f63fb53a..83fb337d 100644
--- a/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html
@@ -286,7 +286,7 @@ label {
<label for="targetResourceId" class="col-sm-4 control-label">
Target ResourceId</label>
<div class="col-sm-8">
- <select class="form-control" name="targetResourceId" id="targetResourceId" enableFilter="true" onchange="changeTargetResourceIdOther();">
+ <select class="form-control" name="targetResourceId" id="targetResourceId" enableFilter="true" onchange="changeTargetResourceIdOther();" >
<option value=""></option>
<option value="Other:">Other:</option>
</select>
@@ -308,6 +308,14 @@ label {
</div>
<script>
+
+ function initTargetResourceId() {
+ // Set all the Resource Invariant UUID in the target resource ID list (+Empty and other)
+ Object.keys(vf_Services["shared"]["byVf"]).forEach(function(key){
+ $('#targetResourceId').append($('<option></option>').val(key).html(key));
+ });
+ }
+
function changeTargetResourceIdOther() {
if ($("#targetResourceId").val()==="Other:") {
$("#targetResourceIdOther").show();
@@ -346,7 +354,8 @@ label {
}
}
$("#pname").val('');
-
+ initTargetResourceId();
+
//load recipes for a chosen policy
function disperseConfig(policyObj, id){
parent_policy={};
@@ -357,11 +366,6 @@ label {
$(".formId").remove();
if (policyObj !== undefined) {
- // Set all the Resource Invariant UUID in the target resource ID list (+Empty and other)
- Object.keys(vf_Services["shared"]["byVf"]).forEach(function(key){
- $('#targetResourceId').append($('<option></option>').val(key).html(key));
- });
-
var el = policyObj[id][3]['policyConfigurations']
for (var i = 0; i < el.length; i++) {
loadingId=true;