@provoly/dashboard 0.20.4 → 0.20.5

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.
Files changed (125) hide show
  1. package/dataset/components/dataset-detail/dataset-detail.component.d.ts +2 -1
  2. package/dataset/i18n/en.translations.d.ts +2 -1
  3. package/dataset/i18n/fr.translations.d.ts +2 -1
  4. package/dataset/style/_o-pry-dataset-card.scss +0 -1
  5. package/dataset/style/_o-pry-dataset-detail.scss +2 -53
  6. package/esm2022/admin/components/admin-classes/admin-classes-form/admin-classes-form.component.mjs +3 -3
  7. package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +3 -3
  8. package/esm2022/admin/components/admin-fields/admin-fields-form/admin-fields-form.component.mjs +3 -3
  9. package/esm2022/admin/components/admin-menu/admin-menu.component.mjs +3 -3
  10. package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +20 -4
  11. package/esm2022/dataset/i18n/en.translations.mjs +3 -2
  12. package/esm2022/dataset/i18n/fr.translations.mjs +3 -2
  13. package/esm2022/dataset/style/css.component.mjs +2 -2
  14. package/esm2022/filters/autocomplete/autocomplete.component.mjs +16 -10
  15. package/esm2022/lib/core/components/about/about.component.mjs +3 -3
  16. package/esm2022/lib/core/components/base-menu/base-menu.component.mjs +3 -3
  17. package/esm2022/lib/core/components/select/select.component.mjs +42 -13
  18. package/esm2022/lib/core/i18n/en.translations.mjs +1 -2
  19. package/esm2022/lib/core/i18n/fr.translations.mjs +1 -2
  20. package/esm2022/lib/core/model/display-options.interface.mjs +2 -2
  21. package/esm2022/lib/core/store/class/class.actions.mjs +1 -4
  22. package/esm2022/lib/core/store/class/class.effects.mjs +1 -4
  23. package/esm2022/lib/core/store/class/class.interface.mjs +1 -1
  24. package/esm2022/lib/core/store/class/class.reducer.mjs +3 -13
  25. package/esm2022/lib/core/store/class/class.selectors.mjs +1 -3
  26. package/esm2022/lib/core/store/class/class.service.mjs +1 -9
  27. package/esm2022/lib/core/store/config/config.selectors.mjs +1 -3
  28. package/esm2022/lib/core/store/config/config.service.mjs +4 -7
  29. package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +3 -3
  30. package/esm2022/presentation/components/presentation.component.mjs +3 -3
  31. package/esm2022/presentation/components/title-presentation/title-presentation.component.mjs +11 -21
  32. package/esm2022/presentation/style/css.component.mjs +2 -2
  33. package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +3 -3
  34. package/esm2022/restitution/i18n/en.translations.mjs +2 -2
  35. package/esm2022/restitution/style/css.component.mjs +2 -2
  36. package/esm2022/search/i18n/en.translations.mjs +2 -1
  37. package/esm2022/search/i18n/fr.translations.mjs +2 -1
  38. package/esm2022/toolbox/components/filter-settings/filter-settings.component.mjs +3 -7
  39. package/fesm2022/provoly-dashboard-admin.mjs +8 -8
  40. package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
  41. package/fesm2022/provoly-dashboard-dataset.mjs +25 -7
  42. package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
  43. package/fesm2022/provoly-dashboard-filters-autocomplete.mjs +15 -9
  44. package/fesm2022/provoly-dashboard-filters-autocomplete.mjs.map +1 -1
  45. package/fesm2022/provoly-dashboard-presentation.mjs +14 -24
  46. package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
  47. package/fesm2022/provoly-dashboard-restitution.mjs +5 -5
  48. package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
  49. package/fesm2022/provoly-dashboard-search.mjs +2 -0
  50. package/fesm2022/provoly-dashboard-search.mjs.map +1 -1
  51. package/fesm2022/provoly-dashboard-toolbox.mjs +2 -6
  52. package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
  53. package/fesm2022/provoly-dashboard.mjs +54 -58
  54. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  55. package/filters/autocomplete/autocomplete.component.d.ts +1 -0
  56. package/lib/core/components/select/select.component.d.ts +2 -1
  57. package/lib/core/i18n/en.translations.d.ts +0 -1
  58. package/lib/core/i18n/fr.translations.d.ts +0 -1
  59. package/lib/core/store/class/class.actions.d.ts +1 -12
  60. package/lib/core/store/class/class.effects.d.ts +0 -5
  61. package/lib/core/store/class/class.interface.d.ts +0 -6
  62. package/lib/core/store/class/class.reducer.d.ts +2 -3
  63. package/lib/core/store/class/class.selectors.d.ts +0 -1
  64. package/lib/core/store/class/class.service.d.ts +1 -5
  65. package/lib/core/store/config/config.selectors.d.ts +0 -1
  66. package/package.json +1 -7
  67. package/presentation/components/title-presentation/title-presentation.component.d.ts +3 -5
  68. package/presentation/style/_o-pry-presentation.scss +1 -48
  69. package/restitution/i18n/en.translations.d.ts +1 -1
  70. package/restitution/style/_o-restitution.scss +11 -14
  71. package/search/i18n/en.translations.d.ts +1 -0
  72. package/search/i18n/fr.translations.d.ts +1 -0
  73. package/styles/base/_utils.scss +4 -0
  74. package/styles/components/_a-tooltip.scss +25 -18
  75. package/styles/components/_m-info-icon.scss +16 -0
  76. package/styles/components/_m-presentation-title.scss +14 -0
  77. package/styles/components/_o-about.scss +2 -24
  78. package/styles/main.scss +2 -0
  79. package/styles-theme/components-theme/_o-pry-dataset.theme.scss +0 -8
  80. package/styles-theme/components-theme/_o-pry-presentation.theme.scss +1 -1
  81. package/styles-theme/components-theme/_o-restitution.theme.scss +10 -0
  82. package/esm2022/supervision/components/supervision-business-data/supervision-business-data.component.mjs +0 -34
  83. package/esm2022/supervision/components/supervision-flow/supervision-flow.component.mjs +0 -33
  84. package/esm2022/supervision/components/supervision-infrastructures/supervision-infrastructures.component.mjs +0 -51
  85. package/esm2022/supervision/components/supervision-integration-errors/supervision-integration-errors-select/supervision-integration-errors-select.component.mjs +0 -27
  86. package/esm2022/supervision/components/supervision-integration-errors/supervision-integration-errors.component.mjs +0 -100
  87. package/esm2022/supervision/components/supervision-layout/supervision-layout.component.mjs +0 -47
  88. package/esm2022/supervision/components/supervision-menu/supervision-menu.component.mjs +0 -32
  89. package/esm2022/supervision/components/supervision-title/supervision-title.component.mjs +0 -24
  90. package/esm2022/supervision/components/supervision.component.mjs +0 -19
  91. package/esm2022/supervision/i18n/en.translations.mjs +0 -58
  92. package/esm2022/supervision/i18n/fr.translations.mjs +0 -58
  93. package/esm2022/supervision/provoly-dashboard-supervision.mjs +0 -5
  94. package/esm2022/supervision/public-api.mjs +0 -2
  95. package/esm2022/supervision/store/supervision-api.model.mjs +0 -2
  96. package/esm2022/supervision/store/supervision.actions.mjs +0 -33
  97. package/esm2022/supervision/store/supervision.effects.mjs +0 -60
  98. package/esm2022/supervision/store/supervision.reducer.mjs +0 -111
  99. package/esm2022/supervision/store/supervision.selectors.mjs +0 -35
  100. package/esm2022/supervision/store/supervision.service.mjs +0 -54
  101. package/esm2022/supervision/supervision-routing.module.mjs +0 -96
  102. package/esm2022/supervision/supervision.module.mjs +0 -96
  103. package/fesm2022/provoly-dashboard-supervision.mjs +0 -861
  104. package/fesm2022/provoly-dashboard-supervision.mjs.map +0 -1
  105. package/supervision/components/supervision-business-data/supervision-business-data.component.d.ts +0 -14
  106. package/supervision/components/supervision-flow/supervision-flow.component.d.ts +0 -14
  107. package/supervision/components/supervision-infrastructures/supervision-infrastructures.component.d.ts +0 -18
  108. package/supervision/components/supervision-integration-errors/supervision-integration-errors-select/supervision-integration-errors-select.component.d.ts +0 -12
  109. package/supervision/components/supervision-integration-errors/supervision-integration-errors.component.d.ts +0 -29
  110. package/supervision/components/supervision-layout/supervision-layout.component.d.ts +0 -21
  111. package/supervision/components/supervision-menu/supervision-menu.component.d.ts +0 -13
  112. package/supervision/components/supervision-title/supervision-title.component.d.ts +0 -11
  113. package/supervision/components/supervision.component.d.ts +0 -9
  114. package/supervision/i18n/en.translations.d.ts +0 -57
  115. package/supervision/i18n/fr.translations.d.ts +0 -57
  116. package/supervision/index.d.ts +0 -5
  117. package/supervision/public-api.d.ts +0 -1
  118. package/supervision/store/supervision-api.model.d.ts +0 -36
  119. package/supervision/store/supervision.actions.d.ts +0 -121
  120. package/supervision/store/supervision.effects.d.ts +0 -51
  121. package/supervision/store/supervision.reducer.d.ts +0 -22
  122. package/supervision/store/supervision.selectors.d.ts +0 -18
  123. package/supervision/store/supervision.service.d.ts +0 -19
  124. package/supervision/supervision-routing.module.d.ts +0 -7
  125. package/supervision/supervision.module.d.ts +0 -25
@@ -1,861 +0,0 @@
1
- import * as i2 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { Component, ViewContainerRef, ViewChild, Injectable, NgModule } from '@angular/core';
5
- import * as i4 from '@angular/forms';
6
- import { FormsModule } from '@angular/forms';
7
- import * as i1$2 from '@ngrx/effects';
8
- import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
9
- import * as i1 from '@ngrx/store';
10
- import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
11
- import * as i3 from '@provoly/dashboard';
12
- import { ClassActions, ClassSelectors, BaseMenuComponent, BaseLayoutComponent, ConfigSelectors, PRY_ACCESS_GUARD, PryCoreModule, PryIconModule, PrySortModule, PrySnackbarModule, PryToggleModule, PrySelectModule, PryI18nModule } from '@provoly/dashboard';
13
- import * as i5 from '@provoly/dashboard/components/checkbox';
14
- import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
15
- import { startWith, Subscription, BehaviorSubject, mergeMap, switchMap, interval, takeUntil } from 'rxjs';
16
- import { map, mergeMap as mergeMap$1, catchError, withLatestFrom } from 'rxjs/operators';
17
- import * as i2$1 from '@angular/router';
18
- import { RouterModule } from '@angular/router';
19
- import * as i1$1 from '@angular/common/http';
20
-
21
- const SupervisionActions = {
22
- highLightMenu: createAction('[Supervision] selecting highLight', props()),
23
- routeTo: createAction('[Supervision] route to', props()),
24
- toggleMenu: createAction('[Supervision] Toggle menu'),
25
- resetActions: createAction('[Supervision] reset toolbox main and sub actions'),
26
- mainActions: createAction('[Supervision] set toolbox main actions', props()),
27
- subActions: createAction('[Supervision] set toolbox sub actions', props()),
28
- loadInfras: createAction('[Supervision/Infra] Load Infras'),
29
- loadInfrasSuccess: createAction('[Supervision/Infra Api] Load Infras Success', props()),
30
- loadInfrasFailure: createAction('[Supervision/Infra Api] Load Infras Failure', props()),
31
- scaleInfra: createAction('[Supervision/Infra] Scale infra', props()),
32
- scaleInfraSuccess: createAction('[Supervision/Infra Api] Scale infra success', props()),
33
- scaleInfraFailure: createAction('[Supervision/Infra Api] Scale infra failure', props()),
34
- loadFlows: createAction('[Supervision/Flow] Load Flows'),
35
- loadFlowsSuccess: createAction('[Supervision/Flow Api] Load Flows Success', props()),
36
- loadFlowsFailure: createAction('[Supervision/Flow Api] Load Flows Failure', props()),
37
- loadIntegrationErrors: createAction('[Supervision/Errors] Load Integration Errors'),
38
- loadIntegrationErrorsSuccess: createAction('[Supervision/Errors Api] Load Integration Errors Success', props()),
39
- loadIntegrationErrorsFailure: createAction('[Supervision/Errors Api] Load Integration Errors Failure', props()),
40
- toggleErrorDetails: createAction('[Supervision/Errors] Toggle Side Panel With Error Details Of Chosen Class', props()),
41
- toggleClassSelection: createAction('[Supervision/Errors] Select/Unselect Class for submission (Reload/Acknowledge)', props()),
42
- reloadErrors: createAction('[Supervision/Errors] Reload Integration Errors'),
43
- reloadErrorsSuccess: createAction('[Supervision/Errors Api] Reload Integration Errors Success'),
44
- reloadErrorsFailure: createAction('[Supervision/Errors Api] Reload Integration Errors failure', props()),
45
- acknowledgeErrors: createAction('[Supervision/Errors] Acknowledge Integration Errors'),
46
- acknowledgeErrorsSuccess: createAction('[Supervision/Errors Api] Acknowledge Integration Errors Success'),
47
- acknowledgeErrorsFailure: createAction('[Supervision/Errors Api] Acknowledge Integration Errors Failure', props()),
48
- setRefreshInterval: createAction('[Supervision/Errors] Change the interval of time for refreshing errors (in milliseconds)', props()),
49
- startAutoRefresh: createAction('[Supervision/Errors] Start auto refreshing errors'),
50
- stopAutoRefresh: createAction('[Supervision/Errors] Stop auto refreshing errors')
51
- };
52
-
53
- const supervisionFeatureKey = '@pry/supervision';
54
- const initialSupervisionState = {
55
- highlightedMenu: 'infrastructures',
56
- menus: [{ menu: 'integration-errors', module: 'supervision', page: 'integration_errors' }],
57
- menuOpen: true,
58
- actions: [],
59
- subActions: [],
60
- infrastructures: [],
61
- lastInfraScale: undefined,
62
- inputFlows: [],
63
- businessDatas: [],
64
- integrationErrors: [],
65
- errorDetailsOpen: false,
66
- selectedClasses: [],
67
- refreshInterval: 30000,
68
- loading: false,
69
- currentIntegrationError: undefined
70
- };
71
- const supervisionReducer = createReducer(initialSupervisionState, on(SupervisionActions.highLightMenu, (state, action) => ({
72
- ...state,
73
- highlightedMenu: action.menu
74
- })), on(SupervisionActions.toggleMenu, (state) => ({
75
- ...state,
76
- menuOpen: !state.menuOpen
77
- })), on(SupervisionActions.resetActions, (state) => ({
78
- ...state,
79
- actions: [],
80
- subActions: []
81
- })), on(SupervisionActions.mainActions, (state, action) => ({
82
- ...state,
83
- actions: [...action.actions]
84
- })), on(SupervisionActions.subActions, (state, action) => ({
85
- ...state,
86
- subActions: [...action.actions]
87
- })), on(SupervisionActions.loadInfras, (state) => ({
88
- ...state,
89
- loading: true
90
- })), on(SupervisionActions.loadInfrasSuccess, (state, action) => ({
91
- ...state,
92
- infrastructures: [...action.infras],
93
- loading: false
94
- })), on(SupervisionActions.loadInfrasFailure, (state) => ({
95
- ...state,
96
- loading: false
97
- })), on(SupervisionActions.scaleInfra, (state) => ({
98
- ...state,
99
- loading: true
100
- })), on(SupervisionActions.scaleInfraSuccess, (state, action) => ({
101
- ...state,
102
- lastInfraScale: { name: action.name, time: action.time, up: action.up }
103
- })), on(SupervisionActions.scaleInfraFailure, (state) => ({
104
- ...state,
105
- loading: false
106
- })), on(SupervisionActions.loadFlows, (state) => ({
107
- ...state,
108
- loading: true
109
- })), on(SupervisionActions.loadFlowsSuccess, (state, action) => ({
110
- ...state,
111
- inputFlows: [...action.flows],
112
- loading: false
113
- })), on(SupervisionActions.loadFlowsFailure, (state) => ({
114
- ...state,
115
- loading: false
116
- })), on(SupervisionActions.loadIntegrationErrors, (state) => ({
117
- ...state,
118
- loading: true
119
- })), on(SupervisionActions.loadIntegrationErrorsSuccess, (state, action) => ({
120
- ...state,
121
- integrationErrors: [...action.integrationErrors],
122
- loading: false
123
- })), on(SupervisionActions.loadIntegrationErrorsFailure, (state) => ({
124
- ...state,
125
- loading: false
126
- })), on(SupervisionActions.toggleErrorDetails, (state, action) => ({
127
- ...state,
128
- currentIntegrationError: action.error,
129
- errorDetailsOpen: action.errorDetailsOpen
130
- })), on(SupervisionActions.toggleClassSelection, (state, action) => {
131
- let updatedClasses;
132
- if (state.selectedClasses.includes(action.selectedClass)) {
133
- updatedClasses = state.selectedClasses.filter((oclass) => oclass !== action.selectedClass);
134
- }
135
- else {
136
- updatedClasses = [...state.selectedClasses, action.selectedClass];
137
- }
138
- return { ...state, selectedClasses: updatedClasses };
139
- }), on(SupervisionActions.reloadErrors, (state, action) => ({
140
- ...state,
141
- loading: true
142
- })), on(SupervisionActions.reloadErrorsSuccess, (state, action) => ({
143
- ...state,
144
- loading: false
145
- })), on(SupervisionActions.reloadErrorsFailure, (state, action) => ({
146
- ...state,
147
- loading: false
148
- })), on(SupervisionActions.acknowledgeErrors, (state, action) => ({
149
- ...state,
150
- loading: true
151
- })), on(SupervisionActions.acknowledgeErrorsSuccess, (state, action) => ({
152
- ...state,
153
- loading: false
154
- })), on(SupervisionActions.acknowledgeErrorsFailure, (state, action) => ({
155
- ...state,
156
- loading: false
157
- })), on(SupervisionActions.setRefreshInterval, (state, action) => ({
158
- ...state,
159
- refreshInterval: action.interval
160
- })));
161
-
162
- const feature = createFeatureSelector(supervisionFeatureKey);
163
- const highlightedMenu = createSelector(feature, (state) => state.highlightedMenu);
164
- const menuOpen = createSelector(feature, (state) => state.menuOpen);
165
- const actions = createSelector(feature, (state) => state.actions);
166
- const subActions = createSelector(feature, (state) => state.subActions);
167
- const menus = createSelector(feature, (state) => state.menus);
168
- const infrastructures = createSelector(feature, (state) => state.infrastructures);
169
- const lastInfraScale = createSelector(feature, (state) => state.lastInfraScale);
170
- const inputFlows = createSelector(feature, (state) => state.inputFlows);
171
- const integrationErrors = createSelector(feature, (state) => state.integrationErrors ?? []);
172
- const currentIntegrationError = createSelector(feature, (state) => state.currentIntegrationError);
173
- const errorDetailsOpen = createSelector(feature, (state) => state.errorDetailsOpen);
174
- const selectedClasses = createSelector(feature, (state) => state.selectedClasses);
175
- const refreshInterval = createSelector(feature, (state) => state.refreshInterval);
176
- const loading = createSelector(feature, (state) => state.loading);
177
- const SupervisionSelectors = {
178
- feature,
179
- highlightedMenu,
180
- menuOpen,
181
- menus,
182
- actions,
183
- subActions,
184
- infrastructures,
185
- lastInfraScale,
186
- inputFlows,
187
- integrationErrors,
188
- currentIntegrationError,
189
- errorDetailsOpen,
190
- selectedClasses,
191
- refreshInterval,
192
- loading
193
- };
194
-
195
- class SupervisionBusinessDataComponent {
196
- constructor(store) {
197
- this.store = store;
198
- this.sortActive = 'name';
199
- this.sortDirection = 'asc';
200
- this.store.dispatch(ClassActions.loadBusinessData());
201
- this.datas$ = this.store.select(ClassSelectors.classDatas);
202
- this.loading$ = this.store.select(SupervisionSelectors.loading);
203
- this.store.dispatch(SupervisionActions.mainActions({
204
- actions: [
205
- {
206
- action: ClassActions.loadBusinessData(),
207
- label: 'refresh',
208
- icon: 'synchro'
209
- }
210
- ]
211
- }));
212
- }
213
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionBusinessDataComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
214
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SupervisionBusinessDataComponent, selector: "pry-supervision-business-data", ngImport: i0, template: "<div class=\"o-base-container\">\n <h1 class=\"a-h1\">{{ '@pry.supervision.businessData.title' | i18n }}</h1>\n <table\n class=\"a-table\"\n prySortTable\n prySortActive=\"name\"\n prySortDirection=\"asc\"\n (prySortChange)=\"sortActive = $event.active; sortDirection = $event.direction\"\n >\n <caption>\n {{\n '@pry.supervision.businessData.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>\n <pry-icon iconSvg=\"detail\"></pry-icon>\n </th>\n <th prySortHeader=\"name\">{{ '@pry.supervision.businessData.name' | i18n }}</th>\n <th prySortHeader=\"count\">{{ '@pry.supervision.businessData.count' | i18n }}</th>\n <th prySortHeader=\"date\">{{ '@pry.supervision.businessData.date' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let data of datas$ | async | prySortData: sortActive : sortDirection\">\n <td>\n <ng-container *ngIf=\"data.icon; else noImg\">\n <img [height]=\"25\" [width]=\"25\" [src]=\"data.icon | getSecuredImage | async\" [alt]=\"data.title\" />\n </ng-container>\n <ng-template #noImg>\n <img\n [height]=\"25\"\n [width]=\"25\"\n [src]=\"data.id | translateId: { type: 'class', output: 'icon' } | async\"\n [alt]=\"data.title\"\n />\n </ng-template>\n </td>\n <td>{{ data.name }}</td>\n <td>{{ data.count }}</td>\n <td>\n {{ !data.date ? '' : (data.date | date: ('@pry.format.datetime' | i18n)) }}\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i3.PrySortHeaderComponent, selector: "th[prySortHeader]", inputs: ["prySortHeader"], outputs: ["sortChange"] }, { kind: "directive", type: i3.PrySortHeaderDirective, selector: "[prySortHeader]" }, { kind: "directive", type: i3.PrySortTableDirective, selector: "[prySortTable]", inputs: ["prySortActive", "prySortDirection"], outputs: ["prySortChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i3.TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: i3.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: i3.PrySortDataPipe, name: "prySortData" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
215
- }
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionBusinessDataComponent, decorators: [{
217
- type: Component,
218
- args: [{ selector: 'pry-supervision-business-data', template: "<div class=\"o-base-container\">\n <h1 class=\"a-h1\">{{ '@pry.supervision.businessData.title' | i18n }}</h1>\n <table\n class=\"a-table\"\n prySortTable\n prySortActive=\"name\"\n prySortDirection=\"asc\"\n (prySortChange)=\"sortActive = $event.active; sortDirection = $event.direction\"\n >\n <caption>\n {{\n '@pry.supervision.businessData.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th>\n <pry-icon iconSvg=\"detail\"></pry-icon>\n </th>\n <th prySortHeader=\"name\">{{ '@pry.supervision.businessData.name' | i18n }}</th>\n <th prySortHeader=\"count\">{{ '@pry.supervision.businessData.count' | i18n }}</th>\n <th prySortHeader=\"date\">{{ '@pry.supervision.businessData.date' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let data of datas$ | async | prySortData: sortActive : sortDirection\">\n <td>\n <ng-container *ngIf=\"data.icon; else noImg\">\n <img [height]=\"25\" [width]=\"25\" [src]=\"data.icon | getSecuredImage | async\" [alt]=\"data.title\" />\n </ng-container>\n <ng-template #noImg>\n <img\n [height]=\"25\"\n [width]=\"25\"\n [src]=\"data.id | translateId: { type: 'class', output: 'icon' } | async\"\n [alt]=\"data.title\"\n />\n </ng-template>\n </td>\n <td>{{ data.name }}</td>\n <td>{{ data.count }}</td>\n <td>\n {{ !data.date ? '' : (data.date | date: ('@pry.format.datetime' | i18n)) }}\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n" }]
219
- }], ctorParameters: function () { return [{ type: i1.Store }]; } });
220
-
221
- class SupervisionFlowComponent {
222
- constructor(store) {
223
- this.store = store;
224
- this.sortActive = 'name';
225
- this.sortDirection = 'asc';
226
- this.store.dispatch(SupervisionActions.loadFlows());
227
- this.flows$ = this.store.select(SupervisionSelectors.inputFlows);
228
- this.loading$ = this.store.select(SupervisionSelectors.loading);
229
- this.store.dispatch(SupervisionActions.mainActions({
230
- actions: [
231
- {
232
- action: SupervisionActions.loadFlows(),
233
- label: 'refresh',
234
- icon: 'synchro'
235
- }
236
- ]
237
- }));
238
- }
239
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionFlowComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
240
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SupervisionFlowComponent, selector: "pry-supervision-flow", ngImport: i0, template: "<div class=\"o-base-container\">\n <h1 class=\"a-h1\">{{ '@pry.supervision.inputFlow.title' | i18n }}</h1>\n\n <table\n class=\"a-table\"\n prySortTable\n prySortActive=\"name\"\n prySortDirection=\"asc\"\n (prySortChange)=\"sortActive = $event.active; sortDirection = $event.direction\"\n >\n <caption>\n {{\n '@pry.supervision.inputFlow.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th prySortHeader=\"name\">{{ '@pry.supervision.inputFlow.name' | i18n }}</th>\n <th prySortHeader=\"format\">{{ '@pry.supervision.inputFlow.format' | i18n }}</th>\n <th>{{ '@pry.supervision.inputFlow.state' | i18n }}</th>\n <th prySortHeader=\"nbIntegrationOk\">{{ '@pry.supervision.inputFlow.oks' | i18n }}</th>\n <th prySortHeader=\"nbIntegrationKo\">{{ '@pry.supervision.inputFlow.kos' | i18n }}</th>\n <th prySortHeader=\"dateIntegration\">{{ '@pry.supervision.inputFlow.date' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async | prySortData: sortActive : sortDirection\">\n <td>\n <div class=\"u-display-flex -align-center\">\n {{ flow.name }}\n <a *ngIf=\"flow.accessLink\" [href]=\"flow.accessLink\" target=\"_blank\" class=\"a-btn a-btn--icon-only\">\n <pry-icon iconSvg=\"launch\" [height]=\"15\" [width]=\"15\"></pry-icon>\n <span class=\"u-sr-only\">{{ '@pry.action.opensInNewTab' | i18n }}</span>\n </a>\n </div>\n </td>\n <td>{{ flow.format }}</td>\n <td>\n <span class=\"a-badge\" [ngClass]=\"{ '-status-ok': flow.status, '-status-inactive': !flow.status }\">\n {{ (flow.status ? '@pry.supervision.inputFlow.active' : '@pry.supervision.inputFlow.inactive') | i18n }}\n </span>\n </td>\n <td>{{ flow.nbIntegrationOk }}</td>\n <td>{{ flow.nbIntegrationKo }}</td>\n <td>{{ flow.dateIntegration | date: ('@pry.format.datetime' | i18n) }}</td>\n </tr>\n </tbody>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i3.PrySortHeaderComponent, selector: "th[prySortHeader]", inputs: ["prySortHeader"], outputs: ["sortChange"] }, { kind: "directive", type: i3.PrySortHeaderDirective, selector: "[prySortHeader]" }, { kind: "directive", type: i3.PrySortTableDirective, selector: "[prySortTable]", inputs: ["prySortActive", "prySortDirection"], outputs: ["prySortChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i3.PrySortDataPipe, name: "prySortData" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
241
- }
242
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionFlowComponent, decorators: [{
243
- type: Component,
244
- args: [{ selector: 'pry-supervision-flow', template: "<div class=\"o-base-container\">\n <h1 class=\"a-h1\">{{ '@pry.supervision.inputFlow.title' | i18n }}</h1>\n\n <table\n class=\"a-table\"\n prySortTable\n prySortActive=\"name\"\n prySortDirection=\"asc\"\n (prySortChange)=\"sortActive = $event.active; sortDirection = $event.direction\"\n >\n <caption>\n {{\n '@pry.supervision.inputFlow.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th prySortHeader=\"name\">{{ '@pry.supervision.inputFlow.name' | i18n }}</th>\n <th prySortHeader=\"format\">{{ '@pry.supervision.inputFlow.format' | i18n }}</th>\n <th>{{ '@pry.supervision.inputFlow.state' | i18n }}</th>\n <th prySortHeader=\"nbIntegrationOk\">{{ '@pry.supervision.inputFlow.oks' | i18n }}</th>\n <th prySortHeader=\"nbIntegrationKo\">{{ '@pry.supervision.inputFlow.kos' | i18n }}</th>\n <th prySortHeader=\"dateIntegration\">{{ '@pry.supervision.inputFlow.date' | i18n }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async | prySortData: sortActive : sortDirection\">\n <td>\n <div class=\"u-display-flex -align-center\">\n {{ flow.name }}\n <a *ngIf=\"flow.accessLink\" [href]=\"flow.accessLink\" target=\"_blank\" class=\"a-btn a-btn--icon-only\">\n <pry-icon iconSvg=\"launch\" [height]=\"15\" [width]=\"15\"></pry-icon>\n <span class=\"u-sr-only\">{{ '@pry.action.opensInNewTab' | i18n }}</span>\n </a>\n </div>\n </td>\n <td>{{ flow.format }}</td>\n <td>\n <span class=\"a-badge\" [ngClass]=\"{ '-status-ok': flow.status, '-status-inactive': !flow.status }\">\n {{ (flow.status ? '@pry.supervision.inputFlow.active' : '@pry.supervision.inputFlow.inactive') | i18n }}\n </span>\n </td>\n <td>{{ flow.nbIntegrationOk }}</td>\n <td>{{ flow.nbIntegrationKo }}</td>\n <td>{{ flow.dateIntegration | date: ('@pry.format.datetime' | i18n) }}</td>\n </tr>\n </tbody>\n </table>\n</div>\n" }]
245
- }], ctorParameters: function () { return [{ type: i1.Store }]; } });
246
-
247
- class SupervisionInfrastructuresComponent {
248
- constructor(store) {
249
- this.store = store;
250
- this.classFromStatus = {
251
- GREEN: '-ok',
252
- YELLOW: '-warning',
253
- RED: '-error'
254
- };
255
- this.store.dispatch(SupervisionActions.loadInfras());
256
- this.infras$ = this.store.select(SupervisionSelectors.infrastructures);
257
- this.lastInfraScale$ = this.store.select(SupervisionSelectors.lastInfraScale);
258
- this.loading$ = this.store.select(SupervisionSelectors.loading);
259
- this.store.dispatch(SupervisionActions.mainActions({
260
- actions: [
261
- {
262
- action: SupervisionActions.loadInfras(),
263
- label: 'refresh',
264
- icon: 'synchro'
265
- }
266
- ]
267
- }));
268
- }
269
- onScaleUp(infra, replicas) {
270
- this.store.dispatch(SupervisionActions.scaleInfra({
271
- name: infra,
272
- scale: replicas + 1,
273
- up: true
274
- }));
275
- }
276
- onScaleDown(infra, replicas) {
277
- this.store.dispatch(SupervisionActions.scaleInfra({
278
- name: infra,
279
- scale: replicas - 1,
280
- up: false
281
- }));
282
- }
283
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionInfrastructuresComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
284
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SupervisionInfrastructuresComponent, selector: "pry-supervision-infrastructures", ngImport: i0, template: "<div class=\"o-base-container\">\n <h1 class=\"a-h1\">{{ '@pry.supervision.infrastructures.title' | i18n }}</h1>\n\n <ul class=\"o-cards-list\">\n <li *ngFor=\"let infra of infras$ | async\" class=\"o-cards-list__item\">\n <div class=\"o-card o-card--infra\">\n <div class=\"o-card__header\">\n <div class=\"o-card__header__logo\"></div>\n <div class=\"o-card__header__title\">\n <h4 class=\"a-h4\">{{ infra.name }}</h4>\n <p class=\"a-p\">{{ infra.title }}</p>\n </div>\n <div *ngIf=\"infra.status\" class=\"o-card__header__status\" [ngClass]=\"classFromStatus[infra.status]\"></div>\n </div>\n\n <div class=\"o-card__content\">\n <p class=\"a-p\">\n {{ infra.available }}\n {{ '@pry.supervision.infrastructures.available' + (infra.available > 1 ? 's' : '') | i18n }}\n </p>\n\n <ng-container *ngIf=\"lastInfraScale$ | async as lastInfraScale\">\n <span *ngIf=\"lastInfraScale.name === infra.name\" class=\"o-card__content__info\">\n {{ '@pry.supervision.infrastructures.scaleReplica' + (lastInfraScale.up ? 'Up' : 'Down') | i18n }}\n {{ lastInfraScale.time | date: 'HH:mm' }}\n </span>\n </ng-container>\n </div>\n\n <div class=\"o-card__footer\">\n <div class=\"o-card__footer__message\">\n <pry-icon iconSvg=\"grid_view\" [height]=\"20\" [width]=\"20\"></pry-icon>\n <span>\n {{ infra.replicas }}\n {{ '@pry.supervision.infrastructures.replica' + (infra.replicas > 1 ? 's' : '') | i18n }}\n </span>\n </div>\n\n <ng-container *pryAccess=\"{ module: 'supervision', page: 'infrastructures', action: 'scale' }\">\n <div *ngIf=\"infra.hotScale\" class=\"m-minus-plus\">\n <ng-container *ngIf=\"infra.replicas !== infra.available; else scaleTemplate\">\n <button\n class=\"m-minus-plus__btn -minus\"\n disabled\n title=\"{{ '@pry.supervision.infrastructures.removeInstance' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.supervision.infrastructures.removeInstance' | i18n }}</span>\n <span class=\"m-minus-plus__btn__sign\" aria-hidden=\"true\"></span>\n </button>\n <button\n class=\"m-minus-plus__btn -plus\"\n disabled\n title=\"{{ '@pry.supervision.infrastructures.addInstance' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.supervision.infrastructures.addInstance' | i18n }}</span>\n <span class=\"m-minus-plus__btn__sign\" aria-hidden=\"true\"></span>\n </button>\n </ng-container>\n\n <ng-template #scaleTemplate>\n <button\n class=\"m-minus-plus__btn -minus scale-down\"\n [disabled]=\"infra.replicas === infra.minReplicas\"\n title=\"{{ '@pry.supervision.infrastructures.removeInstance' | i18n }}\"\n (click)=\"infra.replicas !== infra.minReplicas && onScaleDown(infra.name, infra.replicas)\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.supervision.infrastructures.removeInstance' | i18n }}</span>\n <span class=\"m-minus-plus__btn__sign\" aria-hidden=\"true\"></span>\n </button>\n <button\n class=\"m-minus-plus__btn -plus scale-up\"\n [disabled]=\"infra.replicas === infra.maxReplicas\"\n title=\"{{ '@pry.supervision.infrastructures.addInstance' | i18n }}\"\n (click)=\"infra.replicas !== infra.maxReplicas && onScaleUp(infra.name, infra.replicas)\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.supervision.infrastructures.addInstance' | i18n }}</span>\n <span class=\"m-minus-plus__btn__sign\" aria-hidden=\"true\"></span>\n </button>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n </li>\n </ul>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
285
- }
286
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionInfrastructuresComponent, decorators: [{
287
- type: Component,
288
- args: [{ selector: 'pry-supervision-infrastructures', template: "<div class=\"o-base-container\">\n <h1 class=\"a-h1\">{{ '@pry.supervision.infrastructures.title' | i18n }}</h1>\n\n <ul class=\"o-cards-list\">\n <li *ngFor=\"let infra of infras$ | async\" class=\"o-cards-list__item\">\n <div class=\"o-card o-card--infra\">\n <div class=\"o-card__header\">\n <div class=\"o-card__header__logo\"></div>\n <div class=\"o-card__header__title\">\n <h4 class=\"a-h4\">{{ infra.name }}</h4>\n <p class=\"a-p\">{{ infra.title }}</p>\n </div>\n <div *ngIf=\"infra.status\" class=\"o-card__header__status\" [ngClass]=\"classFromStatus[infra.status]\"></div>\n </div>\n\n <div class=\"o-card__content\">\n <p class=\"a-p\">\n {{ infra.available }}\n {{ '@pry.supervision.infrastructures.available' + (infra.available > 1 ? 's' : '') | i18n }}\n </p>\n\n <ng-container *ngIf=\"lastInfraScale$ | async as lastInfraScale\">\n <span *ngIf=\"lastInfraScale.name === infra.name\" class=\"o-card__content__info\">\n {{ '@pry.supervision.infrastructures.scaleReplica' + (lastInfraScale.up ? 'Up' : 'Down') | i18n }}\n {{ lastInfraScale.time | date: 'HH:mm' }}\n </span>\n </ng-container>\n </div>\n\n <div class=\"o-card__footer\">\n <div class=\"o-card__footer__message\">\n <pry-icon iconSvg=\"grid_view\" [height]=\"20\" [width]=\"20\"></pry-icon>\n <span>\n {{ infra.replicas }}\n {{ '@pry.supervision.infrastructures.replica' + (infra.replicas > 1 ? 's' : '') | i18n }}\n </span>\n </div>\n\n <ng-container *pryAccess=\"{ module: 'supervision', page: 'infrastructures', action: 'scale' }\">\n <div *ngIf=\"infra.hotScale\" class=\"m-minus-plus\">\n <ng-container *ngIf=\"infra.replicas !== infra.available; else scaleTemplate\">\n <button\n class=\"m-minus-plus__btn -minus\"\n disabled\n title=\"{{ '@pry.supervision.infrastructures.removeInstance' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.supervision.infrastructures.removeInstance' | i18n }}</span>\n <span class=\"m-minus-plus__btn__sign\" aria-hidden=\"true\"></span>\n </button>\n <button\n class=\"m-minus-plus__btn -plus\"\n disabled\n title=\"{{ '@pry.supervision.infrastructures.addInstance' | i18n }}\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.supervision.infrastructures.addInstance' | i18n }}</span>\n <span class=\"m-minus-plus__btn__sign\" aria-hidden=\"true\"></span>\n </button>\n </ng-container>\n\n <ng-template #scaleTemplate>\n <button\n class=\"m-minus-plus__btn -minus scale-down\"\n [disabled]=\"infra.replicas === infra.minReplicas\"\n title=\"{{ '@pry.supervision.infrastructures.removeInstance' | i18n }}\"\n (click)=\"infra.replicas !== infra.minReplicas && onScaleDown(infra.name, infra.replicas)\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.supervision.infrastructures.removeInstance' | i18n }}</span>\n <span class=\"m-minus-plus__btn__sign\" aria-hidden=\"true\"></span>\n </button>\n <button\n class=\"m-minus-plus__btn -plus scale-up\"\n [disabled]=\"infra.replicas === infra.maxReplicas\"\n title=\"{{ '@pry.supervision.infrastructures.addInstance' | i18n }}\"\n (click)=\"infra.replicas !== infra.maxReplicas && onScaleUp(infra.name, infra.replicas)\"\n >\n <span class=\"u-visually-hidden\">{{ '@pry.supervision.infrastructures.addInstance' | i18n }}</span>\n <span class=\"m-minus-plus__btn__sign\" aria-hidden=\"true\"></span>\n </button>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n </li>\n </ul>\n</div>\n" }]
289
- }], ctorParameters: function () { return [{ type: i1.Store }]; } });
290
-
291
- class SupervisionIntegrationErrorsSelectComponent {
292
- constructor(store) {
293
- this.store = store;
294
- this.currentIntegrationError$ = this.store
295
- .select(SupervisionSelectors.currentIntegrationError)
296
- .pipe(startWith(null));
297
- }
298
- closePanel() {
299
- this.store.dispatch(SupervisionActions.loadIntegrationErrors());
300
- this.store.dispatch(SupervisionActions.toggleErrorDetails({ error: undefined, errorDetailsOpen: false }));
301
- }
302
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionIntegrationErrorsSelectComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
303
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SupervisionIntegrationErrorsSelectComponent, selector: "pry-supervision-integration-errors-select", ngImport: i0, template: "<div\n *ngIf=\"currentIntegrationError$ | async as e\"\n [id]=\"'panel-env-' + (e.oClass | translateId : { type: 'class', output: 'name' } | async)\"\n [attr.aria-labelledby]=\"'button-env-' + (e.oClass | translateId : { type: 'class', output: 'name' } | async)\"\n class=\"o-panel\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n <h3 [id]=\"'tab-title-' + (e.oClass | translateId : { type: 'class', output: 'name' } | async)\" class=\"a-h3\">\n {{ '@pry.supervision.importErrors.details.title' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.supervision.importErrors.details.\">\n <pry-tab [templateRef]=\"errorDetails\" name=\"details\"></pry-tab>\n </pry-tab-group>\n <ng-template #errorDetails>\n <div *ngFor=\"let error of e.errors\">\n <p class=\"a-p\">\n {{ '@pry.supervision.importErrors.details.errorLabel' | i18n }} :\n <strong>{{ error.label }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.supervision.importErrors.details.errorCount' | i18n }}:\n <strong>{{ error.count }}</strong>\n </p>\n </div>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.TabGroupComponent, selector: "pry-tab-group", inputs: ["translationStringBase"] }, { kind: "component", type: i3.TabComponent, selector: "pry-tab", inputs: ["name", "templateRef", "index"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
304
- }
305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionIntegrationErrorsSelectComponent, decorators: [{
306
- type: Component,
307
- args: [{ selector: 'pry-supervision-integration-errors-select', template: "<div\n *ngIf=\"currentIntegrationError$ | async as e\"\n [id]=\"'panel-env-' + (e.oClass | translateId : { type: 'class', output: 'name' } | async)\"\n [attr.aria-labelledby]=\"'button-env-' + (e.oClass | translateId : { type: 'class', output: 'name' } | async)\"\n class=\"o-panel\"\n>\n <div class=\"o-panel__header\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"closePanel()\">\n <span class=\"u-visually-hidden\">{{ '@pry.action.closePanel' | i18n }}</span>\n <pry-icon iconSvg=\"close\"></pry-icon>\n </button>\n <h3 [id]=\"'tab-title-' + (e.oClass | translateId : { type: 'class', output: 'name' } | async)\" class=\"a-h3\">\n {{ '@pry.supervision.importErrors.details.title' | i18n }}\n </h3>\n </div>\n\n <pry-tab-group translationStringBase=\"@pry.supervision.importErrors.details.\">\n <pry-tab [templateRef]=\"errorDetails\" name=\"details\"></pry-tab>\n </pry-tab-group>\n <ng-template #errorDetails>\n <div *ngFor=\"let error of e.errors\">\n <p class=\"a-p\">\n {{ '@pry.supervision.importErrors.details.errorLabel' | i18n }} :\n <strong>{{ error.label }}</strong>\n </p>\n <p class=\"a-p\">\n {{ '@pry.supervision.importErrors.details.errorCount' | i18n }}:\n <strong>{{ error.count }}</strong>\n </p>\n </div>\n </ng-template>\n</div>\n" }]
308
- }], ctorParameters: function () { return [{ type: i1.Store }]; } });
309
-
310
- class SupervisionIntegrationErrorsComponent {
311
- constructor(store) {
312
- this.store = store;
313
- this.subscription = new Subscription();
314
- this.currentIntegrationError = new BehaviorSubject(undefined);
315
- this.possibleIntervals = [1, 5, 10, 15, 20, 25, 30];
316
- this.sortActive = 'name';
317
- this.sortDirection = 'asc';
318
- this.store.dispatch(ClassActions.load());
319
- this.store.dispatch(SupervisionActions.loadIntegrationErrors());
320
- this.integrationErrors$ = this.store.select(SupervisionSelectors.integrationErrors);
321
- this.subscription.add(this.store.select(SupervisionSelectors.selectedClasses).subscribe((selectedClasses) => {
322
- this.selectedClasses = selectedClasses;
323
- }));
324
- this.loading$ = this.store.select(SupervisionSelectors.loading);
325
- this.refreshInterval$ = this.store
326
- .select(SupervisionSelectors.refreshInterval)
327
- .pipe(map((interval) => interval / 1000));
328
- this.store.dispatch(SupervisionActions.startAutoRefresh());
329
- this.store.dispatch(SupervisionActions.mainActions({
330
- actions: [
331
- {
332
- action: SupervisionActions.reloadErrors(),
333
- icon: 'reset',
334
- label: 'reloadErrors',
335
- moduleAccess: 'supervision',
336
- pageAccess: 'errors'
337
- },
338
- {
339
- action: SupervisionActions.acknowledgeErrors(),
340
- icon: 'check',
341
- label: 'acknowledgeErrors',
342
- moduleAccess: 'supervision',
343
- pageAccess: 'errors'
344
- },
345
- {
346
- action: SupervisionActions.loadIntegrationErrors(),
347
- label: 'refresh',
348
- icon: 'synchro',
349
- moduleAccess: 'supervision',
350
- pageAccess: 'errors'
351
- }
352
- ]
353
- }));
354
- }
355
- selectCurrentError(e) {
356
- if (this.currentIntegrationError.value?.oClass === e.oClass)
357
- this.currentIntegrationError.next(undefined);
358
- else
359
- this.currentIntegrationError.next(e);
360
- }
361
- getTotalErrorCount(e) {
362
- return e.errors.reduce((previousValue, currentValue) => previousValue + currentValue.count, 0);
363
- }
364
- toggleErrorDetails(e) {
365
- this.selectCurrentError(e);
366
- this.store.dispatch(SupervisionActions.toggleErrorDetails({ error: e, errorDetailsOpen: true }));
367
- }
368
- onCheckChange(selectedClass) {
369
- this.store.dispatch(SupervisionActions.toggleClassSelection({ selectedClass }));
370
- }
371
- isClassSelected(c) {
372
- return !!this.selectedClasses.find((oclass) => oclass === c);
373
- }
374
- setRefreshInterval($event) {
375
- this.store.dispatch(SupervisionActions.stopAutoRefresh());
376
- this.store.dispatch(SupervisionActions.setRefreshInterval({ interval: +$event * 1000 }));
377
- }
378
- stopPropagation(event) {
379
- event.stopPropagation();
380
- }
381
- ngOnDestroy() {
382
- this.store.dispatch(SupervisionActions.toggleErrorDetails({ error: undefined, errorDetailsOpen: false }));
383
- this.subscription.unsubscribe();
384
- this.store.dispatch(SupervisionActions.mainActions({ actions: [] }));
385
- this.store.dispatch(SupervisionActions.stopAutoRefresh());
386
- }
387
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionIntegrationErrorsComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
388
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SupervisionIntegrationErrorsComponent, selector: "pry-supervision-integration-errors", viewQueries: [{ propertyName: "detailPanel", first: true, predicate: ["detailPanel"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div class=\"o-base-container\">\n <h1 class=\"a-h1\">{{ '@pry.supervision.importErrors.title' | i18n }}</h1>\n\n <div class=\"m-form-label-field m-form-label-field--inline\">\n <label class=\"a-label\" for=\"interval_time\">Rafraichir chaque</label>\n <pry-select\n [ngModel]=\"refreshInterval$ | async\"\n (ngModelChange)=\"setRefreshInterval($event)\"\n [items]=\"possibleIntervals\"\n id=\"interval_time\"\n ></pry-select>\n <label class=\"a-label\">secondes</label>\n </div>\n\n <table\n class=\"a-table\"\n prySortTable\n prySortActive=\"name\"\n prySortDirection=\"asc\"\n (prySortChange)=\"sortActive = $event.active; sortDirection = $event.direction\"\n >\n <caption>\n {{\n '@pry.supervision.importErrors.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th></th>\n <th prySortHeader=\"name\">{{ '@pry.supervision.importErrors.name' | i18n }}</th>\n <th prySortHeader=\"count\">{{ '@pry.supervision.importErrors.totalErrorCount' | i18n }}</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let e of integrationErrors$ | async | prySortData : sortActive : sortDirection\"\n (click)=\"toggleErrorDetails(e)\"\n [class.is-selected]=\"(currentIntegrationError | async)?.oClass === e.oClass\"\n >\n <td class=\"view-details\" (click)=\"stopPropagation($event)\">\n <button\n [id]=\"'button-attr-' + (e.oClass | translateId : { type: 'class', output: 'name' } | async)\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.action.viewDetails' | i18n }}\"\n [attr.aria-expanded]=\"(currentIntegrationError | async)?.oClass === e.oClass\"\n aria-haspopup\n [attr.aria-controls]=\"'panel-attr-' + (e.oClass | translateId : { type: 'class', output: 'name' } | async)\"\n >\n <span class=\"u-visually-hidden\">{{ e.name }}, {{ '@pry.action.viewDetails' | i18n }}</span>\n <pry-icon iconSvg=\"eye\" [width]=\"15\" [height]=\"15\"></pry-icon>\n </button>\n </td>\n <td>\n {{ e.oClass | translateId : { type: 'class', output: 'name' } | async }}\n </td>\n <td>\n {{ getTotalErrorCount(e) }}\n </td>\n <td (click)=\"stopPropagation($event)\">\n <pry-checkbox\n id=\"selectClass\"\n [ngModel]=\"isClassSelected(e.oClass)\"\n (ngModelChange)=\"onCheckChange(e.oClass)\"\n ></pry-checkbox>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i3.PrySortHeaderComponent, selector: "th[prySortHeader]", inputs: ["prySortHeader"], outputs: ["sortChange"] }, { kind: "directive", type: i3.PrySortHeaderDirective, selector: "[prySortHeader]" }, { kind: "directive", type: i3.PrySortTableDirective, selector: "[prySortTable]", inputs: ["prySortActive", "prySortDirection"], outputs: ["prySortChange"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "elementRef"], outputs: ["searched", "cleared"] }, { kind: "component", type: i5.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslateIdPipe, name: "translateId" }, { kind: "pipe", type: i3.PrySortDataPipe, name: "prySortData" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
389
- }
390
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionIntegrationErrorsComponent, decorators: [{
391
- type: Component,
392
- args: [{ selector: 'pry-supervision-integration-errors', template: "<div class=\"o-base-container\">\n <h1 class=\"a-h1\">{{ '@pry.supervision.importErrors.title' | i18n }}</h1>\n\n <div class=\"m-form-label-field m-form-label-field--inline\">\n <label class=\"a-label\" for=\"interval_time\">Rafraichir chaque</label>\n <pry-select\n [ngModel]=\"refreshInterval$ | async\"\n (ngModelChange)=\"setRefreshInterval($event)\"\n [items]=\"possibleIntervals\"\n id=\"interval_time\"\n ></pry-select>\n <label class=\"a-label\">secondes</label>\n </div>\n\n <table\n class=\"a-table\"\n prySortTable\n prySortActive=\"name\"\n prySortDirection=\"asc\"\n (prySortChange)=\"sortActive = $event.active; sortDirection = $event.direction\"\n >\n <caption>\n {{\n '@pry.supervision.importErrors.title' | i18n\n }},\n {{\n '@pry.action.sortableColumnHeader' | i18n\n }}\n </caption>\n <thead>\n <tr>\n <th></th>\n <th prySortHeader=\"name\">{{ '@pry.supervision.importErrors.name' | i18n }}</th>\n <th prySortHeader=\"count\">{{ '@pry.supervision.importErrors.totalErrorCount' | i18n }}</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let e of integrationErrors$ | async | prySortData : sortActive : sortDirection\"\n (click)=\"toggleErrorDetails(e)\"\n [class.is-selected]=\"(currentIntegrationError | async)?.oClass === e.oClass\"\n >\n <td class=\"view-details\" (click)=\"stopPropagation($event)\">\n <button\n [id]=\"'button-attr-' + (e.oClass | translateId : { type: 'class', output: 'name' } | async)\"\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n title=\"{{ '@pry.action.viewDetails' | i18n }}\"\n [attr.aria-expanded]=\"(currentIntegrationError | async)?.oClass === e.oClass\"\n aria-haspopup\n [attr.aria-controls]=\"'panel-attr-' + (e.oClass | translateId : { type: 'class', output: 'name' } | async)\"\n >\n <span class=\"u-visually-hidden\">{{ e.name }}, {{ '@pry.action.viewDetails' | i18n }}</span>\n <pry-icon iconSvg=\"eye\" [width]=\"15\" [height]=\"15\"></pry-icon>\n </button>\n </td>\n <td>\n {{ e.oClass | translateId : { type: 'class', output: 'name' } | async }}\n </td>\n <td>\n {{ getTotalErrorCount(e) }}\n </td>\n <td (click)=\"stopPropagation($event)\">\n <pry-checkbox\n id=\"selectClass\"\n [ngModel]=\"isClassSelected(e.oClass)\"\n (ngModelChange)=\"onCheckChange(e.oClass)\"\n ></pry-checkbox>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n" }]
393
- }], ctorParameters: function () { return [{ type: i1.Store }]; }, propDecorators: { detailPanel: [{
394
- type: ViewChild,
395
- args: ['detailPanel', { static: true, read: ViewContainerRef }]
396
- }] } });
397
-
398
- class SupervisionMenuComponent extends BaseMenuComponent {
399
- constructor(store, router, route) {
400
- super(store);
401
- this.router = router;
402
- this.route = route;
403
- this.baseMenuTranslation = '@pry.supervision.menus.';
404
- }
405
- init() {
406
- this.menus$ = this.store.select(SupervisionSelectors.menus);
407
- this.highlightedMenu$ = this.store.select(SupervisionSelectors.highlightedMenu);
408
- }
409
- select(menu) {
410
- const path = this.router.createUrlTree([menu], { relativeTo: this.route });
411
- this.store.dispatch(SupervisionActions.routeTo({ path: path.toString() }));
412
- }
413
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionMenuComponent, deps: [{ token: i1.Store }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
414
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SupervisionMenuComponent, selector: "pry-supervision-menu", usesInheritance: true, ngImport: i0, template: "<nav class=\"m-nav-links\">\n <ng-container *ngFor=\"let sub of subMenu$ | async\">\n <ul class=\"m-nav-links__list\">\n <ng-container *ngFor=\"let menu of sub.subMenus\">\n <li\n *pryAccess=\"{ module: menu.module, page: menu.page, subMenu: menu.subMenu }\"\n class=\"m-nav-links__list__item\"\n >\n <a [routerLink]=\"menu.menu\" class=\"a-btn a-btn--secondary -width-full\" [routerLinkActive]=\"'is-active'\">\n {{ baseMenuTranslation + menu.menu | i18n }}\n </a>\n </li>\n </ng-container>\n </ul>\n </ng-container>\n <ng-container *ngIf=\"menus$ | async as menus\">\n <ng-container *ngIf=\"menus.length > 0\">\n <ul class=\"m-nav-links__list\">\n <ng-container *ngFor=\"let menu of menus\">\n <ng-container *ngIf=\"menu.module === 'supervision'\">\n <li *pryAccess=\"{ module: menu.module, page: menu.page }\" class=\"m-nav-links__list__item\">\n <a [routerLink]=\"menu.menu\" class=\"a-btn a-btn--secondary -width-full\" [routerLinkActive]=\"'is-active'\">\n {{ baseMenuTranslation + menu.menu | i18n }}\n </a>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </ng-container>\n </ng-container>\n</nav>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
415
- }
416
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionMenuComponent, decorators: [{
417
- type: Component,
418
- args: [{ selector: 'pry-supervision-menu', template: "<nav class=\"m-nav-links\">\n <ng-container *ngFor=\"let sub of subMenu$ | async\">\n <ul class=\"m-nav-links__list\">\n <ng-container *ngFor=\"let menu of sub.subMenus\">\n <li\n *pryAccess=\"{ module: menu.module, page: menu.page, subMenu: menu.subMenu }\"\n class=\"m-nav-links__list__item\"\n >\n <a [routerLink]=\"menu.menu\" class=\"a-btn a-btn--secondary -width-full\" [routerLinkActive]=\"'is-active'\">\n {{ baseMenuTranslation + menu.menu | i18n }}\n </a>\n </li>\n </ng-container>\n </ul>\n </ng-container>\n <ng-container *ngIf=\"menus$ | async as menus\">\n <ng-container *ngIf=\"menus.length > 0\">\n <ul class=\"m-nav-links__list\">\n <ng-container *ngFor=\"let menu of menus\">\n <ng-container *ngIf=\"menu.module === 'supervision'\">\n <li *pryAccess=\"{ module: menu.module, page: menu.page }\" class=\"m-nav-links__list__item\">\n <a [routerLink]=\"menu.menu\" class=\"a-btn a-btn--secondary -width-full\" [routerLinkActive]=\"'is-active'\">\n {{ baseMenuTranslation + menu.menu | i18n }}\n </a>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n </ng-container>\n </ng-container>\n</nav>\n" }]
419
- }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }]; } });
420
-
421
- class SupervisionTitleComponent {
422
- constructor(store) {
423
- this.store = store;
424
- this.menuOpen$ = this.store.select(SupervisionSelectors.menuOpen);
425
- }
426
- onToggleMenu($event) {
427
- this.store.dispatch(SupervisionActions.toggleMenu());
428
- // Toggle button aria-pressed
429
- $event.target.setAttribute('aria-pressed', $event.target.getAttribute('aria-pressed') === 'true' ? 'false' : 'true');
430
- }
431
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionTitleComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
432
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SupervisionTitleComponent, selector: "pry-supervision-title", ngImport: i0, template: "<h2 class=\"a-h3\">{{ '@pry.supervision.title' | i18n }}</h2>\n<button type=\"button\" class=\"a-btn a-btn--toggle\" (click)=\"onToggleMenu($event)\" aria-pressed=\"false\">\n <span class=\"u-visually-hidden\">{{ '@pry.supervision.titleIndication' | i18n }}</span>\n</button>\n", dependencies: [{ kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
433
- }
434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionTitleComponent, decorators: [{
435
- type: Component,
436
- args: [{ selector: 'pry-supervision-title', template: "<h2 class=\"a-h3\">{{ '@pry.supervision.title' | i18n }}</h2>\n<button type=\"button\" class=\"a-btn a-btn--toggle\" (click)=\"onToggleMenu($event)\" aria-pressed=\"false\">\n <span class=\"u-visually-hidden\">{{ '@pry.supervision.titleIndication' | i18n }}</span>\n</button>\n" }]
437
- }], ctorParameters: function () { return [{ type: i1.Store }]; } });
438
-
439
- class SupervisionLayoutComponent extends BaseLayoutComponent {
440
- constructor(store, router) {
441
- super(store, router);
442
- this.baseToolboxTranslation = '@pry.supervision.';
443
- this.actions$ = this.store.select(SupervisionSelectors.actions);
444
- this.subActions$ = this.store.select(SupervisionSelectors.subActions);
445
- this.panelOpen$ = this.store.select(SupervisionSelectors.errorDetailsOpen);
446
- }
447
- init() {
448
- this.menus$ = this.store.select(SupervisionSelectors.menus);
449
- this.menuOpen$ = this.store.select(SupervisionSelectors.menuOpen);
450
- }
451
- highlightMenu(menu) {
452
- this.store.dispatch(SupervisionActions.highLightMenu({ menu }));
453
- }
454
- ngAfterViewInit() {
455
- if (this.componentRef) {
456
- this.supervisionPanel.clear();
457
- }
458
- this.componentRef = this.supervisionPanel.createComponent(SupervisionIntegrationErrorsSelectComponent);
459
- }
460
- ngOnDestroy() {
461
- this.store.dispatch(SupervisionActions.toggleErrorDetails({ error: undefined, errorDetailsOpen: false }));
462
- }
463
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionLayoutComponent, deps: [{ token: i1.Store }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
464
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SupervisionLayoutComponent, selector: "pry-supervision-layout", viewQueries: [{ propertyName: "supervisionPanel", first: true, predicate: ["supervisionPanel"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-base-layout\" [ngClass]=\"{ 'is-menu-open': menuOpen$ | async }\">\n <pry-supervision-title class=\"o-base-layout__title\"></pry-supervision-title>\n <pry-supervision-menu *ngIf=\"menuOpen$ | async\" class=\"o-base-layout__menu\"></pry-supervision-menu>\n <pry-base-toolbox\n class=\"o-base-layout__toolbox\"\n [baseToolboxTranslation]=\"baseToolboxTranslation\"\n [actions$]=\"actions$\"\n [subActions$]=\"subActions$\"\n ></pry-base-toolbox>\n\n <div class=\"o-base-layout__contentwrapper\">\n <div class=\"o-base-layout__content\">\n <router-outlet></router-outlet>\n </div>\n <div class=\"o-base-layout__panel\" [class.is-open]=\"panelOpen$ | async\">\n <div class=\"o-base-layout__panel__content\">\n <ng-template #supervisionPanel></ng-template>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.BaseToolboxComponent, selector: "pry-base-toolbox", inputs: ["baseToolboxTranslation", "actions$", "subActions$"] }, { kind: "directive", type: i2$1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: SupervisionMenuComponent, selector: "pry-supervision-menu" }, { kind: "component", type: SupervisionTitleComponent, selector: "pry-supervision-title" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
465
- }
466
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionLayoutComponent, decorators: [{
467
- type: Component,
468
- args: [{ selector: 'pry-supervision-layout', template: "<div class=\"o-base-layout\" [ngClass]=\"{ 'is-menu-open': menuOpen$ | async }\">\n <pry-supervision-title class=\"o-base-layout__title\"></pry-supervision-title>\n <pry-supervision-menu *ngIf=\"menuOpen$ | async\" class=\"o-base-layout__menu\"></pry-supervision-menu>\n <pry-base-toolbox\n class=\"o-base-layout__toolbox\"\n [baseToolboxTranslation]=\"baseToolboxTranslation\"\n [actions$]=\"actions$\"\n [subActions$]=\"subActions$\"\n ></pry-base-toolbox>\n\n <div class=\"o-base-layout__contentwrapper\">\n <div class=\"o-base-layout__content\">\n <router-outlet></router-outlet>\n </div>\n <div class=\"o-base-layout__panel\" [class.is-open]=\"panelOpen$ | async\">\n <div class=\"o-base-layout__panel__content\">\n <ng-template #supervisionPanel></ng-template>\n </div>\n </div>\n </div>\n</div>\n" }]
469
- }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2$1.Router }]; }, propDecorators: { supervisionPanel: [{
470
- type: ViewChild,
471
- args: ['supervisionPanel', { static: true, read: ViewContainerRef }]
472
- }] } });
473
-
474
- class PrySupervisionComponent {
475
- constructor(store) {
476
- this.store = store;
477
- this.store.dispatch(SupervisionActions.resetActions());
478
- this.store.dispatch(SupervisionActions.toggleErrorDetails({ error: undefined, errorDetailsOpen: false }));
479
- }
480
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PrySupervisionComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
481
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PrySupervisionComponent, selector: "pry-supervision", ngImport: i0, template: "<h1 class=\"a-h1\">{{ '@pry.supervision.title' | i18n }}</h1>\n", dependencies: [{ kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
482
- }
483
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PrySupervisionComponent, decorators: [{
484
- type: Component,
485
- args: [{ selector: 'pry-supervision', template: "<h1 class=\"a-h1\">{{ '@pry.supervision.title' | i18n }}</h1>\n" }]
486
- }], ctorParameters: function () { return [{ type: i1.Store }]; } });
487
-
488
- const enTranslations = {
489
- '@pry': {
490
- supervision: {
491
- title: 'Supervision',
492
- titleIndication: 'Close supervision menu ',
493
- refresh: 'Refresh',
494
- reloadErrors: 'Reload errors',
495
- acknowledgeErrors: 'Acknowledge errors',
496
- menus: {
497
- infrastructures: 'Infrastructures',
498
- 'input-flows': 'Incoming flows',
499
- 'business-datas': 'Business data',
500
- 'integration-errors': 'Data import errors'
501
- },
502
- infrastructures: {
503
- scaleMsg: 'Your request is taken into account',
504
- title: "Infrastructure's modules ",
505
- available: ' instance available',
506
- availables: ' instances available',
507
- scaleReplicaUp: 'New instance created at ',
508
- scaleReplicaDown: 'Instance deleted at ',
509
- replica: ' instance',
510
- replicas: ' instances',
511
- addInstance: 'Add an instance',
512
- removeInstance: 'Remove an instance'
513
- },
514
- inputFlow: {
515
- title: 'Input flows',
516
- name: 'Name',
517
- format: 'Format',
518
- state: 'State',
519
- oks: 'Added Elements ',
520
- kos: 'Errors',
521
- date: 'Date',
522
- active: 'Active',
523
- inactive: 'Inactive'
524
- },
525
- businessData: {
526
- title: 'Business Datas',
527
- name: 'Names',
528
- count: 'Item number',
529
- date: 'Date'
530
- },
531
- importErrors: {
532
- title: 'Data import errors',
533
- name: 'Class name',
534
- totalErrorCount: 'Errors total',
535
- details: {
536
- details: 'Details',
537
- title: 'Error details',
538
- errorLabel: 'Error name',
539
- errorCount: 'Error count'
540
- }
541
- }
542
- }
543
- }
544
- };
545
-
546
- const frTranslations = {
547
- '@pry': {
548
- supervision: {
549
- title: 'Supervision',
550
- titleIndication: 'Fermer le menu supervision',
551
- refresh: 'Rafraîchir',
552
- reloadErrors: "Relancer l'intégration",
553
- acknowledgeErrors: 'Acquitter les classes en erreur',
554
- menus: {
555
- infrastructures: 'Infrastructures',
556
- 'input-flows': 'Flux en entrée',
557
- 'business-datas': 'Données métier',
558
- 'integration-errors': "Erreurs d'intégration de données"
559
- },
560
- infrastructures: {
561
- scaleMsg: 'Votre demande est prise en compte',
562
- title: "Modules de l'infrastructure",
563
- available: ' instance disponible',
564
- availables: ' instances disponibles',
565
- scaleReplicaUp: 'Nouvelle instance créé à ',
566
- scaleReplicaDown: 'Instance supprimée à ',
567
- replica: ' instance demandée',
568
- replicas: ' instances demandées',
569
- addInstance: 'Ajouter une instance',
570
- removeInstance: 'Supprimer une instance'
571
- },
572
- inputFlow: {
573
- title: 'Flux en Entrée',
574
- name: 'Nom',
575
- format: 'Format',
576
- state: 'Etat',
577
- oks: 'Eléments intégrés',
578
- kos: "Nombre d'erreurs",
579
- date: 'Date',
580
- active: 'Actif',
581
- inactive: 'Inactif'
582
- },
583
- businessData: {
584
- title: 'Données métier',
585
- name: 'Ontologies',
586
- count: "Nombre d'items",
587
- date: 'Date'
588
- },
589
- importErrors: {
590
- title: "Erreurs d'intégration de données",
591
- name: 'Nom de la classe',
592
- totalErrorCount: "Nombre d'erreur total",
593
- details: {
594
- details: 'Détails',
595
- title: 'Détail des erreurs',
596
- errorLabel: "Nom d'erreur",
597
- errorCount: "Nombre d'erreurs"
598
- }
599
- }
600
- }
601
- }
602
- };
603
-
604
- class SupervisionService {
605
- constructor(httpClient, store) {
606
- this.httpClient = httpClient;
607
- this.store = store;
608
- }
609
- getInfrastructures() {
610
- return this.store
611
- .select(ConfigSelectors.monitorUrl)
612
- .pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/status`))));
613
- }
614
- scaleInfra(infra, replicas) {
615
- return this.store
616
- .select(ConfigSelectors.monitorUrl)
617
- .pipe(mergeMap((url) => this.httpClient.post(encodeURI(`${url}/replicas/${infra}?scale=${replicas}`), {})));
618
- }
619
- getInputFlows() {
620
- return this.store
621
- .select(ConfigSelectors.monitorUrl)
622
- .pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/supervision/nifi/monitoringInputFlow`))));
623
- }
624
- getDateIso() {
625
- return new Date().toISOString();
626
- }
627
- getIntegrationErrors() {
628
- return this.store
629
- .select(ConfigSelectors.replayUrl)
630
- .pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/integrations/errors`))));
631
- }
632
- reloadErrors(classes) {
633
- return this.store
634
- .select(ConfigSelectors.replayUrl)
635
- .pipe(mergeMap((url) => this.httpClient.post(encodeURI(`${url}/integrations/errors/replay/class`), classes)));
636
- }
637
- acknowledgeErrors(classes) {
638
- return this.store
639
- .select(ConfigSelectors.replayUrl)
640
- .pipe(mergeMap((url) => this.httpClient.post(encodeURI(`${url}/integrations/errors/acknowledge`), classes)));
641
- }
642
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionService, deps: [{ token: i1$1.HttpClient }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
643
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionService, providedIn: 'root' }); }
644
- }
645
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionService, decorators: [{
646
- type: Injectable,
647
- args: [{
648
- providedIn: 'root'
649
- }]
650
- }], ctorParameters: function () { return [{ type: i1$1.HttpClient }, { type: i1.Store }]; } });
651
-
652
- class SupervisionEffects {
653
- constructor(actions$, service, router, snackbar, translateService, store) {
654
- this.actions$ = actions$;
655
- this.service = service;
656
- this.router = router;
657
- this.snackbar = snackbar;
658
- this.translateService = translateService;
659
- this.store = store;
660
- this.routeTo$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.routeTo), mergeMap$1((action) => {
661
- this.router.navigate([action.path], { queryParams: action.params });
662
- return action.path === this.router.url ? [] : [SupervisionActions.resetActions()];
663
- })));
664
- this.loadInfras$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.loadInfras), mergeMap$1((action) => this.service.getInfrastructures().pipe(map((infras) => SupervisionActions.loadInfrasSuccess({ infras })), catchError((error) => [SupervisionActions.loadInfrasFailure({ error: error })])))));
665
- this.scaleInfra$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.scaleInfra), mergeMap$1((action) => this.service.scaleInfra(action.name, action.scale).pipe(map(() => SupervisionActions.scaleInfraSuccess({ name: action.name, time: this.service.getDateIso(), up: action.up })), catchError((error) => [SupervisionActions.scaleInfraFailure({ error: error })])))));
666
- this.scaleInfraSuccess$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.scaleInfraSuccess), map((action) => {
667
- this.snackbar.open({
668
- message: this.translateService.instant('@pry.supervision.infrastructures.scaleMsg'),
669
- type: 'info'
670
- });
671
- return SupervisionActions.loadInfras();
672
- })));
673
- this.loadFlows$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.loadFlows), mergeMap$1((action) => this.service.getInputFlows().pipe(map((flows) => SupervisionActions.loadFlowsSuccess({ flows })), catchError((error) => [SupervisionActions.loadFlowsFailure({ error: error })])))));
674
- this.loadIntegrationErrors$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.loadIntegrationErrors), mergeMap$1((action) => this.service.getIntegrationErrors().pipe(map((integrationErrors) => SupervisionActions.loadIntegrationErrorsSuccess({ integrationErrors: integrationErrors })), catchError((error) => [SupervisionActions.loadIntegrationErrorsFailure({ error: error })])))));
675
- this.reloadErrors$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.reloadErrors), withLatestFrom(this.store.select(SupervisionSelectors.selectedClasses)), mergeMap$1(([action, classes]) => this.service.reloadErrors(classes).pipe(map(() => SupervisionActions.reloadErrorsSuccess()), catchError((error) => [SupervisionActions.reloadErrorsFailure({ error: error })])))));
676
- this.reloadErrorsSuccess$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.reloadErrorsSuccess), map((action) => {
677
- this.snackbar.open({
678
- message: 'Errors have been reloaded',
679
- type: 'info'
680
- });
681
- return SupervisionActions.loadIntegrationErrors();
682
- })));
683
- this.acknowledgeErrors$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.acknowledgeErrors), withLatestFrom(this.store.select(SupervisionSelectors.selectedClasses)), mergeMap$1(([action, classes]) => this.service.acknowledgeErrors(classes).pipe(map(() => SupervisionActions.acknowledgeErrorsSuccess()), catchError((error) => [SupervisionActions.acknowledgeErrorsFailure({ error: error })])))));
684
- this.acknowledgeErrorsSuccess$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.acknowledgeErrorsSuccess), map((action) => {
685
- this.snackbar.open({
686
- message: 'Errors have been acknowledged',
687
- type: 'info'
688
- });
689
- return SupervisionActions.loadIntegrationErrors();
690
- })));
691
- this.errorAutoRefresh$ = createEffect(() => this.actions$.pipe(ofType(SupervisionActions.startAutoRefresh, SupervisionActions.setRefreshInterval), withLatestFrom(this.store.select(SupervisionSelectors.refreshInterval)), switchMap(([action, refreshInterval]) => interval(refreshInterval).pipe(takeUntil(this.actions$.pipe(ofType(SupervisionActions.stopAutoRefresh))))), map((_) => SupervisionActions.loadIntegrationErrors())));
692
- }
693
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionEffects, deps: [{ token: i1$2.Actions }, { token: SupervisionService }, { token: i2$1.Router }, { token: i3.PrySnackbarService }, { token: i3.PryI18nService }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
694
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionEffects }); }
695
- }
696
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionEffects, decorators: [{
697
- type: Injectable
698
- }], ctorParameters: function () { return [{ type: i1$2.Actions }, { type: SupervisionService }, { type: i2$1.Router }, { type: i3.PrySnackbarService }, { type: i3.PryI18nService }, { type: i1.Store }]; } });
699
-
700
- const routes = [
701
- {
702
- path: '',
703
- component: SupervisionLayoutComponent,
704
- data: {
705
- access: {
706
- module: 'supervision'
707
- }
708
- },
709
- canActivate: [PRY_ACCESS_GUARD],
710
- children: [
711
- {
712
- path: 'infrastructures',
713
- component: SupervisionInfrastructuresComponent,
714
- data: {
715
- access: {
716
- module: 'supervision',
717
- page: 'infrastructures'
718
- }
719
- },
720
- canActivate: [PRY_ACCESS_GUARD]
721
- },
722
- {
723
- path: 'input-flows',
724
- component: SupervisionFlowComponent,
725
- data: {
726
- access: {
727
- module: 'supervision',
728
- page: 'input_flows'
729
- }
730
- },
731
- canActivate: [PRY_ACCESS_GUARD]
732
- },
733
- {
734
- path: 'business-datas',
735
- component: SupervisionBusinessDataComponent,
736
- data: {
737
- access: {
738
- module: 'supervision',
739
- page: 'business_datas'
740
- }
741
- },
742
- canActivate: [PRY_ACCESS_GUARD]
743
- },
744
- {
745
- path: 'integration-errors',
746
- component: SupervisionIntegrationErrorsComponent,
747
- data: {
748
- access: {
749
- module: 'supervision',
750
- page: 'integration_errors'
751
- }
752
- },
753
- canActivate: [PRY_ACCESS_GUARD]
754
- },
755
- {
756
- path: '',
757
- component: PrySupervisionComponent
758
- },
759
- {
760
- path: '**',
761
- redirectTo: '',
762
- pathMatch: 'full'
763
- }
764
- ]
765
- },
766
- {
767
- path: '**',
768
- redirectTo: '',
769
- pathMatch: 'full'
770
- }
771
- ];
772
- class SupervisionRoutingModule {
773
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
774
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SupervisionRoutingModule, imports: [i2$1.RouterModule], exports: [RouterModule] }); }
775
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
776
- }
777
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SupervisionRoutingModule, decorators: [{
778
- type: NgModule,
779
- args: [{
780
- imports: [RouterModule.forChild(routes)],
781
- exports: [RouterModule]
782
- }]
783
- }] });
784
-
785
- class PrySupervisionModule {
786
- constructor(pryTranslateService) {
787
- this.pryTranslateService = pryTranslateService;
788
- this.pryTranslateService.addLangObject('fr', 'supervision', frTranslations);
789
- this.pryTranslateService.addLangObject('en', 'supervision', enTranslations);
790
- }
791
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PrySupervisionModule, deps: [{ token: i3.PryI18nService }], target: i0.ɵɵFactoryTarget.NgModule }); }
792
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: PrySupervisionModule, declarations: [PrySupervisionComponent,
793
- SupervisionLayoutComponent,
794
- SupervisionMenuComponent,
795
- SupervisionInfrastructuresComponent,
796
- SupervisionTitleComponent,
797
- SupervisionBusinessDataComponent,
798
- SupervisionFlowComponent,
799
- SupervisionIntegrationErrorsComponent,
800
- SupervisionIntegrationErrorsSelectComponent], imports: [CommonModule,
801
- PryCoreModule,
802
- SupervisionRoutingModule, i1.StoreFeatureModule, i1$2.EffectsFeatureModule, PryIconModule,
803
- PrySortModule,
804
- PrySnackbarModule,
805
- PryToggleModule,
806
- FormsModule,
807
- PrySelectModule,
808
- PryCheckboxModule,
809
- PryI18nModule] }); }
810
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PrySupervisionModule, imports: [CommonModule,
811
- PryCoreModule,
812
- SupervisionRoutingModule,
813
- StoreModule.forFeature(supervisionFeatureKey, supervisionReducer),
814
- EffectsModule.forFeature([SupervisionEffects]),
815
- PryIconModule,
816
- PrySortModule,
817
- PrySnackbarModule,
818
- PryToggleModule,
819
- FormsModule,
820
- PrySelectModule,
821
- PryCheckboxModule,
822
- PryI18nModule] }); }
823
- }
824
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PrySupervisionModule, decorators: [{
825
- type: NgModule,
826
- args: [{
827
- declarations: [
828
- PrySupervisionComponent,
829
- SupervisionLayoutComponent,
830
- SupervisionMenuComponent,
831
- SupervisionInfrastructuresComponent,
832
- SupervisionTitleComponent,
833
- SupervisionBusinessDataComponent,
834
- SupervisionFlowComponent,
835
- SupervisionIntegrationErrorsComponent,
836
- SupervisionIntegrationErrorsSelectComponent
837
- ],
838
- imports: [
839
- CommonModule,
840
- PryCoreModule,
841
- SupervisionRoutingModule,
842
- StoreModule.forFeature(supervisionFeatureKey, supervisionReducer),
843
- EffectsModule.forFeature([SupervisionEffects]),
844
- PryIconModule,
845
- PrySortModule,
846
- PrySnackbarModule,
847
- PryToggleModule,
848
- FormsModule,
849
- PrySelectModule,
850
- PryCheckboxModule,
851
- PryI18nModule
852
- ]
853
- }]
854
- }], ctorParameters: function () { return [{ type: i3.PryI18nService }]; } });
855
-
856
- /**
857
- * Generated bundle index. Do not edit.
858
- */
859
-
860
- export { PrySupervisionModule };
861
- //# sourceMappingURL=provoly-dashboard-supervision.mjs.map