Added service components
[portal.git] / portal-FE-common / src / app / pages / widget-onboarding / widget-onboarding.component.html
1 <!--
2   ============LICENSE_START==========================================
3   ONAP Portal
4   ===================================================================
5   Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6   ===================================================================
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   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
25  
26               https://creativecommons.org/licenses/by/4.0/
27  
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.
33  
34   ============LICENSE_END============================================
35    
36   -->
37
38 <div class="container">
39     <div class="onap-main-view-title">
40       <h1>Widget Onboarding</h1>
41     </div>
42
43     <div class="c-onap-abs-select default">
44       <div class="table-dropdown">
45         <mat-form-field class="widget-application-select">
46             <mat-label> Select Application </mat-label>
47             <mat-select name="widget-application-select" [(ngModel)]="filterByApp" #appId="ngModel" (ngModelChange)="applyAppFilter($event)">
48               <mat-option *ngFor="let rowData of applicationList" [value]="rowData">{{rowData.title}}</mat-option>
49             </mat-select>
50         </mat-form-field>
51            
52         <mat-form-field>
53           <input matInput type="text" (keyup)="applyFilter($event.target.value)" placeholder="Search in entire table">
54         </mat-form-field>
55        
56         <button type="button" class="btn btn-primary" (click)="openAddWigetModal('')">
57           <i class="icon ion-md-person-add"></i>Add Widget
58         </button>
59       </div>
60     </div>
61   
62     <table mat-table [dataSource]="dataSource" matSort>
63       <!-- Wiget Name Column -->
64       <ng-container matColumnDef="widgetName">
65         <th id="col1" mat-header-cell *matHeaderCellDef> Widget Name  </th>
66         <td (click)="openAddWigetModal(element)" id="rowheader_t1_{{i}}-widgetName" 
67           mat-cell *matCellDef="let element; let i = index;"> {{element.name}}
68         </td>
69       </ng-container>
70   
71       <!-- Application Name Column -->
72       <ng-container matColumnDef="application">
73         <th id="col2" mat-header-cell *matHeaderCellDef> Application </th>
74         <td (click)="openAddWigetModal(element)" id="rowheader_t1_{{i}}-application" 
75           mat-cell *matCellDef="let element; let i=index;"> {{element.appContent}} </td>
76       </ng-container>
77   
78       <!-- Download URL -->
79       <ng-container matColumnDef="download">
80         <th id="col3" mat-header-cell *matHeaderCellDef> Download </th>
81         <td id="rowheader_t1_{{$index}}-download" mat-cell *matCellDef="let element; let i=index;">
82             <i class="icon ion-md-download" (click)="downloadWidget(element)"></i>
83         </td>
84       </ng-container>
85   
86       <!-- Delete Column -->
87       <ng-container matColumnDef="delete">
88         <th id="col4" mat-header-cell *matHeaderCellDef> Delete </th>
89         <td id="rowheader_t1_{{i}}" mat-cell *matCellDef="let element; let i=index;">
90           <span class="icon-trash" id="{{i}}-button-portal-admin-remove" (click)="removeWidget(element)">
91             <i class="icon ion-md-trash"></i>
92           </span>
93         </td>
94       </ng-container>
95   
96       <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
97       <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
98     </table>
99     <mat-paginator [pageSizeOptions]="[10, 20]" showFirstLastButtons></mat-paginator>
100 </div>