2 ============LICENSE_START==========================================
4 ===================================================================
5 Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 ===================================================================
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
13 http://www.apache.org/licenses/LICENSE-2.0
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.
21 Unless otherwise specified, all documentation contained herein is licensed
22 under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23 you may not use this documentation except in compliance with the License.
24 You may obtain a copy of the License at
26 https://creativecommons.org/licenses/by/4.0/
28 Unless required by applicable law or agreed to in writing, documentation
29 distributed under the License is distributed on an "AS IS" BASIS,
30 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 See the License for the specific language governing permissions and
32 limitations under the License.
34 ============LICENSE_END============================================
39 <div class="container">
40 <div class="modal-header">
41 <h4 class="modal-title">{{title}}</h4>
42 <button type="button" class="close" aria-label="Close" (click)="activeModal.dismiss('Cross')">
43 <span aria-hidden="true">×</span>
46 <div class="modal-body">
47 <div *ngIf="dialogState === 1">
49 <mat-label> Select Upload Type: </mat-label>
50 <mat-select [(ngModel)]="selectedUploadDropdown">
51 <mat-option *ngFor="let uploadOpt of ngRepeatBulkUploadOptions" [value]="uploadOpt">
52 {{uploadOpt.title}}</mat-option>
56 <div *ngIf="dialogState === 2">
57 <div class="upload-instructions">Select Upload File:</div>
58 <!-- input type=file is difficult to style.
59 Instead use a label styled as a button. -->
60 <label class="file-label">
61 <input type="file" (change)="onFileSelect($event.target)" accept="text/plain,.csv" />
62 </label>{{selectedFile}}
63 <div *ngIf="selectedUploadDropdown.value === 'functions'" class="upload-instructions">File must be .csv or .txt
64 and one entry per line with this format:
65 <pre>Function Type, Function Instance, Function Action, Function Name</pre>
67 <div *ngIf="selectedUploadDropdown.value === 'roles'" class="upload-instructions">File must be .csv or .txt and
68 one entry per line with this format:
69 <pre>Role Name, Priority (Optional)</pre>
71 <div *ngIf="selectedUploadDropdown.value === 'roleFunctions'" class="upload-instructions">File must be .csv or
72 .txt and one entry per line with this format:
73 <pre>Role Name, Function Type, Function Instance, Function Action, Function Name</pre>
75 <div *ngIf="selectedUploadDropdown.value === 'globalRoleFunctions'" class="upload-instructions">File must be .csv
76 or .txt and one entry per line with this format:
77 <pre>Global Role Name, Function Type, Function Instance, Function Action, Function Name</pre>
80 <div class="bulk-upload" *ngIf="dialogState === 3">
82 <div *ngIf="selectedUploadDropdown.value === 'roles' && !isProcessing">Click OK to upload the valid
83 roles. Invalid or existing roles will be ignored.
84 <p style="font-size: 80%;">
85 <span id="required" style="color: Red;" visible="false">*</span>Name can only contain alphanumeric
86 characters, dots(.), forward slashes(/), and underscores(_)
90 <div *ngIf="selectedUploadDropdown.value === 'functions' && !isProcessing">Click OK to upload the valid
91 functions. Invalid or existing functions will be ignored.
92 <p style="font-size: 80%;">
93 <span id="required" style="color: Red; font-size: 180%;" visible="false">*</span>Type can only contain
95 characters, dots(.) and underscores(_)
97 <p style="font-size: 80%;">
98 <span id="required" style="color: Red; font-size: 180%;" visible="false">*</span>Action can only contain
100 characters, hyphens(-), dots(.) and underscores(_) and single
101 asterisk character(*)
103 <p style="font-size: 80%;">
104 <span id="required" style="color: Red; font-size: 180%;" visible="false">*</span>Instance/Code can only
106 characters, hyphens(-), dots(.), colons(:), forwardSlash(/) ,
107 asterisk(*) and underscores(_)
109 <p style="font-size: 80%;">
110 <span id="required" style="color: Red; font-size: 180%;" visible="false">*</span>Name can only contain
112 characters, spaces, hyphens(-), dots(.) and underscores(_)
116 <div *ngIf="selectedUploadDropdown.value === 'roleFunctions' && !isProcessing">Click OK to upload the valid
117 role functions. Invalid or existing functions will be ignored.
119 <div *ngIf="selectedUploadDropdown.value === 'globalRoleFunctions' && !isProcessing">Click OK to upload the valid
120 global role functions. Invalid or existing functions will be ignored.
122 <!-- progress indicator -->
123 <div class="upload-instructions" [hidden]="!isProcessing">
127 <span class="onap-spinner"></span>
130 <!-- progress indicator -->
131 <div class="upload-instructions" [hidden]="!isProcessedRecords">
134 <div [hidden]="isProcessing || isProcessedRecords">
136 <table [hidden]="selectedUploadDropdown.value !== 'functions'" mat-table
137 [dataSource]="uploadFunctionsDataSource">
139 <ng-container matColumnDef="line">
140 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Line
141 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">{{element.line}}
144 <ng-container matColumnDef="type">
145 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Type
146 <td id="rowheader_t1_{{i}}-roles" mat-cell *matCellDef="let element; let i=index;">
150 <ng-container matColumnDef="instance">
151 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Instance/Code
152 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
153 {{element.instance }}
156 <ng-container matColumnDef="action">
157 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Action
158 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
162 <ng-container matColumnDef="name">
163 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Name
164 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
168 <ng-container matColumnDef="status">
169 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Status
170 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
175 <tr mat-header-row *matHeaderRowDef="displayedFunctionColumns; sticky: true"></tr>
176 <tr mat-row id="table-row-{{i}}" *matRowDef="let row; columns: displayedFunctionColumns; let i = index;"></tr>
179 <table [hidden]="selectedUploadDropdown.value !== 'roles'" mat-table [dataSource]="uploadRolesDataSource">
181 <ng-container matColumnDef="line">
182 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Line
183 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">{{element.line}}
186 <ng-container matColumnDef="name">
187 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Name
188 <td id="rowheader_t1_{{i}}-roles" mat-cell *matCellDef="let element; let i=index;">
192 <ng-container matColumnDef="priority">
193 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Priority
194 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
198 <ng-container matColumnDef="status">
199 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Status
200 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
205 <tr mat-header-row *matHeaderRowDef="displayedRoleColumns; sticky: true"></tr>
206 <tr mat-row id="table-row-{{i}}" *matRowDef="let row; columns: displayedRoleColumns; let i = index;"></tr>
210 <table [hidden]="selectedUploadDropdown.value !== 'roleFunctions'" mat-table
211 [dataSource]="uploadRoleFunctionsDataSource">
213 <ng-container matColumnDef="line">
214 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Line
215 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">{{element.line}}
218 <ng-container matColumnDef="role">
219 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Role Name
220 <td id="rowheader_t1_{{i}}-roles" mat-cell *matCellDef="let element; let i=index;">
224 <ng-container matColumnDef="type">
225 <th id="rowheader-result" mat-header-cell *matHeaderCellDef>Function Type
226 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
230 <ng-container matColumnDef="instance">
231 <th id="rowheader-result" mat-header-cell *matHeaderCellDef>Function Instance
232 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
236 <ng-container matColumnDef="action">
237 <th id="rowheader-result" mat-header-cell *matHeaderCellDef>Function Action
238 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
242 <ng-container matColumnDef="name">
243 <th id="rowheader-result" mat-header-cell *matHeaderCellDef>Function Name
244 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
248 <ng-container matColumnDef="status">
249 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Status
250 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
255 <tr mat-header-row *matHeaderRowDef="displayedRoleFunctionColumns; sticky: true"></tr>
256 <tr mat-row id="table-row-{{i}}" *matRowDef="let row; columns: displayedRoleFunctionColumns; let i = index;">
260 <table [hidden]="selectedUploadDropdown.value !== 'globalRoleFunctions'" mat-table
261 [dataSource]="uploadGlobalRoleFunctionsDataSource">
263 <ng-container matColumnDef="line">
264 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Line
265 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">{{element.line}}
268 <ng-container matColumnDef="role">
269 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Global Role Name
270 <td id="rowheader_t1_{{i}}-roles" mat-cell *matCellDef="let element; let i=index;">
274 <ng-container matColumnDef="type">
275 <th id="rowheader-result" mat-header-cell *matHeaderCellDef>Function Type
276 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
280 <ng-container matColumnDef="instance">
281 <th id="rowheader-result" mat-header-cell *matHeaderCellDef>Function Instance
282 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
286 <ng-container matColumnDef="action">
287 <th id="rowheader-result" mat-header-cell *matHeaderCellDef>Function Action
288 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
292 <ng-container matColumnDef="name">
293 <th id="rowheader-result" mat-header-cell *matHeaderCellDef>Function Name
294 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
298 <ng-container matColumnDef="status">
299 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Status
300 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
305 <tr mat-header-row *matHeaderRowDef="displayedGlobalRoleFunctionColumns; sticky: true"></tr>
306 <tr mat-row id="table-row-{{i}}"
307 *matRowDef="let row; columns: displayedGlobalRoleFunctionColumns; let i = index;"></tr>
312 <div class="modal-footer">
313 <button type="submit" class="btn btn-primary" [hidden]="dialogState !== 1"
314 (click)="navigateUploadScreen()">Next</button>
315 <button type="submit" class="btn btn-primary" [hidden]="dialogState !== 2"
316 (click)="navigateSelectTypeUpload()">Back</button>
317 <button type="submit" class="btn btn-primary" [hidden]="dialogState !== 3" (click)="updateInDB()">Ok</button>
318 <button type="submit" class="btn btn-primary" [hidden]="dialogState !== 3"
319 (click)="navigateUploadScreen()">Cancel</button>
320 <button type="button" class="btn btn-primary" [hidden]="dialogState !== 1"
321 (click)="activeModal.close('Close')">Cancel</button>