aboutsummaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/alarm/alarm.component.html
blob: 312ec2365a034e20b9533dfe78fa4e8e087ec497 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!--
    Copyright (C) 2019 CMCC, Inc. and others. All rights reserved.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<h3 class="title"> <span (click)="detailHide()" style="cursor:pointer; float:right;" *ngIf="detailshow">Alarm</span> <span *ngIf="detailshow">Device Alarm Details</span> </h3>
<div style="padding:0px 20px 20px 20px;">
    <div class="charts" [@showHideAnimate]="state">
        <div class="chartsleft">
            <div class="active sctive_closed">
                <div>Active</div>
                <div>13,980</div>
                <div><nz-progress [nzPercent]="30" [nzShowInfo]="false"></nz-progress></div>
                <div>There are 13980 faults waiting to be solved</div>
            </div>
            <div class="closed sctive_closed">
                <div>Closed</div>
                <div>23,980</div>
                <div><nz-progress [nzPercent]="50" [nzShowInfo]="false"></nz-progress></div>
                <div>23,980 faults have been fixed</div>
            </div>
        </div>
        <div class="chartsright">
            <span>Daily Total</span>
            <app-line [initData]="alarmChartInit" [chartData]="alarmChartData"></app-line>
        </div>
    </div>
    <div class="select" [@showHideAnimate]="state">
        <div class="query_criteria">
            <div class="query_item">
                <span>Source Name: </span>
                <nz-dropdown [nzTrigger]="'click'" [nzPlacement]="'bottomLeft'">
                    <button nz-button nz-dropdown><span>{{sourceNameSelected}}</span> <i class="anticon anticon-down"></i></button>
                    <ul nz-menu>
                        <li nz-menu-item (click)="choseSourceName(item)" *ngFor="let item of sourceNameList">
                            <a>{{item}}</a>
                        </li>
                    </ul>
                </nz-dropdown>
            </div>
            <div class="query_item" style="margin-left: 1.5%;">
                <span>Priority: </span>
                <nz-dropdown [nzTrigger]="'click'" [nzPlacement]="'bottomLeft'">
                    <button nz-button nz-dropdown><span>{{prioritySelected}}</span> <i class="anticon anticon-down"></i></button>
                    <ul nz-menu>
                        <li nz-menu-item (click)="chosePriority(item)" *ngFor="let item of priorityList">
                            <a>{{item}}</a>
                        </li>
                    </ul>
                </nz-dropdown>
            </div>
            <div class="query_item" style="margin-left:-2%;">
                <span>Status: </span>
                <nz-dropdown [nzTrigger]="'click'" [nzPlacement]="'bottomLeft'">
                    <button nz-button nz-dropdown><span>{{statusSelected}}</span> <i class="anticon anticon-down"></i></button>
                    <ul nz-menu>
                        <li nz-menu-item (click)="choseStatus(item)" *ngFor="let item of statusList">
                            <a>{{item}}</a>
                        </li>
                    </ul>
                </nz-dropdown>
            </div>
            <div class="query_time" style="margin-left: -3%;">
                <span>Report Time: </span>
                <nz-range-picker [(ngModel)]="dateRange" (ngModelChange)="onChange($event)" 
               ></nz-range-picker>
                <!-- <nz-range-picker [nzFormat]="dateFormat"></nz-range-picker> -->
            </div>
            <button class="search" nz-button [nzType]="'primary'" (click)="getAlarmFormData()"><i class="anticon anticon-search"></i><span>Search</span></button>
        </div>
    </div>
    <div class="content" [@showHideAnimate]="state">
        <!-- <div class="title">
                    <ul>
                        <li>
                            <h5>All</h5>
                            <p>{{alarmList.all }}</p>
                        </li>
                        <li>
                            <h5>Closed</h5>
                            <p>{{alarmList.closed }}</p>
                        </li>
                        <li>
                            <h5>Active</h5>
                            <p>{{alarmList.activeNum }}</p>
                        </li>
                    </ul>
                </div> -->
        <!-- <div class="chart">
            <h3>Alarm Chart</h3>
            <div class="AlarmChart" [ngClass]="{'alarmChart-active':alarmShow}">
                <app-line [initData]="alarmChartInit" [chartData]="alarmChartData"></app-line>
            </div>
        </div> -->
        <div class="tablelist">
            <nz-table #nzTable [nzData]="list" [(nzPageSize)]="pageSize" nzShowSizeChanger nzShowQuickJumper
                [nzPageSizeOptions]="[5,10,15,20]" nzSize="middle">
                <thead (nzSortChange)="sort($event)" nzSingleSort>
                    <tr>
                        <th nzWidth="5%" style="padding-left:20px;">NO</th>
                        <th nzWidth="12%">Source Name</th>
                        <th nzWidth="7%">Priority</th>
                        <th nzWidth="18%">SpecificProblem</th>
                        <th nzWidth="15%">Report Time</th>
                        <th nzWidth="15%">Clear Time</th>
                        <th nzWidth="8%">Status</th>
                        <th nzWidth="10%">Action</th>
                    </tr>
                </thead>
                <tbody>
                    <tr *ngFor="let item of nzTable.data; let i = index;">
                        <td style="padding-left: 20px;">{{i+1}}</td>
                        <td>{{item.sourceName}}</td>
                        <td>{{item.priority}}</td>
                        <td>{{item.specificProblem}}</td>
                        <td>{{item.startEpochMicrosec | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                        <td>{{item.startEpochMicrosecCleared | date:'yyyy-MM-dd HH:mm:ss'}}</td>
                        <td>{{item.status}}</td>
                        <td class="action"><a (click)="detailShow(item)"><i class="details"></i></a></td>
                    </tr>
                </tbody>
            </nz-table>
        </div>
    </div>
    <div [@showHideAnimate]="state2">
        <app-details [detailId]="detailId"></app-details>
    </div>
</div>