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 | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 27 | </div> |
| 28 | </div> |
| 29 | |
Sean Condon | d6f95bf | 2020-01-21 10:10:23 +0000 | [diff] [blame] | 30 | <div class="summary-list" onosTableResize> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 31 | <div class="table-header"> |
| 32 | <table> |
| 33 | <tr> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 34 | <td colId="alarmId" (click)="onSort('id')">Alarm Id |
| 35 | <onos-icon classes="active-sort" [iconSize]="10" |
| 36 | [iconId]="sortIcon('id')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 37 | </td> |
| 38 | <td colId="alarmDeviceId" (click)="onSort('alarmDeviceId')">Device |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 39 | <onos-icon classes="active-sort" [iconSize]="10" |
| 40 | [iconId]="sortIcon('alarmDeviceId')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 41 | </td> |
| 42 | <td colId="alarmDesc" (click)="onSort('alarmDesc')">Description |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 43 | <onos-icon classes="active-sort" [iconSize]="10" |
| 44 | [iconId]="sortIcon('alarmDesc')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 45 | </td> |
| 46 | <td colId="alarmSource" (click)="onSort('alarmSource')">Source |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 47 | <onos-icon classes="active-sort" [iconSize]="10" |
| 48 | [iconId]="sortIcon('alarmSource')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 49 | </td> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 50 | <td colId="alarmTimeRaised" (click)="onSort('alarmTimeRaised')">Time |
| 51 | Raised |
| 52 | <onos-icon classes="active-sort" [iconSize]="10" |
| 53 | [iconId]="sortIcon('alarmTimeRaised')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 54 | </td> |
| 55 | <td colId="alarmSeverity" (click)="onSort('alarmSeverity')">Severity |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 56 | <onos-icon classes="active-sort" [iconSize]="10" |
| 57 | [iconId]="sortIcon('alarmSeverity')"></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="alarmAcknowledged" class="table-icon" |
| 60 | (click)="onSort('alarmAcknowledged')">Ack |
| 61 | <onos-icon classes="active-sort" [iconSize]="10" |
| 62 | [iconId]="sortIcon('alarmAcknowledged')"></onos-icon> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 63 | </td> |
| 64 | </tr> |
| 65 | </table> |
| 66 | </div> |
| 67 | |
| 68 | <div class="table-body"> |
| 69 | <table> |
| 70 | <tr class="table-body" *ngIf="tableData.length === 0" class="no-data"> |
| 71 | <td colspan="9">{{ annots.noRowsMsg }}</td> |
| 72 | </tr> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 73 | <tr *ngFor="let item of tableData | filter : tableDataFilter" |
| 74 | (click)="selectCallback($event, item)" |
| 75 | [ngClass]="{selected: item.id === selId, 'data-change': isChanged(item.id)}"> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 76 | <td>{{ item.id }}</td> |
| 77 | <td>{{ item.alarmDeviceId }}</td> |
| 78 | <td>{{ item.alarmDesc }}</td> |
| 79 | <td>{{ item.alarmSource }}</td> |
| 80 | <td>{{ item.alarmTimeRaised }}</td> |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 81 | <td [ngClass]="[item.alarmSeverity, 'severity']">{{ item.alarmSeverity }}</td> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 82 | <td class="table-icon"> |
| 83 | <onos-icon [iconId]="ackIcon(item.alarmAcknowledged)"></onos-icon> |
| 84 | </td> |
| 85 | </tr> |
| 86 | </table> |
| 87 | </div> |
| 88 | </div> |
| 89 | |
Sean Condon | 7c51a01 | 2019-12-04 12:47:05 +0000 | [diff] [blame] | 90 | <onos-alarmdetails class="floatpanels" id="{{ selId }}" |
| 91 | (closeEvent)="deselectRow($event)"></onos-alarmdetails> |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 92 | </div> |