@esfaenza/admin-module 20.3.14 → 20.3.16

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/index.d.ts CHANGED
@@ -1,32 +1,32 @@
1
- import * as i26 from '@angular/router';
2
- import { ActivatedRoute } from '@angular/router';
3
- import * as i12 from '@angular/common';
1
+ import * as i28 from '@angular/router';
2
+ import { ActivatedRoute, CanMatchFn } from '@angular/router';
3
+ import * as i14 from '@angular/common';
4
4
  import { Location } from '@angular/common';
5
- import * as i18 from '@esfaenza/localizations';
5
+ import * as i20 from '@esfaenza/localizations';
6
6
  import { LocalizationService } from '@esfaenza/localizations';
7
7
  import { PreferencesService } from '@esfaenza/preferences';
8
- import * as i19 from '@esfaenza/extensions';
8
+ import * as i21 from '@esfaenza/extensions';
9
9
  import { MessageService, ClipboardService, InterComService, UtilityService, DateService, ExportService } from '@esfaenza/extensions';
10
- import * as i20 from '@esfaenza/es-table';
10
+ import * as i22 from '@esfaenza/es-table';
11
11
  import { AppSearch, GenericItem, EsTableOperationDefinition, ItemsSelection } from '@esfaenza/es-table';
12
12
  import * as i0 from '@angular/core';
13
- import { Injector, EventEmitter, PipeTransform, InjectionToken } from '@angular/core';
13
+ import { Injector, NgZone, EventEmitter, PipeTransform, InjectionToken } from '@angular/core';
14
14
  import { HTTPService } from '@esfaenza/httpservice';
15
15
  import { KeyValue as KeyValue$1 } from '@esfaenza/core/domain';
16
- import * as i23 from '@esfaenza/es-charts';
16
+ import * as i25 from '@esfaenza/es-charts';
17
17
  import { DateValue, LineChartData, PieChartData, LineSerie, BaseChartComponent } from '@esfaenza/es-charts';
18
- import * as i13 from '@angular/forms';
18
+ import * as i15 from '@angular/forms';
19
19
  import { NgForm } from '@angular/forms';
20
- import * as i14 from 'ngx-bootstrap/modal';
20
+ import * as i16 from 'ngx-bootstrap/modal';
21
21
  import { ModalDirective } from 'ngx-bootstrap/modal';
22
22
  import { ReplaySubject } from 'rxjs';
23
- import * as i15 from 'ngx-bootstrap/tooltip';
24
- import * as i16 from 'ngx-bootstrap/dropdown';
25
- import * as i17 from '@esfaenza/ngx-contextmenu';
26
- import * as i21 from '@esfaenza/forms-and-validations';
27
- import * as i22 from '@esfaenza/gertrude';
28
- import * as i24 from '@esfaenza/core/components';
29
- import * as i25 from '@esfaenza/core/directives';
23
+ import * as i17 from 'ngx-bootstrap/tooltip';
24
+ import * as i18 from 'ngx-bootstrap/dropdown';
25
+ import * as i19 from '@esfaenza/ngx-contextmenu';
26
+ import * as i23 from '@esfaenza/forms-and-validations';
27
+ import * as i24 from '@esfaenza/gertrude';
28
+ import * as i26 from '@esfaenza/core/components';
29
+ import * as i27 from '@esfaenza/core/directives';
30
30
 
31
31
  declare class Audit {
32
32
  timestamp: Date;
@@ -136,6 +136,123 @@ declare class TopActivitiesDataView extends AppSearch<TopActivity> {
136
136
  filterglobal: boolean;
137
137
  }
138
138
 
139
+ declare enum TopActivityDimension {
140
+ WaitClass = 0,
141
+ EventType = 1,
142
+ WaitEvent = 2,
143
+ Instance = 3,
144
+ UserSession = 4,
145
+ UserName = 5,
146
+ Tenant = 6,
147
+ SessionType = 7,
148
+ BackgroundSession = 8,
149
+ JobName = 9,
150
+ ConsumerGroup = 10,
151
+ ThreadType = 11,
152
+ Api = 12,
153
+ Machine = 13
154
+ }
155
+ declare enum TopActivityDataSource {
156
+ Memory = 0,
157
+ MemoryAndStored = 1
158
+ }
159
+ declare enum TopActivityResolution {
160
+ Low = 0,
161
+ Medium = 1,
162
+ High = 2,
163
+ Maximum = 3
164
+ }
165
+ declare enum TopActivityMaximumThreads {
166
+ None = 0,
167
+ Cores = 1,
168
+ Threads = 2
169
+ }
170
+
171
+ declare class TopActivityV2Filter {
172
+ Dimension: TopActivityDimension;
173
+ Value: string;
174
+ }
175
+ declare class TopActivityV2Request {
176
+ From?: string;
177
+ To?: string;
178
+ Global?: boolean;
179
+ InstanceId?: string;
180
+ DataSource?: TopActivityDataSource;
181
+ Dimension?: TopActivityDimension;
182
+ Filters?: TopActivityV2Filter[];
183
+ TotalActivity?: boolean;
184
+ MaximumThreads?: TopActivityMaximumThreads;
185
+ Resolution?: TopActivityResolution;
186
+ MaxComponents?: number;
187
+ TablesFrom?: string;
188
+ TablesTo?: string;
189
+ Tables?: TopActivityDimension[];
190
+ TopCount?: number;
191
+ }
192
+
193
+ declare class TopActivityV2Component {
194
+ Key: string;
195
+ Label: string;
196
+ Other: boolean;
197
+ Activity: number;
198
+ Percentage: number;
199
+ Values: number[];
200
+ }
201
+ declare class TopActivityV2Breakdown {
202
+ Key: string;
203
+ Other: boolean;
204
+ Activity: number;
205
+ }
206
+ declare class TopActivityV2Session {
207
+ InstanceId: string;
208
+ SessionId: number;
209
+ SerialNo: number;
210
+ UserName: string;
211
+ TenantId: string;
212
+ SessionType: string;
213
+ BgProcessName: string;
214
+ JobName: string;
215
+ ConsumerGroup: string;
216
+ }
217
+ declare class TopActivityV2Event {
218
+ EventId: string;
219
+ EventName: string;
220
+ EventType: string;
221
+ WaitClass: string;
222
+ }
223
+ declare class TopActivityV2TableItem {
224
+ Key: string;
225
+ Label: string;
226
+ Other: boolean;
227
+ Activity: number;
228
+ Percentage: number;
229
+ Breakdown: TopActivityV2Breakdown[];
230
+ Session: TopActivityV2Session;
231
+ Event: TopActivityV2Event;
232
+ }
233
+ declare class TopActivityV2Table {
234
+ Dimension: TopActivityDimension;
235
+ From: string;
236
+ To: string;
237
+ Activity: number;
238
+ Items: TopActivityV2TableItem[];
239
+ }
240
+ declare class TopActivityV2Response {
241
+ From: string;
242
+ To: string;
243
+ Dimension: TopActivityDimension;
244
+ DataSource: TopActivityDataSource;
245
+ BucketSeconds: number;
246
+ Times: string[];
247
+ Components: TopActivityV2Component[];
248
+ TotalActivity: number[];
249
+ MaximumThreads: number;
250
+ AverageActiveSessions: number;
251
+ PeakActiveSessions: number;
252
+ MemoryFrom: string;
253
+ Tables: TopActivityV2Table[];
254
+ }
255
+
139
256
  declare class DirectorInfosPerInstance {
140
257
  instance: string;
141
258
  startuptime: Date;
@@ -327,6 +444,7 @@ declare class AdminModuleBaseService {
327
444
  getConsumerGroups(be: string): Promise<KeyValue$1[]>;
328
445
  getServerLogs(be: string, from: string, to: string, instance: string, target: string): Promise<string>;
329
446
  getTopActivities(be: string, sv: TopActivitiesDataView): Promise<TopActivitiesDataView>;
447
+ getTopActivitiesV2(be: string, req: TopActivityV2Request): Promise<TopActivityV2Response>;
330
448
  getInfos(be: string): Promise<DirectorInfos>;
331
449
  getNodeStats(be: string, nodeId: string, global?: boolean): Promise<NodeStats>;
332
450
  getSessionStats(be: string, sid: string, serial: string, instance: string): Promise<SessionStats>;
@@ -515,6 +633,110 @@ declare class AdmTopActivitiesComponent {
515
633
  static ɵcmp: i0.ɵɵComponentDeclaration<AdmTopActivitiesComponent, "topact_search", never, {}, {}, never, never, false, never>;
516
634
  }
517
635
 
636
+ declare class TopActivityV2LegendItem {
637
+ key: string;
638
+ label: string;
639
+ color: string;
640
+ other: boolean;
641
+ activity: number;
642
+ percentage: number;
643
+ }
644
+ declare class TopActivityV2FilterChip {
645
+ filter: TopActivityV2Filter;
646
+ label: string;
647
+ }
648
+ declare class AdmTopActivityV2Component {
649
+ dateExts: DateService;
650
+ lc: LocalizationService;
651
+ private localStorage;
652
+ private intercom;
653
+ private route;
654
+ private adms;
655
+ private zone;
656
+ dlgNodeDetails: ModalDirective;
657
+ dlgSessionDetails: ModalDirective;
658
+ readonly Dim: typeof TopActivityDimension;
659
+ filterfrom: string;
660
+ filterto: string;
661
+ instance: string;
662
+ dataSource: string;
663
+ dimension: string;
664
+ resolution: string;
665
+ totalActivity: boolean;
666
+ maxCpu: boolean;
667
+ maxThreadsKind: string;
668
+ tableDims: string[];
669
+ filters: TopActivityV2FilterChip[];
670
+ refreshSeconds: string;
671
+ Instances: KeyValue[];
672
+ DataSources: KeyValue[];
673
+ Dimensions: KeyValue[];
674
+ Resolutions: KeyValue[];
675
+ ThreadKinds: KeyValue[];
676
+ RefreshOptions: KeyValue[];
677
+ loading: boolean;
678
+ result: TopActivityV2Response;
679
+ chartData: LineChartData;
680
+ chartMax: number;
681
+ legend: TopActivityV2LegendItem[];
682
+ tables: TopActivityV2Table[];
683
+ memoryFrom: string;
684
+ sliderMin: number;
685
+ sliderMax: number;
686
+ sliderStep: number;
687
+ sliderValue: number;
688
+ sliderAnchored: boolean;
689
+ tablesWindowLabel: string;
690
+ DirInfos: DirectorInfos;
691
+ NodeDetails: NodeStats;
692
+ SessionDetails: SessionStats;
693
+ private be;
694
+ private chartFrom;
695
+ private chartTo;
696
+ private colors;
697
+ private lastChartKey;
698
+ private chart;
699
+ private windowAxis;
700
+ private windowRange;
701
+ private refreshTimer;
702
+ constructor(dateExts: DateService, lc: LocalizationService, localStorage: PreferencesService, intercom: InterComService, route: ActivatedRoute, adms: AdminModuleBaseService, zone: NgZone);
703
+ ngOnInit(): Promise<void>;
704
+ ngOnDestroy(): void;
705
+ searchClicked(): void;
706
+ search(): Promise<void>;
707
+ private buildRequest;
708
+ private applyResult;
709
+ onChartLoaded(chart: BaseChartComponent<any>): void;
710
+ private drawTablesWindow;
711
+ addFilter(item: TopActivityV2LegendItem): void;
712
+ removeFilter(index: number): void;
713
+ sliderMoving(): void;
714
+ sliderChanged(): void;
715
+ private updateTablesWindowLabel;
716
+ isClickable(item: TopActivityV2TableItem): boolean;
717
+ openItem(item: TopActivityV2TableItem): void;
718
+ breakdownWidth(item: TopActivityV2TableItem, part: TopActivityV2Breakdown): number;
719
+ breakdownColor(part: TopActivityV2Breakdown): string;
720
+ itemLabel(item: TopActivityV2TableItem, table: TopActivityV2Table): string;
721
+ loadNodeDetails(nodeId: string): void;
722
+ loadSessionDetails(session: TopActivityV2Session): void;
723
+ refreshChanged(): void;
724
+ private shiftWindow;
725
+ private buildSources;
726
+ private loadInstances;
727
+ private refreshInfos;
728
+ dimensionLabel(dimension: TopActivityDimension): string;
729
+ private valueLabel;
730
+ private applySettings;
731
+ private saveSettings;
732
+ private setLastHour;
733
+ private toDate;
734
+ private fmt;
735
+ private parseUtc;
736
+ static ɵfac: i0.ɵɵFactoryDeclaration<AdmTopActivityV2Component, never>;
737
+ static ɵcmp: i0.ɵɵComponentDeclaration<AdmTopActivityV2Component, "topact_v2", never, {}, {}, never, never, false, never>;
738
+ }
739
+
518
740
  declare class AdmEnqComponent {
519
741
  lc: LocalizationService;
520
742
  private localStorage;
@@ -692,6 +914,24 @@ declare class AdminModuleCommService {
692
914
  static ɵprov: i0.ɵɵInjectableDeclaration<AdminModuleCommService>;
693
915
  }
694
916
 
917
+ declare class SessionDetailComponent {
918
+ lc: LocalizationService;
919
+ SessionDetails: SessionStats;
920
+ onClose: EventEmitter<boolean>;
921
+ onNodeSelected: EventEmitter<string>;
922
+ SelectedTopNodes: TopNode[];
923
+ SelectedSessions: LineChartData;
924
+ private seriesPropertiesMapping;
925
+ private propertiesSeriesMapping;
926
+ constructor(lc: LocalizationService);
927
+ ngOnInit(): void;
928
+ threadSelectionChanged(selection?: ItemsSelection<SessionThread>): void;
929
+ onChartLoaded(chart: BaseChartComponent<any>): void;
930
+ closeDialog(): void;
931
+ static ɵfac: i0.ɵɵFactoryDeclaration<SessionDetailComponent, never>;
932
+ static ɵcmp: i0.ɵɵComponentDeclaration<SessionDetailComponent, "session-detail", never, { "SessionDetails": { "alias": "SessionDetails"; "required": false; }; }, { "onClose": "onClose"; "onNodeSelected": "onNodeSelected"; }, never, never, false, never>;
933
+ }
934
+
695
935
  declare class NodeDetailComponent {
696
936
  lc: LocalizationService;
697
937
  NodeDetails: NodeStats;
@@ -711,6 +951,7 @@ declare class FormatTimePipe implements PipeTransform {
711
951
  static ɵpipe: i0.ɵɵPipeDeclaration<FormatTimePipe, "format_time", true>;
712
952
  }
713
953
 
954
+ declare const topActivityV2Enabled: CanMatchFn;
714
955
  declare const routeConfig: {
715
956
  path: string;
716
957
  children: ({
@@ -720,6 +961,7 @@ declare const routeConfig: {
720
961
  title: string;
721
962
  internalNavigation: boolean;
722
963
  };
964
+ canMatch?: undefined;
723
965
  } | {
724
966
  path: string;
725
967
  component: typeof AdmProfilerComponent;
@@ -727,6 +969,15 @@ declare const routeConfig: {
727
969
  title: string;
728
970
  internalNavigation: boolean;
729
971
  };
972
+ canMatch?: undefined;
973
+ } | {
974
+ path: string;
975
+ component: typeof AdmTopActivityV2Component;
976
+ canMatch: CanMatchFn[];
977
+ data: {
978
+ title: string;
979
+ internalNavigation: boolean;
980
+ };
730
981
  } | {
731
982
  path: string;
732
983
  component: typeof AdmTopActivitiesComponent;
@@ -734,6 +985,7 @@ declare const routeConfig: {
734
985
  title: string;
735
986
  internalNavigation: boolean;
736
987
  };
988
+ canMatch?: undefined;
737
989
  } | {
738
990
  path: string;
739
991
  component: typeof AdmMetricsComponent;
@@ -741,6 +993,7 @@ declare const routeConfig: {
741
993
  title: string;
742
994
  internalNavigation: boolean;
743
995
  };
996
+ canMatch?: undefined;
744
997
  } | {
745
998
  path: string;
746
999
  component: typeof AdmLogsComponent;
@@ -748,6 +1001,7 @@ declare const routeConfig: {
748
1001
  title: string;
749
1002
  internalNavigation: boolean;
750
1003
  };
1004
+ canMatch?: undefined;
751
1005
  } | {
752
1006
  path: string;
753
1007
  component: typeof AdmAuditsComponent;
@@ -755,6 +1009,7 @@ declare const routeConfig: {
755
1009
  title: string;
756
1010
  internalNavigation: boolean;
757
1011
  };
1012
+ canMatch?: undefined;
758
1013
  } | {
759
1014
  path: string;
760
1015
  component: typeof AdmEnqComponent;
@@ -762,6 +1017,7 @@ declare const routeConfig: {
762
1017
  title: string;
763
1018
  internalNavigation: boolean;
764
1019
  };
1020
+ canMatch?: undefined;
765
1021
  } | {
766
1022
  path: string;
767
1023
  component: typeof AdmDynamicViewsComponent;
@@ -769,6 +1025,7 @@ declare const routeConfig: {
769
1025
  title: string;
770
1026
  internalNavigation: boolean;
771
1027
  };
1028
+ canMatch?: undefined;
772
1029
  } | {
773
1030
  path: string;
774
1031
  component: typeof MtdQueryComponent;
@@ -776,6 +1033,7 @@ declare const routeConfig: {
776
1033
  title: string;
777
1034
  internalNavigation: boolean;
778
1035
  };
1036
+ canMatch?: undefined;
779
1037
  } | {
780
1038
  path: string;
781
1039
  component: typeof AdmSystemParametersComponent;
@@ -783,18 +1041,20 @@ declare const routeConfig: {
783
1041
  title: string;
784
1042
  internalNavigation: boolean;
785
1043
  };
1044
+ canMatch?: undefined;
786
1045
  })[];
787
1046
  }[];
788
1047
  declare class AdmModule {
789
1048
  private commService;
790
1049
  constructor(commService: AdminModuleCommService);
791
1050
  static ɵfac: i0.ɵɵFactoryDeclaration<AdmModule, never>;
792
- static ɵmod: i0.ɵɵNgModuleDeclaration<AdmModule, [typeof AdmWrkComponent, typeof AdmProfilerComponent, typeof AdmTopActivitiesComponent, typeof AdmDynamicViewsComponent, typeof AdmLogsComponent, typeof AdmAuditsComponent, typeof AdmEnqComponent, typeof AdmMetricsComponent, typeof NodeDetailComponent, typeof MtdQueryComponent, typeof AdmSystemParametersComponent], [typeof i12.CommonModule, typeof i13.FormsModule, typeof i14.ModalModule, typeof i15.TooltipModule, typeof i16.BsDropdownModule, typeof i17.ContextMenuModule, typeof i18.LocalizationModule, typeof i19.ExtensionsModule, typeof i20.EsTableModule, typeof i21.FormsAndValidationsModule, typeof i22.EsGertrudeModule, typeof i23.EsChartsModule, typeof i24.ComponentsModule, typeof i25.DirectivesModule, typeof i26.RouterModule, typeof FormatTimePipe], never>;
1051
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AdmModule, [typeof AdmWrkComponent, typeof AdmProfilerComponent, typeof AdmTopActivitiesComponent, typeof AdmTopActivityV2Component, typeof SessionDetailComponent, typeof AdmDynamicViewsComponent, typeof AdmLogsComponent, typeof AdmAuditsComponent, typeof AdmEnqComponent, typeof AdmMetricsComponent, typeof NodeDetailComponent, typeof MtdQueryComponent, typeof AdmSystemParametersComponent], [typeof i14.CommonModule, typeof i15.FormsModule, typeof i16.ModalModule, typeof i17.TooltipModule, typeof i18.BsDropdownModule, typeof i19.ContextMenuModule, typeof i20.LocalizationModule, typeof i21.ExtensionsModule, typeof i22.EsTableModule, typeof i23.FormsAndValidationsModule, typeof i24.EsGertrudeModule, typeof i25.EsChartsModule, typeof i26.ComponentsModule, typeof i27.DirectivesModule, typeof i28.RouterModule, typeof FormatTimePipe], never>;
793
1052
  static ɵinj: i0.ɵɵInjectorDeclaration<AdmModule>;
794
1053
  }
795
1054
 
796
1055
  declare const ADM_MODULE_PATH: InjectionToken<string>;
797
1056
  declare const ADM_CONVERSATIONS: InjectionToken<boolean>;
1057
+ declare const ADM_TOPACT_V2: InjectionToken<boolean>;
798
1058
 
799
1059
  /** Chiave di questo modulo, da utilizzare per i messaggi */
800
1060
  declare const MK_ADM = "EsAdminModule";
@@ -803,4 +1063,4 @@ declare enum AdmMessageTypes {
803
1063
  Message = 0
804
1064
  }
805
1065
 
806
- export { ADM_CONVERSATIONS, ADM_MODULE_PATH, AdmMessageTypes, AdmModule, MK_ADM, routeConfig };
1066
+ export { ADM_CONVERSATIONS, ADM_MODULE_PATH, ADM_TOPACT_V2, AdmMessageTypes, AdmModule, MK_ADM, routeConfig, topActivityV2Enabled };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esfaenza/admin-module",
3
- "version": "20.3.14",
3
+ "version": "20.3.16",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^20.3.34",
6
6
  "@angular/common": "^20.3.34",