@dative-gpi/foundation-core-components 1.0.158 → 1.0.159-notification
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
:itemTo="$props.itemTo"
|
|
6
6
|
:items="alertsOrdered"
|
|
7
7
|
:loading="fetchingAlerts"
|
|
8
|
+
:headersOptions="headersOptions"
|
|
8
9
|
:tableCode="$props.tableCode"
|
|
9
10
|
:modelValue="$props.modelValue"
|
|
10
11
|
:selectable="$props.selectable"
|
|
@@ -194,11 +195,14 @@ import type { RouteLocation } from "vue-router";
|
|
|
194
195
|
import { computed, defineComponent, watch } from "vue";
|
|
195
196
|
import _ from "lodash";
|
|
196
197
|
|
|
198
|
+
import { useTranslations } from "@dative-gpi/bones-ui";
|
|
199
|
+
|
|
197
200
|
import type { AlertFilters, AlertInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
198
201
|
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
202
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
199
203
|
import { useAlerts } from "@dative-gpi/foundation-core-services/composables";
|
|
200
204
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
201
|
-
import
|
|
205
|
+
import { Criticity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
202
206
|
import { AlertStatus } from "@dative-gpi/foundation-shared-domain/enums";
|
|
203
207
|
|
|
204
208
|
import { AlertTools } from "@dative-gpi/foundation-shared-components/tools";
|
|
@@ -212,6 +216,7 @@ import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage
|
|
|
212
216
|
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
213
217
|
import FSAlertTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSAlertTileUI.vue";
|
|
214
218
|
|
|
219
|
+
|
|
215
220
|
export default defineComponent({
|
|
216
221
|
name: "FSBaseAlertsList",
|
|
217
222
|
components: {
|
|
@@ -265,6 +270,7 @@ export default defineComponent({
|
|
|
265
270
|
},
|
|
266
271
|
emits: ["update:modelValue"],
|
|
267
272
|
setup(props) {
|
|
273
|
+
const { $tr } = useTranslations();
|
|
268
274
|
const { getMany: getManyAlerts, entities: alerts, fetching : fetchingAlerts } = useAlerts();
|
|
269
275
|
const { epochToShortTimeFormat } = useDateFormat();
|
|
270
276
|
|
|
@@ -289,12 +295,36 @@ export default defineComponent({
|
|
|
289
295
|
});
|
|
290
296
|
});
|
|
291
297
|
|
|
298
|
+
const headersOptions = computed(() => ({
|
|
299
|
+
currentStatus: {
|
|
300
|
+
fixedFilters: getEnumEntries(AlertStatus).map(e => ({
|
|
301
|
+
value: e.value,
|
|
302
|
+
text: AlertTools.statusLabel(e.value)
|
|
303
|
+
})),
|
|
304
|
+
methodFilter: (value: AlertStatus, item: AlertStatus) => value == item
|
|
305
|
+
},
|
|
306
|
+
criticity: {
|
|
307
|
+
fixedFilters: getEnumEntries(Criticity).map(e => ({
|
|
308
|
+
value: e.value,
|
|
309
|
+
text: AlertTools.criticityLabel(e.value)
|
|
310
|
+
})),
|
|
311
|
+
methodFilter: (value: Criticity, item: Criticity) => value == item
|
|
312
|
+
},
|
|
313
|
+
acknowledged: {
|
|
314
|
+
fixedFilters: [
|
|
315
|
+
{ value: true, text: $tr('entity.alert.acknowledged', 'Acknowledged') },
|
|
316
|
+
{ value: false, text: $tr('ui.alert.not-acknowledged', 'Not acknowledged') }
|
|
317
|
+
],
|
|
318
|
+
methodFilter: (value: boolean, item: boolean) => value === item
|
|
319
|
+
},
|
|
320
|
+
}));
|
|
321
|
+
|
|
292
322
|
watch([() => props.alertFilters, () => props.notAcknowledged, () => props.hidePending], (next, previous) => {
|
|
293
323
|
if (!_.isEqual(next, previous)) {
|
|
294
324
|
getManyAlerts({
|
|
295
325
|
...props.alertFilters,
|
|
296
326
|
acknowledged: props.notAcknowledged ? false : undefined,
|
|
297
|
-
statuses: props.hidePending ? [AlertStatus.Unresolved, AlertStatus.Triggered, AlertStatus.Resolved, AlertStatus.
|
|
327
|
+
statuses: props.hidePending ? [AlertStatus.Unresolved, AlertStatus.Triggered, AlertStatus.Resolved, AlertStatus.Abandoned] : undefined
|
|
298
328
|
});
|
|
299
329
|
}
|
|
300
330
|
}, { immediate: true });
|
|
@@ -302,6 +332,7 @@ export default defineComponent({
|
|
|
302
332
|
|
|
303
333
|
return {
|
|
304
334
|
fetchingAlerts,
|
|
335
|
+
headersOptions,
|
|
305
336
|
alertsOrdered,
|
|
306
337
|
AlertTools,
|
|
307
338
|
ColorEnum,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.159-notification",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-core-domain": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-core-services": "1.0.
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "1.0.
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "1.0.159-notification",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.159-notification",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.159-notification",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.159-notification",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.159-notification"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"sass": "1.71.1",
|
|
27
27
|
"sass-loader": "13.3.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "bd9f45c4be8554c7778b5388f3d60d25c9244054"
|
|
30
30
|
}
|