blob: 99ab3215eb0686f67ba943c25575b6680fba131e [file] [log] [blame]
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +03001<div class="home-container">
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +03002 <div style="display: flex;
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +03003 padding-bottom:7px;
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +03004 justify-content: space-between;">
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +03005 <div style="font-size: 22px; display: flex; align-items: center;">Monitoring</div>
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +03006
7 <div style="display: flex;">
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +03008 <button mat-icon-button [disabled]="!checkCanCreate()" style="margin-right: 10px;" data-tests-id="btn-import-mc" (click)="importScreen()">
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +03009 <span style="width: 100%;
10 height: 100%;
11 display: flex;
12 justify-content: center;
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030013 align-items: center;" [innerHTML]="'download' | feather:20"></span>
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030014 </button>
15
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030016 <button mat-raised-button color="primary" (click)="createScreen()" data-tests-id="btn-create-mc" class="btn-create" [disabled]="!checkCanCreate()">
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030017 Create New MC
18 </button>
19 </div>
20 </div>
21
22 <div *ngIf="showTable===true; then thenBlock else elseBlock"></div>
23
24 <ng-template #thenBlock>
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030025
26 <div *ngIf="unavailableMonitoringComponents.length > 0" data-tests-id="unavailableArea" style="color: white; background: red; padding: 1rem; border-radius: 5px; font-weight: bold; margin: 1em 0;">
27 <div *ngFor="let item of unavailableMonitoringComponents">
28 {{item.uuid}}
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030029 </div>
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030030 </div>
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030031
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030032 <ngx-datatable data-tests-id="monitoringComponentTable" class="material" [rows]="monitoringComponents" [loadingIndicator]="loadingIndicator"
33 [columnMode]="'flex'" [headerHeight]="40" [footerHeight]="40" [limit]="12" [rowHeight]="40" (selected)="onTableSelectItem($event)"
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030034 [selectionType]="'single'" [selected]="selectedLine" (activate)="onTableActivate($event)">
35
36 <ngx-datatable-column name="Monitoring Configuration" prop="name" [flexGrow]="3">
37 <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030038 <div data-tests-id="tableItemsMonitoringConfiguration" (click)="checkTableItemHoverCondition(row) && editTableItem(row)"
39 [ngClass]="{'ngx-datatable-monitoring-name': checkTableItemHoverCondition(row)}">
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030040 <span> {{value}} </span>
41 </div>
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030042 </ng-template>
43
44 </ngx-datatable-column>
45 <ngx-datatable-column name="VNFI Name" prop="vfiName" [flexGrow]="3">
46 <ng-template let-value="value" ngx-datatable-cell-template>
47
48 <div pTooltip="{{value}}" tooltipPosition="bottom">{{value}}</div>
49
50 </ng-template>
51
52
53 </ngx-datatable-column>
54 <ngx-datatable-column name="Version" prop="version" [flexGrow]="1"></ngx-datatable-column>
55 <ngx-datatable-column name="Status" prop="status" [flexGrow]="2"></ngx-datatable-column>
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030056 <ngx-datatable-column name="Last Updated by" prop="lastUpdaterUserId" [flexGrow]="2"></ngx-datatable-column>
57 <ngx-datatable-column name="Actions" sortable="false" prop="id" [flexGrow]="1">
58 <ng-template let-row="row" let-rowIndex="rowIndex" ngx-datatable-cell-template>
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030059
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030060 <div *ngIf="hoveredIndex == rowIndex" style="margin-top:-5px;">
61 <button data-tests-id="tableItemsButtonDelete" *ngIf="checkCanCreate(); else elseBtnBlock" mat-icon-button
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030062 data-tests-id="tableItemsButtonDelete" (click)="deleteTableItem(row, rowIndex)" style="width:30px; height: 30px;">
63 <span style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;" [innerHTML]="'trash-2' | feather:18"></span>
64 </button>
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030065
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030066 <ng-template #elseBtnBlock>
67
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030068 <button data-tests-id="tableItemsButtonInfo" mat-icon-button data-tests-id="tableItemsButtonInfo" style="width:30px; height: 30px;">
69 <span style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;" [innerHTML]="'info' | feather:18"></span>
70 </button>
71 </ng-template>
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030072
73 </div>
74
75 </ng-template>
76 </ngx-datatable-column>
77
78 </ngx-datatable>
79
80
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030081 </ng-template>
82
83 <ng-template #elseBlock>
84 <div style="display: flex;
85 flex-direction: column;
86 justify-content: center;
87 align-items: center;
88 flex:1;">
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030089 <div style="font-size: 18px;">
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030090 Monitoring Configuration does not Exist
91 </div>
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030092 <div style="padding: 0.5em; padding-top: 1em; font-size: 13px;" data-tests-id="new-monitoring-title">
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030093 A Monitoring Configuration (MC) was not yet created
94 </div>
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030095 <div style="font-size: 13px;">
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030096 Please create a new MC to monitor the service
97 </div>
98 <div class="wrapper-btn-add-mc">
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +030099 <button mat-mini-fab color="primary" (click)="createScreen()" data-tests-id="btn-fab-create-mc" [disabled]="!checkCanCreate()">
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +0300100 <span [innerHTML]="'plus' | feather:24"></span>
101 </button>
Manor, Yanir (ym903w)22eda032018-09-20 14:18:38 +0300102 <span data-tests-id="btn-span-create-mc" style="margin-top: 10px; font-size: 14px; " [style.color]="!checkCanCreate() ? '#ebebe4' : '#009FDB'">Add First MC</span>
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +0300103 </div>
104 </div>
105 </ng-template>
106</div>