added ansible server functionality
[appc/cdt.git] / src / app / vnfs / myvnfs / myvnfs.component.html
1 <!--
2 ============LICENSE_START==========================================
3 ===================================================================
4 Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
5 ===================================================================
6 Copyright (C) 2018 IBM.
7 ===================================================================
8 Unless otherwise specified, all software contained herein is licensed
9 under the Apache License, Version 2.0 (the License);
10 you may not use this software except in compliance with the License.
11 You may obtain a copy of the License at
12
13     http://www.apache.org/licenses/LICENSE-2.0
14
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
20
21 ============LICENSE_END============================================
22 -->
23 <simple-notifications [options]="options"></simple-notifications>
24 <ng-progress [positionUsing]="'marginLeft'" [minimum]="0.15" [maximum]="1" [speed]="200" [showSpinner]="false" [direction]="'leftToRightIncreased'" [color]="'#6ab344'" [trickleSpeed]="250" [thick]="true" [ease]="'linear'"></ng-progress>
25 <div class="container">
26     <div *ngIf="noData != true">
27         <div class="row">
28             <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
29
30             </div>
31             <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
32                 <input placeholder="filter table" class="form-control" type="text" [(ngModel)]="filterQuery" />
33             </div>
34         </div>
35         <div class="row">
36             <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
37                 <div class="table-responsive" style="height:600px; overflow: auto;">
38                     <table class="table">
39                         <thead>
40                             <tr>
41                                 <th>VNF TYPE <i class="fa fa-sort" (click)="sortOrder= !sortOrder; sortBy='vnf-type'" aria-hidden="true"></i></th>
42                                 <th>VNFC TYPE<i class="fa fa-sort" (click)="sortOrder= !sortOrder; sortBy='vnfc-type'" aria-hidden="true"></i></th>
43                                 <!-- <th>INCART<i class="fa fa-sort" (click)="sortOrder= !sortOrder; sortBy='subscriber'" aria-hidden="true"></i></th> -->
44                                 <!-- <th>PROTOCOL<i class="fa fa-sort" (click)="sortOrder= !sortOrder; sortBy='protocol'" aria-hidden="true"></i></th>
45                             <th>ACTION<i class="fa fa-sort" (click)="sortOrder= !sortOrder; sortBy='action'" aria-hidden="true"></i></th> -->
46                                 <th>ARTIFACT NAME<i class="fa fa-sort" (click)="sortOrder= !sortOrder; sortBy='artifact-name'" aria-hidden="true"></i></th>
47                                 <!-- <th>ARTIFACT TYPE<i class="fa fa-sort" (click)="sortOrder= !sortOrder; sortBy='artifact-type'"
48                                     aria-hidden="true"></i></th> -->
49                                 <th></th>
50                             </tr>
51                         </thead>
52
53                         <tbody style="padding: 15px 25px">
54                             <tr *ngFor="let item of vnfData | orderBy:sortBy:sortOrder | tableFilter:filterQuery:filter">
55                                 <td>{{item['vnf-type']}}</td>
56                                 <td>{{item['vnfc-type']}}</td>
57                                 <!--td>{{defineData(item)}}</td-->
58                                 <!-- <td>{{item.incart}}</td> -->
59                                 <!-- <td>{{item.protocol}}</td>
60                             <td>{{item.action}}</td> -->
61                                 <td>{{item['artifact-name']}}</td>
62                                 <!-- <td>{{item['artifact-type']}}</td> -->
63                                 <td>
64                                     <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="navigateToReference(item)"><i class="fa fa-edit"
65                                                                                aria-hidden="true"></i> View/Edit
66                                 </button>
67                                 </td>
68                             </tr>
69                         </tbody>
70                     </table>
71                 </div>
72             </div>
73         </div>
74     </div>
75     <div *ngIf="noData == true" class="text-center">
76         <div class="card">
77             <div class="mdl-dialog__content">
78                 <div class="mdl-card__title">
79                     <h2 class="mdl-card__title-text">You don't have any Artifacts</h2>
80                 </div>
81                 <div class="mdl-card__supporting-text">
82                     {{noDataMsg}}
83                 </div>
84             </div>
85         </div>
86     </div>
87     <div class="col-lg-12-ln2">
88         <!-- <button type="button" (click)="buildNewDesign(content)" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary">Create New
89             VNF Type
90         </button> -->
91         <button type="button" (click)="createVnfcModal.open()" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary">
92             Create New VNF Type
93         </button>
94     </div>
95 </div>
96
97 <!-- <ng-template #content let-c="close" let-d="dismiss">
98     <form ngNativeValidate (ngSubmit)="c('yes')">
99         <div class="modal-header">
100             <h4 class="modal-title">Enter VNF Type</h4>
101             <button type="button" class="close" aria-label="Close" (click)="d('Cross click')">
102                 <span aria-hidden="true">&times;</span>
103             </button>
104         </div>
105         <div class="modal-body">
106
107             <div class="form-group row">
108                 <label for="example-text-input" class="col-12 col-form-label">Enter Vnf Type</label>
109                 <div class="col-12">
110                     <input pattern=".*[^ ].*" required name="vnfType" class="form-control" (ngModelChange)="validateVnfName($event)" [(ngModel)]="vnfType" type="text" id="vnfType">
111                     <span class="error-message">{{errorMessage}}</span>
112                 </div>
113
114             </div>
115             <div class="form-check">
116                 <label class="form-check-label">
117                     <input  name="vnfcRequired" class="form-check-input" [(ngModel)]="vnfcRequired" type="checkbox"
118                            id="vnfcRequired">
119                     This VNF has VNFC templates
120                 </label>
121             </div>
122         </div>
123         <div class="modal-footer">
124             <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent
125         
126         " (click)="c('no')">Proceed To Upload
127             </button>
128             <button type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" [disabled]="invalid">Next
129             </button>
130
131         </div>
132     </form>
133 </ng-template> -->
134
135 <!-- Modal for Create new Vnf -->
136 <modal #createVnfcModal>
137     <form ngNativeValidate (ngSubmit)="buildNewDesign('yes')">
138         <modal-header [show-close]="true">
139             <h4 class="modal-title">Enter VNF Type</h4>
140         </modal-header>
141         <modal-body>
142             <div class="form-group row">
143                 <label for="example-text-input" class="col-12 col-form-label">Enter Vnf Type</label>
144                 <div class="col-12">
145                     <input pattern=".*[^ ].*" required name="vnfType" class="form-control" (ngModelChange)="validateVnfName($event)" [(ngModel)]="vnfType" type="text" id="vnfType">
146                     <span class="error-message">{{errorMessage}}</span>
147                 </div>
148
149             </div>
150             <div class="form-check">
151                 <label class="form-check-label">
152                     <input  name="vnfcRequired" class="form-check-input" [(ngModel)]="vnfcRequired" type="checkbox"
153                             id="vnfcRequired">
154                     This VNF has VNFC templates
155                 </label>
156             </div>
157         </modal-body>
158         <modal-footer [show-default-buttons]="false">
159             <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" (click)="buildNewDesign('no')">
160                 Proceed To Upload
161             </button>
162             <button type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" [disabled]="invalid">
163                 Next
164             </button>
165         </modal-footer>
166     </form>
167 </modal>