Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 1 | <div class="home-container"> |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 2 | <div style="display: flex; |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 3 | padding-bottom:7px; |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 4 | justify-content: space-between;"> |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 5 | <div style="font-size: 22px; display: flex; align-items: center;">Monitoring</div> |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 6 | |
| 7 | <div style="display: flex;"> |
Manor, Yanir (ym903w) | 22eda03 | 2018-09-20 14:18:38 +0300 | [diff] [blame] | 8 | <button mat-icon-button [disabled]="!checkCanCreate()" style="margin-right: 10px;" data-tests-id="btn-import-mc" (click)="importScreen()"> |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 9 | <span style="width: 100%; |
| 10 | height: 100%; |
| 11 | display: flex; |
| 12 | justify-content: center; |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 13 | align-items: center;" [innerHTML]="'download' | feather:20"></span> |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 14 | </button> |
| 15 | |
Manor, Yanir (ym903w) | 22eda03 | 2018-09-20 14:18:38 +0300 | [diff] [blame] | 16 | <button mat-raised-button color="primary" (click)="createScreen()" data-tests-id="btn-create-mc" class="btn-create" [disabled]="!checkCanCreate()"> |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 17 | 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) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 25 | |
| 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) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 29 | </div> |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 30 | </div> |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 31 | |
Manor, Yanir (ym903w) | 22eda03 | 2018-09-20 14:18:38 +0300 | [diff] [blame] | 32 | <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) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 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> |
Manor, Yanir (ym903w) | 22eda03 | 2018-09-20 14:18:38 +0300 | [diff] [blame] | 38 | <div data-tests-id="tableItemsMonitoringConfiguration" (click)="checkTableItemHoverCondition(row) && editTableItem(row)" |
| 39 | [ngClass]="{'ngx-datatable-monitoring-name': checkTableItemHoverCondition(row)}"> |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 40 | <span> {{value}} </span> |
| 41 | </div> |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 42 | </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) | 22eda03 | 2018-09-20 14:18:38 +0300 | [diff] [blame] | 56 | <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) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 59 | |
Manor, Yanir (ym903w) | 22eda03 | 2018-09-20 14:18:38 +0300 | [diff] [blame] | 60 | <div *ngIf="hoveredIndex == rowIndex" style="margin-top:-5px;"> |
| 61 | <button data-tests-id="tableItemsButtonDelete" *ngIf="checkCanCreate(); else elseBtnBlock" mat-icon-button |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 62 | 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) | 22eda03 | 2018-09-20 14:18:38 +0300 | [diff] [blame] | 65 | |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 66 | <ng-template #elseBtnBlock> |
| 67 | |
Manor, Yanir (ym903w) | 22eda03 | 2018-09-20 14:18:38 +0300 | [diff] [blame] | 68 | <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) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 72 | |
| 73 | </div> |
| 74 | |
| 75 | </ng-template> |
| 76 | </ngx-datatable-column> |
| 77 | |
| 78 | </ngx-datatable> |
| 79 | |
| 80 | |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 81 | </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) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 89 | <div style="font-size: 18px;"> |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 90 | Monitoring Configuration does not Exist |
| 91 | </div> |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 92 | <div style="padding: 0.5em; padding-top: 1em; font-size: 13px;" data-tests-id="new-monitoring-title"> |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 93 | A Monitoring Configuration (MC) was not yet created |
| 94 | </div> |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame] | 95 | <div style="font-size: 13px;"> |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 96 | Please create a new MC to monitor the service |
| 97 | </div> |
| 98 | <div class="wrapper-btn-add-mc"> |
Manor, Yanir (ym903w) | 22eda03 | 2018-09-20 14:18:38 +0300 | [diff] [blame] | 99 | <button mat-mini-fab color="primary" (click)="createScreen()" data-tests-id="btn-fab-create-mc" [disabled]="!checkCanCreate()"> |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 100 | <span [innerHTML]="'plus' | feather:24"></span> |
| 101 | </button> |
Manor, Yanir (ym903w) | 22eda03 | 2018-09-20 14:18:38 +0300 | [diff] [blame] | 102 | <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) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 103 | </div> |
| 104 | </div> |
| 105 | </ng-template> |
| 106 | </div> |