Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 1 | <!-- |
| 2 | ~ Copyright 2018-present Open Networking Foundation |
| 3 | ~ |
| 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | ~ you may not use this file except in compliance with the License. |
| 6 | ~ You may obtain a copy of the License at |
| 7 | ~ |
| 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | ~ |
| 10 | ~ Unless required by applicable law or agreed to in writing, software |
| 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | ~ See the License for the specific language governing permissions and |
| 14 | ~ limitations under the License. |
| 15 | --> |
| 16 | <div id="ov-alarm-table"> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 17 | <onos-loading [theme]="'light'" [running]="loadingIconShown"></onos-loading> |
| 18 | <div class="tabular-header"> |
| 19 | <h2>Alarms for {{ devId ? devId : "all devices" }} ({{ tableData.length }} total)</h2> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 20 | <div class="ctrl-btns"> |
| 21 | <div class="refresh" (click)="toggleRefresh()"> |
| 22 | <!-- See icon.theme.css for the defintions of the classes active and refresh--> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 23 | <onos-icon classes="{{ autoRefresh?'active refresh':'refresh' }}" |
| 24 | iconId="refresh" iconSize="36" |
| 25 | toolTip="{{ autoRefreshTip }}"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 26 | </div> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 27 | <div class="separator"></div> |
| 28 | <!--div (click)="(!!selId) ? confirmAction(AlarmActionEnum.ACKNOWLEDGE) : ''"> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 29 | <onos-icon classes="{{ ctrlBtnState.acknowledged?'active-rect play':'play' }}" |
| 30 | iconId="play" iconSize="42" toolTip="{{ acknowledgeTip }}"></onos-icon> |
| 31 | </div> |
| 32 | <div (click)="(!!selId) ? confirmAction(AlarmActionEnum.CLEAR) : ''"> |
| 33 | <onos-icon classes="{{ ctrlBtnState.cleared?'active-rect stop':'stop' }}" |
| 34 | iconId="stop" iconSize="42" toolTip="{{ clearTip }}"></onos-icon> |
| 35 | </div--> |
| 36 | </div> |
| 37 | </div> |
| 38 | |
| 39 | <div class="summary-list" class="summary-list" onosTableResize> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 40 | <div class="table-header"> |
| 41 | <table> |
| 42 | <tr> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 43 | <td colId="alarmId" (click)="onSort('id')">Alarm Id |
| 44 | <onos-icon classes="active-sort" [iconSize]="10" |
| 45 | [iconId]="sortIcon('id')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 46 | </td> |
| 47 | <td colId="alarmDeviceId" (click)="onSort('alarmDeviceId')">Device |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 48 | <onos-icon classes="active-sort" [iconSize]="10" |
| 49 | [iconId]="sortIcon('alarmDeviceId')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 50 | </td> |
| 51 | <td colId="alarmDesc" (click)="onSort('alarmDesc')">Description |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 52 | <onos-icon classes="active-sort" [iconSize]="10" |
| 53 | [iconId]="sortIcon('alarmDesc')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 54 | </td> |
| 55 | <td colId="alarmSource" (click)="onSort('alarmSource')">Source |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 56 | <onos-icon classes="active-sort" [iconSize]="10" |
| 57 | [iconId]="sortIcon('alarmSource')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 58 | </td> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 59 | <td colId="alarmTimeRaised" (click)="onSort('alarmTimeRaised')">Time |
| 60 | Raised |
| 61 | <onos-icon classes="active-sort" [iconSize]="10" |
| 62 | [iconId]="sortIcon('alarmTimeRaised')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 63 | </td> |
| 64 | <td colId="alarmSeverity" (click)="onSort('alarmSeverity')">Severity |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 65 | <onos-icon classes="active-sort" [iconSize]="10" |
| 66 | [iconId]="sortIcon('alarmSeverity')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 67 | </td> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 68 | <td colId="alarmAcknowledged" class="table-icon" |
| 69 | (click)="onSort('alarmAcknowledged')">Ack |
| 70 | <onos-icon classes="active-sort" [iconSize]="10" |
| 71 | [iconId]="sortIcon('alarmAcknowledged')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 72 | </td> |
| 73 | </tr> |
| 74 | </table> |
| 75 | </div> |
| 76 | |
| 77 | <div class="table-body"> |
| 78 | <table> |
| 79 | <tr class="table-body" *ngIf="tableData.length === 0" class="no-data"> |
| 80 | <td colspan="9">{{ annots.noRowsMsg }}</td> |
| 81 | </tr> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 82 | <tr *ngFor="let item of tableData | filter : tableDataFilter" |
| 83 | (click)="selectCallback($event, item)" |
| 84 | [ngClass]="{selected: item.id === selId, 'data-change': isChanged(item.id)}"> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 85 | <td>{{ item.id }}</td> |
| 86 | <td>{{ item.alarmDeviceId }}</td> |
| 87 | <td>{{ item.alarmDesc }}</td> |
| 88 | <td>{{ item.alarmSource }}</td> |
| 89 | <td>{{ item.alarmTimeRaised }}</td> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 90 | <td [ngClass]="[item.alarmSeverity, 'severity']">{{ item.alarmSeverity }}</td> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 91 | <td class="table-icon"> |
| 92 | <onos-icon [iconId]="ackIcon(item.alarmAcknowledged)"></onos-icon> |
| 93 | </td> |
| 94 | </tr> |
| 95 | </table> |
| 96 | </div> |
| 97 | </div> |
| 98 | |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 99 | <onos-alarmdetails class="floatpanels" id="{{ selId }}" |
| 100 | (closeEvent)="deselectRow($event)"></onos-alarmdetails> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 101 | </div> |