aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/META-INF
diff options
context:
space:
mode:
authorxg353y <xg353y@intl.att.com>2019-03-11 13:47:22 +0100
committerxg353y <xg353y@intl.att.com>2019-03-11 14:25:19 +0100
commita9be95f91ea469681517c697fae2fd2a5bcd9ff5 (patch)
tree7487bdd874dd9e2e5f21e9eea64b4a16eacc6ec4 /src/main/resources/META-INF
parent2f56e98490cd3f7f3a688685e38ee6178c19648c (diff)
Rework authorization controller
Rework the authorization controller, put the authorization code into a camel box, so that it could be put and remove from other methods easily and not tightly connected with other logic; Remove unused CldsTemplateService.js Issue-ID: CLAMP-305 Change-Id: I5e01f1fa4534e78e0996b4b8acaf33f1875e95f0 Signed-off-by: xg353y <xg353y@intl.att.com>
Diffstat (limited to 'src/main/resources/META-INF')
-rw-r--r--src/main/resources/META-INF/resources/designer/index.html1
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/CldsOpenModelCtrl.js12
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/CldsTemplateService.js67
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js3
4 files changed, 2 insertions, 81 deletions
diff --git a/src/main/resources/META-INF/resources/designer/index.html b/src/main/resources/META-INF/resources/designer/index.html
index e30d7245..ec13e2a0 100644
--- a/src/main/resources/META-INF/resources/designer/index.html
+++ b/src/main/resources/META-INF/resources/designer/index.html
@@ -172,7 +172,6 @@
<script src="scripts/ExtraUserInfoCtrl.js"></script>
<script src="scripts/ExtraUserInfoService.js"></script>
<script src="scripts/saveConfirmationModalPopUpCtrl.js"></script>
- <script src="scripts/CldsTemplateService.js"></script>
<script src="scripts/GlobalPropertiesCtrl.js"></script>
<script src="scripts/AlertService.js"></script>
<script src="scripts/ToscaModelCtrl.js"></script>
diff --git a/src/main/resources/META-INF/resources/designer/scripts/CldsOpenModelCtrl.js b/src/main/resources/META-INF/resources/designer/scripts/CldsOpenModelCtrl.js
index a1625a93..0e3fce97 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/CldsOpenModelCtrl.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/CldsOpenModelCtrl.js
@@ -32,9 +32,8 @@ app
'cldsModelService',
'$location',
'dialogs',
-'cldsTemplateService',
function($scope, $rootScope, $modalInstance, $window, $uibModalInstance, cldsModelService, $location,
- dialogs, cldsTemplateService) {
+ dialogs) {
$scope.typeModel = 'template';
$scope.error = {
flag : false,
@@ -67,15 +66,6 @@ function($scope, $rootScope, $modalInstance, $window, $uibModalInstance, cldsMod
$scope.close();
}
}
- cldsTemplateService.getSavedTemplate().then(function(pars) {
- $scope.templateNamel = []
- for (var i = 0; i < pars.length; i++) {
- $scope.templateNamel.push(pars[i].value);
- }
- setTimeout(function() {
- setMultiSelect();
- }, 100);
- });
function contains(a, obj) {
var i = a && a.length > 0 ? a.length : 0;
while (i--) {
diff --git a/src/main/resources/META-INF/resources/designer/scripts/CldsTemplateService.js b/src/main/resources/META-INF/resources/designer/scripts/CldsTemplateService.js
deleted file mode 100644
index 4a0e7147..00000000
--- a/src/main/resources/META-INF/resources/designer/scripts/CldsTemplateService.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
- * reserved.
- * ================================================================================
- * 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END============================================
- * ===================================================================
- *
- */
-
-app.service('cldsTemplateService', ['alertService', '$http', '$q', function (alertService, $http, $q) {
- this.getTemplate = function(templateName){
-
-
- var def = $q.defer();
- var sets = [];
-
- var svcUrl = "/restservices/clds/v1/cldsTempate/template/" + templateName;
-
- $http.get(svcUrl)
- .success(function(data){
-
- def.resolve(data);
-
- })
- .error(function(data){
-
- def.reject("Open Model not successful");
- });
-
- return def.promise;
- };
- this.getSavedTemplate=function(){
-
- var def = $q.defer();
- var sets = [];
-
- var svcUrl = "/restservices/clds/v1/cldsTempate/template-names";
-
- $http.get(svcUrl)
- .success(function(data){
-
- def.resolve(data);
-
- })
- .error(function(data){
-
- def.reject("Open Model not successful");
- });
-
- return def.promise;
- };
-
- }]);
diff --git a/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js b/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js
index 2ac959b4..e9ff4996 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js
@@ -27,9 +27,8 @@ app.controller('GlobalPropertiesCtrl', [
'cldsModelService',
'$location',
'dialogs',
-'cldsTemplateService',
function($scope, $rootScope, $uibModalInstance, cldsModelService, $location,
- dialogs, cldsTemplateService) {
+ dialogs) {
$scope.$watch('name', function(newValue, oldValue) {
var el = getGlobalProperty();