blob: 8cea74120ab31b978c6fb565168399437895b1a7 [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;">
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +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
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +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
32 <ngx-datatable data-tests-id="monitoringComponentTable" class="material" [rows]="monitoringComponents" [loadingIndicator]="loadingIndicator" [columnMode]="'flex'"
33 [headerHeight]="40" [footerHeight]="40" [limit]="10" [rowHeight]="40"(selected)="onTableSelectItem($event)"
34 [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>
38
39 <div data-tests-id="tableItemsMonitoringConfiguration" [hidden]="checkTableItemHoverCondition(row)" (click)="editTableItem(row)"
40 class="ngx-datatable-monitoring-name">
41 <span> {{value}} </span>
42 </div>
43 <div data-tests-id="tableItemsMonitoringConfigurationNotOwner" [hidden]="!checkTableItemHoverCondition(row)">
44 <span>{{value}} </span>
45 </div>
46 </ng-template>
47
48 </ngx-datatable-column>
49 <ngx-datatable-column name="VNFI Name" prop="vfiName" [flexGrow]="3">
50 <ng-template let-value="value" ngx-datatable-cell-template>
51
52 <div pTooltip="{{value}}" tooltipPosition="bottom">{{value}}</div>
53
54 </ng-template>
55
56
57 </ngx-datatable-column>
58 <ngx-datatable-column name="Version" prop="version" [flexGrow]="1"></ngx-datatable-column>
59 <ngx-datatable-column name="Status" prop="status" [flexGrow]="2"></ngx-datatable-column>
60 <ngx-datatable-column name="Last Updated by" prop="lastUpdaterUserId" [flexGrow]="2"></ngx-datatable-column>
61 <ngx-datatable-column name="Actions" sortable="false" prop="id" [flexGrow]="1">
62 <ng-template let-row="row" let-rowIndex="rowIndex" ngx-datatable-cell-template >
63
64 <div *ngIf="hoveredIndex == rowIndex" style="margin-top:-5px;" >
65 <button data-tests-id="tableItemsButtonDelete" *ngIf="!checkTableItemHoverCondition(row); else elseBtnBlock" mat-icon-button
66 data-tests-id="tableItemsButtonDelete" (click)="deleteTableItem(row, rowIndex)" style="width:30px; height: 30px;">
67 <span style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;" [innerHTML]="'trash-2' | feather:18"></span>
68 </button>
69
70 <ng-template #elseBtnBlock>
71
72 <button data-tests-id="tableItemsButtonInfo" mat-icon-button data-tests-id="tableItemsButtonInfo" style="width:30px; height: 30px;">
73 <span style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;" [innerHTML]="'info' | feather:18"></span>
74 </button>
75 </ng-template>
76
77 </div>
78
79 </ng-template>
80 </ngx-datatable-column>
81
82 </ngx-datatable>
83
84
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030085 </ng-template>
86
87 <ng-template #elseBlock>
88 <div style="display: flex;
89 flex-direction: column;
90 justify-content: center;
91 align-items: center;
92 flex:1;">
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030093 <div style="font-size: 18px;">
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +030094 Monitoring Configuration does not Exist
95 </div>
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030096 <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 +030097 A Monitoring Configuration (MC) was not yet created
98 </div>
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +030099 <div style="font-size: 13px;">
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +0300100 Please create a new MC to monitor the service
101 </div>
102 <div class="wrapper-btn-add-mc">
103 <button mat-mini-fab color="primary" (click)="createScreen()" data-tests-id="btn-fab-create-mc" [disabled]="checkCanCreate()">
104 <span [innerHTML]="'plus' | feather:24"></span>
105 </button>
Stone, Avi (as206k)548c5a22018-06-03 13:12:12 +0300106 <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 +0300107 </div>
108 </div>
109 </ng-template>
110</div>