Skip to content

Commit 0d7e1a0

Browse files
authored
Merge pull request #393 from openITCOCKPIT/ITC-3575
ITC-3575 - HostTopalertWidget: fixes state <up> to >recovery> in widget config
2 parents 8fc6061 + 8c8a46e commit 0d7e1a0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/app/pages/dashboards/widgets/hosts-top-alerts-widget/hosts-top-alerts-widget.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<c-col [xs]="12" [md]="6">
5252
{{ t('Alert status') }}
5353
@switch (config.state) {
54-
@case ('up') {
54+
@case ('recovery') {
5555
<c-badge color="success">
5656
{{ t('Up') }}
5757
</c-badge>
@@ -99,25 +99,25 @@
9999
<thead>
100100
<tr>
101101
<th class="text-white" [ngClass]="{
102-
'bg-up': config.state === 'up',
102+
'bg-up': config.state === 'recovery',
103103
'bg-down': config.state === 'down',
104104
'bg-unreachable': config.state === 'unreachable'}">
105105
{{ t('State') }}
106106
</th>
107107
<th scope="col" class="text-white" [ngClass]="{
108-
'bg-up': config.state === 'up',
108+
'bg-up': config.state === 'recovery',
109109
'bg-down': config.state === 'down',
110110
'bg-unreachable': config.state === 'unreachable'}">
111111
{{ t('Host') }}
112112
</th>
113113
<th class="text-white" [ngClass]="{
114-
'bg-up': config.state === 'up',
114+
'bg-up': config.state === 'recovery',
115115
'bg-down': config.state === 'down',
116116
'bg-unreachable': config.state === 'unreachable'}">
117117
{{ t('Last date') }}
118118
</th>
119119
<th class="text-white" [ngClass]="{
120-
'bg-up': config.state === 'up',
120+
'bg-up': config.state === 'recovery',
121121
'bg-down': config.state === 'down',
122122
'bg-unreachable': config.state === 'unreachable'}">
123123
{{ t('Count') }}
@@ -185,7 +185,7 @@
185185
type="radio"
186186
[id]="'hoststatus-up-'+widget.id"
187187
[name]="'hoststatus-up-'+widget.id"
188-
[value]="'up'"
188+
[value]="'recovery'"
189189
[(ngModel)]="config.state"
190190
/>
191191
<label cFormCheckLabel class="ms-1 mt-1"

src/app/pages/dashboards/widgets/hosts-top-alerts-widget/hosts-top-alerts-widget.interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { PaginateOrScroll } from '../../../../layouts/coreui/paginator/paginator
33
import { HostObject } from '../../../hosts/hosts.interface';
44

55
export interface HostsTopAlertsWidgetConfig {
6-
state: 'up' | 'down' | 'unreachable',
6+
state: 'recovery' | 'down' | 'unreachable',
77
not_older_than: number,
88
not_older_than_unit: 'DAY' | 'HOUR' | 'MINUTE',
99
scroll_interval: number,
@@ -14,7 +14,7 @@ export interface HostsTopAlertsWidgetParams {
1414
angular: true
1515
scroll: true
1616
page: number
17-
'filter[NotificationHosts.state][]': ['up' | 'down' | 'unreachable']
17+
'filter[NotificationHosts.state][]': ['recovery' | 'down' | 'unreachable']
1818
'filter[not_older_than]': number // in minutes
1919
limit: number
2020
}

0 commit comments

Comments
 (0)