@esfaenza/admin-module 15.2.9 → 15.2.11

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.
@@ -32,7 +32,8 @@ import * as i4 from '@esfaenza/httpservice';
32
32
  import { HttpParams } from '@angular/common/http';
33
33
  import { __decorate } from 'tslib';
34
34
  import { autoserialize } from 'cerialize';
35
- import { map } from 'rxjs/operators';
35
+ import { catchError } from 'rxjs/operators';
36
+ import { of } from 'rxjs';
36
37
 
37
38
  class AuditsView extends AppSearch {
38
39
  constructor() {
@@ -43,27 +44,27 @@ class AuditsView extends AppSearch {
43
44
  }
44
45
 
45
46
  const Repository = {
46
- GET_Adm_ChangeProcessConsumerGroup: "/api/Adm/ChangeProcessConsumerGroup",
47
- GET_Adm_ClearAllCaches: "/api/Adm/ClearAllCaches",
48
- GET_Adm_GetConsumerGroups: "/api/Adm/GetConsumerGroups#cache",
49
- GET_Adm_GetInfos: "/api/Adm/GetInfos",
50
- GET_Adm_GetMetrics: "/api/Adm/GetMetrics",
51
- POST_Adm_GetMetrics: "/api/Adm/GetMetrics",
52
- POST_Adm_GetProfilerDataNodes: "/api/Adm/GetProfilerDataNodes",
53
- POST_Adm_GetServerAudits: "/api/Adm/GetServerAudits",
54
- POST_Adm_GetDynamicViewData: "/api/Adm/GetDynamicViewData",
55
- POST_Adm_GetServerLocks: "/api/Adm/GetServerLocks",
56
- GET_Adm_GetServerLogs: "/api/Adm/GetServerLogs",
57
- GET_Adm_GetDynamicViews: "/api/Adm/GetDynamicViews",
58
- POST_Adm_GetServerWorkers: "/api/Adm/GetServerWorkers",
59
- POST_Adm_GetTopActivities: "/api/Adm/GetTopActivities",
60
- GET_Adm_GetWorkerStatus: "/api/Adm/GetWorkerStatus",
61
- GET_Adm_InvalidateServerSideCache: "/api/Adm/InvalidateServerSideCache",
62
- GET_Adm_KillProcess: "/api/Adm/KillProcess",
63
- GET_Adm_SetProcessTracing: "/api/Adm/SetProcessTracing",
64
- GET_Adm_StartWorker: "/api/Adm/StartWorker",
65
- GET_Adm_StopWorker: "/api/Adm/StopWorker",
66
- GET_Adm_GetNodeStats: "/api/Adm/GetNodeStats",
47
+ GET_Director_ChangeProcessConsumerGroup: "/api/Director/ChangeProcessConsumerGroup",
48
+ GET_Director_ClearAllCaches: "/api/Director/ClearAllCaches",
49
+ GET_Director_GetConsumerGroups: "/api/Director/GetConsumerGroups#cache",
50
+ GET_Director_GetInfos: "/api/Director/GetInfos",
51
+ GET_Director_GetMetrics: "/api/Director/GetMetrics",
52
+ POST_Director_GetMetrics: "/api/Director/GetMetrics",
53
+ POST_Director_GetProfilerDataNodes: "/api/Director/GetProfilerDataNodes",
54
+ POST_Director_GetServerAudits: "/api/Director/GetServerAudits",
55
+ POST_Director_GetDynamicViewData: "/api/Director/GetDynamicViewData",
56
+ POST_Director_GetServerLocks: "/api/Director/GetServerLocks",
57
+ GET_Director_GetServerLogs: "/api/Director/GetServerLogs",
58
+ GET_Director_GetDynamicViews: "/api/Director/GetDynamicViews",
59
+ POST_Director_GetServerWorkers: "/api/Director/GetServerWorkers",
60
+ POST_Director_GetTopActivities: "/api/Director/GetTopActivities",
61
+ GET_Director_GetWorkerStatus: "/api/Director/GetWorkerStatus",
62
+ GET_Director_InvalidateServerSideCache: "/api/Director/InvalidateServerSideCache",
63
+ GET_Director_KillProcess: "/api/Director/KillProcess",
64
+ GET_Director_SetProcessTracing: "/api/Director/SetProcessTracing",
65
+ GET_Director_StartWorker: "/api/Director/StartWorker",
66
+ GET_Director_StopWorker: "/api/Director/StopWorker",
67
+ GET_Director_GetNodeStats: "/api/Director/GetNodeStats",
67
68
  };
68
69
 
69
70
  const ADM_MODULE_PATH = new InjectionToken('ADM_MODULE_PATH');
@@ -150,7 +151,7 @@ class AdmAuditsComponent {
150
151
  //Altirmenti genero il modello nuovo normalmente
151
152
  if (HotPotato) {
152
153
  this.searchView = HotPotato;
153
- this.POSTGetProcesses(Repository["POST_Adm_GetServerAudits"], this.searchView);
154
+ this.POSTGetProcesses(Repository["POST_Director_GetServerAudits"], this.searchView);
154
155
  }
155
156
  else {
156
157
  this.searchView = new AuditsView();
@@ -163,7 +164,7 @@ class AdmAuditsComponent {
163
164
  this.searchInProgress = true;
164
165
  if (resetPage)
165
166
  this.searchView.page = 1;
166
- this.POSTGetProcesses(Repository["POST_Adm_GetServerAudits"], this.searchView);
167
+ this.POSTGetProcesses(Repository["POST_Director_GetServerAudits"], this.searchView);
167
168
  }
168
169
  POSTGetProcesses(url, data) {
169
170
  this.http.post(url, data).subscribe(t => {
@@ -292,7 +293,7 @@ class AdmWrkComponent {
292
293
  init(HotPotato) {
293
294
  if (HotPotato) {
294
295
  this.searchView = HotPotato;
295
- this.POSTGetProcesses(Repository["POST_Adm_GetServerWorkers"], this.searchView);
296
+ this.POSTGetProcesses(Repository["POST_Director_GetServerWorkers"], this.searchView);
296
297
  }
297
298
  else {
298
299
  this.searchView = new ProcessesView();
@@ -303,7 +304,7 @@ class AdmWrkComponent {
303
304
  this.searchView.searchinprogress = true;
304
305
  if (resetPage)
305
306
  this.searchView.page = 1;
306
- this.POSTGetProcesses(Repository["POST_Adm_GetServerWorkers"], this.searchView);
307
+ this.POSTGetProcesses(Repository["POST_Director_GetServerWorkers"], this.searchView);
307
308
  }
308
309
  POSTGetProcesses(url, data) {
309
310
  this.http.post(url, data).subscribe(t => {
@@ -337,7 +338,7 @@ class AdmWrkComponent {
337
338
  .set("sid", process.properties["sid"] || process.properties["SID"])
338
339
  .set("serial", process.properties["serial"] || process.properties["SERIAL"])
339
340
  .set("enable", tracing.toString());
340
- this.http.get(Repository["GET_Adm_SetProcessTracing"], pars).subscribe(t => {
341
+ this.http.get(Repository["GET_Director_SetProcessTracing"], pars).subscribe(t => {
341
342
  this.msgExts.manageStringResponse(t, "", this.lc.loc("Errori nella modifica del Tracing del Processo"), () => this.sendSearch());
342
343
  });
343
344
  }
@@ -347,7 +348,7 @@ class AdmWrkComponent {
347
348
  .set("instanceid", process.properties["inst_id"] || process.properties["INST_ID"])
348
349
  .set("sid", process.properties["sid"] || process.properties["SID"])
349
350
  .set("serial", process.properties["serial"] || process.properties["SERIAL"]);
350
- this.http.get(Repository["GET_Adm_KillProcess"], pars).subscribe(t => {
351
+ this.http.get(Repository["GET_Director_KillProcess"], pars).subscribe(t => {
351
352
  this.msgExts.manageStringResponse(t, this.lc.loc("Processo ucciso con successo"), this.lc.loc("Errori durante la Kill del Processo"), () => this.sendSearch());
352
353
  });
353
354
  });
@@ -362,7 +363,7 @@ class AdmWrkComponent {
362
363
  this.dlgChangeCg.show();
363
364
  }
364
365
  loadCgDictionaries() {
365
- this.http.get(Repository["GET_Adm_GetConsumerGroups"]).subscribe(t => this.CGs = t);
366
+ this.http.get(Repository["GET_Director_GetConsumerGroups"]).subscribe(t => this.CGs = t);
366
367
  }
367
368
  setupChangeCg() {
368
369
  this.utiExts.cleanForm(this.cgFrom);
@@ -374,7 +375,7 @@ class AdmWrkComponent {
374
375
  .set("sid", this.ProcessOnEdit.properties["sid"] || this.ProcessOnEdit.properties["SID"])
375
376
  .set("serial", this.ProcessOnEdit.properties["serial"] || this.ProcessOnEdit.properties["SERIAL"])
376
377
  .set("consumer_group", this.newCg);
377
- this.http.get(Repository["GET_Adm_ChangeProcessConsumerGroup"], pars).subscribe(t => {
378
+ this.http.get(Repository["GET_Director_ChangeProcessConsumerGroup"], pars).subscribe(t => {
378
379
  this.msgExts.manageStringResponse(t, this.lc.loc("Gruppo di Consumo modificato con successo"), this.lc.loc("Errori nella modifica del Gruppo di Consumo"), () => this.sendSearch());
379
380
  });
380
381
  return true;
@@ -636,7 +637,7 @@ class AdmProfilerComponent {
636
637
  init(HotPotato) {
637
638
  if (HotPotato) {
638
639
  this.searchView = HotPotato;
639
- this.POSTGetItems(Repository["POST_Adm_GetProfilerDataNodes"], this.searchView);
640
+ this.POSTGetItems(Repository["POST_Director_GetProfilerDataNodes"], this.searchView);
640
641
  }
641
642
  else {
642
643
  this.searchView = new ProfilerDataNodesView();
@@ -651,7 +652,7 @@ class AdmProfilerComponent {
651
652
  this.searchView.searchinprogress = true;
652
653
  if (resetPage)
653
654
  this.searchView.page = 1;
654
- this.POSTGetItems(Repository["POST_Adm_GetProfilerDataNodes"], this.searchView);
655
+ this.POSTGetItems(Repository["POST_Director_GetProfilerDataNodes"], this.searchView);
655
656
  }
656
657
  POSTGetItems(url, data) {
657
658
  this.http.post(url, data).subscribe(t => {
@@ -664,7 +665,7 @@ class AdmProfilerComponent {
664
665
  var view = JSON.parse(JSON.stringify(this.searchView));
665
666
  view.page = 1;
666
667
  view.itemsperpageoverride = 9999999;
667
- this.http.post(Repository["POST_Adm_GetProfilerDataNodes"], view).subscribe(t => {
668
+ this.http.post(Repository["POST_Director_GetProfilerDataNodes"], view).subscribe(t => {
668
669
  let items = this.expExts.deserializeForExport(t.items, ProfilerDataNode);
669
670
  dataCallBack(items);
670
671
  });
@@ -672,7 +673,7 @@ class AdmProfilerComponent {
672
673
  loadNodeDetails(nodeId) {
673
674
  this.NodeDetails = null;
674
675
  let pars = new HttpParams().set('nodeId', nodeId);
675
- this.http.get(Repository.GET_Adm_GetNodeStats, pars).subscribe(t => {
676
+ this.http.get(Repository.GET_Director_GetNodeStats, pars).subscribe(t => {
676
677
  this.NodeDetails = t;
677
678
  });
678
679
  }
@@ -770,7 +771,7 @@ class AdmTopActivitiesComponent {
770
771
  init(HotPotato) {
771
772
  if (HotPotato) {
772
773
  this.searchView = HotPotato;
773
- this.POSTGetItems(Repository.POST_Adm_GetTopActivities, this.searchView, false);
774
+ this.POSTGetItems(Repository.POST_Director_GetTopActivities, this.searchView, false);
774
775
  }
775
776
  else {
776
777
  this.searchView = new TopActivitiesDataView();
@@ -785,7 +786,7 @@ class AdmTopActivitiesComponent {
785
786
  this.searchView.searchinprogress = true;
786
787
  if (resetPage)
787
788
  this.searchView.page = 1;
788
- this.POSTGetItems(Repository.POST_Adm_GetTopActivities, searchViewOverride ?? this.searchView, update);
789
+ this.POSTGetItems(Repository.POST_Director_GetTopActivities, searchViewOverride ?? this.searchView, update);
789
790
  }
790
791
  POSTGetItems(url, data, update) {
791
792
  this.http.post(url, data).subscribe(async (t) => {
@@ -794,18 +795,16 @@ class AdmTopActivitiesComponent {
794
795
  this.searchView = t;
795
796
  this.localStorage.setItem("HotSearchTopAct", this.searchView).subscribe();
796
797
  }
797
- var dirinfos = await this.getDirectorInfos();
798
+ // DirectorInfos anche se per qualche motivo crasha di brutto è comunque non obbligatorio, evito di non caricare la pagina solo perché lui scoppia
799
+ var dirinfos = await this.http.get(Repository.GET_Director_GetInfos, null, null, false).pipe(catchError(_ => of(null))).toPromise();
798
800
  this.searchView.searchinprogress = false;
799
801
  this.reviewBindings(update, t, dirinfos);
800
802
  });
801
803
  }
802
- getDirectorInfos() {
803
- return this.http.get(Repository.GET_Adm_GetInfos).pipe(map(res => { return res; })).toPromise();
804
- }
805
804
  loadNodeDetails(nodeId) {
806
805
  this.NodeDetails = null;
807
806
  let pars = new HttpParams().set('nodeId', nodeId);
808
- this.http.get(Repository.GET_Adm_GetNodeStats, pars).subscribe(t => {
807
+ this.http.get(Repository.GET_Director_GetNodeStats, pars).subscribe(t => {
809
808
  this.NodeDetails = t;
810
809
  });
811
810
  }
@@ -947,7 +946,7 @@ class AdmEnqComponent {
947
946
  init(HotPotato) {
948
947
  if (HotPotato) {
949
948
  this.locksView = HotPotato;
950
- this.POSTGetProcesses(Repository["POST_Adm_GetServerLocks"], this.locksView);
949
+ this.POSTGetProcesses(Repository["POST_Director_GetServerLocks"], this.locksView);
951
950
  }
952
951
  else {
953
952
  this.locksView = new LocksView();
@@ -957,7 +956,7 @@ class AdmEnqComponent {
957
956
  sendSearch(resetPage = true) {
958
957
  if (resetPage)
959
958
  this.locksView.page = 1;
960
- this.POSTGetProcesses(Repository["POST_Adm_GetServerLocks"], this.locksView);
959
+ this.POSTGetProcesses(Repository["POST_Director_GetServerLocks"], this.locksView);
961
960
  }
962
961
  POSTGetProcesses(url, data) {
963
962
  this.http.post(url, data).subscribe(t => {
@@ -1037,7 +1036,7 @@ class AdmMetricsComponent {
1037
1036
  this.selectedInstance = "";
1038
1037
  this.searchView.filtermetrics = [];
1039
1038
  var pars = new HttpParams().set("from", this.searchView.filterfrom || "").set("to", this.searchView.filterto || "");
1040
- this.http.get(Repository["GET_Adm_GetMetrics"], pars).subscribe(t => this.Metrics = t);
1039
+ this.http.get(Repository["GET_Director_GetMetrics"], pars).subscribe(t => this.Metrics = t);
1041
1040
  }
1042
1041
  async doInit(ignoreStorage) {
1043
1042
  let item = await this.localStorage.getItem("HotSearchMetrics").toPromise();
@@ -1054,7 +1053,7 @@ class AdmMetricsComponent {
1054
1053
  init(HotPotato) {
1055
1054
  if (HotPotato) {
1056
1055
  this.searchView = HotPotato;
1057
- this.POSTGetItems(Repository["POST_Adm_GetMetrics"], this.searchView, false);
1056
+ this.POSTGetItems(Repository["POST_Director_GetMetrics"], this.searchView, false);
1058
1057
  }
1059
1058
  else {
1060
1059
  this.searchView = new MetricsView();
@@ -1074,7 +1073,7 @@ class AdmMetricsComponent {
1074
1073
  this.searchView.itemsperpageoverride = 999999;
1075
1074
  if (resetPage)
1076
1075
  this.searchView.page = 1;
1077
- this.POSTGetItems(Repository["POST_Adm_GetMetrics"], searchViewOverride ?? this.searchView, update);
1076
+ this.POSTGetItems(Repository["POST_Director_GetMetrics"], searchViewOverride ?? this.searchView, update);
1078
1077
  }
1079
1078
  POSTGetItems(url, data, update) {
1080
1079
  data.filterrealtime = update ? data.filterrealtime : !(!!data.filterfrom || !!data.filterto);
@@ -1172,7 +1171,7 @@ class AdmLogsComponent {
1172
1171
  this.intercom.send(InboundMessageTypes.Navigation, { sub: false, routeTitle: this.lc.loc(this.route.snapshot.data["title"]) });
1173
1172
  }
1174
1173
  ngOnInit() {
1175
- this.http.get(Repository["GET_Adm_GetServerLogs"]).subscribe(t => { this.Log = t; });
1174
+ this.http.get(Repository["GET_Director_GetServerLogs"]).subscribe(t => { this.Log = t; });
1176
1175
  }
1177
1176
  }
1178
1177
  AdmLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AdmLogsComponent, deps: [{ token: i1.InterComService }, { token: i4.HTTPService }, { token: i2.LocalizationService }, { token: i5.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
@@ -1221,7 +1220,7 @@ class AdmDynamicViewsComponent {
1221
1220
  this.intercom.send(InboundMessageTypes.Navigation, { sub: false, routeTitle: this.lc.loc(this.route.snapshot.data["title"]) });
1222
1221
  }
1223
1222
  ngOnInit() {
1224
- this.http.get(Repository.GET_Adm_GetDynamicViews).subscribe(t => { this.Names = t; });
1223
+ this.http.get(Repository.GET_Director_GetDynamicViews).subscribe(t => { this.Names = t; });
1225
1224
  this.storageSub = this.route.queryParams.subscribe(params => { this.Init(params["ignoreStorage"]); });
1226
1225
  }
1227
1226
  ngOnDestroy() {
@@ -1245,7 +1244,7 @@ class AdmDynamicViewsComponent {
1245
1244
  //Altirmenti genero il modello nuovo normalmente
1246
1245
  if (HotPotato) {
1247
1246
  this.searchView = HotPotato;
1248
- this.POSTGetItems(Repository.POST_Adm_GetDynamicViewData, this.searchView);
1247
+ this.POSTGetItems(Repository.POST_Director_GetDynamicViewData, this.searchView);
1249
1248
  }
1250
1249
  else {
1251
1250
  this.searchView = new DynamicViewsView();
@@ -1257,7 +1256,7 @@ class AdmDynamicViewsComponent {
1257
1256
  if (resetPage)
1258
1257
  this.searchView.page = 1;
1259
1258
  this.searchView.filtername = this.filterName;
1260
- this.POSTGetItems(Repository.POST_Adm_GetDynamicViewData, this.searchView);
1259
+ this.POSTGetItems(Repository.POST_Director_GetDynamicViewData, this.searchView);
1261
1260
  }
1262
1261
  POSTGetItems(url, data) {
1263
1262
  if (!this.searchView.filtername) {