2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
23 var DetailsService = function($log, DataService, ComponentService, COMPONENT,
\r
24 FIELD, UtilityService) {
\r
28 var getSummaryList = function() {
\r
29 switch (_this.componentId) {
\r
30 case COMPONENT.NETWORK:
\r
31 case COMPONENT.SERVICE:
\r
33 case COMPONENT.VF_MODULE:
\r
34 case COMPONENT.VOLUME_GROUP:
\r
36 name : FIELD.NAME.SUBSCRIBER_NAME,
\r
37 value : DataService.getSubscriberName()
\r
39 name : FIELD.NAME.SERVICE_INSTANCE_ID,
\r
40 value : DataService.getServiceInstanceId()
\r
42 name : FIELD.NAME.SERVICE_TYPE,
\r
43 value : DataService.getServiceType()
\r
48 var getDetailsList = function() {
\r
49 switch (_this.componentId) {
\r
50 case COMPONENT.NETWORK:
\r
51 case COMPONENT.SERVICE:
\r
53 case COMPONENT.VF_MODULE:
\r
54 case COMPONENT.VOLUME_GROUP:
\r
55 return ComponentService.getDisplayNames(ComponentService
\r
56 .getInventoryParameterList(_this.componentId, DataService
\r
57 .getInventoryItem(), false));
\r
61 var getMsoFilterString = function() {
\r
63 var instanceId = "";
\r
65 switch (_this.componentId) {
\r
66 case COMPONENT.NETWORK:
\r
67 instanceId = DataService.getNetworkInstanceId();
\r
69 case COMPONENT.SERVICE:
\r
70 instanceId = DataService.getServiceInstanceId();
\r
73 instanceId = DataService.getVnfInstanceId();
\r
75 case COMPONENT.VF_MODULE:
\r
76 instanceId = DataService.getVfModuleInstanceId();
\r
78 case COMPONENT.VOLUME_GROUP:
\r
79 instanceId = DataService.getVolumeGroupInstanceId();
\r
82 return "filter=" + _this.componentId + "InstanceId:EQUALS:"
\r
87 initializeComponent : function(componentId) {
\r
88 _this.componentId = ComponentService.initialize(componentId);
\r
90 getComponentDisplayName : ComponentService.getComponentDisplayName,
\r
91 getSummaryList : getSummaryList,
\r
92 getDetailsList : getDetailsList,
\r
93 getMsoFilterString : getMsoFilterString
\r
97 appDS2.factory("DetailsService", [ "$log", "DataService", "ComponentService",
\r
98 "COMPONENT", "FIELD", "UtilityService", DetailsService ]);
\r