@provoly/hypervisor 0.0.2 → 0.0.4
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.
- package/esm2022/provoly-hypervisor.mjs +1 -1
- package/esm2022/public-api.mjs +7 -3
- package/esm2022/src/lib/event/detail/event-detail.component.mjs +19 -0
- package/esm2022/src/lib/event/icon-pipe/event-icon.pipe.mjs +26 -0
- package/esm2022/src/lib/event/list/event-list.component.mjs +22 -0
- package/esm2022/src/lib/event/public-api.mjs +4 -0
- package/esm2022/src/lib/event-summary/item/event-summary-item.component.mjs +28 -0
- package/esm2022/src/lib/event-summary/list/event-summary-list.component.mjs +44 -0
- package/esm2022/src/lib/event-summary/public-api.mjs +3 -0
- package/esm2022/src/lib/general/base.token.mjs +3 -0
- package/esm2022/src/lib/general/i18n/en.translations.mjs +36 -0
- package/esm2022/src/lib/general/i18n/fr.translations.mjs +36 -0
- package/esm2022/src/lib/general/public-api.mjs +4 -0
- package/esm2022/src/lib/hypervisor.module.mjs +85 -0
- package/esm2022/src/lib/model/hyp-event.interface.mjs +13 -0
- package/esm2022/src/lib/model/hyp-process.interface.mjs +2 -0
- package/esm2022/src/lib/model/public-api.mjs +6 -0
- package/esm2022/src/lib/store/event/event.actions.mjs +11 -0
- package/esm2022/src/lib/store/event/event.effects.mjs +21 -0
- package/esm2022/src/lib/store/event/event.reducer.mjs +38 -0
- package/esm2022/src/lib/store/event/event.selectors.mjs +15 -0
- package/esm2022/src/lib/store/event/event.service.mjs +50 -0
- package/esm2022/src/lib/store/event/public-api.mjs +5 -0
- package/esm2022/src/lib/store/hypervisor/hypervisor.actions.mjs +5 -0
- package/esm2022/src/lib/store/hypervisor/hypervisor.effects.mjs +16 -0
- package/esm2022/src/lib/store/hypervisor/hypervisor.reducer.mjs +14 -0
- package/esm2022/src/lib/store/hypervisor/hypervisor.selectors.mjs +9 -0
- package/esm2022/src/lib/store/hypervisor/hypervisor.service.mjs +19 -0
- package/fesm2022/provoly-hypervisor.mjs +433 -24
- package/fesm2022/provoly-hypervisor.mjs.map +1 -1
- package/package.json +2 -2
- package/public-api.d.ts +6 -2
- package/src/lib/event/detail/event-detail.component.d.ts +9 -0
- package/src/lib/event/icon-pipe/event-icon.pipe.d.ts +15 -0
- package/src/lib/event/list/event-list.component.d.ts +11 -0
- package/src/lib/event/public-api.d.ts +3 -0
- package/src/lib/event-summary/item/event-summary-item.component.d.ts +10 -0
- package/src/lib/event-summary/list/event-summary-list.component.d.ts +19 -0
- package/src/lib/event-summary/public-api.d.ts +2 -0
- package/src/lib/general/base.token.d.ts +2 -0
- package/src/lib/general/i18n/en.translations.d.ts +35 -0
- package/src/lib/general/i18n/fr.translations.d.ts +35 -0
- package/src/lib/general/public-api.d.ts +3 -0
- package/src/lib/hypervisor.module.d.ts +25 -0
- package/src/lib/model/hyp-event.interface.d.ts +44 -0
- package/src/lib/model/hyp-process.interface.d.ts +4 -0
- package/src/lib/model/public-api.d.ts +2 -0
- package/src/lib/store/event/event.actions.d.ts +34 -0
- package/src/lib/store/event/event.effects.d.ts +20 -0
- package/src/lib/store/event/event.reducer.d.ts +13 -0
- package/src/lib/store/event/event.selectors.d.ts +12 -0
- package/src/lib/store/event/event.service.d.ts +14 -0
- package/src/lib/store/event/public-api.d.ts +4 -0
- package/src/lib/store/hypervisor/hypervisor.actions.d.ts +7 -0
- package/src/lib/store/hypervisor/hypervisor.effects.d.ts +10 -0
- package/src/lib/store/hypervisor/hypervisor.reducer.d.ts +7 -0
- package/src/lib/store/hypervisor/hypervisor.selectors.d.ts +5 -0
- package/src/lib/store/hypervisor/hypervisor.service.d.ts +10 -0
- package/styles/components/_o-hvy-event-summary-item.scss +38 -0
- package/styles/components/_o-hvy-event-summary-list.scss +45 -0
- package/styles/components/_o-hvy-events-table.scss +31 -0
- package/styles/main.scss +4 -0
- package/esm2022/lib/hypervisor.component.mjs +0 -19
- package/esm2022/lib/hypervisor.module.mjs +0 -21
- package/lib/hypervisor.component.d.ts +0 -5
- package/lib/hypervisor.module.d.ts +0 -7
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { HttpParams } from '@angular/common/http';
|
|
3
|
+
import { mergeMap, withLatestFrom } from 'rxjs';
|
|
4
|
+
import { HypSelectors } from '../hypervisor/hypervisor.selectors';
|
|
5
|
+
import { EventSelectors } from './event.selectors';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/common/http";
|
|
8
|
+
import * as i2 from "@ngrx/store";
|
|
9
|
+
export class EventService {
|
|
10
|
+
constructor(httpClient, store) {
|
|
11
|
+
this.httpClient = httpClient;
|
|
12
|
+
this.store = store;
|
|
13
|
+
}
|
|
14
|
+
list() {
|
|
15
|
+
return this.store
|
|
16
|
+
.select(HypSelectors.url)
|
|
17
|
+
.pipe(withLatestFrom(this.store.select(EventSelectors.filters)), mergeMap(([url, filters]) => {
|
|
18
|
+
let params = new HttpParams();
|
|
19
|
+
Object.keys(filters).forEach(filter => {
|
|
20
|
+
filters[filter].forEach((filterValue) => {
|
|
21
|
+
params = params.set(filter, filterValue);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
return this.httpClient.get(encodeURI(`${url}/event`), { params });
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
listSummaries() {
|
|
28
|
+
return this.store
|
|
29
|
+
.select(HypSelectors.url)
|
|
30
|
+
.pipe(withLatestFrom(this.store.select(EventSelectors.filters)), mergeMap(([url, filters]) => {
|
|
31
|
+
let params = new HttpParams();
|
|
32
|
+
Object.keys(filters).forEach(filter => {
|
|
33
|
+
filters[filter].forEach((filterValue) => {
|
|
34
|
+
params = params.set(filter, filterValue);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
console.log(params);
|
|
38
|
+
return this.httpClient.get(encodeURI(`${url}/events/summary`), { params });
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, deps: [{ token: i1.HttpClient }, { token: i2.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
42
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, providedIn: 'root' }); }
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, decorators: [{
|
|
45
|
+
type: Injectable,
|
|
46
|
+
args: [{
|
|
47
|
+
providedIn: 'root'
|
|
48
|
+
}]
|
|
49
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.Store }] });
|
|
50
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Byb3ZvbHkvaHlwZXJ2aXNvci9zcmMvbGliL3N0b3JlL2V2ZW50L2V2ZW50LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQWMsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDOUQsT0FBTyxFQUFFLFFBQVEsRUFBYyxjQUFjLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFHNUQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG9DQUFvQyxDQUFDO0FBQ2xFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQzs7OztBQUtuRCxNQUFNLE9BQU8sWUFBWTtJQUN2QixZQUNVLFVBQXNCLEVBQ3RCLEtBQWlCO1FBRGpCLGVBQVUsR0F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3VybH0vZXZlbnRzL3N1bW1hcnlgKSwgeyBwYXJhbXMgfSk7XG4gICAgICAgIH0pXG4gICAgICApO1xuICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './event.actions';
|
|
2
|
+
export * from './event.effects';
|
|
3
|
+
export * from './event.reducer';
|
|
4
|
+
export * from './event.selectors';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Byb3ZvbHkvaHlwZXJ2aXNvci9zcmMvbGliL3N0b3JlL2V2ZW50L3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxtQkFBbUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vZXZlbnQuYWN0aW9ucyc7XG5leHBvcnQgKiBmcm9tICcuL2V2ZW50LmVmZmVjdHMnO1xuZXhwb3J0ICogZnJvbSAnLi9ldmVudC5yZWR1Y2VyJztcbmV4cG9ydCAqIGZyb20gJy4vZXZlbnQuc2VsZWN0b3JzJztcbiJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createAction, props } from '@ngrx/store';
|
|
2
|
+
export const HypervisorActions = {
|
|
3
|
+
setUrl: createAction('[Event] Set Backend Url', props())
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHlwZXJ2aXNvci5hY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcHJvdm9seS9oeXBlcnZpc29yL3NyYy9saWIvc3RvcmUvaHlwZXJ2aXNvci9oeXBlcnZpc29yLmFjdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFFbEQsTUFBTSxDQUFDLE1BQU0saUJBQWlCLEdBQUc7SUFDL0IsTUFBTSxFQUFFLFlBQVksQ0FBQyx5QkFBeUIsRUFBRSxLQUFLLEVBQW9CLENBQUM7Q0FDM0UsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNyZWF0ZUFjdGlvbiwgcHJvcHMgfSBmcm9tICdAbmdyeC9zdG9yZSc7XG5cbmV4cG9ydCBjb25zdCBIeXBlcnZpc29yQWN0aW9ucyA9IHtcbiAgc2V0VXJsOiBjcmVhdGVBY3Rpb24oJ1tFdmVudF0gU2V0IEJhY2tlbmQgVXJsJywgcHJvcHM8eyB1cmw/OiBzdHJpbmcgfT4oKSlcbn07XG4iXX0=
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@ngrx/effects";
|
|
4
|
+
import * as i2 from "./hypervisor.service";
|
|
5
|
+
export class HypervisorEffects {
|
|
6
|
+
constructor(actions$, eventService) {
|
|
7
|
+
this.actions$ = actions$;
|
|
8
|
+
this.eventService = eventService;
|
|
9
|
+
}
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorEffects, deps: [{ token: i1.Actions }, { token: i2.HypervisorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorEffects }); }
|
|
12
|
+
}
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorEffects, decorators: [{
|
|
14
|
+
type: Injectable
|
|
15
|
+
}], ctorParameters: () => [{ type: i1.Actions }, { type: i2.HypervisorService }] });
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHlwZXJ2aXNvci5lZmZlY3RzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcHJvdm9seS9oeXBlcnZpc29yL3NyYy9saWIvc3RvcmUvaHlwZXJ2aXNvci9oeXBlcnZpc29yLmVmZmVjdHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7OztBQUszQyxNQUFNLE9BQU8saUJBQWlCO0lBRTVCLFlBQ1UsUUFBaUIsRUFDakIsWUFBK0I7UUFEL0IsYUFBUSxHQUFSLFFBQVEsQ0FBUztRQUNqQixpQkFBWSxHQUFaLFlBQVksQ0FBbUI7SUFFekMsQ0FBQzs4R0FOVSxpQkFBaUI7a0hBQWpCLGlCQUFpQjs7MkZBQWpCLGlCQUFpQjtrQkFEN0IsVUFBVSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IEFjdGlvbnMgfSBmcm9tICdAbmdyeC9lZmZlY3RzJztcbmltcG9ydCB7IEh5cGVydmlzb3JTZXJ2aWNlIH0gZnJvbSAnLi9oeXBlcnZpc29yLnNlcnZpY2UnO1xuXG5ASW5qZWN0YWJsZSgpXG5leHBvcnQgY2xhc3MgSHlwZXJ2aXNvckVmZmVjdHMge1xuXG4gIGNvbnN0cnVjdG9yKFxuICAgIHByaXZhdGUgYWN0aW9ucyQ6IEFjdGlvbnMsXG4gICAgcHJpdmF0ZSBldmVudFNlcnZpY2U6IEh5cGVydmlzb3JTZXJ2aWNlLFxuICApIHtcbiAgfVxufVxuIl19
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createReducer, on } from '@ngrx/store';
|
|
2
|
+
import { HypervisorActions } from './hypervisor.actions';
|
|
3
|
+
export const hypFeatureKey = '@hvy/general';
|
|
4
|
+
export const eventInitialState = {
|
|
5
|
+
url: '/api/hypervisor',
|
|
6
|
+
};
|
|
7
|
+
const internalReducer = createReducer(eventInitialState, on(HypervisorActions.setUrl, (state, action) => ({
|
|
8
|
+
...state,
|
|
9
|
+
url: action.url ?? state.url,
|
|
10
|
+
})));
|
|
11
|
+
export function hypervisorReducer(state, action) {
|
|
12
|
+
return internalReducer(state, action);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHlwZXJ2aXNvci5yZWR1Y2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcHJvdm9seS9oeXBlcnZpc29yL3NyYy9saWIvc3RvcmUvaHlwZXJ2aXNvci9oeXBlcnZpc29yLnJlZHVjZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFVLGFBQWEsRUFBRSxFQUFFLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDeEQsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFekQsTUFBTSxDQUFDLE1BQU0sYUFBYSxHQUFHLGNBQWMsQ0FBQztBQU01QyxNQUFNLENBQUMsTUFBTSxpQkFBaUIsR0FBYTtJQUN6QyxHQUFHLEVBQUUsaUJBQWlCO0NBQ3ZCLENBQUM7QUFFRixN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xuKTtcblxuZXhwb3J0IGZ1bmN0aW9uIGh5cGVydmlzb3JSZWR1Y2VyKHN0YXRlOiBIeXBTdGF0ZSwgYWN0aW9uOiBBY3Rpb24pIHtcbiAgcmV0dXJuIGludGVybmFsUmVkdWNlcihzdGF0ZSwgYWN0aW9uKTtcbn1cbiJdfQ==
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createFeatureSelector, createSelector } from '@ngrx/store';
|
|
2
|
+
import { hypFeatureKey } from './hypervisor.reducer';
|
|
3
|
+
const feature = createFeatureSelector(hypFeatureKey);
|
|
4
|
+
const url = createSelector(feature, (state) => state.url);
|
|
5
|
+
export const HypSelectors = {
|
|
6
|
+
feature,
|
|
7
|
+
url
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHlwZXJ2aXNvci5zZWxlY3RvcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9wcm92b2x5L2h5cGVydmlzb3Ivc3JjL2xpYi9zdG9yZS9oeXBlcnZpc29yL2h5cGVydmlzb3Iuc2VsZWN0b3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxjQUFjLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDcEUsT0FBTyxFQUFFLGFBQWEsRUFBWSxNQUFNLHNCQUFzQixDQUFDO0FBRy9ELE1BQU0sT0FBTyxHQUFHLHFCQUFxQixDQUFXLGFBQWEsQ0FBQyxDQUFDO0FBQy9ELE1BQU0sR0FBRyxHQUFHLGNBQWMsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUUxRCxNQUFNLENBQUMsTUFBTSxZQUFZLEdBQUc7SUFDMUIsT0FBTztJQUNQLEdBQUc7Q0FDSixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3JlYXRlRmVhdHVyZVNlbGVjdG9yLCBjcmVhdGVTZWxlY3RvciB9IGZyb20gJ0BuZ3J4L3N0b3JlJztcbmltcG9ydCB7IGh5cEZlYXR1cmVLZXksIEh5cFN0YXRlIH0gZnJvbSAnLi9oeXBlcnZpc29yLnJlZHVjZXInO1xuXG5cbmNvbnN0IGZlYXR1cmUgPSBjcmVhdGVGZWF0dXJlU2VsZWN0b3I8SHlwU3RhdGU+KGh5cEZlYXR1cmVLZXkpO1xuY29uc3QgdXJsID0gY3JlYXRlU2VsZWN0b3IoZmVhdHVyZSwgKHN0YXRlKSA9PiBzdGF0ZS51cmwpO1xuXG5leHBvcnQgY29uc3QgSHlwU2VsZWN0b3JzID0ge1xuICBmZWF0dXJlLFxuICB1cmxcbn07XG4iXX0=
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common/http";
|
|
4
|
+
import * as i2 from "@ngrx/store";
|
|
5
|
+
export class HypervisorService {
|
|
6
|
+
constructor(httpClient, store) {
|
|
7
|
+
this.httpClient = httpClient;
|
|
8
|
+
this.store = store;
|
|
9
|
+
}
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorService, deps: [{ token: i1.HttpClient }, { token: i2.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorService, providedIn: 'root' }); }
|
|
12
|
+
}
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorService, decorators: [{
|
|
14
|
+
type: Injectable,
|
|
15
|
+
args: [{
|
|
16
|
+
providedIn: 'root'
|
|
17
|
+
}]
|
|
18
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.Store }] });
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHlwZXJ2aXNvci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcHJvdm9seS9oeXBlcnZpc29yL3NyYy9saWIvc3RvcmUvaHlwZXJ2aXNvci9oeXBlcnZpc29yLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7OztBQU8zQyxNQUFNLE9BQU8saUJBQWlCO0lBQzVCLFlBQ1UsVUFBc0IsRUFDdEIsS0FBaUI7UUFEakIsZUFBVSxHQUFWLFVBQVUsQ0FBWTtRQUN0QixVQUFLLEdBQUwsS0FBSyxDQUFZO0lBQ3hCLENBQUM7OEdBSk8saUJBQWlCO2tIQUFqQixpQkFBaUIsY0FGaEIsTUFBTTs7MkZBRVAsaUJBQWlCO2tCQUg3QixVQUFVO21CQUFDO29CQUNWLFVBQVUsRUFBRSxNQUFNO2lCQUNuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IEh0dHBDbGllbnQgfSBmcm9tICdAYW5ndWxhci9jb21tb24vaHR0cCc7XG5pbXBvcnQgeyBTdG9yZSB9IGZyb20gJ0BuZ3J4L3N0b3JlJztcblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgSHlwZXJ2aXNvclNlcnZpY2Uge1xuICBjb25zdHJ1Y3RvcihcbiAgICBwcml2YXRlIGh0dHBDbGllbnQ6IEh0dHBDbGllbnQsXG4gICAgcHJpdmF0ZSBzdG9yZTogU3RvcmU8YW55PlxuICApIHt9XG5cbn1cbiJdfQ==
|
|
@@ -1,40 +1,449 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, Input, Pipe, InjectionToken, Injectable, NgModule, Inject } from '@angular/core';
|
|
3
|
+
import { of, withLatestFrom, mergeMap } from 'rxjs';
|
|
4
|
+
import * as i3 from '@provoly/dashboard';
|
|
5
|
+
import { DEFAULT_ICON_URL, PryCoreModule, PryIconModule, PryI18nModule } from '@provoly/dashboard';
|
|
6
|
+
import * as i1 from '@ngrx/store';
|
|
7
|
+
import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
|
|
8
|
+
import * as i2 from '@angular/common';
|
|
9
|
+
import { DatePipe, AsyncPipe, NgForOf } from '@angular/common';
|
|
10
|
+
import * as i2$1 from '@angular/router';
|
|
11
|
+
import { RouterLink } from '@angular/router';
|
|
12
|
+
import * as i1$2 from '@ngrx/effects';
|
|
13
|
+
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
14
|
+
import { debounceTime, mergeMap as mergeMap$1, map, catchError } from 'rxjs/operators';
|
|
15
|
+
import * as i1$1 from '@angular/common/http';
|
|
16
|
+
import { HttpParams } from '@angular/common/http';
|
|
3
17
|
|
|
4
|
-
class
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
class EventDetailComponent {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.events = [];
|
|
21
|
+
this.process = undefined;
|
|
22
|
+
}
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: EventDetailComponent, selector: "hvy-event-detail", inputs: { events: "events", process: "process" }, ngImport: i0, template: "<h1> TODO </h1>\n<p>Events: {{ events.length }}</p>\n<p>Process: {{ process }}</p>\n" }); }
|
|
11
25
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type:
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventDetailComponent, decorators: [{
|
|
13
27
|
type: Component,
|
|
14
|
-
args: [{ selector: 'hvy-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
28
|
+
args: [{ selector: 'hvy-event-detail', template: "<h1> TODO </h1>\n<p>Events: {{ events.length }}</p>\n<p>Process: {{ process }}</p>\n" }]
|
|
29
|
+
}], propDecorators: { events: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], process: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}] } });
|
|
20
34
|
|
|
35
|
+
const EVENT_TO_ICON = {
|
|
36
|
+
fn: (event, store) => of(DEFAULT_ICON_URL),
|
|
37
|
+
};
|
|
38
|
+
class EventIconPipe {
|
|
39
|
+
constructor(store) {
|
|
40
|
+
this.store = store;
|
|
41
|
+
}
|
|
42
|
+
transform(value, ...args) {
|
|
43
|
+
return EVENT_TO_ICON.fn(value, this.store);
|
|
44
|
+
}
|
|
45
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventIconPipe, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
46
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: EventIconPipe, isStandalone: true, name: "eventIcon" }); }
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventIconPipe, decorators: [{
|
|
49
|
+
type: Pipe,
|
|
50
|
+
args: [{
|
|
51
|
+
name: 'eventIcon',
|
|
52
|
+
standalone: true
|
|
53
|
+
}]
|
|
54
|
+
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
55
|
+
|
|
56
|
+
const EventActions = {
|
|
57
|
+
load: createAction('[Event] Load Events'),
|
|
58
|
+
loadSuccess: createAction('[Event Api] (bus) Load Events Success', props()),
|
|
59
|
+
loadFailure: createAction('[Event Api] Load Events Failure', props()),
|
|
60
|
+
filter: createAction('[Event Api] Set filters', props()),
|
|
61
|
+
loadSummaries: createAction('[Event] Load Summaries'),
|
|
62
|
+
loadSummariesSuccess: createAction('[Event Api] Load Summaries Success', props()),
|
|
63
|
+
loadSummariesFailure: createAction('[Event Api] Load Summaries Failure', props())
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const eventFeatureKey = '@hvy/event';
|
|
67
|
+
const eventInitialState$1 = {
|
|
68
|
+
events: [],
|
|
69
|
+
summaries: { NEW: { events: [], count: 0 }, IN_PROGRESS: { events: [], count: 0 }, DONE: { events: [], count: 0 } },
|
|
70
|
+
loading: false,
|
|
71
|
+
filters: {}
|
|
72
|
+
};
|
|
73
|
+
const internalReducer$1 = createReducer(eventInitialState$1, on(EventActions.load, (state, action) => ({
|
|
74
|
+
...state,
|
|
75
|
+
loading: true
|
|
76
|
+
})), on(EventActions.loadSuccess, (state, { events }) => ({
|
|
77
|
+
...state,
|
|
78
|
+
loading: false,
|
|
79
|
+
events
|
|
80
|
+
})), on(EventActions.loadFailure, (state, action) => ({
|
|
81
|
+
...state,
|
|
82
|
+
loading: false,
|
|
83
|
+
events: []
|
|
84
|
+
})), on(EventActions.loadSummaries, (state, action) => ({
|
|
85
|
+
...state,
|
|
86
|
+
loading: true
|
|
87
|
+
})), on(EventActions.loadSummariesSuccess, (state, { summaries }) => ({
|
|
88
|
+
...state,
|
|
89
|
+
loading: false,
|
|
90
|
+
summaries
|
|
91
|
+
})), on(EventActions.loadSummariesFailure, (state, action) => ({
|
|
92
|
+
...state,
|
|
93
|
+
loading: false
|
|
94
|
+
})), on(EventActions.filter, (state, { filters }) => ({
|
|
95
|
+
...state,
|
|
96
|
+
filters
|
|
97
|
+
})));
|
|
98
|
+
function eventReducer(state, action) {
|
|
99
|
+
return internalReducer$1(state, action);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const feature$1 = createFeatureSelector(eventFeatureKey);
|
|
103
|
+
const events = createSelector(feature$1, (state) => state.events);
|
|
104
|
+
const summaries = createSelector(feature$1, (state) => state.summaries);
|
|
105
|
+
const loading = createSelector(feature$1, (state) => state.loading);
|
|
106
|
+
const filters = createSelector(feature$1, (state) => state.filters);
|
|
107
|
+
const EventSelectors = {
|
|
108
|
+
feature: feature$1,
|
|
109
|
+
events,
|
|
110
|
+
summaries,
|
|
111
|
+
loading,
|
|
112
|
+
filters
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
class EventListComponent {
|
|
116
|
+
constructor(store) {
|
|
117
|
+
this.store = store;
|
|
118
|
+
this.store.dispatch(EventActions.load());
|
|
119
|
+
this.events$ = this.store.select(EventSelectors.events);
|
|
120
|
+
}
|
|
121
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventListComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
122
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: EventListComponent, selector: "hvy-event-list", ngImport: i0, template: "<table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th></th>\n <th>{{ '@hvy.event.criticality' | i18n }}</th>\n <th>{{ '@hvy.event.name' | i18n }}</th>\n <th>{{ '@hvy.event.type.name' | i18n }}</th>\n <th>{{ '@hvy.event.address' | i18n }}</th>\n <th>{{ '@hvy.event.date' | i18n }}</th>\n <th>{{ '@hvy.event.dateM' | i18n }}</th>\n <th>{{ '@hvy.event.status' | i18n }}</th>\n <th>{{ '@hvy.process.name' | i18n }}</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr class=\"o-hvy-events-table__line\" *ngFor=\"let event of events$|async\">\n <td class=\"o-hvy-events-table__line__cell\"></td>\n <td class=\"o-hvy-events-table__line__cell -centered\"><img [alt]=\"event.name\" [height]=\"32\" [width]=\"32\"\n [src]=\"event | eventIcon | async | getSecuredImage | async\" /></td>\n <td class=\"o-hvy-events-table__line__cell\">\n <div class=\"o-hvy-events-table__line__name__main\">{{ event.name }}</div>\n <div>{{ event.equipment ? event.equipment.name : '' }}</div>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">{{ '@hvy.event.type.' + event.type | i18n }}</td>\n <td class=\"o-hvy-events-table__line__cell\">-</td>\n <td class=\"o-hvy-events-table__line__cell\">--</td>\n <td class=\"o-hvy-events-table__line__cell\">---</td>\n <td class=\"o-hvy-events-table__line__cell -centered\">----</td>\n <td class=\"o-hvy-events-table__line__cell\">-----</td>\n <td class=\"o-hvy-events-table__line__cell\"></td>\n </tr>\n </tbody>\n</table>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i3.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: EventIconPipe, name: "eventIcon" }] }); }
|
|
123
|
+
}
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventListComponent, decorators: [{
|
|
125
|
+
type: Component,
|
|
126
|
+
args: [{ selector: 'hvy-event-list', template: "<table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th></th>\n <th>{{ '@hvy.event.criticality' | i18n }}</th>\n <th>{{ '@hvy.event.name' | i18n }}</th>\n <th>{{ '@hvy.event.type.name' | i18n }}</th>\n <th>{{ '@hvy.event.address' | i18n }}</th>\n <th>{{ '@hvy.event.date' | i18n }}</th>\n <th>{{ '@hvy.event.dateM' | i18n }}</th>\n <th>{{ '@hvy.event.status' | i18n }}</th>\n <th>{{ '@hvy.process.name' | i18n }}</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr class=\"o-hvy-events-table__line\" *ngFor=\"let event of events$|async\">\n <td class=\"o-hvy-events-table__line__cell\"></td>\n <td class=\"o-hvy-events-table__line__cell -centered\"><img [alt]=\"event.name\" [height]=\"32\" [width]=\"32\"\n [src]=\"event | eventIcon | async | getSecuredImage | async\" /></td>\n <td class=\"o-hvy-events-table__line__cell\">\n <div class=\"o-hvy-events-table__line__name__main\">{{ event.name }}</div>\n <div>{{ event.equipment ? event.equipment.name : '' }}</div>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">{{ '@hvy.event.type.' + event.type | i18n }}</td>\n <td class=\"o-hvy-events-table__line__cell\">-</td>\n <td class=\"o-hvy-events-table__line__cell\">--</td>\n <td class=\"o-hvy-events-table__line__cell\">---</td>\n <td class=\"o-hvy-events-table__line__cell -centered\">----</td>\n <td class=\"o-hvy-events-table__line__cell\">-----</td>\n <td class=\"o-hvy-events-table__line__cell\"></td>\n </tr>\n </tbody>\n</table>\n" }]
|
|
127
|
+
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
128
|
+
|
|
129
|
+
class EventSummaryItemComponent {
|
|
130
|
+
constructor() {
|
|
131
|
+
this.linkBase = [];
|
|
132
|
+
this.linkFragments = [];
|
|
133
|
+
}
|
|
134
|
+
ngOnInit() {
|
|
135
|
+
this.linkFragments = this.linkFragments.length > 0 ? [...this.linkBase, this.event.id] : ['list', this.event.id];
|
|
136
|
+
}
|
|
137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventSummaryItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
138
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: EventSummaryItemComponent, isStandalone: true, selector: "hvy-event-summary-item", inputs: { event: "event", linkBase: "linkBase" }, ngImport: i0, template: "<div class=\"m-hvy-event-summary-item\" [routerLink]=\"linkFragments\">\n <div class=\"m-hvy-event-summary-item__title\">\n <h4>\n {{ event.name }}\n </h4>\n </div>\n <div class=\"m-hvy-event-summary-item__content\">\n <span>\n {{\n event.manifestation ?\n (event.manifestation.startDate | date : 'dd/MM HH:MM') + ' - ' + (event.manifestation.endDate | date : 'dd/MM HH:MM') :\n event.interventionRequestTitle\n }}\n </span>\n </div>\n <div class=\"m-hvy-event-summary-item__footer\">\n <div class=\"m-hvy-event-summary-item__icons\">\n <span class=\"m-hvy-event-summary-item__intervention-counter\">{{ event.interventionRequestCount }}</span>\n <img [alt]=\"'hvy' + event.name + '-icon'\" [height]=\"20\" [width]=\"20\" [src]=\"event | eventIcon | async | getSecuredImage | async\" />\n <span>{{ event.criticality }}</span>\n </div>\n <div class=\"m-hvy-event-summary-item__date\">\n <span>\n {{ event.lastModificationDate | date : 'd MMMM . HH:MM' }}\n </span>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: EventIconPipe, name: "eventIcon" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: PryCoreModule }, { kind: "pipe", type: i3.GetSecuredImagePipe, name: "getSecuredImage" }] }); }
|
|
139
|
+
}
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventSummaryItemComponent, decorators: [{
|
|
141
|
+
type: Component,
|
|
142
|
+
args: [{ standalone: true, selector: 'hvy-event-summary-item', imports: [EventIconPipe, DatePipe, RouterLink, AsyncPipe, PryCoreModule], template: "<div class=\"m-hvy-event-summary-item\" [routerLink]=\"linkFragments\">\n <div class=\"m-hvy-event-summary-item__title\">\n <h4>\n {{ event.name }}\n </h4>\n </div>\n <div class=\"m-hvy-event-summary-item__content\">\n <span>\n {{\n event.manifestation ?\n (event.manifestation.startDate | date : 'dd/MM HH:MM') + ' - ' + (event.manifestation.endDate | date : 'dd/MM HH:MM') :\n event.interventionRequestTitle\n }}\n </span>\n </div>\n <div class=\"m-hvy-event-summary-item__footer\">\n <div class=\"m-hvy-event-summary-item__icons\">\n <span class=\"m-hvy-event-summary-item__intervention-counter\">{{ event.interventionRequestCount }}</span>\n <img [alt]=\"'hvy' + event.name + '-icon'\" [height]=\"20\" [width]=\"20\" [src]=\"event | eventIcon | async | getSecuredImage | async\" />\n <span>{{ event.criticality }}</span>\n </div>\n <div class=\"m-hvy-event-summary-item__date\">\n <span>\n {{ event.lastModificationDate | date : 'd MMMM . HH:MM' }}\n </span>\n </div>\n </div>\n</div>\n" }]
|
|
143
|
+
}], propDecorators: { event: [{
|
|
144
|
+
type: Input,
|
|
145
|
+
args: [{ required: true }]
|
|
146
|
+
}], linkBase: [{
|
|
147
|
+
type: Input
|
|
148
|
+
}] } });
|
|
149
|
+
|
|
150
|
+
class EventSummaryListComponent {
|
|
151
|
+
constructor(store, router) {
|
|
152
|
+
this.store = store;
|
|
153
|
+
this.router = router;
|
|
154
|
+
this.events = [];
|
|
155
|
+
this.totalEventCount = 0;
|
|
156
|
+
this.status = '';
|
|
157
|
+
this.consultLink = [];
|
|
158
|
+
this.itemLinkBase = [];
|
|
159
|
+
}
|
|
160
|
+
ngOnInit() {
|
|
161
|
+
this.consultLink = this.consultLink.length > 0 ? this.consultLink : ['events'];
|
|
162
|
+
this.itemLinkBase = this.itemLinkBase.length > 0 ? this.itemLinkBase : ['events'];
|
|
163
|
+
}
|
|
164
|
+
filterAndRoute(status) {
|
|
165
|
+
this.router.navigate([...this.consultLink]);
|
|
166
|
+
this.store.dispatch(EventActions.filter({ filters: { status: [status] } }));
|
|
167
|
+
}
|
|
168
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventSummaryListComponent, deps: [{ token: i1.Store }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
169
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: EventSummaryListComponent, isStandalone: true, selector: "hvy-event-summary-list", inputs: { events: "events", totalEventCount: "totalEventCount", status: "status", consultLink: "consultLink", itemLinkBase: "itemLinkBase" }, ngImport: i0, template: "<div class=\"o-hvy-event-summary-list -hvy-{{status}}\">\n <div class=\"o-hvy-event-summary-list__header\">\n <h3 class=\"o-hvy-event-summary-list__title\">\n {{ '@hvy.eventSummary.statusLabels.' + status | i18n }}\n </h3>\n <span class=\"o-hvy-event-summary-list__counter\">\n {{ totalEventCount }}\n </span>\n </div>\n <div class=\"o-hvy-event-summary-list__content\">\n @for (event of events; track event.id) {\n <hvy-event-summary-item\n [event]=\"event\"\n [linkBase]=\"itemLinkBase\">\n </hvy-event-summary-item>\n } @empty {\n <span class=\"o-hvy-event-summary-list__no-content\">\n {{ '@hvy.eventSummary.noContent' | i18n }}\n </span>\n }\n </div>\n <div class=\"o-hvy-event-summary-list__footer\">\n <button class=\"o-hvy-event-summary-list__footer-button\" (click)=\"filterAndRoute(status)\">\n Consulter\n <pry-icon iconSvg=\"arrow\"></pry-icon>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: EventSummaryItemComponent, selector: "hvy-event-summary-item", inputs: ["event", "linkBase"] }, { kind: "ngmodule", type: PryIconModule }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "ngmodule", type: PryI18nModule }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
170
|
+
}
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventSummaryListComponent, decorators: [{
|
|
172
|
+
type: Component,
|
|
173
|
+
args: [{ standalone: true, selector: 'hvy-event-summary-list', imports: [EventSummaryItemComponent, PryIconModule, PryI18nModule], template: "<div class=\"o-hvy-event-summary-list -hvy-{{status}}\">\n <div class=\"o-hvy-event-summary-list__header\">\n <h3 class=\"o-hvy-event-summary-list__title\">\n {{ '@hvy.eventSummary.statusLabels.' + status | i18n }}\n </h3>\n <span class=\"o-hvy-event-summary-list__counter\">\n {{ totalEventCount }}\n </span>\n </div>\n <div class=\"o-hvy-event-summary-list__content\">\n @for (event of events; track event.id) {\n <hvy-event-summary-item\n [event]=\"event\"\n [linkBase]=\"itemLinkBase\">\n </hvy-event-summary-item>\n } @empty {\n <span class=\"o-hvy-event-summary-list__no-content\">\n {{ '@hvy.eventSummary.noContent' | i18n }}\n </span>\n }\n </div>\n <div class=\"o-hvy-event-summary-list__footer\">\n <button class=\"o-hvy-event-summary-list__footer-button\" (click)=\"filterAndRoute(status)\">\n Consulter\n <pry-icon iconSvg=\"arrow\"></pry-icon>\n </button>\n </div>\n</div>\n" }]
|
|
174
|
+
}], ctorParameters: () => [{ type: i1.Store }, { type: i2$1.Router }], propDecorators: { events: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}], totalEventCount: [{
|
|
177
|
+
type: Input
|
|
178
|
+
}], status: [{
|
|
179
|
+
type: Input
|
|
180
|
+
}], consultLink: [{
|
|
181
|
+
type: Input
|
|
182
|
+
}], itemLinkBase: [{
|
|
183
|
+
type: Input
|
|
184
|
+
}] } });
|
|
185
|
+
|
|
186
|
+
const HYP_BASE_CONFIG = new InjectionToken('base config');
|
|
187
|
+
|
|
188
|
+
const enTranslations = {
|
|
189
|
+
'@hvy': {
|
|
190
|
+
event: {
|
|
191
|
+
criticality: 'Criticality',
|
|
192
|
+
name: 'Event',
|
|
193
|
+
type: {
|
|
194
|
+
name: 'Event type',
|
|
195
|
+
ALERT: "Alert",
|
|
196
|
+
REPORT: "Report",
|
|
197
|
+
OPERATOR: "Operator",
|
|
198
|
+
},
|
|
199
|
+
address: 'Address',
|
|
200
|
+
date: 'Effect date',
|
|
201
|
+
dateM: 'Modification date',
|
|
202
|
+
status: 'Status',
|
|
203
|
+
},
|
|
204
|
+
eventSummary: {
|
|
205
|
+
noContent: 'No event with given status',
|
|
206
|
+
statusLabels: {
|
|
207
|
+
NEW: 'Open',
|
|
208
|
+
IN_PROGRESS: 'In progress',
|
|
209
|
+
DONE: 'Done',
|
|
210
|
+
},
|
|
211
|
+
criticalityLabels: {
|
|
212
|
+
LOW: 'Low',
|
|
213
|
+
MEDIUM: 'Medium',
|
|
214
|
+
HIGH: 'High',
|
|
215
|
+
ALL: 'All'
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
process: {
|
|
219
|
+
name: 'Process',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const frTranslations = {
|
|
225
|
+
'@hvy': {
|
|
226
|
+
event: {
|
|
227
|
+
criticality: 'Criticité',
|
|
228
|
+
name: 'Évènement',
|
|
229
|
+
type: {
|
|
230
|
+
name: 'Type d\'évènement',
|
|
231
|
+
ALERT: "Alerte",
|
|
232
|
+
REPORT: "Signalement",
|
|
233
|
+
OPERATOR: "Opérateur",
|
|
234
|
+
},
|
|
235
|
+
address: 'Adresse',
|
|
236
|
+
date: 'Date d\'effet',
|
|
237
|
+
dateM: 'Date de modification',
|
|
238
|
+
status: 'Statut'
|
|
239
|
+
},
|
|
240
|
+
eventSummary: {
|
|
241
|
+
noContent: 'Aucun évènement avec statut donnée',
|
|
242
|
+
statusLabels: {
|
|
243
|
+
NEW: 'Ouverts',
|
|
244
|
+
IN_PROGRESS: 'En cours',
|
|
245
|
+
DONE: 'Clôturés',
|
|
246
|
+
},
|
|
247
|
+
criticalityLabels: {
|
|
248
|
+
LOW: 'Bas',
|
|
249
|
+
MEDIUM: 'Moyen',
|
|
250
|
+
HIGH: 'Haut',
|
|
251
|
+
ALL: 'Tous'
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
process: {
|
|
255
|
+
name: 'Procédure',
|
|
256
|
+
},
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
var HypEventCriticality;
|
|
261
|
+
(function (HypEventCriticality) {
|
|
262
|
+
HypEventCriticality[HypEventCriticality["LOW"] = 0] = "LOW";
|
|
263
|
+
HypEventCriticality[HypEventCriticality["MEDIUM"] = 1] = "MEDIUM";
|
|
264
|
+
HypEventCriticality[HypEventCriticality["HIGH"] = 2] = "HIGH";
|
|
265
|
+
})(HypEventCriticality || (HypEventCriticality = {}));
|
|
266
|
+
var HypEventType;
|
|
267
|
+
(function (HypEventType) {
|
|
268
|
+
HypEventType[HypEventType["ALERT"] = 0] = "ALERT";
|
|
269
|
+
HypEventType[HypEventType["REPORT"] = 1] = "REPORT";
|
|
270
|
+
HypEventType[HypEventType["OPERATOR"] = 2] = "OPERATOR";
|
|
271
|
+
})(HypEventType || (HypEventType = {}));
|
|
272
|
+
|
|
273
|
+
/*
|
|
274
|
+
* Public API Surface of hypervisor
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
const HypervisorActions = {
|
|
278
|
+
setUrl: createAction('[Event] Set Backend Url', props())
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
const hypFeatureKey = '@hvy/general';
|
|
282
|
+
const eventInitialState = {
|
|
283
|
+
url: '/api/hypervisor',
|
|
284
|
+
};
|
|
285
|
+
const internalReducer = createReducer(eventInitialState, on(HypervisorActions.setUrl, (state, action) => ({
|
|
286
|
+
...state,
|
|
287
|
+
url: action.url ?? state.url,
|
|
288
|
+
})));
|
|
289
|
+
function hypervisorReducer(state, action) {
|
|
290
|
+
return internalReducer(state, action);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
const feature = createFeatureSelector(hypFeatureKey);
|
|
294
|
+
const url = createSelector(feature, (state) => state.url);
|
|
295
|
+
const HypSelectors = {
|
|
296
|
+
feature,
|
|
297
|
+
url
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
class EventService {
|
|
301
|
+
constructor(httpClient, store) {
|
|
302
|
+
this.httpClient = httpClient;
|
|
303
|
+
this.store = store;
|
|
304
|
+
}
|
|
305
|
+
list() {
|
|
306
|
+
return this.store
|
|
307
|
+
.select(HypSelectors.url)
|
|
308
|
+
.pipe(withLatestFrom(this.store.select(EventSelectors.filters)), mergeMap(([url, filters]) => {
|
|
309
|
+
let params = new HttpParams();
|
|
310
|
+
Object.keys(filters).forEach(filter => {
|
|
311
|
+
filters[filter].forEach((filterValue) => {
|
|
312
|
+
params = params.set(filter, filterValue);
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
return this.httpClient.get(encodeURI(`${url}/event`), { params });
|
|
316
|
+
}));
|
|
317
|
+
}
|
|
318
|
+
listSummaries() {
|
|
319
|
+
return this.store
|
|
320
|
+
.select(HypSelectors.url)
|
|
321
|
+
.pipe(withLatestFrom(this.store.select(EventSelectors.filters)), mergeMap(([url, filters]) => {
|
|
322
|
+
let params = new HttpParams();
|
|
323
|
+
Object.keys(filters).forEach(filter => {
|
|
324
|
+
filters[filter].forEach((filterValue) => {
|
|
325
|
+
params = params.set(filter, filterValue);
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
console.log(params);
|
|
329
|
+
return this.httpClient.get(encodeURI(`${url}/events/summary`), { params });
|
|
330
|
+
}));
|
|
331
|
+
}
|
|
332
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, deps: [{ token: i1$1.HttpClient }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
333
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, providedIn: 'root' }); }
|
|
334
|
+
}
|
|
335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, decorators: [{
|
|
336
|
+
type: Injectable,
|
|
337
|
+
args: [{
|
|
338
|
+
providedIn: 'root'
|
|
339
|
+
}]
|
|
340
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i1.Store }] });
|
|
341
|
+
|
|
342
|
+
class EventEffects {
|
|
343
|
+
constructor(actions$, eventService) {
|
|
344
|
+
this.actions$ = actions$;
|
|
345
|
+
this.eventService = eventService;
|
|
346
|
+
this.loadEvents$ = createEffect(() => this.actions$.pipe(ofType(EventActions.load), debounceTime(200), mergeMap$1((action) => this.eventService.list().pipe(map((events) => EventActions.loadSuccess({ events })), catchError((error) => [EventActions.loadFailure({ error: error })])))));
|
|
347
|
+
this.loadSummaries$ = createEffect(() => this.actions$.pipe(ofType(EventActions.loadSummaries), debounceTime(200), mergeMap$1((action) => this.eventService.listSummaries().pipe(map((summaries) => EventActions.loadSummariesSuccess({ summaries })), catchError((error) => [EventActions.loadSummariesFailure({ error: error })])))));
|
|
348
|
+
}
|
|
349
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventEffects, deps: [{ token: i1$2.Actions }, { token: EventService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
350
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventEffects }); }
|
|
351
|
+
}
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventEffects, decorators: [{
|
|
353
|
+
type: Injectable
|
|
354
|
+
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: EventService }] });
|
|
355
|
+
|
|
356
|
+
class HypervisorService {
|
|
357
|
+
constructor(httpClient, store) {
|
|
358
|
+
this.httpClient = httpClient;
|
|
359
|
+
this.store = store;
|
|
360
|
+
}
|
|
361
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorService, deps: [{ token: i1$1.HttpClient }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
362
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorService, providedIn: 'root' }); }
|
|
363
|
+
}
|
|
364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorService, decorators: [{
|
|
365
|
+
type: Injectable,
|
|
366
|
+
args: [{
|
|
367
|
+
providedIn: 'root'
|
|
368
|
+
}]
|
|
369
|
+
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i1.Store }] });
|
|
370
|
+
|
|
371
|
+
class HypervisorEffects {
|
|
372
|
+
constructor(actions$, eventService) {
|
|
373
|
+
this.actions$ = actions$;
|
|
374
|
+
this.eventService = eventService;
|
|
375
|
+
}
|
|
376
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorEffects, deps: [{ token: i1$2.Actions }, { token: HypervisorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
377
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorEffects }); }
|
|
378
|
+
}
|
|
379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HypervisorEffects, decorators: [{
|
|
380
|
+
type: Injectable
|
|
381
|
+
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: HypervisorService }] });
|
|
382
|
+
|
|
383
|
+
const components = [
|
|
384
|
+
EventDetailComponent,
|
|
385
|
+
EventListComponent
|
|
386
|
+
];
|
|
21
387
|
class PvyHypervisorModule {
|
|
22
|
-
static
|
|
23
|
-
|
|
24
|
-
|
|
388
|
+
static forRoot(options) {
|
|
389
|
+
return {
|
|
390
|
+
ngModule: PvyHypervisorModule,
|
|
391
|
+
providers: [
|
|
392
|
+
{ provide: HYP_BASE_CONFIG, useValue: options },
|
|
393
|
+
],
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
constructor(baseConfig, store, i18nService) {
|
|
397
|
+
this.baseConfig = baseConfig;
|
|
398
|
+
this.store = store;
|
|
399
|
+
this.i18nService = i18nService;
|
|
400
|
+
this.store.dispatch(HypervisorActions.setUrl({ url: baseConfig.url }));
|
|
401
|
+
this.i18nService.addLangObject('en', '@hvy', enTranslations);
|
|
402
|
+
this.i18nService.addLangObject('fr', '@hvy', frTranslations);
|
|
403
|
+
}
|
|
404
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PvyHypervisorModule, deps: [{ token: HYP_BASE_CONFIG }, { token: i1.Store }, { token: i3.PryI18nService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
405
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: PvyHypervisorModule, declarations: [EventDetailComponent,
|
|
406
|
+
EventListComponent], imports: [i1.StoreFeatureModule, i1.StoreFeatureModule, i1$2.EffectsFeatureModule, NgForOf,
|
|
407
|
+
AsyncPipe,
|
|
408
|
+
PryI18nModule,
|
|
409
|
+
PryCoreModule,
|
|
410
|
+
AsyncPipe,
|
|
411
|
+
PryCoreModule,
|
|
412
|
+
EventIconPipe], exports: [EventDetailComponent,
|
|
413
|
+
EventListComponent] }); }
|
|
414
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PvyHypervisorModule, imports: [StoreModule.forFeature(eventFeatureKey, eventReducer),
|
|
415
|
+
StoreModule.forFeature(hypFeatureKey, hypervisorReducer),
|
|
416
|
+
EffectsModule.forFeature([EventEffects, HypervisorEffects]),
|
|
417
|
+
PryI18nModule,
|
|
418
|
+
PryCoreModule,
|
|
419
|
+
PryCoreModule] }); }
|
|
25
420
|
}
|
|
26
421
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PvyHypervisorModule, decorators: [{
|
|
27
422
|
type: NgModule,
|
|
28
423
|
args: [{
|
|
29
424
|
declarations: [
|
|
30
|
-
|
|
425
|
+
...components,
|
|
426
|
+
],
|
|
427
|
+
imports: [
|
|
428
|
+
StoreModule.forFeature(eventFeatureKey, eventReducer),
|
|
429
|
+
StoreModule.forFeature(hypFeatureKey, hypervisorReducer),
|
|
430
|
+
EffectsModule.forFeature([EventEffects, HypervisorEffects]),
|
|
431
|
+
NgForOf,
|
|
432
|
+
AsyncPipe,
|
|
433
|
+
PryI18nModule,
|
|
434
|
+
PryCoreModule,
|
|
435
|
+
AsyncPipe,
|
|
436
|
+
PryCoreModule,
|
|
437
|
+
EventIconPipe
|
|
31
438
|
],
|
|
32
|
-
imports: [],
|
|
33
439
|
exports: [
|
|
34
|
-
|
|
35
|
-
]
|
|
440
|
+
...components
|
|
441
|
+
],
|
|
36
442
|
}]
|
|
37
|
-
}]
|
|
443
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
444
|
+
type: Inject,
|
|
445
|
+
args: [HYP_BASE_CONFIG]
|
|
446
|
+
}] }, { type: i1.Store }, { type: i3.PryI18nService }] });
|
|
38
447
|
|
|
39
448
|
/*
|
|
40
449
|
* Public API Surface of hypervisor
|
|
@@ -44,5 +453,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
44
453
|
* Generated bundle index. Do not edit.
|
|
45
454
|
*/
|
|
46
455
|
|
|
47
|
-
export {
|
|
456
|
+
export { EVENT_TO_ICON, EventActions, EventDetailComponent, EventEffects, EventIconPipe, EventListComponent, EventSelectors, EventSummaryItemComponent, EventSummaryListComponent, HYP_BASE_CONFIG, HypEventCriticality, PvyHypervisorModule, enTranslations, eventFeatureKey, eventInitialState$1 as eventInitialState, eventReducer, frTranslations };
|
|
48
457
|
//# sourceMappingURL=provoly-hypervisor.mjs.map
|