@esfaenza/admin-module 15.2.47 → 15.2.49

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,97 @@ 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
+ if (!this.searchView.filterquery)
1522
+ return;
1523
+ this.POSTGetSearch(this.searchView);
1524
+ }
1525
+ async POSTGetSearch(data) {
1526
+ this.searchView = await this.adms.getServerQuery(data);
1527
+ this.searchView.searchinprogress = false;
1528
+ this.localStorage.setItem("HotEnqueue", this.searchView).subscribe();
1529
+ }
1530
+ async prepareExport(callback) {
1531
+ var view = JSON.parse(JSON.stringify(this.searchView));
1532
+ view.page = 1;
1533
+ view.itemsperpageoverride = 9999999;
1534
+ let tmp = await this.adms.getServerLocks(view);
1535
+ callback(tmp.items, GenericItem);
1536
+ }
1537
+ }
1538
+ 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 });
1539
+ 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 }] });
1540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MtdQueryComponent, decorators: [{
1541
+ type: Component,
1542
+ 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>" }]
1543
+ }], 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: [{
1544
+ type: Inject,
1545
+ args: [ADM_MODULE_PATH]
1546
+ }] }]; } });
1547
+
1452
1548
  // Angular
1453
1549
  class FormatTimePipe {
1454
1550
  constructor() { }
@@ -1516,7 +1612,8 @@ const routeConfig = [
1516
1612
  { path: "serverlogs", component: AdmLogsComponent, data: { title: "Log del Server", internalNavigation: false } },
1517
1613
  { path: "serveraudits", component: AdmAuditsComponent, data: { title: "Ricerca Audit Applicativi", internalNavigation: false } },
1518
1614
  { path: "serverenqueues", component: AdmEnqComponent, data: { title: "Ricerca Lock Applicativi", internalNavigation: false } },
1519
- { path: "serverviews", component: AdmDynamicViewsComponent, data: { title: "Ricerca Viste Dinamiche Applicative", internalNavigation: false } }
1615
+ { path: "serverviews", component: AdmDynamicViewsComponent, data: { title: "Ricerca Viste Dinamiche Applicative", internalNavigation: false } },
1616
+ { path: "metadataquery", component: MtdQueryComponent, data: { title: "Ricerca Viste Dinamiche Applicative", internalNavigation: false } }
1520
1617
  ]
1521
1618
  }
1522
1619
  ];
@@ -1553,7 +1650,8 @@ const COMPONENTS = [
1553
1650
  AdmAuditsComponent,
1554
1651
  AdmEnqComponent,
1555
1652
  AdmMetricsComponent,
1556
- NodeDetailComponent
1653
+ NodeDetailComponent,
1654
+ MtdQueryComponent
1557
1655
  ];
1558
1656
  const PIPES = [
1559
1657
  FormatTimePipe
@@ -1574,7 +1672,8 @@ AdmModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
1574
1672
  AdmAuditsComponent,
1575
1673
  AdmEnqComponent,
1576
1674
  AdmMetricsComponent,
1577
- NodeDetailComponent, FormatTimePipe], imports: [
1675
+ NodeDetailComponent,
1676
+ MtdQueryComponent, FormatTimePipe], imports: [
1578
1677
  // Base
1579
1678
  CommonModule,
1580
1679
  FormsModule,