Apply mat-table to control and catalog
[portal/ric-dashboard.git] / webapp-frontend / src / app / catalog / catalog.component.html
index 86e925e..2379fd4 100644 (file)
@@ -7,9 +7,9 @@
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
-  
+
        http://www.apache.org/licenses/LICENSE-2.0
-  
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   ========================LICENSE_END===================================
   -->
 <div class="catalog__section">
-    <h3 class="catalog__header">xApp Catalog</h3>
-    <ng2-smart-table [settings]="settings" [source]="source" (custom)="onDeployxApp($event)">
-    </ng2-smart-table>
-    <!-- <app-modal-event></app-modal-event> -->
+  <h3 class="catalog__header">xApp Catalog</h3>
+  <div class="spinner-container" *ngIf="dataSource.loading$ | async">
+    <mat-spinner></mat-spinner>
+  </div>
+  <table mat-table [dataSource]="dataSource" class="catalog-table mat-elevation-z8">
+
+    <ng-container matColumnDef="name">
+      <mat-header-cell *matHeaderCellDef> xApp Name </mat-header-cell>
+      <mat-cell *matCellDef="let element"> {{element.name}} </mat-cell>
+    </ng-container>
+
+    <ng-container matColumnDef="version">
+      <mat-header-cell *matHeaderCellDef> xApp version </mat-header-cell>
+      <mat-cell *matCellDef="let element"> {{element.version}} </mat-cell>
+    </ng-container>
+
+    <ng-container matColumnDef="status">
+      <mat-header-cell *matHeaderCellDef> Status </mat-header-cell>
+      <mat-cell *matCellDef="let element"> {{element.status}} </mat-cell>
+    </ng-container>
+
+    <ng-container matColumnDef="action">
+      <mat-header-cell *matHeaderCellDef> Action </mat-header-cell>
+      <mat-cell *matCellDef="let element">
+        <div class="catalog-button-row">
+          <button mat-icon-button
+                  (click)="onConfigurexApp(element.name)">
+            <mat-icon>settings</mat-icon>
+          </button>
+          <button mat-button class="mat-raised-button mat-primary"
+                  (click)="onDeployxApp(element.name)">
+            Deploy
+          </button>
+        </div>
+      </mat-cell>
+    </ng-container>
+
+    <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
+    <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
+  </table>
 </div>