Add Xapp Onboarder frontend UI
[portal/ric-dashboard.git] / dashboard / webapp-frontend / src / app / catalog / catalog.component.html
1 <!--
2   ========================LICENSE_START=================================
3   O-RAN-SC
4   %%
5   Copyright (C) 2019 AT&T Intellectual Property
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   <div class="catalog__section">
21     <h3 class="rd-global-page-title">xApp Catalog</h3>
22
23     <button mat-flat-button color="primary" class="right-button" (click)="onboard()">Onboard Xapp</button>
24
25     <table mat-table [dataSource]="dataSource" matSort class="catalog-table mat-elevation-z8">
26
27       <ng-container matColumnDef="name">
28         <mat-header-cell *matHeaderCellDef mat-sort-header> App Name </mat-header-cell>
29         <mat-cell *matCellDef="let element"> {{element.name}} </mat-cell>
30       </ng-container>
31
32       <ng-container matColumnDef="version">
33         <mat-header-cell *matHeaderCellDef mat-sort-header> Version </mat-header-cell>
34         <mat-cell *matCellDef="let element"> {{element.version}} </mat-cell>
35       </ng-container>
36
37       <ng-container matColumnDef="action">
38         <mat-header-cell *matHeaderCellDef> Action </mat-header-cell>
39         <mat-cell *matCellDef="let element">
40           <div class="catalog-button-row">
41             <button mat-icon-button (click)="onConfigureApp(element)">
42               <mat-icon matTooltip="Adjust settings">settings</mat-icon>
43             </button>
44             <button mat-icon-button (click)="onDeployApp(element)">
45               <mat-icon matTooltip="Deploy app">cloud_upload</mat-icon>
46             </button>
47           </div>
48         </mat-cell>
49       </ng-container>
50
51       <ng-container matColumnDef="noRecordsFound">
52         <mat-footer-cell *matFooterCellDef>No records found.</mat-footer-cell>
53       </ng-container>
54
55       <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
56       <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
57       <mat-footer-row *matFooterRowDef="['noRecordsFound']" [ngClass]="{'display-none': dataSource.rowCount > 0}"></mat-footer-row>
58
59     </table>
60
61     <div class="spinner-container" *ngIf="dataSource.loading$ | async">
62       <mat-spinner diameter=50></mat-spinner>
63     </div>
64
65   </div>