blob: 90e82d330483684b935cb2d507eced715d87448d [file] [log] [blame]
Stone, Avi (as206k)9b2ceb32018-04-12 16:36:39 +03001<div class="container">
2 <div style="display: flex;
3 justify-content: space-between;">
4 <div style="font-size: 1.7em; display: flex; align-items: center;">Monitoring</div>
5
6 <div style="display: flex;">
7 <button mat-icon-button [disabled]="checkCanCreate()" (click)="importScreen()">
8 <span style="width: 100%;
9 height: 100%;
10 display: flex;
11 justify-content: center;
12 align-items: center;" [innerHTML]="'download' | feather:22"></span>
13 </button>
14
15 <button mat-raised-button color="primary" (click)="createScreen()" data-tests-id="btn-create-mc" [disabled]="checkCanCreate()">
16 Create New MC
17 </button>
18 </div>
19 </div>
20
21 <div *ngIf="showTable===true; then thenBlock else elseBlock"></div>
22
23 <ng-template #thenBlock>
24 <!-- Table -->
25 <div class="table-wrapper">
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}}
29 </div>
30 </div>
31 <table class="mcTable">
32 <thead>
33 <tr data-tests-id="monitoringComponentTableHeaders">
34 <th>Monitoring Configuration</th>
35 <th>VNFI Name</th>
36 <th style="width:90px;">Version</th>
37 <th style="width:140px;">Status</th>
38 <th style="width:140px;">Last Updated by</th>
39 <th style="width:96px;">Action</th>
40 </tr>
41 </thead>
42 <tbody>
43 <tr *ngFor="let item of monitoringComponents; let i = index" on-mouseleave="hoveredIndex=null" (click)="onSelect(i)" [class.active]="i == selectedLine"
44 data-tests-id="monitoringComponentTableItems" on-mouseover="hoveredIndex=i">
45 <td color="blue">
46 <div [hidden]="checkHoverCondition(item)" data-tests-id="tableItemsMonitoringConfiguration" class="table-Monitoring-Component" (click)="editItem(item)">
47 {{item.name}}
48 </div>
49 </td>
50 <td>
51 <span pTooltip="{{item.vfiName}}" tooltipPosition="bottom" style="padding:5px;">{{item.vfiName}}</span>
52 </td>
53 <td style="width:90px;">{{item.version}}</td>
54 <td style="width:140px;">{{item.status}}</td>
55 <td style="width:140px;">{{item.lastUpdaterUserId}}</td>
56 <td style="width:80px;">
57 <div *ngIf="i==hoveredIndex" [hidden]="checkHoverCondition(item)">
58 <button mat-icon-button data-tests-id="tableItemsButtonDelete" (click)="deleteItem(item)" style="width:30px; height: 30px;">
59 <span style="width: 100%;
60 height: 100%;
61 display: flex;
62 justify-content: center;
63 align-items: center;" [innerHTML]="'trash-2' | feather:18"></span>
64 </button>
65 </div>
66 <div *ngIf="i==hoveredIndex" [hidden]="!checkHoverCondition(item)">
67 <button mat-icon-button data-tests-id="tableItemsButtonInfo" style="width:30px; height: 30px;">
68 <span style="width: 100%;
69 height: 100%;
70 display: flex;
71 justify-content: center;
72 align-items: center;" [innerHTML]="'info' | feather:18"></span>
73 </button>
74 </div>
75 </td>
76 </tr>
77 </tbody>
78 </table>
79 </div>
80 </ng-template>
81
82 <ng-template #elseBlock>
83 <div style="display: flex;
84 flex-direction: column;
85 justify-content: center;
86 align-items: center;
87 flex:1;">
88 <div style="font-size: 1.5em;">
89 Monitoring Configuration does not Exist
90 </div>
91 <div style="padding: 0.5em; padding-top: 1em;" data-tests-id="new-monitoring-title">
92 A Monitoring Configuration (MC) was not yet created
93 </div>
94 <div>
95 Please create a new MC to monitor the service
96 </div>
97 <div class="wrapper-btn-add-mc">
98 <button mat-mini-fab color="primary" (click)="createScreen()" data-tests-id="btn-fab-create-mc" [disabled]="checkCanCreate()">
99 <span [innerHTML]="'plus' | feather:24"></span>
100 </button>
101 <span data-tests-id="btn-span-create-mc" style="margin-top: 1rem; font-size: 1.2em; font-weight: 400;" [style.color]="checkCanCreate() ? '#ebebe4' : '#009FDB'">Add First MC</span>
102 </div>
103 </div>
104 </ng-template>
105</div>
106