@esfaenza/admin-module 15.2.47 → 15.2.48

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.
@@ -86,6 +86,7 @@ const GET_Director_GetWorkloadReport = "/api/Director/GetWorkloadReport";
86
86
  const POST_Director_GetServerAudits = "/api/Director/GetServerAudits";
87
87
  const POST_Director_GetDynamicViewData = "/api/Director/GetDynamicViewData";
88
88
  const POST_Director_GetServerLocks = "/api/Director/GetServerLocks";
89
+ const POST_Director_GetServerQuery = "/api/Director/GetServerQuery";
89
90
  const GET_Director_GetServerLogs = "/api/Director/GetServerLogs";
90
91
  const GET_Director_GetDynamicViews = "/api/Director/GetDynamicViews";
91
92
  const POST_Director_GetServerWorkers = "/api/Director/GetServerWorkers";
@@ -180,6 +181,10 @@ class AdminModuleBaseService {
180
181
  let ret = await firstValueFrom(this.http.post(POST_Director_GetServerLocks, sv));
181
182
  return ret;
182
183
  }
184
+ async getServerQuery(sv) {
185
+ let ret = await firstValueFrom(this.http.post(POST_Director_GetServerQuery, sv));
186
+ return ret;
187
+ }
183
188
  async getDynamicViewData(sv) {
184
189
  let ret = await firstValueFrom(this.http.post(POST_Director_GetDynamicViewData, sv));
185
190
  return ret;
@@ -1449,6 +1454,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1449
1454
  args: [ADM_MODULE_PATH]
1450
1455
  }] }]; } });
1451
1456
 
1457
+ class QueryView extends AppSearch {
1458
+ constructor() { super(); }
1459
+ }
1460
+
1461
+ class MtdQueryLoc extends LocalizationService {
1462
+ constructor(injector) {
1463
+ super(injector);
1464
+ super.set("it->en", "Esecuzione Query Metadati", ["Metadata Query Execution"]);
1465
+ super.set("it->en", "Query", ["Query"]);
1466
+ super.set("it->en", "Carico i Risultati", ["Loading Results"]);
1467
+ }
1468
+ }
1469
+ MtdQueryLoc.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MtdQueryLoc, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
1470
+ MtdQueryLoc.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MtdQueryLoc });
1471
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MtdQueryLoc, decorators: [{
1472
+ type: Injectable
1473
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
1474
+
1475
+ // Angular
1476
+ class MtdQueryComponent {
1477
+ constructor(lc, localStorage, expExts, intercom, route, location, adms, mod) {
1478
+ this.lc = lc;
1479
+ this.localStorage = localStorage;
1480
+ this.expExts = expExts;
1481
+ this.intercom = intercom;
1482
+ this.route = route;
1483
+ this.location = location;
1484
+ this.adms = adms;
1485
+ this.mod = mod;
1486
+ this.searchView = new QueryView();
1487
+ this.intercom.send(InboundMessageTypes.Navigation, { sub: false, routeTitle: this.lc.loc(this.route.snapshot.data["title"]) });
1488
+ }
1489
+ ngOnInit() {
1490
+ this.storageSub = this.route.queryParams.subscribe(params => { this.Init(params["ignoreStorage"]); });
1491
+ }
1492
+ ngOnDestroy() {
1493
+ if (this.storageSub)
1494
+ this.storageSub.unsubscribe();
1495
+ }
1496
+ async Init(ignoreStorage) {
1497
+ let item = await this.localStorage.getItem("HotQuery").toPromise();
1498
+ if (!ignoreStorage && item) {
1499
+ this.init(item);
1500
+ }
1501
+ else {
1502
+ this.init(null);
1503
+ this.location.replaceState(`/pages/${this.mod}/metadataquery`);
1504
+ this.route.snapshot.queryParams = [];
1505
+ await this.localStorage.removeItem("HotQuery").toPromise();
1506
+ }
1507
+ }
1508
+ init(HotPotato) {
1509
+ if (HotPotato) {
1510
+ this.searchView = HotPotato;
1511
+ this.POSTGetSearch(this.searchView);
1512
+ }
1513
+ else {
1514
+ this.searchView = new QueryView();
1515
+ this.sendSearch();
1516
+ }
1517
+ }
1518
+ sendSearch(resetPage = true) {
1519
+ if (resetPage)
1520
+ this.searchView.page = 1;
1521
+ this.POSTGetSearch(this.searchView);
1522
+ }
1523
+ async POSTGetSearch(data) {
1524
+ this.searchView = await this.adms.getServerQuery(data);
1525
+ this.searchView.searchinprogress = false;
1526
+ this.localStorage.setItem("HotEnqueue", this.searchView).subscribe();
1527
+ }
1528
+ async prepareExport(callback) {
1529
+ var view = JSON.parse(JSON.stringify(this.searchView));
1530
+ view.page = 1;
1531
+ view.itemsperpageoverride = 9999999;
1532
+ let tmp = await this.adms.getServerLocks(view);
1533
+ callback(tmp.items, GenericItem);
1534
+ }
1535
+ }
1536
+ MtdQueryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MtdQueryComponent, deps: [{ token: i1.LocalizationService }, { token: i3.PreferencesService }, { token: i1$1.ExportService }, { token: i1$1.InterComService }, { token: i4.ActivatedRoute }, { token: i5.Location }, { token: AdminModuleBaseService }, { token: ADM_MODULE_PATH }], target: i0.ɵɵFactoryTarget.Component });
1537
+ MtdQueryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MtdQueryComponent, selector: "adm_mtd_query", ngImport: i0, 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\">{{'Esecuzione Query Metadati' | localize: lc}}</span>\r\n </div>\r\n <div class=\"card-body widget-body\">\r\n <form role=\"form\">\r\n <div class=\"col-md-12 row app-first-filter-line\">\r\n <div class=\"col-xl-11 col-lg-11 col-md-11 app-filter-wrapper\">\r\n <form-textarea [Rows]=\"3\" [FormLayout]=\"false\" [Validation]=\"false\" [(ngModel)]=\"searchView.filterquery\" name=\"filterquery\" [Placeholder]=\"'Query'\"></form-textarea>\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 class=\"row\">\r\n <div class=\"col-md-12\">\r\n <p *ngIf=\"!searchView\"><em>{{'Carico i Risultati' | localize: lc}}...</em></p>\r\n <div *ngIf=\"searchView\">\r\n <es-table [(ngModel)]=\"searchView\" [AutoUpdate]=\"true\" [OrderByColumn]=\"true\" (onSearchRequest)=\"sendSearch($event);\" [ExportFileName]=\"'Results.csv'\" [ExportFunction]=\"prepareExport.bind(this)\"></es-table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i9.EsTableComponent, selector: "es-table", inputs: ["EsTableTemplate", "CornerMenuOptions", "ColumnsResizable", "ColumnsPinnable", "AutoUpdate", "Height", "EmptySpaceBackgroundColor", "EsTableHandledSearch", "MaxHeight", "ContainerClass", "XLSXExport", "CSVExport", "AllSearch", "HighCellDensity", "Selection", "ShowLoadingOnBootstrap", "Removal", "RemovalCondition", "Export", "ShiftClick", "CountLabel", "HidePaging", "HidePagingCount", "HidePagingButtons", "ContextMenu", "ExportFileName", "TableClass", "ExportFunction", "ExportOnlyVisibleColumns", "HasHeaderGroup", "HasSecondaryHeaderGroup", "HeaderHidden", "BodyHidden", "SelectionDisabled", "SingleSelection", "RowClassAssigner", "OrderByColumn", "MultipleOrderingDirectives", "HiddenColumns", "ColumnsOrdering", "SearchView", "SelectAll", "UseArrayModePaging", "DynamicRowColumnsDefinition", "DynamicOperations", "Hierarchy", "ParentKey", "OwnKey", "StartsExpanded", "SavePreferences", "DefaultAlignment", "PagingStyle", "RowGroupingPagingStyle", "ItemSourceProperty", "UseSelectionCache", "ShowItemGroupsColumns", "Editable", "RangeSelection", "SearchThrottle", "ArraymodeItemsPerPage"], outputs: ["onOrderChanged", "onSearchRequest", "onSelectionChanged", "onRemoval", "onAbortRemoval", "onModelChange", "onOpenContextMenu", "onCornerAction", "onDynamicOperation"] }, { kind: "component", type: i9$1.FormTextareaComponent, selector: "form-textarea", inputs: ["Rows"] }, { kind: "pipe", type: i1.LocalizePipe, name: "localize" }], viewProviders: [{ provide: LocalizationService, useClass: MtdQueryLoc }] });
1538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MtdQueryComponent, decorators: [{
1539
+ type: Component,
1540
+ args: [{ selector: "adm_mtd_query", viewProviders: [{ provide: LocalizationService, useClass: MtdQueryLoc }], 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\">{{'Esecuzione Query Metadati' | localize: lc}}</span>\r\n </div>\r\n <div class=\"card-body widget-body\">\r\n <form role=\"form\">\r\n <div class=\"col-md-12 row app-first-filter-line\">\r\n <div class=\"col-xl-11 col-lg-11 col-md-11 app-filter-wrapper\">\r\n <form-textarea [Rows]=\"3\" [FormLayout]=\"false\" [Validation]=\"false\" [(ngModel)]=\"searchView.filterquery\" name=\"filterquery\" [Placeholder]=\"'Query'\"></form-textarea>\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 class=\"row\">\r\n <div class=\"col-md-12\">\r\n <p *ngIf=\"!searchView\"><em>{{'Carico i Risultati' | localize: lc}}...</em></p>\r\n <div *ngIf=\"searchView\">\r\n <es-table [(ngModel)]=\"searchView\" [AutoUpdate]=\"true\" [OrderByColumn]=\"true\" (onSearchRequest)=\"sendSearch($event);\" [ExportFileName]=\"'Results.csv'\" [ExportFunction]=\"prepareExport.bind(this)\"></es-table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>" }]
1541
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i3.PreferencesService }, { type: i1$1.ExportService }, { type: i1$1.InterComService }, { type: i4.ActivatedRoute }, { type: i5.Location }, { type: AdminModuleBaseService }, { type: undefined, decorators: [{
1542
+ type: Inject,
1543
+ args: [ADM_MODULE_PATH]
1544
+ }] }]; } });
1545
+
1452
1546
  // Angular
1453
1547
  class FormatTimePipe {
1454
1548
  constructor() { }
@@ -1516,7 +1610,8 @@ const routeConfig = [
1516
1610
  { path: "serverlogs", component: AdmLogsComponent, data: { title: "Log del Server", internalNavigation: false } },
1517
1611
  { path: "serveraudits", component: AdmAuditsComponent, data: { title: "Ricerca Audit Applicativi", internalNavigation: false } },
1518
1612
  { path: "serverenqueues", component: AdmEnqComponent, data: { title: "Ricerca Lock Applicativi", internalNavigation: false } },
1519
- { path: "serverviews", component: AdmDynamicViewsComponent, data: { title: "Ricerca Viste Dinamiche Applicative", internalNavigation: false } }
1613
+ { path: "serverviews", component: AdmDynamicViewsComponent, data: { title: "Ricerca Viste Dinamiche Applicative", internalNavigation: false } },
1614
+ { path: "metadataquery", component: MtdQueryComponent, data: { title: "Ricerca Viste Dinamiche Applicative", internalNavigation: false } }
1520
1615
  ]
1521
1616
  }
1522
1617
  ];
@@ -1553,7 +1648,8 @@ const COMPONENTS = [
1553
1648
  AdmAuditsComponent,
1554
1649
  AdmEnqComponent,
1555
1650
  AdmMetricsComponent,
1556
- NodeDetailComponent
1651
+ NodeDetailComponent,
1652
+ MtdQueryComponent
1557
1653
  ];
1558
1654
  const PIPES = [
1559
1655
  FormatTimePipe
@@ -1574,7 +1670,8 @@ AdmModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
1574
1670
  AdmAuditsComponent,
1575
1671
  AdmEnqComponent,
1576
1672
  AdmMetricsComponent,
1577
- NodeDetailComponent, FormatTimePipe], imports: [
1673
+ NodeDetailComponent,
1674
+ MtdQueryComponent, FormatTimePipe], imports: [
1578
1675
  // Base
1579
1676
  CommonModule,
1580
1677
  FormsModule,