2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
23 angular.module("abs").factory('PolicyDictionaryService', function ($http, $q) {
26 getActionPolicyDictionaryData : function(url){
27 console.log("url on the service js: " + url);
28 var url = url+'/ecomp/get_ActionPolicyDictDataByName';
30 .then(function(response) {
31 if (typeof response.data === 'object') {
34 return $q.reject(response.data);
37 }, function(response) {
38 // something went wrong
39 return $q.reject(response.data);
43 getFunctionDefinitionData : function(){
44 return $http.get('get_FunctionDefinitionDataByName')
45 .then(function(response) {
46 if (typeof response.data === 'object') {
49 return $q.reject(response.data);
52 }, function(response) {
53 // something went wrong
54 return $q.reject(response.data);
58 getAttributeDictionaryData: function(url) {
59 console.log("url on the service js: " + url);
60 var url = url+'/ecomp/get_AttributeDatabyAttributeName';
62 .then(function(response) {
63 if (typeof response.data === 'object') {
66 return $q.reject(response.data);
69 }, function(response) {
70 // something went wrong
71 return $q.reject(response.data);
76 getEcompDictionaryData : function(url){
77 console.log("url on the service js: " + url);
78 var url = url+'/ecomp/get_EcompNameDataByName';
80 .then(function(response) {
81 if (typeof response.data === 'object') {
84 return $q.reject(response.data);
86 }, function(response) {
87 // something went wrong
88 return $q.reject(response.data);
93 getBRMSParamDictionaryData : function(url){
94 console.log("url on the service js: " + url);
95 var url = url+'/ecomp/get_BRMSParamDataByName';
97 .then(function(response) {
98 if (typeof response.data === 'object') {
101 return $q.reject(response.data);
104 }, function(response) {
105 // something went wrong
106 return $q.reject(response.data);
111 getDecisionSettingsDictionaryData : function(url){
112 console.log("url on the service js: " + url);
113 var url = url+'/ecomp/get_SettingsDictionaryDataByName';
114 return $http.get(url)
115 .then(function(response) {
116 if (typeof response.data === 'object') {
117 return response.data;
119 return $q.reject(response.data);
122 }, function(response) {
123 // something went wrong
124 return $q.reject(response.data);
128 getDescriptiveDictionaryData : function(url){
129 console.log("url on the service js: " + url);
130 var url = url+'/ecomp/get_DescriptiveScopeByName';
131 return $http.get(url)
132 .then(function(response) {
133 if (typeof response.data === 'object') {
134 return response.data;
136 return $q.reject(response.data);
139 }, function(response) {
140 // something went wrong
141 return $q.reject(response.data);
145 getPepOptionsDictionaryData : function(url){
146 console.log("url on the service js: " + url);
147 var url = url+'/ecomp/get_PEPOptionsDataByName';
148 return $http.get(url)
149 .then(function(response) {
150 if (typeof response.data === 'object') {
151 return response.data;
153 return $q.reject(response.data);
156 }, function(response) {
157 // something went wrong
158 return $q.reject(response.data);
162 getVSCLActionDictionaryData: function(url) {
163 console.log("url on the service js: " + url);
164 var url = url+'/ecomp/get_VSCLActionDataByName';
165 return $http.get(url)
166 .then(function(response) {
167 if (typeof response.data === 'object') {
168 return response.data;
170 return $q.reject(response.data);
173 }, function(response) {
174 // something went wrong
175 return $q.reject(response.data);
179 getVnfTypeDictionaryData : function(url){
180 console.log("url on the service js: " + url);
181 var url = url+'/ecomp/get_VNFTypeDataByName';
182 return $http.get(url)
183 .then(function(response) {
184 if (typeof response.data === 'object') {
185 return response.data;
187 return $q.reject(response.data);
190 }, function(response) {
191 // something went wrong
192 return $q.reject(response.data);
196 getServiceDictionaryData : function(url){
197 console.log("url on the service js: " + url);
198 var url = url+'/ecomp/get_ClosedLoopServicesDataByName';
199 return $http.get(url)
200 .then(function(response) {
201 if (typeof response.data === 'object') {
202 return response.data;
204 return $q.reject(response.data);
207 }, function(response) {
208 // something went wrong
209 return $q.reject(response.data);
214 getSiteDictionaryData : function(url){
215 console.log("url on the service js: " + url);
216 var url = url+'/ecomp/get_ClosedLoopSiteDataByName';
217 return $http.get(url)
218 .then(function(response) {
219 if (typeof response.data === 'object') {
220 return response.data;
222 return $q.reject(response.data);
225 }, function(response) {
226 // something went wrong
227 return $q.reject(response.data);
232 getVarbindDictionaryData : function(url){
233 console.log("url on the service js: " + url);
234 var url = url+'/ecomp/get_VarbindDictionaryDataByName';
235 return $http.get(url)
236 .then(function(response) {
237 if (typeof response.data === 'object') {
238 return response.data;
240 return $q.reject(response.data);
243 }, function(response) {
244 // something went wrong
245 return $q.reject(response.data);
249 getSecurityZoneDictionaryData : function(url){
250 console.log("url on the service js: " + url);
251 var url = url+'/ecomp/get_SecurityZoneDataByName';
252 return $http.get(url)
253 .then(function(response) {
254 if (typeof response.data === 'object') {
255 return response.data;
257 return $q.reject(response.data);
260 }, function(response) {
261 // something went wrong
262 return $q.reject(response.data);
266 getTermListDictionaryData : function(url){
267 console.log("url on the service js: " + url);
268 var url = url+'/ecomp/get_TermListDataByName';
269 return $http.get(url)
270 .then(function(response) {
271 if (typeof response.data === 'object') {
272 return response.data;
274 return $q.reject(response.data);
277 }, function(response) {
278 // something went wrong
279 return $q.reject(response.data);
283 getPepOptionsDictionaryDataEntity : function(url){
284 console.log("url on the service js: " + url);
285 var url = url+'/ecomp/get_PEPOptionsData';
286 return $http.get(url)
287 .then(function(response) {
288 if (typeof response.data === 'object') {
289 return response.data;
291 return $q.reject(response.data);
294 }, function(response) {
295 // something went wrong
296 return $q.reject(response.data);
300 getFWDictionaryListDictionaryData : function(url){
301 var url = url+'/ecomp/get_FWDictionaryListDataByName';
302 return $http.get(url)
303 .then(function(response) {
304 if (typeof response.data === 'object') {
305 return response.data;
307 return $q.reject(response.data);
310 }, function(response) {
311 // something went wrong
312 return $q.reject(response.data);
316 getFWParentListDictionaryData : function(){
317 return $http.get('get_FWParentListDataByName')
318 .then(function(response) {
319 if (typeof response.data === 'object') {
320 return response.data;
322 return $q.reject(response.data);
325 }, function(response) {
326 // something went wrong
327 return $q.reject(response.data);
331 getMSConfigDataByName : function(url){
332 console.log("url on the service js: " + url);
333 var url = url+'/ecomp/get_MicroServiceConfigNameDataByName';
334 return $http.get(url)
335 .then(function(response) {
336 if (typeof response.data === 'object') {
337 return response.data;
339 return $q.reject(response.data);
342 }, function(response) {
343 // something went wrong
344 return $q.reject(response.data);
348 getMSLocationDataByName : function(url){
349 console.log("url on the service js: " + url);
350 var url = url+'/ecomp/get_MicroServiceLocationDataByName';
351 return $http.get(url)
352 .then(function(response) {
353 if (typeof response.data === 'object') {
354 return response.data;
356 return $q.reject(response.data);
359 }, function(response) {
360 // something went wrong
361 return $q.reject(response.data);
365 getMSServiceModelsDataByName : function(url){
366 console.log("url on the service js: " + url);
367 var url = url+'/ecomp/get_MicroServiceModelsDataByName';
368 return $http.get(url)
369 .then(function(response) {
370 if (typeof response.data === 'object') {
371 return response.data;
373 return $q.reject(response.data);
376 }, function(response) {
377 // something went wrong
378 return $q.reject(response.data);
382 getDCAEuuidDataByName : function(url){
383 console.log("url on the service js: " + url);
384 var url = url+'/ecomp/get_DCAEUUIDDataByName';
385 return $http.get(url)
386 .then(function(response) {
387 if (typeof response.data === 'object') {
388 return response.data;
390 return $q.reject(response.data);
393 }, function(response) {
394 // something went wrong
395 return $q.reject(response.data);
399 getPriorityValueData : function(){
400 return $http.get('get_DCAEPriorityValues')
401 .then(function(response) {
402 if (typeof response.data === 'object') {
403 return response.data;
405 return $q.reject(response.data);
408 }, function(response) {
409 // something went wrong
410 return $q.reject(response.data);
414 getPolicyScopeData : function(url){
415 console.log("url on the service js: " + url);
416 var url = url+'/ecomp/get_GroupPolicyScopeDataByName';
417 return $http.get(url)
418 .then(function(response) {
419 if (typeof response.data === 'object') {
420 return response.data;
422 return $q.reject(response.data);
425 }, function(response) {
426 // something went wrong
427 return $q.reject(response.data);
431 getRiskTypeDictionaryData : function(url){
432 console.log("url on the service js: " + url);
433 var url = url+'/ecomp/get_RiskTypeDataByName';
434 return $http.get(url)
435 .then(function(response) {
436 if (typeof response.data === 'object') {
437 return response.data;
439 return $q.reject(response.data);
441 }, function(response) {
442 // something went wrong
443 return $q.reject(response.data);
446 getRiskLevelValueData : function(){
447 return $http.get('get_RiskLevelValues')
448 .then(function(response) {
449 if (typeof response.data === 'object') {
450 return response.data;
452 return $q.reject(response.data);
455 }, function(response) {
456 // something went wrong
457 return $q.reject(response.data);
460 getGuardValueData : function(){
461 return $http.get('get_GuardlValues')
462 .then(function(response) {
463 if (typeof response.data === 'object') {
464 return response.data;
466 return $q.reject(response.data);
469 }, function(response) {
470 // something went wrong
471 return $q.reject(response.data);
474 getSafePolicyWarningDictionaryData : function(url){
475 console.log("url on the service js: " + url);
476 var url = url+'/ecomp/get_SafePolicyWarningDataByName';
477 return $http.get(url)
478 .then(function(response) {
479 if (typeof response.data === 'object') {
480 return response.data;
482 return $q.reject(response.data);
484 }, function(response) {
485 // something went wrong
486 return $q.reject(response.data);
489 getRCAlarmDictionaryData : function(url){
490 console.log("url on the service js: " + url);
491 var url = url+'/ecomp/get_RCAlarmDataByName';
492 return $http.get(url)
493 .then(function(response) {
494 if (typeof response.data === 'object') {
495 return response.data;
497 return $q.reject(response.data);
499 }, function(response) {
500 // something went wrong
501 return $q.reject(response.data);
504 getServerScopeDictionaryData : function(url){
505 console.log("url on the service js: " + url);
506 var url = url+'/ecomp/get_ServerScopeDataByName';
507 return $http.get(url)
508 .then(function(response) {
509 if (typeof response.data === 'object') {
510 return response.data;
512 return $q.reject(response.data);
515 }, function(response) {
516 // something went wrong
517 return $q.reject(response.data);