@provoly/hypervisor 0.0.3 → 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/public-api.mjs +3 -1
- package/esm2022/src/lib/event/icon-pipe/event-icon.pipe.mjs +3 -2
- package/esm2022/src/lib/event/list/event-list.component.mjs +1 -1
- 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/i18n/en.translations.mjs +15 -1
- package/esm2022/src/lib/general/i18n/fr.translations.mjs +17 -3
- package/esm2022/src/lib/hypervisor.module.mjs +9 -10
- package/esm2022/src/lib/model/hyp-event.interface.mjs +13 -2
- package/esm2022/src/lib/store/event/event.actions.mjs +4 -1
- package/esm2022/src/lib/store/event/event.effects.mjs +2 -1
- package/esm2022/src/lib/store/event/event.reducer.mjs +16 -5
- package/esm2022/src/lib/store/event/event.selectors.mjs +3 -1
- package/esm2022/src/lib/store/event/event.service.mjs +16 -2
- package/esm2022/src/lib/store/event/public-api.mjs +5 -0
- package/esm2022/src/lib/store/hypervisor/hypervisor.actions.mjs +1 -1
- package/esm2022/src/lib/store/hypervisor/hypervisor.reducer.mjs +2 -2
- package/fesm2022/provoly-hypervisor.mjs +151 -20
- package/fesm2022/provoly-hypervisor.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/src/lib/event/icon-pipe/event-icon.pipe.d.ts +4 -4
- package/src/lib/event/list/event-list.component.d.ts +2 -2
- 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/i18n/en.translations.d.ts +14 -0
- package/src/lib/general/i18n/fr.translations.d.ts +14 -0
- package/src/lib/hypervisor.module.d.ts +7 -7
- package/src/lib/model/hyp-event.interface.d.ts +35 -2
- package/src/lib/store/event/event.actions.d.ts +14 -3
- package/src/lib/store/event/event.effects.d.ts +6 -1
- package/src/lib/store/event/event.reducer.d.ts +3 -2
- package/src/lib/store/event/event.selectors.d.ts +2 -1
- package/src/lib/store/event/event.service.d.ts +3 -2
- package/src/lib/store/event/public-api.d.ts +4 -0
- package/src/lib/store/hypervisor/hypervisor.actions.d.ts +2 -2
- 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
|
@@ -14,6 +14,20 @@ export declare const frTranslations: {
|
|
|
14
14
|
dateM: string;
|
|
15
15
|
status: string;
|
|
16
16
|
};
|
|
17
|
+
eventSummary: {
|
|
18
|
+
noContent: string;
|
|
19
|
+
statusLabels: {
|
|
20
|
+
NEW: string;
|
|
21
|
+
IN_PROGRESS: string;
|
|
22
|
+
DONE: string;
|
|
23
|
+
};
|
|
24
|
+
criticalityLabels: {
|
|
25
|
+
LOW: string;
|
|
26
|
+
MEDIUM: string;
|
|
27
|
+
HIGH: string;
|
|
28
|
+
ALL: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
17
31
|
process: {
|
|
18
32
|
name: string;
|
|
19
33
|
};
|
|
@@ -4,22 +4,22 @@ import { PryI18nService } from '@provoly/dashboard';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import * as i1 from "./event/detail/event-detail.component";
|
|
6
6
|
import * as i2 from "./event/list/event-list.component";
|
|
7
|
-
import * as i3 from "
|
|
8
|
-
import * as i4 from "@ngrx/
|
|
9
|
-
import * as i5 from "@
|
|
10
|
-
import * as i6 from "@
|
|
11
|
-
import * as i7 from "
|
|
7
|
+
import * as i3 from "@ngrx/store";
|
|
8
|
+
import * as i4 from "@ngrx/effects";
|
|
9
|
+
import * as i5 from "@angular/common";
|
|
10
|
+
import * as i6 from "@provoly/dashboard";
|
|
11
|
+
import * as i7 from "./event/icon-pipe/event-icon.pipe";
|
|
12
12
|
export declare class PvyHypervisorModule {
|
|
13
13
|
private baseConfig;
|
|
14
14
|
private store;
|
|
15
15
|
private i18nService;
|
|
16
16
|
static forRoot(options: {
|
|
17
|
-
url
|
|
17
|
+
url?: string;
|
|
18
18
|
}): ModuleWithProviders<PvyHypervisorModule>;
|
|
19
19
|
constructor(baseConfig: {
|
|
20
20
|
url: string;
|
|
21
21
|
}, store: Store<any>, i18nService: PryI18nService);
|
|
22
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<PvyHypervisorModule, never>;
|
|
23
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PvyHypervisorModule, [typeof i1.EventDetailComponent, typeof i2.EventListComponent, typeof i3.
|
|
23
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PvyHypervisorModule, [typeof i1.EventDetailComponent, typeof i2.EventListComponent], [typeof i3.StoreFeatureModule, typeof i3.StoreFeatureModule, typeof i4.EffectsFeatureModule, typeof i5.NgForOf, typeof i5.AsyncPipe, typeof i6.PryI18nModule, typeof i6.PryCoreModule, typeof i5.AsyncPipe, typeof i6.PryCoreModule, typeof i7.EventIconPipe], [typeof i1.EventDetailComponent, typeof i2.EventListComponent]>;
|
|
24
24
|
static ɵinj: i0.ɵɵInjectorDeclaration<PvyHypervisorModule>;
|
|
25
25
|
}
|
|
@@ -1,11 +1,44 @@
|
|
|
1
1
|
export interface HypEvent {
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
|
-
criticality:
|
|
5
|
-
type:
|
|
4
|
+
criticality: HypEventCriticality;
|
|
5
|
+
type: HypEventType;
|
|
6
|
+
}
|
|
7
|
+
export declare enum HypEventCriticality {
|
|
8
|
+
LOW = 0,
|
|
9
|
+
MEDIUM = 1,
|
|
10
|
+
HIGH = 2
|
|
11
|
+
}
|
|
12
|
+
declare enum HypEventType {
|
|
13
|
+
ALERT = 0,
|
|
14
|
+
REPORT = 1,
|
|
15
|
+
OPERATOR = 2
|
|
16
|
+
}
|
|
17
|
+
export interface HypEventDetails extends HypEvent {
|
|
6
18
|
equipment: null | HypEquipment;
|
|
19
|
+
status: HypStatus;
|
|
20
|
+
category: HypEventCategory;
|
|
7
21
|
}
|
|
8
22
|
export interface HypEquipment {
|
|
9
23
|
id: string;
|
|
10
24
|
name: string;
|
|
11
25
|
}
|
|
26
|
+
export type HypStatus = 'NEW' | 'IN_PROGRESS' | 'DONE';
|
|
27
|
+
type HypEventCategory = HypEventType | 'MALFUNCTION_ALERT' | 'LIMIT_ALERT' | 'MANIFESTATION';
|
|
28
|
+
export interface HypEventSummary extends HypEvent {
|
|
29
|
+
interventionRequestCount: number;
|
|
30
|
+
lastModificationDate: Date;
|
|
31
|
+
manifestation?: {
|
|
32
|
+
startDate: Date;
|
|
33
|
+
endDate: Date;
|
|
34
|
+
};
|
|
35
|
+
interventionRequestTitle?: string;
|
|
36
|
+
category: HypEventCategory;
|
|
37
|
+
}
|
|
38
|
+
export type HypEventSummaries = {
|
|
39
|
+
[key in HypStatus]: {
|
|
40
|
+
events: HypEventSummary[];
|
|
41
|
+
count: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HypEventDetails, HypEventSummaries } from '../../model/hyp-event.interface';
|
|
2
2
|
export declare const EventActions: {
|
|
3
3
|
load: import("@ngrx/store").ActionCreator<"[Event] Load Events", () => import("@ngrx/store/src/models").TypedAction<"[Event] Load Events">>;
|
|
4
4
|
loadSuccess: import("@ngrx/store").ActionCreator<"[Event Api] (bus) Load Events Success", (props: {
|
|
5
|
-
events:
|
|
5
|
+
events: HypEventDetails[];
|
|
6
6
|
}) => {
|
|
7
|
-
events:
|
|
7
|
+
events: HypEventDetails[];
|
|
8
8
|
} & import("@ngrx/store/src/models").TypedAction<"[Event Api] (bus) Load Events Success">>;
|
|
9
9
|
loadFailure: import("@ngrx/store").ActionCreator<"[Event Api] Load Events Failure", (props: {
|
|
10
10
|
error: string;
|
|
@@ -20,4 +20,15 @@ export declare const EventActions: {
|
|
|
20
20
|
[key: string]: string[];
|
|
21
21
|
};
|
|
22
22
|
} & import("@ngrx/store/src/models").TypedAction<"[Event Api] Set filters">>;
|
|
23
|
+
loadSummaries: import("@ngrx/store").ActionCreator<"[Event] Load Summaries", () => import("@ngrx/store/src/models").TypedAction<"[Event] Load Summaries">>;
|
|
24
|
+
loadSummariesSuccess: import("@ngrx/store").ActionCreator<"[Event Api] Load Summaries Success", (props: {
|
|
25
|
+
summaries: HypEventSummaries;
|
|
26
|
+
}) => {
|
|
27
|
+
summaries: HypEventSummaries;
|
|
28
|
+
} & import("@ngrx/store/src/models").TypedAction<"[Event Api] Load Summaries Success">>;
|
|
29
|
+
loadSummariesFailure: import("@ngrx/store").ActionCreator<"[Event Api] Load Summaries Failure", (props: {
|
|
30
|
+
error: string;
|
|
31
|
+
}) => {
|
|
32
|
+
error: string;
|
|
33
|
+
} & import("@ngrx/store/src/models").TypedAction<"[Event Api] Load Summaries Failure">>;
|
|
23
34
|
};
|
|
@@ -5,10 +5,15 @@ export declare class EventEffects {
|
|
|
5
5
|
private actions$;
|
|
6
6
|
private eventService;
|
|
7
7
|
loadEvents$: import("rxjs").Observable<({
|
|
8
|
-
events: import("@provoly/hypervisor").
|
|
8
|
+
events: import("@provoly/hypervisor").HypEventDetails[];
|
|
9
9
|
} & import("@ngrx/store/src/models").TypedAction<"[Event Api] (bus) Load Events Success">) | ({
|
|
10
10
|
error: string;
|
|
11
11
|
} & import("@ngrx/store/src/models").TypedAction<"[Event Api] Load Events Failure">)> & import("@ngrx/effects").CreateEffectMetadata;
|
|
12
|
+
loadSummaries$: import("rxjs").Observable<({
|
|
13
|
+
summaries: import("@provoly/hypervisor").HypEventSummaries;
|
|
14
|
+
} & import("@ngrx/store/src/models").TypedAction<"[Event Api] Load Summaries Success">) | ({
|
|
15
|
+
error: string;
|
|
16
|
+
} & import("@ngrx/store/src/models").TypedAction<"[Event Api] Load Summaries Failure">)> & import("@ngrx/effects").CreateEffectMetadata;
|
|
12
17
|
constructor(actions$: Actions, eventService: EventService);
|
|
13
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<EventEffects, never>;
|
|
14
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<EventEffects>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Action } from '@ngrx/store';
|
|
2
|
-
import {
|
|
2
|
+
import { HypEventDetails, HypEventSummaries } from '../../model/hyp-event.interface';
|
|
3
3
|
export declare const eventFeatureKey = "@hvy/event";
|
|
4
4
|
export interface EventState {
|
|
5
|
-
events:
|
|
5
|
+
events: HypEventDetails[];
|
|
6
|
+
summaries: HypEventSummaries;
|
|
6
7
|
loading: boolean;
|
|
7
8
|
filters: {
|
|
8
9
|
[key: string]: string[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EventState } from './event.reducer';
|
|
2
2
|
export declare const EventSelectors: {
|
|
3
3
|
feature: import("@ngrx/store").MemoizedSelector<object, EventState, import("@ngrx/store").DefaultProjectorFn<EventState>>;
|
|
4
|
-
events: import("@ngrx/store").MemoizedSelector<object, import("@provoly/hypervisor").
|
|
4
|
+
events: import("@ngrx/store").MemoizedSelector<object, import("@provoly/hypervisor").HypEventDetails[], (s1: EventState) => import("@provoly/hypervisor").HypEventDetails[]>;
|
|
5
|
+
summaries: import("@ngrx/store").MemoizedSelector<object, import("@provoly/hypervisor").HypEventSummaries, (s1: EventState) => import("@provoly/hypervisor").HypEventSummaries>;
|
|
5
6
|
loading: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: EventState) => boolean>;
|
|
6
7
|
filters: import("@ngrx/store").MemoizedSelector<object, {
|
|
7
8
|
[key: string]: string[];
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { Store } from '@ngrx/store';
|
|
4
|
-
import {
|
|
4
|
+
import { HypEventDetails, HypEventSummaries } from '../../model/hyp-event.interface';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class EventService {
|
|
7
7
|
private httpClient;
|
|
8
8
|
private store;
|
|
9
9
|
constructor(httpClient: HttpClient, store: Store<any>);
|
|
10
|
-
list(): Observable<Array<
|
|
10
|
+
list(): Observable<Array<HypEventDetails>>;
|
|
11
|
+
listSummaries(): Observable<HypEventSummaries>;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<EventService, never>;
|
|
12
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<EventService>;
|
|
13
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const HypervisorActions: {
|
|
2
2
|
setUrl: import("@ngrx/store").ActionCreator<"[Event] Set Backend Url", (props: {
|
|
3
|
-
url
|
|
3
|
+
url?: string | undefined;
|
|
4
4
|
}) => {
|
|
5
|
-
url
|
|
5
|
+
url?: string | undefined;
|
|
6
6
|
} & import("@ngrx/store/src/models").TypedAction<"[Event] Set Backend Url">>;
|
|
7
7
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@use '/node_modules/@provoly/dashboard/styles/abstracts' as *;
|
|
2
|
+
|
|
3
|
+
.m-hvy-event-summary-item {
|
|
4
|
+
gap: toRem(5);
|
|
5
|
+
padding: toRem(10);
|
|
6
|
+
border-radius: toRem(5);
|
|
7
|
+
|
|
8
|
+
background-color: #ffffff;
|
|
9
|
+
|
|
10
|
+
&:hover {
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&__content {
|
|
15
|
+
margin-bottom: toRem(10);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__footer {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__icons {
|
|
25
|
+
display: flex;
|
|
26
|
+
gap: toRem(5);
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__intervention-counter {
|
|
31
|
+
padding: 0 toRem(5);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__date {
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: space-between;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use '/node_modules/@provoly/dashboard/styles/abstracts' as *;
|
|
2
|
+
|
|
3
|
+
.o-hvy-event-summary-list {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: toRem(10);
|
|
7
|
+
|
|
8
|
+
height: 100%;
|
|
9
|
+
padding: toRem(10);
|
|
10
|
+
border-radius: toRem(5);
|
|
11
|
+
|
|
12
|
+
&__header {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: toRem(10);
|
|
16
|
+
text-transform: uppercase;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__title {
|
|
20
|
+
padding: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__counter {
|
|
24
|
+
height: toRem(20);
|
|
25
|
+
padding: 0 toRem(5);
|
|
26
|
+
border-radius: toRem(10);
|
|
27
|
+
text-align: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__content {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: toRem(10);
|
|
34
|
+
flex: 1;
|
|
35
|
+
overflow-y: auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__footer {
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
align-items: center;
|
|
42
|
+
text-decoration: underline;
|
|
43
|
+
text-underline-offset: toRem(2);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@use '/node_modules/@provoly/dashboard/styles/abstracts' as *;
|
|
2
|
+
|
|
3
|
+
.o-hvy-events-table {
|
|
4
|
+
border-collapse: collapse;
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: toRem(20);
|
|
7
|
+
|
|
8
|
+
&__header {
|
|
9
|
+
th {
|
|
10
|
+
border-bottom: 2px solid #EAEAEA;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&__line {
|
|
15
|
+
&__cell {
|
|
16
|
+
height: toRem(50);
|
|
17
|
+
padding: toRem(15);
|
|
18
|
+
border-bottom: 1px solid #EAEAEA;
|
|
19
|
+
|
|
20
|
+
&.-centered {
|
|
21
|
+
text-align: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__name {
|
|
25
|
+
&__main {
|
|
26
|
+
font-weight: 500;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
package/styles/main.scss
ADDED