diff options
author | Sébastien Determe <sebastien.determe@intl.att.com> | 2019-04-05 13:35:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-05 13:35:33 +0000 |
commit | b089c282bb4b8c2614a8af1df9a6ca14bd59f1fe (patch) | |
tree | e8b43ef30ccad727599b662d1738491105816cef /src/main/resources/META-INF | |
parent | d994b259592d70862d0e0b6c7bd9bf764cbf6ea4 (diff) | |
parent | 156fcac184b573be2a77bc16a546c462fc484e2f (diff) |
Merge "E2E Automation"
Diffstat (limited to 'src/main/resources/META-INF')
2 files changed, 101 insertions, 10 deletions
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/operational_policy_window.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/operational_policy_window.html index 53f1d94e..82b48039 100644 --- a/src/main/resources/META-INF/resources/designer/partials/portfolios/operational_policy_window.html +++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/operational_policy_window.html @@ -197,8 +197,8 @@ label { <option value="APPC">APPC</option> <option value="SO">SO</option> <option value="VFC">VFC</option> - <option value="SDNC">SDNC</option>° - <option value="SDNR">SDNR</option>° + <option value="SDNC">SDNC</option>° + <option value="SDNR">SDNR</option>° </select> </div> @@ -282,12 +282,55 @@ label { Target ResourceId</label> <div class="col-sm-8"> <select class="form-control" name="resourceId" id="resourceId" - enableFilter="true" ng-model="resourceId"> + enableFilter="true" ng-click="changeTargetResourceId()" + ng-model="resourceId"> <option value=""></option> <option value="Other:">Other:</option> </select> </div> </div> + <div id="metadata"> + <div class="form-group clearfix"> + <label for="modelInvariantId" class="col-sm-4 control-label"> + Model Invariant Id</label> + <div class="col-sm-8"> + <input class="form-control" name="modelInvariantId" + id="modelInvariantId" readonly /> + </div> + </div> + <div class="form-group clearfix"> + <label for="modelVersionId" class="col-sm-4 control-label"> + Model Version Id</label> + <div class="col-sm-8"> + <input class="form-control" name="modelVersionId" + id="modelVersionId" readonly /> + </div> + </div> + <div class="form-group clearfix"> + <label for="modelName" class="col-sm-4 control-label"> + Model Name</label> + <div class="col-sm-8"> + <input class="form-control" name="modelName" id="modelName" + readonly /> + </div> + </div> + <div class="form-group clearfix"> + <label for="modelVersion" class="col-sm-4 control-label"> + Model Version</label> + <div class="col-sm-8"> + <input class="form-control" name="modelVersion" + id="modelVersion" readonly /> + </div> + </div> + <div class="form-group clearfix"> + <label for="modelCustomizationId" class="col-sm-4 control-label"> + Model Customization Id</label> + <div class="col-sm-8"> + <input class="form-control" name="modelCustomizationId" + id="modelCustomizationId" readonly /> + </div> + </div> + </div> </form> <div class="form-group clearfix"> <label for="enableGuardPolicy" class="col-sm-4 control-label"> diff --git a/src/main/resources/META-INF/resources/designer/scripts/OperationalPolicyCtrl.js b/src/main/resources/META-INF/resources/designer/scripts/OperationalPolicyCtrl.js index 922220b1..e7c5d93b 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/OperationalPolicyCtrl.js +++ b/src/main/resources/META-INF/resources/designer/scripts/OperationalPolicyCtrl.js @@ -209,6 +209,11 @@ app var type = $(event.target).val(); + $("#modelName").val(""); + $("#modelInvariantId").val(""); + $("#modelVersionId").val(""); + $("#modelVersion").val(""); + $("#modelCustomizationId").val(""); $('#resourceId').empty(); $("#resourceId") .append( @@ -217,6 +222,9 @@ app $("#resourceId").append( $('<option></option>').val("Other:") .html("Other:")); + if (type == "VM" || type == "" || type == "VNF" ) { + $("#metadata *").prop('disabled',true); + } var resourceVnf = getResourceDetailsProperty(); if (type == "VNF" @@ -244,18 +252,58 @@ app } } } - else + else { for ( var prop in resourceVfc) { - var name = resourceVfc[prop]["name"]; - $("#resourceId").append( - $('<option></option>') - .val(name).html(name)); + var name = resourceVfc[prop]["name"]; + $("#resourceId").append( + $('<option></option>') + .val(name).html(name)); } - } + } + } + } + + $scope.changeTargetResourceId = function() { + $("#modelName").val(""); + $("#modelInvariantId").val(""); + $("#modelVersionId").val(""); + $("#modelVersion").val(""); + $("#modelCustomizationId").val(""); + var resourceVfc = getResourceDetailsVfcProperty(); + var type = $("#type").val(); + var recipe = $("#recipe").val(); + vfBaseName = $(event.target).val(); + if (type == "VFC" + && (null !== resourceVfc || undefined !== resourceVfc) + && (recipe == 'VF Module Create' || recipe == 'VF Module Delete')) { + for ( var prop in resourceVfc) { + var name = resourceVfc[prop]["name"]; + if (name == vfBaseName) { + var vfModuleModelName = resourceVfc[prop]["name"]; + $("#modelName").val( + vfModuleModelName); + var vfModuleModelInvariantUUID = resourceVfc[prop]["invariantUUID"]; + $("#modelInvariantId").val( + vfModuleModelInvariantUUID); + var vfModuleModelUUID = resourceVfc[prop]["UUID"]; + $("#modelVersionId").val( + vfModuleModelUUID); + var vfModuleModelVersion = resourceVfc[prop]["version"]; + $("#modelVersion").val( + vfModuleModelVersion); + var vfModuleModelCustomizationUUID = resourceVfc[prop]["customizationUUID"]; + $("#modelCustomizationId") + .val( + vfModuleModelCustomizationUUID); + } + } + } + else { + $("#metadata *").prop('disabled',true); + } } - $scope.changeGuardPolicyType = function() { var formItemActive = searchActiveFormId(); |