diff options
4 files changed, 32 insertions, 28 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java b/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java index 6ec2221d4..a8ff12067 100644 --- a/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java +++ b/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java @@ -5,6 +5,8 @@ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights * reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -54,6 +56,7 @@ public class DefaultUserConfiguration extends WebSecurityConfigurerAdapter { protected static final EELFLogger logger = EELFManager.getInstance().getLogger(DefaultUserConfiguration.class); protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger(); + private static final String SETUP_WEB_USERS_EXCEPTION_MSG = "Exception occurred during the setup of the Web users in memory"; @Autowired private ClampProperties refProp; @Value("${clamp.config.security.permission.type.cl:permission-type-cl}") @@ -76,8 +79,8 @@ public class DefaultUserConfiguration extends WebSecurityConfigurerAdapter { .and().invalidSessionUrl("/designer/timeout.html"); } catch (Exception e) { - logger.error("Exception occurred during the setup of the Web users in memory", e); - throw new CldsUsersException("Exception occurred during the setup of the Web users in memory", e); + logger.error(SETUP_WEB_USERS_EXCEPTION_MSG, e); + throw new CldsUsersException(SETUP_WEB_USERS_EXCEPTION_MSG, e); } } @@ -105,8 +108,8 @@ public class DefaultUserConfiguration extends WebSecurityConfigurerAdapter { .authorities(user.getPermissionsString()).and().passwordEncoder(passwordEncoder); } } catch (Exception e) { - logger.error("Exception occurred during the setup of the Web users in memory", e); - throw new CldsUsersException("Exception occurred during the setup of the Web users in memory", e); + logger.error(SETUP_WEB_USERS_EXCEPTION_MSG, e); + throw new CldsUsersException(SETUP_WEB_USERS_EXCEPTION_MSG, e); } } 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 { <div class="col-sm-8"> <select class="form-control" name="type" id="type" ng-click="initTargetResourceId()" ng-model="type"> - <option value="VFC">VFC</option> + <option value="">-- choose an option --</option> + <option value="VFModule">VFModule</option> <option value="VM">VM</option> <option value="VNF">VNF</option> </select> @@ -305,7 +306,7 @@ label { <select class="form-control" name="resourceId" id="resourceId" enableFilter="true" ng-click="changeTargetResourceId()" ng-model="resourceId"> - <option value=""></option> + <option value="">-- choose an option --</option> <option value="Other:">Other:</option> </select> </div> 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( $('<option></option>').val("") - .html("")); + .html("-- choose an option --")); $("#resourceId").append( $('<option></option>').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( $('<option></option>') .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( $('<option></option>') .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 |