re base code
[sdc.git] / catalog-ui / src / app / ng2 / pages / composition / panel / panel.component.ts
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20
21 import * as _ from "lodash";
22 import { Component, Inject, Input, Output, EventEmitter, AfterViewInit, SimpleChanges, HostBinding } from "@angular/core";
23 import { Component as TopologyTemplate, ComponentInstance, IAppMenu } from "app/models";
24 import { PolicyInstance } from 'app/models/graph/zones/policy-instance';
25 import { TranslateService } from 'app/ng2/shared/translator/translate.service';
26 import { ZoneInstanceType } from "app/models/graph/zones/zone-instance";
27 import { GroupsService } from "../../../services/groups.service";
28 import { PoliciesService } from "../../../services/policies.service";
29 import { SdcUiComponents } from "sdc-ui/lib/angular";
30 import { IZoneService } from "../../../../models/graph/zones/zone";
31
32 @Component({
33     selector: 'ng2-composition-panel',
34     templateUrl: './panel.component.html',
35     styleUrls: ['./panel.component.less'],
36     providers: [TranslateService]
37 })
38 export class CompositionPanelComponent {
39
40     @Input() topologyTemplate: TopologyTemplate;
41     @Input() selectedZoneInstanceType: ZoneInstanceType;
42     @Input() selectedZoneInstanceId: string;
43     @Input() selectedZoneInstanceName: string;
44     @Input() nonCertified: boolean;
45     @Input() isViewOnly: boolean;
46     @Input() isLoading: boolean;
47
48
49     @HostBinding('class') classes = 'component-details-panel';
50
51     private zoneInstanceType = ZoneInstanceType; // Expose ZoneInstanceType to use in template.
52
53     constructor(){
54     }
55
56     private setIsLoading = (value):void => {
57         this.isLoading = value;
58     }
59
60 }