@esfaenza/admin-module 11.2.12 → 11.2.15

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 (29) hide show
  1. package/bundles/esfaenza-admin-module.umd.js +190 -12
  2. package/bundles/esfaenza-admin-module.umd.js.map +1 -1
  3. package/bundles/esfaenza-admin-module.umd.min.js +2 -2
  4. package/bundles/esfaenza-admin-module.umd.min.js.map +1 -1
  5. package/esfaenza-admin-module.d.ts +6 -3
  6. package/esfaenza-admin-module.metadata.json +1 -1
  7. package/esm2015/esfaenza-admin-module.js +7 -4
  8. package/esm2015/lib/admin-module.module.js +17 -9
  9. package/esm2015/lib/components/_shared/node_detail.component.js +2 -2
  10. package/esm2015/lib/components/_shared/node_detail.component.loc.js +3 -1
  11. package/esm2015/lib/components/dynamic_views/adm_dynamic_views.component.js +116 -0
  12. package/esm2015/lib/components/dynamic_views/adm_dynamic_views.component.loc.js +19 -0
  13. package/esm2015/lib/components/profiler/adm_profiler.component.js +2 -2
  14. package/esm2015/lib/models/components/DynamicViewsView.js +5 -0
  15. package/esm2015/lib/models/components/NodeStats.js +1 -1
  16. package/esm2015/lib/models/components/NodeWaitStack.js +3 -0
  17. package/esm2015/lib/models/externals/Repository.js +3 -1
  18. package/esm2015/lib/pipes/format_time.pipe.js +23 -0
  19. package/fesm2015/esfaenza-admin-module.js +162 -11
  20. package/fesm2015/esfaenza-admin-module.js.map +1 -1
  21. package/lib/admin-module.module.d.ts +8 -0
  22. package/lib/components/dynamic_views/adm_dynamic_views.component.d.ts +32 -0
  23. package/lib/components/dynamic_views/adm_dynamic_views.component.loc.d.ts +4 -0
  24. package/lib/models/components/DynamicViewsView.d.ts +5 -0
  25. package/lib/models/components/NodeStats.d.ts +2 -0
  26. package/lib/models/components/NodeWaitStack.d.ts +6 -0
  27. package/lib/models/externals/Repository.d.ts +2 -0
  28. package/lib/pipes/format_time.pipe.d.ts +6 -0
  29. package/package.json +1 -1
@@ -342,8 +342,10 @@
342
342
  POST_Adm_GetMetrics: "/api/Adm/GetMetrics",
343
343
  POST_Adm_GetProfilerDataNodes: "/api/Adm/GetProfilerDataNodes",
344
344
  POST_Adm_GetServerAudits: "/api/Adm/GetServerAudits",
345
+ POST_Adm_GetDynamicViewData: "/api/Adm/GetDynamicViewData",
345
346
  POST_Adm_GetServerLocks: "/api/Adm/GetServerLocks",
346
347
  GET_Adm_GetServerLogs: "/api/Adm/GetServerLogs",
348
+ GET_Adm_GetDynamicViews: "/api/Adm/GetDynamicViews",
347
349
  POST_Adm_GetServerWorkers: "/api/Adm/GetServerWorkers",
348
350
  POST_Adm_GetTopActivities: "/api/Adm/GetTopActivities",
349
351
  GET_Adm_GetWorkerStatus: "/api/Adm/GetWorkerStatus",
@@ -977,7 +979,7 @@
977
979
  { type: core.Component, args: [{
978
980
  selector: "adm_profiler",
979
981
  providers: [{ provide: localizations.LocalizationService, useClass: AdmProfilerComponentLoc }],
980
- template: "<div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"card app-overflow-visible\" widget>\r\n <div class=\"card-header\">\r\n <span class=\"text-uppercase\">{{'Server Profiler' | localize : lc}}</span>&nbsp;\r\n </div>\r\n <div class=\"card-body widget-body\">\r\n <div class=\"col-md-12 bottom-15\">\r\n <form role=\"form\">\r\n <div class=\"row app-first-filter-line\">\r\n <div class=\"col-xl-2 col-lg-2 col-md-12 app-filter-wrapper\">\r\n <form-date [FormLayout]=\"false\" [Validation]=\"false\" [(ngModel)]=\"searchView.filterfrom\" name=\"filterfrom\" [Placeholder]=\"'From' | localize : lc\"></form-date>\r\n </div>\r\n <div class=\"col-xl-2 col-lg-2 col-md-12 app-filter-wrapper\">\r\n <form-date [FormLayout]=\"false\" [Validation]=\"false\" [(ngModel)]=\"searchView.filterto\" name=\"filterto\" [Placeholder]=\"'To' | localize : lc\"></form-date>\r\n </div>\r\n <button [disabled]=\"searchView.searchinprogress\" class=\"input-group-addon btn app-btn-search app-margin-top-20\" (click)=\"sendSearch()\" type=\"submit\"><i class=\"fa fa-search\"></i></button>\r\n </div>\r\n </form>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <p *ngIf=\"!searchView\"><em>{{'Loading Data' | localize : lc}}</em></p>\r\n <div *ngIf=\"searchView\">\r\n <es-table [(ngModel)]=\"searchView\" [Hierarchy]=\"true\" [OrderByColumn]=\"false\" [ParentKey]=\"'parentid'\"\r\n [OwnKey]=\"'id'\" [StartsExpanded]=\"false\" [ExportFunction]=\"prepareExport.bind(this)\" [Export]=\"true\"\r\n [ExportFileName]=\"'Profiler Export.csv'\" [HidePaging]=\"true\" (onSearchRequest)=\"sendSearch($event);\">\r\n \r\n <span *th=\"'1'\">{{'ID' | localize : lc}}</span>\r\n <span *th=\"'2'\">{{'Description' | localize : lc}}</span>\r\n <span *th=\"'3'\">{{'Calls' | localize : lc}}</span>\r\n <span *th=\"'4'\">{{'Time' | localize : lc}}</span>\r\n <span *th=\"'5'\">{{'Peak Time' | localize : lc}}</span>\r\n <span *th=\"'6'\">{{'Min. Time' | localize : lc}}</span>\r\n <span *th=\"'7'\">{{'Avg. Time' | localize : lc}}</span>\r\n <span *th=\"'8'\">{{'Specific Time' | localize : lc}}</span>\r\n <span *th=\"'9'\">{{'Percentage' | localize : lc}}</span>\r\n <span *th=\"'10'\">{{'Calls for Period' | localize : lc}}</span>\r\n <span *th=\"'11'\">{{'Time for Period' | localize : lc}}</span>\r\n <span *th=\"'12'\">{{'Peak Time for Period' | localize : lc}}</span>\r\n <span *th=\"'13'\">{{'Min. Time for Period' | localize : lc}}</span>\r\n <span *th=\"'14'\">{{'Avg. Time for Period' | localize : lc}}</span>\r\n <span *th=\"'15'\">{{'Specific Time for Period' | localize : lc}}</span>\r\n <span *th=\"'16'\">{{'Percentage for Period' | localize : lc}}</span>\r\n <span *th=\"'17'\">{{'Event Type Name' | localize : lc}}</span>\r\n <span *th=\"'18'\">{{'Wait Class Name' | localize : lc}}</span>\r\n\r\n <span *td=\"'1'; let item\"><span class=\"app-link app-inline\" (click)=\"loadNodeDetails(item.id); dlgNodeDetails.show();\">{{item.id}}</span></span>\r\n <span *td=\"'2'; let item\" title=\"{{item.description}}\">{{item.description.length <= 50 ? item.description : item.description.substr(0,50) + \"[...]\" }}</span>\r\n <span *td=\"'3'; let item\">{{item.calls}}</span>\r\n <span *td=\"'4'; let item\">{{item.time}}</span>\r\n <span *td=\"'5'; let item\">{{item.peaktime}}</span>\r\n <span *td=\"'6'; let item\">{{item.mintime}}</span>\r\n <span *td=\"'7'; let item\">{{item.avgtime}}</span>\r\n <span *td=\"'8'; let item\">{{item.timewithoutchildren}}</span>\r\n <span *td=\"'9'; let item\">{{item.percentage}}</span>\r\n <span *td=\"'10' let item\">{{item.snapdeltacalls}}</span>\r\n <span *td=\"'11' let item\">{{item.snapdeltatime}}</span>\r\n <span *td=\"'12' let item\">{{item.snappeaktime}}</span>\r\n <span *td=\"'13' let item\">{{item.snapmintime}}</span>\r\n <span *td=\"'14' let item\">{{item.snapavgtime}}</span>\r\n <span *td=\"'15' let item\">{{item.snaptimewithoutchildren}}</span>\r\n <span *td=\"'16' let item\">{{item.snappercentage}}</span>\r\n <span *td=\"'17' let item\">{{item.eventtypename}}</span>\r\n <span *td=\"'18' let item\">{{item.waitclassname}}</span>\r\n </es-table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div bsModal #dlgNodeDetails=\"bs-modal\" class=\"modal fade\" role=\"dialog\" aria-hidden=\"true\">\r\n <node-detail *ngIf=\"NodeDetails\" [NodeDetails]=\"NodeDetails\" (onClose)=\"dlgNodeDetails.hide()\"></node-detail>\r\n</div>"
982
+ template: "<div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"card app-overflow-visible\" widget>\r\n <div class=\"card-header\">\r\n <span class=\"text-uppercase\">{{'Server Profiler' | localize : lc}}</span>&nbsp;\r\n </div>\r\n <div class=\"card-body widget-body\">\r\n <div class=\"col-md-12 bottom-15\">\r\n <form role=\"form\">\r\n <div class=\"row app-first-filter-line\">\r\n <div class=\"col-xl-2 col-lg-2 col-md-12 app-filter-wrapper\">\r\n <form-date [FormLayout]=\"false\" [Validation]=\"false\" [(ngModel)]=\"searchView.filterfrom\" name=\"filterfrom\" [Placeholder]=\"'From' | localize : lc\"></form-date>\r\n </div>\r\n <div class=\"col-xl-2 col-lg-2 col-md-12 app-filter-wrapper\">\r\n <form-date [FormLayout]=\"false\" [Validation]=\"false\" [(ngModel)]=\"searchView.filterto\" name=\"filterto\" [Placeholder]=\"'To' | localize : lc\"></form-date>\r\n </div>\r\n <button [disabled]=\"searchView.searchinprogress\" class=\"input-group-addon btn app-btn-search app-margin-top-20\" (click)=\"sendSearch()\" type=\"submit\"><i class=\"fa fa-search\"></i></button>\r\n </div>\r\n </form>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <p *ngIf=\"!searchView\"><em>{{'Loading Data' | localize : lc}}</em></p>\r\n <div *ngIf=\"searchView\">\r\n <es-table [(ngModel)]=\"searchView\" [Hierarchy]=\"true\" [OrderByColumn]=\"false\" [ParentKey]=\"'parentid'\"\r\n [OwnKey]=\"'id'\" [StartsExpanded]=\"false\" [ExportFunction]=\"prepareExport.bind(this)\" [Export]=\"true\"\r\n [ExportFileName]=\"'Profiler Export.csv'\" [HidePaging]=\"true\" (onSearchRequest)=\"sendSearch($event);\">\r\n \r\n <span *th=\"'1'\">{{'ID' | localize : lc}}</span>\r\n <span *th=\"'2'\">{{'Description' | localize : lc}}</span>\r\n <span *th=\"'3'\">{{'Calls' | localize : lc}}</span>\r\n <span *th=\"'4'\">{{'Time' | localize : lc}}</span>\r\n <span *th=\"'5'\">{{'Peak Time' | localize : lc}}</span>\r\n <span *th=\"'6'\">{{'Min. Time' | localize : lc}}</span>\r\n <span *th=\"'7'\">{{'Avg. Time' | localize : lc}}</span>\r\n <span *th=\"'8'\">{{'Specific Time' | localize : lc}}</span>\r\n <span *th=\"'9'\">{{'Percentage' | localize : lc}}</span>\r\n <span *th=\"'10'\">{{'Calls for Period' | localize : lc}}</span>\r\n <span *th=\"'11'\">{{'Time for Period' | localize : lc}}</span>\r\n <span *th=\"'12'\">{{'Peak Time for Period' | localize : lc}}</span>\r\n <span *th=\"'13'\">{{'Min. Time for Period' | localize : lc}}</span>\r\n <span *th=\"'14'\">{{'Avg. Time for Period' | localize : lc}}</span>\r\n <span *th=\"'15'\">{{'Specific Time for Period' | localize : lc}}</span>\r\n <span *th=\"'16'\">{{'Percentage for Period' | localize : lc}}</span>\r\n <span *th=\"'17'\">{{'Event Type Name' | localize : lc}}</span>\r\n <span *th=\"'18'\">{{'Wait Class Name' | localize : lc}}</span>\r\n\r\n <span *td=\"'1'; let item\"><span class=\"app-link app-inline\" (click)=\"loadNodeDetails(item.id); dlgNodeDetails.show();\">{{item.id}}</span></span>\r\n <span *td=\"'2'; let item\" title=\"{{item.description}}\">{{item.description.length <= 50 ? item.description : item.description.substr(0,50) + \"[...]\" }}</span>\r\n <span *td=\"'3'; let item\">{{item.calls}}</span>\r\n <span *td=\"'4'; let item\">{{item.time | format_time}}</span>\r\n <span *td=\"'5'; let item\">{{item.peaktime | format_time}}</span>\r\n <span *td=\"'6'; let item\">{{item.mintime | format_time}}</span>\r\n <span *td=\"'7'; let item\">{{item.avgtime | format_time}}</span>\r\n <span *td=\"'8'; let item\">{{item.timewithoutchildren | format_time}}</span>\r\n <span *td=\"'9'; let item\">{{item.percentage}}</span>\r\n <span *td=\"'10' let item\">{{item.snapdeltacalls}}</span>\r\n <span *td=\"'11' let item\">{{item.snapdeltatime}}</span>\r\n <span *td=\"'12' let item\">{{item.snappeaktime | format_time}}</span>\r\n <span *td=\"'13' let item\">{{item.snapmintime | format_time}}</span>\r\n <span *td=\"'14' let item\">{{item.snapavgtime | format_time}}</span>\r\n <span *td=\"'15' let item\">{{item.snaptimewithoutchildren | format_time}}</span>\r\n <span *td=\"'16' let item\">{{item.snappercentage}}</span>\r\n <span *td=\"'17' let item\">{{item.eventtypename}}</span>\r\n <span *td=\"'18' let item\">{{item.waitclassname}}</span>\r\n </es-table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div bsModal #dlgNodeDetails=\"bs-modal\" class=\"modal fade\" role=\"dialog\" aria-hidden=\"true\">\r\n <node-detail *ngIf=\"NodeDetails\" [NodeDetails]=\"NodeDetails\" (onClose)=\"dlgNodeDetails.hide()\"></node-detail>\r\n</div>"
981
983
  },] }
982
984
  ];
983
985
  AdmProfilerComponent.ctorParameters = function () { return [
@@ -1640,6 +1642,8 @@
1640
1642
  _super.prototype.set.call(_this, "en->it", "Elapsed (With Children)", ["Tempo Trascorso (Con Figli)"]);
1641
1643
  _super.prototype.set.call(_this, "en->it", "Wait Class", ["Classe Attesa"]);
1642
1644
  _super.prototype.set.call(_this, "en->it", "Elapsed (No Children)", ["Tempo Trascorso (Non Figli)"]);
1645
+ _super.prototype.set.call(_this, "en->it", "Wait Stack", ["Stack di Attesa"]);
1646
+ _super.prototype.set.call(_this, "en->it", "Resources Usage", ["Utilizzo Risorse"]);
1643
1647
  return _this;
1644
1648
  }
1645
1649
  return NodeDetailLoc;
@@ -1680,7 +1684,7 @@
1680
1684
  { type: core.Component, args: [{
1681
1685
  selector: "node-detail",
1682
1686
  viewProviders: [{ provide: localizations.LocalizationService, useClass: NodeDetailLoc }],
1683
- template: "<div class=\"modal-dialog modal-lg\" cdkDrag>\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\" cdkDragHandle>\r\n <h4 class=\"modal-title pull-left\">\r\n {{'Activity Node Details' | localize : lc}}\r\n <span *ngIf=\"NodeDetails\">&nbsp;{{NodeDetails.nodeid}}&nbsp;-&nbsp;{{NodeDetails.nodedescription}}</span>\r\n </h4>\r\n <button type=\"button\" class=\"close pull-right\" (click)=\"closeDialog()\" aria-label=\"Close\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n </div>\r\n <div class=\"modal-body\" *ngIf=\"NodeDetails\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <strong>{{'Event Type' | localize: lc}}</strong>:&nbsp;{{NodeDetails.eventtypedesc}}\r\n </div>\r\n <div class=\"col-md-6\">\r\n <strong>{{'Elapsed (With Children)' | localize: lc}}</strong>:&nbsp;{{NodeDetails.elapsed}}\r\n </div>\r\n <div class=\"col-md-6\">\r\n <strong>{{'Wait Class' | localize: lc}}</strong>:&nbsp;{{NodeDetails.waitclassname}}\r\n </div>\r\n <div class=\"col-md-6\">\r\n <strong>{{'Elapsed (No Children)' | localize: lc}}</strong>:&nbsp;{{NodeDetails.elapsedlesschildren}}\r\n </div>\r\n </div>\r\n <div style=\"height: 200px;\">\r\n <es-line-chart *ngIf=\"NodeDetails.sessionchart\"\r\n [MinGridDistance]=\"65\"\r\n [Timeline]=\"false\"\r\n [FinalInstants]=\"false\"\r\n [LegendPadding]=\"{top: 0, bottom: 7, right: 0, left: 10}\"\r\n [Fill]=\"true\"\r\n [MergeDatasets]=\"true\"\r\n [Data]=\"NodeDetails.sessionchart\"\r\n [Legend]=\"true\" \r\n name=\"nodeDetailSessionChart\"\r\n [DataGroupingThreshold]=\"99999999\"></es-line-chart>\r\n </div>\r\n <div style=\"height: 200px;\">\r\n <es-pie-chart *ngIf=\"NodeDetails.loadchart\" [Legend]=\"true\" [Data]=\"NodeDetails.loadchart\" name=\"nodeDetailLoadChart\"></es-pie-chart>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"closeDialog()\">{{'Close' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n</div>"
1687
+ template: "<div class=\"modal-dialog modal-xl\" cdkDrag>\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\" cdkDragHandle>\r\n <h4 class=\"modal-title pull-left\">\r\n {{'Activity Node Details' | localize : lc}}\r\n <span *ngIf=\"NodeDetails\">&nbsp;{{NodeDetails.nodeid}}&nbsp;-&nbsp;{{NodeDetails.nodedescription}}</span>\r\n </h4>\r\n <button type=\"button\" class=\"close pull-right\" (click)=\"closeDialog()\" aria-label=\"Close\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n </div>\r\n <div class=\"modal-body\" *ngIf=\"NodeDetails\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <strong>{{'Event Type' | localize: lc}}</strong>:&nbsp;{{NodeDetails.eventtypedesc}}\r\n </div>\r\n <div class=\"col-md-6\">\r\n <strong>{{'Elapsed (With Children)' | localize: lc}}</strong>:&nbsp;{{NodeDetails.elapsed}}\r\n </div>\r\n <div class=\"col-md-6\">\r\n <strong>{{'Wait Class' | localize: lc}}</strong>:&nbsp;{{NodeDetails.waitclassname}}\r\n </div>\r\n <div class=\"col-md-6\">\r\n <strong>{{'Elapsed (No Children)' | localize: lc}}</strong>:&nbsp;{{NodeDetails.elapsedlesschildren}}\r\n </div>\r\n </div>\r\n <div class=\"row\" style=\"max-height: 200px; overflow: auto\" *ngIf=\"(NodeDetails?.waitstack?.length || 0) > 0\">\r\n <h5 class=\"app-margin-top-10\"><strong>{{'Wait Stack' | localize: lc}}</strong></h5>\r\n <div *ngFor=\"let wait of NodeDetails.waitstack\">\r\n >&nbsp;{{wait.nodeid}}&nbsp;-&nbsp;{{wait.nodedescription}}:&nbsp;\r\n <strong>{{'Event Type' | localize: lc}}</strong>:&nbsp;{{wait.eventtypedesc}}&nbsp;\r\n <strong>{{'Wait Class' | localize: lc}}</strong>:&nbsp;{{wait.waitclassname}}\r\n </div>\r\n </div>\r\n <div style=\"height: 200px;\">\r\n <h5 class=\"app-margin-top-10\"><strong>{{'Resources Usage' | localize: lc}}</strong></h5>\r\n <es-line-chart *ngIf=\"NodeDetails.sessionchart\"\r\n [MinGridDistance]=\"65\"\r\n [Timeline]=\"false\"\r\n [FinalInstants]=\"false\"\r\n [LegendPadding]=\"{top: 0, bottom: 7, right: 0, left: 10}\"\r\n [Fill]=\"true\"\r\n [MergeDatasets]=\"true\"\r\n [Data]=\"NodeDetails.sessionchart\"\r\n [Legend]=\"true\" \r\n name=\"nodeDetailSessionChart\"\r\n [DataGroupingThreshold]=\"99999999\"></es-line-chart>\r\n </div>\r\n <div style=\"height: 200px;\">\r\n <es-pie-chart *ngIf=\"NodeDetails.loadchart\" [Legend]=\"true\" [Data]=\"NodeDetails.loadchart\" name=\"nodeDetailLoadChart\"></es-pie-chart>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"closeDialog()\">{{'Close' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n</div>"
1684
1688
  },] }
1685
1689
  ];
1686
1690
  NodeDetailComponent.ctorParameters = function () { return [
@@ -1691,6 +1695,171 @@
1691
1695
  onClose: [{ type: core.Output }]
1692
1696
  };
1693
1697
 
1698
+ var DynamicViewsView = /** @class */ (function (_super) {
1699
+ __extends(DynamicViewsView, _super);
1700
+ function DynamicViewsView() {
1701
+ return _super.call(this) || this;
1702
+ }
1703
+ return DynamicViewsView;
1704
+ }(esTable.AppSearch));
1705
+
1706
+ var AdmDynamicViewsLoc = /** @class */ (function (_super) {
1707
+ __extends(AdmDynamicViewsLoc, _super);
1708
+ function AdmDynamicViewsLoc(LOC_LOCALE) {
1709
+ var _this = _super.call(this, LOC_LOCALE) || this;
1710
+ _super.prototype.set.call(_this, "en->it", "Search Application Dynamic Views", ["Ricerca Viste Dinamiche Applicative"]);
1711
+ _super.prototype.set.call(_this, "en->it", "Name", ["Nome"]);
1712
+ _super.prototype.set.call(_this, "en->it", "Loading Application Dynamic Views", ["Carico le Viste Dinamiche Applicative"]);
1713
+ _super.prototype.set.call(_this, "en->it", "View Name is mandatory for search operations", ["Il nome della vista è obbligatorio per le operazioni di ricerca"]);
1714
+ return _this;
1715
+ }
1716
+ return AdmDynamicViewsLoc;
1717
+ }(localizations.LocalizationService));
1718
+ AdmDynamicViewsLoc.decorators = [
1719
+ { type: core.Injectable }
1720
+ ];
1721
+ AdmDynamicViewsLoc.ctorParameters = function () { return [
1722
+ { type: String, decorators: [{ type: core.Inject, args: [ADM_LOCALE,] }] }
1723
+ ]; };
1724
+
1725
+ var AdmDynamicViewsComponent = /** @class */ (function () {
1726
+ function AdmDynamicViewsComponent(lc, intercom, localStorage, http, route, location, backend, mod) {
1727
+ this.lc = lc;
1728
+ this.intercom = intercom;
1729
+ this.localStorage = localStorage;
1730
+ this.http = http;
1731
+ this.route = route;
1732
+ this.location = location;
1733
+ this.backend = backend;
1734
+ this.mod = mod;
1735
+ this.searchView = new DynamicViewsView();
1736
+ this.Names = [];
1737
+ this.searchInProgress = false;
1738
+ this.badSearch = false;
1739
+ this.currentName = "";
1740
+ // Staccato dalla view perché deve essere distrutta e ricreata di continuo
1741
+ this.filterName = "";
1742
+ this.intercom.send(extensions.InboundMessageTypes.Navigation, { sub: false, routeTitle: this.lc.loc(this.route.snapshot.data["title"]) });
1743
+ }
1744
+ AdmDynamicViewsComponent.prototype.ngOnInit = function () {
1745
+ var _this = this;
1746
+ this.http.get(Repository.GET_Adm_GetDynamicViews).subscribe(function (t) { _this.Names = t; });
1747
+ this.storageSub = this.route.queryParams.subscribe(function (params) { _this.Init(params["ignoreStorage"]); });
1748
+ };
1749
+ AdmDynamicViewsComponent.prototype.ngOnDestroy = function () {
1750
+ if (this.storageSub)
1751
+ this.storageSub.unsubscribe();
1752
+ };
1753
+ AdmDynamicViewsComponent.prototype.Init = function (ignoreStorage) {
1754
+ return __awaiter(this, void 0, void 0, function () {
1755
+ var item;
1756
+ return __generator(this, function (_a) {
1757
+ switch (_a.label) {
1758
+ case 0: return [4 /*yield*/, this.localStorage.getItem("HotDinamitato").toPromise()];
1759
+ case 1:
1760
+ item = _a.sent();
1761
+ if (!(!ignoreStorage && item)) return [3 /*break*/, 2];
1762
+ this.init(item);
1763
+ return [3 /*break*/, 4];
1764
+ case 2:
1765
+ this.init(null);
1766
+ this.location.replaceState("/pages/" + this.mod + "/serverviews");
1767
+ this.route.snapshot.queryParams = [];
1768
+ return [4 /*yield*/, this.localStorage.removeItem("HotDinamitato").toPromise()];
1769
+ case 3:
1770
+ _a.sent();
1771
+ _a.label = 4;
1772
+ case 4: return [2 /*return*/];
1773
+ }
1774
+ });
1775
+ });
1776
+ };
1777
+ AdmDynamicViewsComponent.prototype.init = function (HotPotato) {
1778
+ //Se ho la HotPotato vuol dire che sono appena tornato dall'edit/nuovo. Rifaccio la ricerca in base ai filtri precedenti
1779
+ //Altirmenti genero il modello nuovo normalmente
1780
+ if (HotPotato) {
1781
+ this.searchView = HotPotato;
1782
+ this.POSTGetItems(this.backend + Repository.POST_Adm_GetDynamicViewData, this.searchView);
1783
+ }
1784
+ else {
1785
+ this.searchView = new DynamicViewsView();
1786
+ this.sendSearch();
1787
+ }
1788
+ };
1789
+ AdmDynamicViewsComponent.prototype.sendSearch = function (resetPage) {
1790
+ if (resetPage === void 0) { resetPage = true; }
1791
+ this.searchInProgress = true;
1792
+ if (resetPage)
1793
+ this.searchView.page = 1;
1794
+ this.searchView.filtername = this.filterName;
1795
+ this.POSTGetItems(this.backend + Repository.POST_Adm_GetDynamicViewData, this.searchView);
1796
+ };
1797
+ AdmDynamicViewsComponent.prototype.POSTGetItems = function (url, data) {
1798
+ var _this = this;
1799
+ if (!this.searchView.filtername) {
1800
+ this.badSearch = true;
1801
+ this.searchView.reset();
1802
+ //Aggiorno il riferimento per refreshare la es-table
1803
+ this.searchView = JSON.parse(JSON.stringify(this.searchView));
1804
+ return;
1805
+ }
1806
+ else
1807
+ this.badSearch = false;
1808
+ // Per force-resettare l'estable
1809
+ if (this.currentName != this.searchView.filtername) {
1810
+ this.searchView = null;
1811
+ this.currentName = this.searchView.filtername;
1812
+ }
1813
+ this.http.post(url, data).subscribe(function (t) {
1814
+ _this.searchView = t;
1815
+ _this.searchInProgress = false;
1816
+ _this.localStorage.setItem("HotDinamitato", _this.searchView).subscribe();
1817
+ });
1818
+ };
1819
+ return AdmDynamicViewsComponent;
1820
+ }());
1821
+ AdmDynamicViewsComponent.decorators = [
1822
+ { type: core.Component, args: [{
1823
+ selector: "adm_dynamic_views",
1824
+ viewProviders: [{ provide: localizations.LocalizationService, useClass: AdmDynamicViewsLoc }],
1825
+ template: "<div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"card app-overflow-visible\" widget>\r\n <div class=\"card-header\">\r\n <span class=\"text-uppercase\">{{'Search Application Dynamic Views' | localize : lc}}</span>\r\n </div>\r\n <div class=\"card-body widget-body\">\r\n <div class=\"col-md-12 bottom-15\">\r\n <form role=\"form\">\r\n <div class=\"row app-first-filter-line\">\r\n <div class=\"col-xl-2 col-lg-2 col-md-12 app-filter-wrapper\">\r\n <form-select [FormLayout]=\"false\" [Validation]=\"false\" [(ngModel)]=\"filterName\" name=\"filtername\" [Source]=\"Names\" [SelectLabel]=\"'Name' | localize : lc\"></form-select>\r\n </div>\r\n <button class=\"input-group-addon btn app-btn-search app-margin-top-20\" (click)=\"sendSearch()\" type=\"submit\"><i class=\"fa fa-search\"></i></button>\r\n </div>\r\n </form>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <div *ngIf=\"badSearch\" class=\"card card-info app-white-text app-padding-10\">{{'View Name is mandatory for search operations' | localize : lc}}</div>\r\n <ng-container *ngIf=\"!badSearch\">\r\n <p *ngIf=\"!searchView\"><em>{{'Loading Application Dynamic Views' | localize : lc}}...</em></p>\r\n <div *ngIf=\"searchView\">\r\n <es-table [(ngModel)]=\"searchView\" [AutoUpdate]=\"true\" [OrderByColumn]=\"true\" (onSearchRequest)=\"sendSearch($event);\"></es-table>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>"
1826
+ },] }
1827
+ ];
1828
+ AdmDynamicViewsComponent.ctorParameters = function () { return [
1829
+ { type: localizations.LocalizationService },
1830
+ { type: extensions.InterComService },
1831
+ { type: preferences.PreferencesService },
1832
+ { type: httpservice.HTTPService },
1833
+ { type: router.ActivatedRoute },
1834
+ { type: common.Location },
1835
+ { type: String, decorators: [{ type: core.Inject, args: [ADM_BACKEND_URL,] }] },
1836
+ { type: String, decorators: [{ type: core.Inject, args: [ADM_MODULE_PATH,] }] }
1837
+ ]; };
1838
+
1839
+ // Angular
1840
+ var FormatTimePipe = /** @class */ (function () {
1841
+ function FormatTimePipe() {
1842
+ }
1843
+ FormatTimePipe.prototype.transform = function (value) {
1844
+ return this.secondsToHms(value);
1845
+ };
1846
+ FormatTimePipe.prototype.secondsToHms = function (d) {
1847
+ d = Number(d);
1848
+ var h = Math.floor(d / 3600);
1849
+ var m = Math.floor(d % 3600 / 60);
1850
+ var s = Math.floor(d % 3600 % 60);
1851
+ var hDisplay = h > 0 ? h + " h, " : "";
1852
+ var mDisplay = m > 0 ? m + " min, " : "";
1853
+ var sDisplay = s > 0 ? s + " sec" : "";
1854
+ return hDisplay + mDisplay + sDisplay;
1855
+ };
1856
+ return FormatTimePipe;
1857
+ }());
1858
+ FormatTimePipe.decorators = [
1859
+ { type: core.Pipe, args: [{ name: 'format_time' },] }
1860
+ ];
1861
+ FormatTimePipe.ctorParameters = function () { return []; };
1862
+
1694
1863
  /** Chiave di questo modulo, da utilizzare per i messaggi */
1695
1864
  var MK_ADM = "EsAdminModule";
1696
1865
  (function (AdmMessageTypes) {
@@ -1724,7 +1893,7 @@
1724
1893
  { type: extensions.InterComService }
1725
1894
  ]; };
1726
1895
 
1727
- var ɵ0 = { title: "Search Application Processes", internalNavigation: false }, ɵ1 = { title: "Server Profiler", internalNavigation: false }, ɵ2 = { title: "Top Activities", internalNavigation: false }, ɵ3 = { title: "System Metrics", internalNavigation: false }, ɵ4 = { title: "Server Logs", internalNavigation: false }, ɵ5 = { title: "Search Application Audits", internalNavigation: false }, ɵ6 = { title: "Search Application Locks", internalNavigation: false };
1896
+ var ɵ0 = { title: "Search Application Processes", internalNavigation: false }, ɵ1 = { title: "Server Profiler", internalNavigation: false }, ɵ2 = { title: "Top Activities", internalNavigation: false }, ɵ3 = { title: "System Metrics", internalNavigation: false }, ɵ4 = { title: "Server Logs", internalNavigation: false }, ɵ5 = { title: "Search Application Audits", internalNavigation: false }, ɵ6 = { title: "Search Application Locks", internalNavigation: false }, ɵ7 = { title: "Search Application Dynamic Views", internalNavigation: false };
1728
1897
  var routeConfig = [
1729
1898
  {
1730
1899
  path: "",
@@ -1735,7 +1904,8 @@
1735
1904
  { path: "metrics", component: AdmMetricsComponent, data: ɵ3 },
1736
1905
  { path: "serverlogs", component: AdmLogsComponent, data: ɵ4 },
1737
1906
  { path: "serveraudits", component: AdmAuditsComponent, data: ɵ5 },
1738
- { path: "serverenqueues", component: AdmEnqComponent, data: ɵ6 }
1907
+ { path: "serverenqueues", component: AdmEnqComponent, data: ɵ6 },
1908
+ { path: "serverviews", component: AdmDynamicViewsComponent, data: ɵ7 }
1739
1909
  ]
1740
1910
  }
1741
1911
  ];
@@ -1767,13 +1937,17 @@
1767
1937
  AdmWrkComponent,
1768
1938
  AdmProfilerComponent,
1769
1939
  AdmTopActivitiesComponent,
1940
+ AdmDynamicViewsComponent,
1770
1941
  AdmLogsComponent,
1771
1942
  AdmAuditsComponent,
1772
1943
  AdmEnqComponent,
1773
1944
  AdmMetricsComponent,
1774
1945
  NodeDetailComponent
1775
1946
  ];
1776
- var ɵ7 = myconfig.LOCALE, ɵ8 = myconfig.BACKEND_URL, ɵ9 = !!myconfig.TRANSACTIONS_TIMEOUT_S;
1947
+ var PIPES = [
1948
+ FormatTimePipe
1949
+ ];
1950
+ var ɵ8 = myconfig.LOCALE, ɵ9 = myconfig.BACKEND_URL, ɵ10 = !!myconfig.TRANSACTIONS_TIMEOUT_S;
1777
1951
  var AdmModule = /** @class */ (function () {
1778
1952
  function AdmModule(commService) {
1779
1953
  this.commService = commService;
@@ -1785,12 +1959,12 @@
1785
1959
  AdmModule.decorators = [
1786
1960
  { type: core.NgModule, args: [{
1787
1961
  imports: __spread(MODULES),
1788
- declarations: __spread(COMPONENTS),
1962
+ declarations: __spread(COMPONENTS, PIPES),
1789
1963
  providers: [
1790
1964
  AdminModuleCommService,
1791
- { provide: ADM_LOCALE, useValue: ɵ7 },
1792
- { provide: ADM_BACKEND_URL, useValue: ɵ8 },
1793
- { provide: ADM_CONVERSATIONS, useValue: ɵ9 }
1965
+ { provide: ADM_LOCALE, useValue: ɵ8 },
1966
+ { provide: ADM_BACKEND_URL, useValue: ɵ9 },
1967
+ { provide: ADM_CONVERSATIONS, useValue: ɵ10 }
1794
1968
  ]
1795
1969
  },] }
1796
1970
  ];
@@ -1811,6 +1985,7 @@
1811
1985
  exports.routeConfig = routeConfig;
1812
1986
  exports.ɵ0 = ɵ0;
1813
1987
  exports.ɵ1 = ɵ1;
1988
+ exports.ɵ10 = ɵ10;
1814
1989
  exports.ɵ2 = ɵ2;
1815
1990
  exports.ɵ3 = ɵ3;
1816
1991
  exports.ɵ4 = ɵ4;
@@ -1833,9 +2008,12 @@
1833
2008
  exports.ɵl = AdmAuditLoc;
1834
2009
  exports.ɵm = AdmEnqComponent;
1835
2010
  exports.ɵn = AdmEnqLoc;
1836
- exports.ɵo = NodeDetailComponent;
1837
- exports.ɵp = NodeDetailLoc;
1838
- exports.ɵq = AdminModuleCommService;
2011
+ exports.ɵo = AdmDynamicViewsComponent;
2012
+ exports.ɵp = AdmDynamicViewsLoc;
2013
+ exports.ɵq = NodeDetailComponent;
2014
+ exports.ɵr = NodeDetailLoc;
2015
+ exports.ɵs = FormatTimePipe;
2016
+ exports.ɵt = AdminModuleCommService;
1839
2017
 
1840
2018
  Object.defineProperty(exports, '__esModule', { value: true });
1841
2019