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 Application </mat-label>
50 <mat-select [disabled]='adminsAppsData.length === 0'>
51 <mat-option [value]="select-application" (click)="changeSelectApp('select-application')">Select Application
53 <mat-option *ngFor="let app of adminsAppsData" (click)="changeSelectApp(app)" [value]="app.value">
54 {{app.title}}</mat-option>
57 <span class="onap-spinner" *ngIf="adminsAppsData.length === 0"></span>
59 <div *ngIf="dialogState===2">
60 <div class="upload-instructions">Select Upload File:</div>
61 <!-- input type=file is difficult to style.
62 Instead use a label styled as a button. -->
63 <label class="file-label">
64 <input type="file" (change)="onFileSelect($event.target)" accept="text/plain,.csv" />
65 </label>{{selectedFile}}
66 <div class="upload-instructions">File must be .csv or .txt and have one entry per line with this format:
67 <pre>orgUserId, role name</pre>
70 <div class="bulk-upload" *ngIf="dialogState===3">
71 <!-- progress indicator -->
72 <div class="upload-instructions" [hidden]="!isProcessing">
76 <span class="onap-spinner"></span>
79 <!-- progress indicator -->
80 <div class="upload-instructions" [hidden]="!isProcessedRecords">
83 <div [hidden]="isProcessing || isProcessedRecords">
84 <div class="upload-instructions">
85 Click OK to upload the valid requests.
86 Invalid requests will be ignored.</div>
88 <table mat-table [dataSource]="uploadFileDataSource">
89 <!-- Search Result Column-->
90 <ng-container matColumnDef="line">
91 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Line
92 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">{{element.line}}
95 <ng-container matColumnDef="orgUserId">
96 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> OrgUserID
97 <td id="rowheader_t1_{{i}}-roles" mat-cell *matCellDef="let element; let i=index;">
101 <ng-container matColumnDef="appRole">
102 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> App Role
103 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
107 <ng-container matColumnDef="status">
108 <th id="rowheader-result" mat-header-cell *matHeaderCellDef> Status
109 <td id="table-data-{{i}}" mat-cell *matCellDef="let element; let i = index;">
114 <tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
115 <tr mat-row id="table-row-{{i}}" *matRowDef="let row; columns: displayedColumns; let i = index;"></tr>
120 <div class="modal-footer">
121 <button type="button" class="btn btn-primary" *ngIf="dialogState === 2" (click)="navigateBack()">Back</button>
123 <button type="submit" id="dialog1Button" class="btn btn-primary" [disabled]="selectApp" *ngIf="dialogState === 1"
124 (click)="uploadFileDialog()">Next</button>
125 <button type="button" class="btn btn-primary" *ngIf="dialogState !== 3"
126 (click)="activeModal.close('Close')">Close</button>
127 <button type="submit" class="btn btn-primary" *ngIf="dialogState === 3" (click)="updateDB()">Ok</button>
128 <button type="button" class="btn btn-primary" *ngIf="dialogState === 3" (click)="navigateDialog2()">Cancel</button>