From 71b8dc8a2e445d5cfc0a4cffac84c43e61192cad Mon Sep 17 00:00:00 2001 From: ThamlurRaju Date: Fri, 19 Apr 2019 19:41:09 +0530 Subject: Replacing the VFC with VFModule GUI modifications for operation policy Change-Id: I21fd7bc499ba799a0b8436b1946733608d9c62e2 Issue-ID: CLAMP-350 Signed-off-by: ThamlurRaju --- .../portfolios/operational_policy_window.html | 5 +-- .../designer/scripts/OperationalPolicyCtrl.js | 38 +++++++++++----------- .../designer/scripts/propertyController.js | 6 ++-- 3 files changed, 25 insertions(+), 24 deletions(-) (limited to 'src/main/resources/META-INF') 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 a53ad73d5..b7864eca9 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 @@ -292,7 +292,8 @@ label {
@@ -305,7 +306,7 @@ 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 4e8855eb0..2c3f83e41 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/OperationalPolicyCtrl.js +++ b/src/main/resources/META-INF/resources/designer/scripts/OperationalPolicyCtrl.js @@ -228,7 +228,7 @@ app $("#resourceId") .append( $('').val("") - .html("")); + .html("-- choose an option --")); $("#resourceId").append( $('').val("Other:") .html("Other:")); @@ -247,14 +247,14 @@ app } } - var resourceVfc = getResourceDetailsVfcProperty(); - if (type == "VFC" - && (null !== resourceVfc || undefined !== resourceVfc)) { + var resourceVFModule = getResourceDetailsVfModuleProperty(); + if (type == "VFModule" + && (null !== resourceVFModule || undefined !== resourceVFModule)) { if (recipe == 'VF Module Create' || recipe == 'VF Module Delete') { - for ( var prop in resourceVfc) { - if (resourceVfc[prop]["isBase"] == false) { - var name = resourceVfc[prop]["name"]; + for ( var prop in resourceVFModule) { + if (resourceVFModule[prop]["isBase"] == false) { + var name = resourceVFModule[prop]["name"]; $("#resourceId").append( $('') .val(name) @@ -264,8 +264,8 @@ app } else { - for ( var prop in resourceVfc) { - var name = resourceVfc[prop]["name"]; + for ( var prop in resourceVFModule) { + var name = resourceVFModule[prop]["name"]; $("#resourceId").append( $('') .val(name).html(name)); @@ -280,29 +280,29 @@ app $("#modelVersionId").val(""); $("#modelVersion").val(""); $("#modelCustomizationId").val(""); - var resourceVfc = getResourceDetailsVfcProperty(); + var resourceVFModule = getResourceDetailsVfModuleProperty(); var type = $("#type").val(); var recipe = $("#recipe").val(); vfBaseName = $(event.target).val(); - if (type == "VFC" - && (null !== resourceVfc || undefined !== resourceVfc) + if (type == "VFModule" + && (null !== resourceVFModule || undefined !== resourceVFModule) && (recipe == 'VF Module Create' || recipe == 'VF Module Delete')) { - for ( var prop in resourceVfc) { - var name = resourceVfc[prop]["name"]; + for ( var prop in resourceVFModule) { + var name = resourceVFModule[prop]["name"]; if (name == vfBaseName) { - var vfModuleModelName = resourceVfc[prop]["name"]; + var vfModuleModelName = resourceVFModule[prop]["name"]; $("#modelName").val( vfModuleModelName); - var vfModuleModelInvariantUUID = resourceVfc[prop]["invariantUUID"]; + var vfModuleModelInvariantUUID = resourceVFModule[prop]["invariantUUID"]; $("#modelInvariantId").val( vfModuleModelInvariantUUID); - var vfModuleModelUUID = resourceVfc[prop]["UUID"]; + var vfModuleModelUUID = resourceVFModule[prop]["UUID"]; $("#modelVersionId").val( vfModuleModelUUID); - var vfModuleModelVersion = resourceVfc[prop]["version"]; + var vfModuleModelVersion = resourceVFModule[prop]["version"]; $("#modelVersion").val( vfModuleModelVersion); - var vfModuleModelCustomizationUUID = resourceVfc[prop]["customizationUUID"]; + var vfModuleModelCustomizationUUID = resourceVFModule[prop]["customizationUUID"]; $("#modelCustomizationId") .val( vfModuleModelCustomizationUUID); diff --git a/src/main/resources/META-INF/resources/designer/scripts/propertyController.js b/src/main/resources/META-INF/resources/designer/scripts/propertyController.js index 916de678e..3902cf413 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/propertyController.js +++ b/src/main/resources/META-INF/resources/designer/scripts/propertyController.js @@ -118,12 +118,12 @@ function getResourceDetailsProperty() { return cl_props["modelPropertiesJson"]["resourceDetails"]["VF"]; } -function getResourceDetailsVfcProperty() { - return cl_props["modelPropertiesJson"]["resourceDetails"]["VFC"]; +function getResourceDetailsVfModuleProperty() { + return cl_props["modelPropertiesJson"]["resourceDetails"]["VFModule"]; } function getLoopLogsArray() { return cl_props.loopLogs; } -module.exports = { getOperationalPolicyProperty,getGlobalProperty,getMsProperty,getMsUI,getLastUpdatedStatus,getDeploymentID,getDeploymentStatusURL,getResourceDetailsProperty,getResourceDetailsVfcProperty }; \ No newline at end of file +module.exports = { getOperationalPolicyProperty,getGlobalProperty,getMsProperty,getMsUI,getLastUpdatedStatus,getDeploymentID,getDeploymentStatusURL,getResourceDetailsProperty,getResourceDetailsVfModuleProperty }; \ No newline at end of file -- cgit 1.2.3-korg