@firestitch/system 12.5.6 → 13.0.1

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 (81) hide show
  1. package/esm2020/app/modules/query-logs/components/explain/explain.component.mjs +24 -0
  2. package/esm2020/app/modules/query-logs/components/query-log/query-log.component.mjs +58 -0
  3. package/esm2020/app/modules/query-logs/components/query-logs/query-logs.component.mjs +84 -0
  4. package/{esm2015/app/modules/query-logs/query-logs.module.js → esm2020/app/modules/query-logs/query-logs.module.mjs} +5 -5
  5. package/esm2020/app/modules/system/components/api-log/api-log.component.mjs +34 -0
  6. package/esm2020/app/modules/system/components/api-logs/api-logs.component.mjs +69 -0
  7. package/esm2020/app/modules/system/components/cron/cron.component.mjs +104 -0
  8. package/esm2020/app/modules/system/components/cron-log/cron-log.component.mjs +37 -0
  9. package/esm2020/app/modules/system/components/crons/crons.component.mjs +231 -0
  10. package/esm2020/app/modules/system/components/dashboard/dashboard.component.mjs +84 -0
  11. package/esm2020/app/modules/system/components/info/info.component.mjs +31 -0
  12. package/esm2020/app/modules/system/components/process/process.component.mjs +62 -0
  13. package/esm2020/app/modules/system/components/processes/processes.component.mjs +174 -0
  14. package/esm2020/app/modules/system/components/server-log/server-log.component.mjs +38 -0
  15. package/esm2020/app/modules/system/components/server-logs/server-logs.component.mjs +53 -0
  16. package/esm2020/app/modules/system/components/settings/settings.component.mjs +138 -0
  17. package/esm2020/app/modules/system/components/upgrade-logs/upgrade-logs.component.mjs +44 -0
  18. package/{esm2015/app/modules/system/fs-system.module.js → esm2020/app/modules/system/fs-system.module.mjs} +5 -5
  19. package/{esm2015/app/modules/system/pipes/key-name-value.pipe.js → esm2020/app/modules/system/pipes/key-name-value.pipe.mjs} +5 -5
  20. package/fesm2015/firestitch-system.mjs +1447 -0
  21. package/fesm2015/firestitch-system.mjs.map +1 -0
  22. package/fesm2020/firestitch-system.mjs +1449 -0
  23. package/fesm2020/firestitch-system.mjs.map +1 -0
  24. package/package.json +20 -7
  25. package/styles.scss +3 -0
  26. package/bundles/firestitch-system.umd.js +0 -1904
  27. package/bundles/firestitch-system.umd.js.map +0 -1
  28. package/esm2015/app/modules/query-logs/components/explain/explain.component.js +0 -27
  29. package/esm2015/app/modules/query-logs/components/query-log/query-log.component.js +0 -63
  30. package/esm2015/app/modules/query-logs/components/query-logs/query-logs.component.js +0 -89
  31. package/esm2015/app/modules/system/components/api-log/api-log.component.js +0 -37
  32. package/esm2015/app/modules/system/components/api-logs/api-logs.component.js +0 -73
  33. package/esm2015/app/modules/system/components/cron/cron.component.js +0 -102
  34. package/esm2015/app/modules/system/components/cron-log/cron-log.component.js +0 -40
  35. package/esm2015/app/modules/system/components/crons/crons.component.js +0 -229
  36. package/esm2015/app/modules/system/components/dashboard/dashboard.component.js +0 -89
  37. package/esm2015/app/modules/system/components/info/info.component.js +0 -36
  38. package/esm2015/app/modules/system/components/process/process.component.js +0 -66
  39. package/esm2015/app/modules/system/components/processes/processes.component.js +0 -179
  40. package/esm2015/app/modules/system/components/server-log/server-log.component.js +0 -41
  41. package/esm2015/app/modules/system/components/server-logs/server-logs.component.js +0 -57
  42. package/esm2015/app/modules/system/components/settings/settings.component.js +0 -137
  43. package/esm2015/app/modules/system/components/upgrade-logs/upgrade-logs.component.js +0 -48
  44. package/fesm2015/firestitch-system.js +0 -1498
  45. package/fesm2015/firestitch-system.js.map +0 -1
  46. /package/{esm2015/app/modules/query-logs/components/explain/index.js → esm2020/app/modules/query-logs/components/explain/index.mjs} +0 -0
  47. /package/{esm2015/app/modules/query-logs/components/index.js → esm2020/app/modules/query-logs/components/index.mjs} +0 -0
  48. /package/{esm2015/app/modules/query-logs/components/query-log/index.js → esm2020/app/modules/query-logs/components/query-log/index.mjs} +0 -0
  49. /package/{esm2015/app/modules/query-logs/components/query-logs/index.js → esm2020/app/modules/query-logs/components/query-logs/index.mjs} +0 -0
  50. /package/{esm2015/app/modules/system/components/api-log/index.js → esm2020/app/modules/system/components/api-log/index.mjs} +0 -0
  51. /package/{esm2015/app/modules/system/components/api-logs/index.js → esm2020/app/modules/system/components/api-logs/index.mjs} +0 -0
  52. /package/{esm2015/app/modules/system/components/cron/index.js → esm2020/app/modules/system/components/cron/index.mjs} +0 -0
  53. /package/{esm2015/app/modules/system/components/cron-log/index.js → esm2020/app/modules/system/components/cron-log/index.mjs} +0 -0
  54. /package/{esm2015/app/modules/system/components/crons/index.js → esm2020/app/modules/system/components/crons/index.mjs} +0 -0
  55. /package/{esm2015/app/modules/system/components/dashboard/index.js → esm2020/app/modules/system/components/dashboard/index.mjs} +0 -0
  56. /package/{esm2015/app/modules/system/components/info/index.js → esm2020/app/modules/system/components/info/index.mjs} +0 -0
  57. /package/{esm2015/app/modules/system/components/process/index.js → esm2020/app/modules/system/components/process/index.mjs} +0 -0
  58. /package/{esm2015/app/modules/system/components/processes/index.js → esm2020/app/modules/system/components/processes/index.mjs} +0 -0
  59. /package/{esm2015/app/modules/system/components/server-log/index.js → esm2020/app/modules/system/components/server-log/index.mjs} +0 -0
  60. /package/{esm2015/app/modules/system/components/server-logs/index.js → esm2020/app/modules/system/components/server-logs/index.mjs} +0 -0
  61. /package/{esm2015/app/modules/system/components/settings/index.js → esm2020/app/modules/system/components/settings/index.mjs} +0 -0
  62. /package/{esm2015/app/modules/system/components/upgrade-logs/index.js → esm2020/app/modules/system/components/upgrade-logs/index.mjs} +0 -0
  63. /package/{esm2015/app/modules/system/consts/api-log-states.const.js → esm2020/app/modules/system/consts/api-log-states.const.mjs} +0 -0
  64. /package/{esm2015/app/modules/system/consts/cron-log-states.const.js → esm2020/app/modules/system/consts/cron-log-states.const.mjs} +0 -0
  65. /package/{esm2015/app/modules/system/consts/cron-states.const.js → esm2020/app/modules/system/consts/cron-states.const.mjs} +0 -0
  66. /package/{esm2015/app/modules/system/consts/index.js → esm2020/app/modules/system/consts/index.mjs} +0 -0
  67. /package/{esm2015/app/modules/system/consts/process-states.const.js → esm2020/app/modules/system/consts/process-states.const.mjs} +0 -0
  68. /package/{esm2015/app/modules/system/enums/api-log-state.enum.js → esm2020/app/modules/system/enums/api-log-state.enum.mjs} +0 -0
  69. /package/{esm2015/app/modules/system/enums/cron-log-state.enum.js → esm2020/app/modules/system/enums/cron-log-state.enum.mjs} +0 -0
  70. /package/{esm2015/app/modules/system/enums/cron-state.enum.js → esm2020/app/modules/system/enums/cron-state.enum.mjs} +0 -0
  71. /package/{esm2015/app/modules/system/enums/index.js → esm2020/app/modules/system/enums/index.mjs} +0 -0
  72. /package/{esm2015/app/modules/system/enums/process-state.enum.js → esm2020/app/modules/system/enums/process-state.enum.mjs} +0 -0
  73. /package/{esm2015/app/modules/system/enums/setting-interface-type.enum.js → esm2020/app/modules/system/enums/setting-interface-type.enum.mjs} +0 -0
  74. /package/{esm2015/app/modules/system/helpers/index-name-value.js → esm2020/app/modules/system/helpers/index-name-value.mjs} +0 -0
  75. /package/{esm2015/app/modules/system/injectors/system-config.injector.js → esm2020/app/modules/system/injectors/system-config.injector.mjs} +0 -0
  76. /package/{esm2015/app/modules/system/interfaces/dashboard-action.js → esm2020/app/modules/system/interfaces/dashboard-action.mjs} +0 -0
  77. /package/{esm2015/app/modules/system/interfaces/index.js → esm2020/app/modules/system/interfaces/index.mjs} +0 -0
  78. /package/{esm2015/app/modules/system/interfaces/process-action.js → esm2020/app/modules/system/interfaces/process-action.mjs} +0 -0
  79. /package/{esm2015/app/modules/system/interfaces/system-config.js → esm2020/app/modules/system/interfaces/system-config.mjs} +0 -0
  80. /package/{esm2015/firestitch-system.js → esm2020/firestitch-system.mjs} +0 -0
  81. /package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
@@ -1,1904 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/router'), require('@angular/material/button'), require('@angular/material/dialog'), require('@angular/material/tabs'), require('@firestitch/clipboard'), require('@firestitch/common'), require('@firestitch/date'), require('@firestitch/dialog'), require('@firestitch/form'), require('@firestitch/label'), require('@firestitch/list'), require('@firestitch/popover'), require('@firestitch/filter'), require('rxjs/operators'), require('@angular/material/expansion'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tooltip'), require('@firestitch/colorpicker'), require('@firestitch/datepicker'), require('@firestitch/file'), require('@firestitch/file-manager'), require('@firestitch/menu'), require('@firestitch/skeleton'), require('@firestitch/selection'), require('rxjs'), require('date-fns'), require('@firestitch/message'), require('@firestitch/prompt'), require('@firestitch/build'), require('@angular/material/core')) :
3
- typeof define === 'function' && define.amd ? define('@firestitch/system', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/router', '@angular/material/button', '@angular/material/dialog', '@angular/material/tabs', '@firestitch/clipboard', '@firestitch/common', '@firestitch/date', '@firestitch/dialog', '@firestitch/form', '@firestitch/label', '@firestitch/list', '@firestitch/popover', '@firestitch/filter', 'rxjs/operators', '@angular/material/expansion', '@angular/material/form-field', '@angular/material/icon', '@angular/material/input', '@angular/material/select', '@angular/material/tooltip', '@firestitch/colorpicker', '@firestitch/datepicker', '@firestitch/file', '@firestitch/file-manager', '@firestitch/menu', '@firestitch/skeleton', '@firestitch/selection', 'rxjs', 'date-fns', '@firestitch/message', '@firestitch/prompt', '@firestitch/build', '@angular/material/core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch.system = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.router, global.ng.material.button, global.ng.material.dialog, global.ng.material.tabs, global.i2$1, global.i9, global.i4$1, global.i2, global.form, global.i3, global.i2$2, global.i7, global.filter, global.rxjs.operators, global.ng.material.expansion, global.ng.material.formField, global.ng.material.icon, global.ng.material.input, global.ng.material.select, global.ng.material.tooltip, global.i11, global.i10, global.i12, global.fileManager, global.i4$2, global.i5, global.selection, global.rxjs, global.dateFns, global.i1$1, global.i3$2, global.i2$3, global.ng.material.core));
5
- })(this, (function (exports, i8, i0, i16, router, i4, i1, i3$1, i2$1, i9, i4$1, i2, form, i3, i2$2, i7, filter, operators, i4$3, i7$1, i6, i15, i8$1, i9$1, i11, i10, i12, fileManager, i4$2, i5, selection, rxjs, dateFns, i1$1, i3$2, i2$3, i9$2) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
26
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
27
- var i16__namespace = /*#__PURE__*/_interopNamespace(i16);
28
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
29
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
- var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
31
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
32
- var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
33
- var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
34
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
35
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
36
- var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
37
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
38
- var i4__namespace$3 = /*#__PURE__*/_interopNamespace(i4$3);
39
- var i7__namespace$1 = /*#__PURE__*/_interopNamespace(i7$1);
40
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
41
- var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
42
- var i8__namespace$1 = /*#__PURE__*/_interopNamespace(i8$1);
43
- var i9__namespace$1 = /*#__PURE__*/_interopNamespace(i9$1);
44
- var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
45
- var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
46
- var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
47
- var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
48
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
49
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
50
- var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
51
- var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
52
- var i9__namespace$2 = /*#__PURE__*/_interopNamespace(i9$2);
53
-
54
- var ExplainComponent = /** @class */ (function () {
55
- function ExplainComponent(_data) {
56
- this._data = _data;
57
- this.explain = _data.explain;
58
- }
59
- return ExplainComponent;
60
- }());
61
- ExplainComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ExplainComponent, deps: [{ token: i1.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
62
- ExplainComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ExplainComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>Explain</h1>\n <mat-dialog-content>\n <div class=\"explain-popover\">{{explain | json}}</div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".explain-popover{white-space:pre}\n"], components: [{ type: i2__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "json": i8__namespace.JsonPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
63
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ExplainComponent, decorators: [{
64
- type: i0.Component,
65
- args: [{
66
- templateUrl: './explain.component.html',
67
- styleUrls: ['./explain.component.scss'],
68
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
69
- }]
70
- }], ctorParameters: function () {
71
- return [{ type: undefined, decorators: [{
72
- type: i0.Inject,
73
- args: [i1.MAT_DIALOG_DATA]
74
- }] }];
75
- } });
76
-
77
- var QueryLogComponent = /** @class */ (function () {
78
- function QueryLogComponent(_data, _dialog) {
79
- this._data = _data;
80
- this._dialog = _dialog;
81
- this.accessTypes = {
82
- NULL: 'This access method means MySQL can resolve the query during the optimization phase and will not even access the table or index during the execution stage.',
83
- system: 'The table is empty or has one row.',
84
- const: 'The value of the column can be treated as a constant (there is one row matching the query). Note: Primary Key Lookup, Unique Index Lookup',
85
- eq_ref: 'The index is clustered and is being used by the operation (either the index is a PRIMARY KEY or UNIQUE INDEX with all key columns defined as NOT NULL)',
86
- ref: 'The indexed column was accessed using an equality operator Note: The ref_or_null access type is a variation on ref. It means MySQL must do a second lookup to find NULL entries after doing the initial lookup.',
87
- fulltext: 'Operation (JOIN) is using the table’s fulltext index',
88
- index: 'The entire index is scanned to find a match for the query. Note: The main advantage is that this avoids sorting. The biggest disadvantage is the cost of reading an entire table in index order. This usually means accessing the rows in random order, which is very expensive.',
89
- index_merge: 'This join type indicates that the Index Merge optimization is used. In this case, the key column in the output row contains a list of indexes used. It indicates a query can make limited use of multiple indexes on a single table.',
90
- range: 'This type replaces eq_ref for some IN subqueries of the following form: value IN (SELECT primary_key FROM single_table WHERE some_expr)',
91
- unique_subquery: '',
92
- ALL: 'MySQL scans the entire table to satisfy the query',
93
- };
94
- this.queryLog = _data.queryLog;
95
- }
96
- QueryLogComponent.prototype.openExplain = function () {
97
- this._dialog.open(ExplainComponent, {
98
- data: { explain: this.explain },
99
- });
100
- };
101
- Object.defineProperty(QueryLogComponent.prototype, "explain", {
102
- get: function () {
103
- return this.queryLog.explain;
104
- },
105
- enumerable: false,
106
- configurable: true
107
- });
108
- Object.defineProperty(QueryLogComponent.prototype, "queryBlock", {
109
- get: function () {
110
- var _a;
111
- return (_a = this.explain) === null || _a === void 0 ? void 0 : _a.queryBlock;
112
- },
113
- enumerable: false,
114
- configurable: true
115
- });
116
- Object.defineProperty(QueryLogComponent.prototype, "orderingOperation", {
117
- get: function () {
118
- var _a;
119
- return (_a = this.queryBlock) === null || _a === void 0 ? void 0 : _a.orderingOperation;
120
- },
121
- enumerable: false,
122
- configurable: true
123
- });
124
- return QueryLogComponent;
125
- }());
126
- QueryLogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueryLogComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
127
- QueryLogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueryLogComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>Query Log</h1>\n <mat-dialog-content>\n <div class=\"fs-row.gap-large\">\n <fs-label-field>\n <fs-label>Duration</fs-label>\n {{queryLog.duration}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Optimized</fs-label>\n {{queryLog.optimized ? 'Yes' : 'No'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Query Cost</fs-label>\n {{queryLog.queryCost}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Raw Explain</fs-label>\n <a (click)=\"openExplain()\">View</a>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>URL</fs-label>\n {{queryLog.path | fsFormatTruncate: 50}}\n </fs-label-field>\n </div>\n\n <mat-tab-group>\n <mat-tab label=\"Query\">\n <fs-clipboard-button\n [content]=\"queryLog.prettyQuery\">\n </fs-clipboard-button>\n <div [innerHTML]=\"queryLog.prettyQuery\" class=\"query\"></div>\n </mat-tab>\n \n <mat-tab label=\"Explain\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock, selectId: queryBlock.selectId, costInfo: queryBlock.costInfo }\"></ng-container>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n\n<ng-template #nestedLoop let-queryBlock=\"queryBlock\" let-selectId=\"selectId\" let-costInfo=\"costInfo\">\n <ng-container *ngIf=\"selectId\">\n <h1>Select {{selectId}}</h1>\n </ng-container>\n \n <div class=\"fs-row.gap-large\">\n <ng-container *ngIf=\"costInfo?.queryCost\">\n <fs-label-field>\n <fs-label>Query Cost</fs-label>\n {{costInfo.queryCost}}\n </fs-label-field>\n </ng-container>\n <ng-container *ngIf=\"queryBlock.orderingOperation\">\n <fs-label-field>\n <fs-label>Ordering Operation</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.orderingOperation }\"></ng-container>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.groupingOperation\">\n <fs-label-field>\n <fs-label>Grouping Operation</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.groupingOperation }\"></ng-container>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.duplicatesRemoval\">\n <fs-label-field>\n <fs-label>Duplicates Removal</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.duplicatesRemoval }\"></ng-container>\n </fs-label-field>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"queryBlock.orderingOperation\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.orderingOperation }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.groupingOperation\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.groupingOperation }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.duplicatesRemoval\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.duplicatesRemoval }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.table\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: { nestedLoop: [ queryBlock ]} }\"></ng-container>\n \n <ng-container *ngIf=\"queryBlock.table.attachedSubqueries\"> \n <fs-label>Attached Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.table.attachedSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container> \n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock, selectId: subquery.queryBlock.selectId, costInfo: subquery.queryBlock.costInfo }\"></ng-container>\n </ng-container>\n </ng-container> \n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.nestedLoop\">\n <table class=\"fs-list-table style-line\">\n <thead>\n <tr>\n <th>Table</th>\n <th>Type</th>\n <th>Keys</th>\n <th>Ref</th>\n <th>Rows</th>\n <th>Filtered</th>\n <th>Extra</th>\n <th>Cost</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of queryBlock.nestedLoop; let index = index\">\n <tr>\n <td>\n {{item.table.tableName}}\n </td>\n <td>\n <fs-popover [template]=\"accessTypePopover\" [data]=\"item.table.accessType\">\n <span class=\"access-type\" [ngClass]=\"item.table.accessType\">{{item.table.accessType}}</span>\n </fs-popover> \n </td>\n <td>\n <fs-popover \n [template]=\"keysPopover\"\n [maxWidth]=\"null\"\n [data]=\"{ possibleKeys: item.table.possibleKeys, key: item.table.key }\">\n {{item.table.key}}\n </fs-popover>\n </td>\n <td>\n <div class=\"fs-delimit\">\n <ng-container *ngFor=\"let ref of item.table.ref\">\n <span>{{ref}}</span>\n </ng-container>\n </div>\n </td>\n <td>\n {{item.table.rowsExaminedPerScan}}\n </td>\n <td>\n {{item.table.filtered}}\n </td>\n <td>\n <div class=\"fs-delimit\">\n <ng-container *ngIf=\"item.table.indexCondition\">\n <span>\n <fs-popover \n [template]=\"usingIndexCondition\" \n [maxWidth]=\"null\"\n [data]=\"item.table.indexCondition\">\n Using Index Condition\n </fs-popover>\n </span>\n </ng-container>\n <ng-container *ngIf=\"item.table.attachedCondition\">\n <span>\n <fs-popover \n [template]=\"usingWhere\" \n [maxWidth]=\"null\"\n [data]=\"item.table.attachedCondition\">\n Using Where\n </fs-popover>\n </span>\n </ng-container>\n <ng-container *ngIf=\"item.usingIndex\">\n <span>Using Index</span>\n </ng-container> \n <ng-container *ngIf=\"item.usingFilesort\">\n <span class=\"critical\">Using File Sort</span>\n </ng-container>\n \n <ng-container *ngIf=\"item.usingTemporaryTable\">\n <span class=\"critical\">Temporary Table</span>\n </ng-container>\n </div>\n </td>\n <td> \n <fs-popover [template]=\"tableCostPopover\" [data]=\"item.table?.costInfo\">\n {{item.table?.costInfo.prefixCost}}\n </fs-popover>\n <ng-template #tableCostPopover let-data=\"data\">\n <div>Eval Cost: {{data.evalCost}}</div>\n <div>Read Cost: {{data.readCost}}</div>\n <div>Prefix Cost: {{data.prefixCost}}</div>\n <div>Data Read Per Join: {{data.dataReadPerJoin}}</div>\n </ng-template>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <br>\n </ng-container> \n \n <ng-container *ngIf=\"queryBlock.selectListSubqueries\">\n <br>\n <fs-label>Select List Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.selectListSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container> \n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock, selectId: subquery.queryBlock.selectId, costInfo: subquery.queryBlock.costInfo }\"></ng-container>\n </ng-container>\n </ng-container>\n<!-- \n <ng-container *ngIf=\"queryBlock.queryBlockattachedSubqueries\">\n <br>\n <fs-label>Attached Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.attachedSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container>\n </ng-container>\n </ng-container> -->\n</ng-template>\n\n<ng-template #keysPopover let-data=\"data\">\n <div class=\"fs-delimit\">\n <ng-container *ngFor=\"let possibleKey of data.possibleKeys\">\n <span [ngClass]=\"{ 'query-log-used-key': possibleKey === data.key }\">{{possibleKey}}</span>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #usingWhere let-data=\"data\">\n {{data}}\n</ng-template>\n\n<ng-template #usingIndexCondition let-data=\"data\">\n {{data}}\n</ng-template>\n\n<ng-template #accessTypePopover let-data=\"data\">\n {{accessTypes[data]}}\n</ng-template>\n\n\n<ng-template #queryBlockCritical let-queryBlock=\"queryBlock\">\n <div class=\"fs-delimit\">\n <ng-container *ngIf=\"queryBlock.usingFilesort\">\n <span class=\"critical\">Using File Sort</span>\n </ng-container>\n \n <ng-container *ngIf=\"queryBlock.usingTemporaryTable\">\n <span class=\"critical\">Temporary Table</span>\n </ng-container>\n </div>\n</ng-template>", styles: ["::ng-deep .query-log-used-key{font-weight:bold}::ng-deep .explain-popover{white-space:pre}.critical{color:red}fs-clipboard-button{float:right}.query{white-space:break-spaces}.access-type{color:green}.access-type.fulltext,.access-type.index,.access-type.range{color:orange}.access-type.ALL{color:red}\n"], components: [{ type: i2__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3__namespace.FsLabelComponent, selector: "fs-label" }, { type: i3__namespace$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3__namespace$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i2__namespace$1.FsClipboardButtonComponent, selector: "fs-clipboard-button", inputs: ["content"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i7__namespace.FsPopoverComponent, selector: "fs-popover" }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fsFormatTruncate": i9__namespace.FsFormatTruncatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
128
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueryLogComponent, decorators: [{
129
- type: i0.Component,
130
- args: [{
131
- templateUrl: './query-log.component.html',
132
- styleUrls: ['./query-log.component.scss'],
133
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
134
- }]
135
- }], ctorParameters: function () {
136
- return [{ type: undefined, decorators: [{
137
- type: i0.Inject,
138
- args: [i1.MAT_DIALOG_DATA]
139
- }] }, { type: i1__namespace.MatDialog }];
140
- } });
141
-
142
- var QueryLogsComponent = /** @class */ (function () {
143
- function QueryLogsComponent(_dialog) {
144
- this._dialog = _dialog;
145
- }
146
- QueryLogsComponent.prototype.openQueryLog = function (queryLog) {
147
- this._dialog.open(QueryLogComponent, {
148
- data: { queryLog: queryLog },
149
- width: '100%',
150
- });
151
- };
152
- QueryLogsComponent.prototype.ngOnInit = function () {
153
- var _this = this;
154
- this.listConfig = {
155
- filters: [
156
- {
157
- name: 'keyword',
158
- type: filter.ItemType.Keyword,
159
- label: 'Search',
160
- },
161
- {
162
- name: 'optimized',
163
- type: filter.ItemType.Select,
164
- label: 'Optimization',
165
- values: [
166
- { name: 'Any', value: undefined },
167
- { name: 'Yes', value: 'true' },
168
- { name: 'No', value: 'false' },
169
- ],
170
- },
171
- {
172
- name: 'createDate',
173
- type: filter.ItemType.DateTimeRange,
174
- label: ['From Date', 'To Date'],
175
- },
176
- {
177
- name: 'duration',
178
- type: filter.ItemType.Range,
179
- label: ['Min Duration', 'Max Duration'],
180
- },
181
- ],
182
- actions: [
183
- {
184
- label: 'Purge',
185
- primary: false,
186
- click: function () {
187
- _this.purgeQueryLogs()
188
- .subscribe(function () {
189
- _this.list.reload();
190
- });
191
- },
192
- },
193
- ],
194
- fetch: function (query) {
195
- return _this.loadQueryLogs(query)
196
- .pipe(operators.map(function (response) { return ({ data: response.data, paging: response.paging }); }));
197
- },
198
- };
199
- };
200
- return QueryLogsComponent;
201
- }());
202
- QueryLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueryLogsComponent, deps: [{ token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
203
- QueryLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueryLogsComponent, selector: "fs-system-query-logs", inputs: { loadQueryLogs: "loadQueryLogs", purgeQueryLogs: "purgeQueryLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column title=\"Optimized\" name=\"optimized\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <span [ngClass]=\"{ optimized: row.optimized, 'not-optimized': !row.optimized }\">\n {{row.optimized ? 'Yes' : 'No'}}\n </span>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Duration\" name=\"duration\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.duration}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Cost\" name=\"query_cost\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.queryCost}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Query\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openQueryLog(row)\">{{ row.query | fsFormatTruncate: 500 }}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Created\" name=\"query_log_id\" [sortable]=\"true\" [direction]=\"'desc'\" [sortableDefault]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .optimized{color:green}:host ::ng-deep .not-optimized{color:red}\n"], components: [{ type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fsFormatTruncate": i9__namespace.FsFormatTruncatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
204
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QueryLogsComponent, decorators: [{
205
- type: i0.Component,
206
- args: [{
207
- selector: 'fs-system-query-logs',
208
- templateUrl: './query-logs.component.html',
209
- styleUrls: ['./query-logs.component.scss'],
210
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
211
- }]
212
- }], ctorParameters: function () { return [{ type: i1__namespace.MatDialog }]; }, propDecorators: { list: [{
213
- type: i0.ViewChild,
214
- args: [i2$2.FsListComponent]
215
- }], loadQueryLogs: [{
216
- type: i0.Input
217
- }], purgeQueryLogs: [{
218
- type: i0.Input
219
- }] } });
220
-
221
- var FsSystemQueryLogsModule = /** @class */ (function () {
222
- function FsSystemQueryLogsModule() {
223
- }
224
- return FsSystemQueryLogsModule;
225
- }());
226
- FsSystemQueryLogsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsSystemQueryLogsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
227
- FsSystemQueryLogsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsSystemQueryLogsModule, declarations: [QueryLogsComponent,
228
- QueryLogComponent,
229
- ExplainComponent], imports: [i8.CommonModule,
230
- router.RouterModule,
231
- i8.CommonModule,
232
- i16.FormsModule,
233
- i3$1.MatTabsModule,
234
- i4.MatButtonModule,
235
- i1.MatDialogModule,
236
- form.FsFormModule,
237
- i3.FsLabelModule,
238
- i7.FsPopoverModule,
239
- i9.FsCommonModule,
240
- i4$1.FsDateModule,
241
- i2.FsDialogModule,
242
- i2$2.FsListModule,
243
- i2$1.FsClipboardModule], exports: [QueryLogsComponent] });
244
- FsSystemQueryLogsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsSystemQueryLogsModule, imports: [[
245
- i8.CommonModule,
246
- router.RouterModule,
247
- i8.CommonModule,
248
- i16.FormsModule,
249
- i3$1.MatTabsModule,
250
- i4.MatButtonModule,
251
- i1.MatDialogModule,
252
- form.FsFormModule,
253
- i3.FsLabelModule,
254
- i7.FsPopoverModule,
255
- i9.FsCommonModule,
256
- i4$1.FsDateModule,
257
- i2.FsDialogModule,
258
- i2$2.FsListModule,
259
- i2$1.FsClipboardModule,
260
- ]] });
261
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsSystemQueryLogsModule, decorators: [{
262
- type: i0.NgModule,
263
- args: [{
264
- imports: [
265
- i8.CommonModule,
266
- router.RouterModule,
267
- i8.CommonModule,
268
- i16.FormsModule,
269
- i3$1.MatTabsModule,
270
- i4.MatButtonModule,
271
- i1.MatDialogModule,
272
- form.FsFormModule,
273
- i3.FsLabelModule,
274
- i7.FsPopoverModule,
275
- i9.FsCommonModule,
276
- i4$1.FsDateModule,
277
- i2.FsDialogModule,
278
- i2$2.FsListModule,
279
- i2$1.FsClipboardModule,
280
- ],
281
- declarations: [
282
- QueryLogsComponent,
283
- QueryLogComponent,
284
- ExplainComponent,
285
- ],
286
- exports: [
287
- QueryLogsComponent,
288
- ],
289
- }]
290
- }] });
291
-
292
- exports.CronState = void 0;
293
- (function (CronState) {
294
- CronState["Running"] = "running";
295
- CronState["Idle"] = "idle";
296
- CronState["Failed"] = "failed";
297
- CronState["Queued"] = "queued";
298
- CronState["Disabled"] = "disabled";
299
- CronState["Enabled"] = "enabled";
300
- CronState["Killing"] = "killing";
301
- })(exports.CronState || (exports.CronState = {}));
302
-
303
- var SettingInterfaceType;
304
- (function (SettingInterfaceType) {
305
- SettingInterfaceType["RadioButton"] = "R";
306
- SettingInterfaceType["InputBox"] = "I";
307
- SettingInterfaceType["Textarea"] = "T";
308
- SettingInterfaceType["Select"] = "D";
309
- SettingInterfaceType["SelectMultiple"] = "W";
310
- SettingInterfaceType["Date"] = "A";
311
- SettingInterfaceType["File"] = "F";
312
- SettingInterfaceType["Static"] = "S";
313
- SettingInterfaceType["Password"] = "P";
314
- SettingInterfaceType["Time"] = "M";
315
- SettingInterfaceType["None"] = "N";
316
- SettingInterfaceType["Color"] = "C";
317
- })(SettingInterfaceType || (SettingInterfaceType = {}));
318
-
319
- exports.ApiLogState = void 0;
320
- (function (ApiLogState) {
321
- ApiLogState["Success"] = "success";
322
- ApiLogState["Failed"] = "failed";
323
- ApiLogState["Deleted"] = "deleted";
324
- })(exports.ApiLogState || (exports.ApiLogState = {}));
325
-
326
- exports.ProcessState = void 0;
327
- (function (ProcessState) {
328
- ProcessState["Queued"] = "Q";
329
- ProcessState["Running"] = "R";
330
- ProcessState["Completed"] = "C";
331
- ProcessState["Killed"] = "K";
332
- ProcessState["Deleted"] = "D";
333
- ProcessState["Failed"] = "F";
334
- })(exports.ProcessState || (exports.ProcessState = {}));
335
-
336
- var CronLogState;
337
- (function (CronLogState) {
338
- CronLogState["Message"] = "message";
339
- CronLogState["Disabled"] = "disabled";
340
- CronLogState["Enabled"] = "enabled";
341
- CronLogState["Started"] = "started";
342
- CronLogState["Running"] = "running";
343
- CronLogState["Completed"] = "completed";
344
- CronLogState["Failed"] = "failed";
345
- CronLogState["Killed"] = "killed";
346
- CronLogState["Queued"] = "queued";
347
- CronLogState["Reset"] = "reset";
348
- CronLogState["Stagnant"] = "stagnant";
349
- CronLogState["LongRunning"] = "long_running";
350
- })(CronLogState || (CronLogState = {}));
351
-
352
- var CronStates = [
353
- { name: 'Running', value: exports.CronState.Running },
354
- { name: 'Idle', value: exports.CronState.Idle },
355
- { name: 'Failed', value: exports.CronState.Failed },
356
- { name: 'Queued', value: exports.CronState.Queued },
357
- { name: 'Disabled', value: exports.CronState.Disabled },
358
- { name: 'Killing', value: exports.CronState.Killing },
359
- { name: 'Enabled', value: exports.CronState.Enabled },
360
- ];
361
-
362
- var ApiLogStates = [
363
- { name: 'Success', value: exports.ApiLogState.Success },
364
- { name: 'Failed', value: exports.ApiLogState.Failed },
365
- { name: 'Deleted', value: exports.ApiLogState.Deleted }
366
- ];
367
-
368
- var ProcessStates = [
369
- { name: 'Queued', value: exports.ProcessState.Queued },
370
- { name: 'Running', value: exports.ProcessState.Running },
371
- { name: 'Completed', value: exports.ProcessState.Completed },
372
- { name: 'Killed', value: exports.ProcessState.Killed },
373
- { name: 'Failed', value: exports.ProcessState.Failed },
374
- { name: 'Deleted', value: exports.ProcessState.Deleted }
375
- ];
376
-
377
- function indexNameValue(arry) {
378
- var obj = {};
379
- arry.forEach(function (item) {
380
- obj[item.value] = item.name;
381
- });
382
- return obj;
383
- }
384
-
385
- var ApiLogComponent = /** @class */ (function () {
386
- function ApiLogComponent(_dialogRef, data) {
387
- this._dialogRef = _dialogRef;
388
- this.data = data;
389
- }
390
- ApiLogComponent.prototype.ngOnInit = function () {
391
- this.apiLogStates = indexNameValue(ApiLogStates);
392
- if (this.data.apiLog) {
393
- this.apiLog = this.data.apiLog;
394
- }
395
- };
396
- return ApiLogComponent;
397
- }());
398
- ApiLogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ApiLogComponent, deps: [{ token: i1__namespace.MatDialogRef }, { token: i1.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
399
- ApiLogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ApiLogComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog *fsSkeleton=\"apiLog\">\n\n <div mat-dialog-title>API Log</div>\n\n <mat-dialog-content>\n <div class=\"fs-row.gap-large.wrap\">\n <div>\n <fs-label-field>\n <fs-label>\n Type\n </fs-label>\n {{apiLog.type}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{apiLogStates[apiLog.state]}}\n </fs-label-field>\n\n\n <fs-label-field *ngIf=\"apiLog.code\">\n <fs-label>\n Code\n </fs-label>\n {{apiLog.code}}\n </fs-label-field>\n\n </div>\n <div>\n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{apiLog.createDate|fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n\n\n <fs-label-field *ngIf=\"apiLog.direction\">\n <fs-label>\n Direction\n </fs-label>\n {{apiLog.direction}}\n </fs-label-field>\n\n\n <fs-label-field *ngIf=\"apiLog.length\">\n <fs-label>\n Duration\n </fs-label>\n {{ apiLog.length | fsDateDuration }}\n </fs-label-field>\n </div>\n </div>\n\n <div>\n <fs-label-field *ngIf=\"apiLog.message\">\n <fs-label>\n Message\n </fs-label>\n {{apiLog.message}}\n </fs-label-field>\n </div>\n\n\n <div class=\"fs-row.gap-large.wrap\">\n <div>\n <fs-label-field *ngIf=\"apiLog.method\">\n <fs-label>\n Method\n </fs-label>\n {{apiLog.method}}\n </fs-label-field>\n </div>\n <div>\n <fs-label-field *ngIf=\"apiLog.url\">\n <fs-label>\n URL\n </fs-label>\n {{apiLog.url}}\n </fs-label-field>\n </div>\n </div>\n\n <div>\n <fs-label-field *ngIf=\"apiLog.request\">\n <fs-label>\n Request\n </fs-label>\n <pre>{{apiLog.request|json}}</pre>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.response\">\n <fs-label>\n Response\n </fs-label>\n <pre>{{apiLog.response|json}}</pre>\n </fs-label-field>\n </div>\n </mat-dialog-content>\n\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i2__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3__namespace.FsLabelComponent, selector: "fs-label" }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i4__namespace$1.FsDateFormatPipe, "fsDateDuration": i4__namespace$1.FsDateDurationPipe, "json": i8__namespace.JsonPipe } });
400
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ApiLogComponent, decorators: [{
401
- type: i0.Component,
402
- args: [{
403
- templateUrl: './api-log.component.html',
404
- styleUrls: ['./api-log.component.scss']
405
- }]
406
- }], ctorParameters: function () {
407
- return [{ type: i1__namespace.MatDialogRef }, { type: undefined, decorators: [{
408
- type: i0.Inject,
409
- args: [i1.MAT_DIALOG_DATA]
410
- }] }];
411
- } });
412
-
413
- var ApiLogsComponent = /** @class */ (function () {
414
- function ApiLogsComponent(_dialog) {
415
- this._dialog = _dialog;
416
- this.config = null;
417
- this.apiLogStates = indexNameValue(ApiLogStates);
418
- }
419
- ApiLogsComponent.prototype.ngOnInit = function () {
420
- this._configList();
421
- };
422
- ApiLogsComponent.prototype._configList = function () {
423
- var _this = this;
424
- this.config = {
425
- filters: [
426
- {
427
- type: filter.ItemType.Keyword,
428
- name: 'keyword',
429
- label: 'Search',
430
- },
431
- {
432
- type: filter.ItemType.Select,
433
- name: 'state',
434
- label: 'Status',
435
- values: ApiLogStates,
436
- },
437
- {
438
- name: 'createDate',
439
- type: filter.ItemType.DateRange,
440
- label: ['From Date', 'To Date'],
441
- },
442
- ],
443
- fetch: function (query) {
444
- Object.assign(query, {});
445
- return _this.loadApiLogs(query)
446
- .pipe(operators.map(function (response) { return ({ data: response.data, paging: response.paging }); }));
447
- },
448
- };
449
- };
450
- ApiLogsComponent.prototype.open = function (apiLog) {
451
- this._dialog.open(ApiLogComponent, {
452
- data: { apiLog: apiLog },
453
- width: '85%',
454
- });
455
- };
456
- return ApiLogsComponent;
457
- }());
458
- ApiLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ApiLogsComponent, deps: [{ token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
459
- ApiLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ApiLogsComponent, selector: "fs-system-api-logs", inputs: { loadApiLogs: "loadApiLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a href=\"javascript:;\" (click)=\"open(row)\">\n {{row.type || 'Unknown'}}\n <mat-icon class=\"direction\" *ngIf=\"row.direction=='outgoing'\">arrow_upward</mat-icon>\n <mat-icon class=\"direction\" *ngIf=\"row.direction=='incoming'\">arrow_downward</mat-icon>\n </a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{apiLogStates[row.state]}}\n <span *ngIf=\"row.code\" class=\"code\" [ngClass]=\"{'success': row.code==200,'error': row.code!=200 }\">[{{row.code}}]</span>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Date</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div><small *ngIf=\"row.length\">Duration: {{ row.length | fsDateDuration }}</small></div>\n </ng-template>\n </fs-list-column>\n </fs-list>\n", styles: [".code.success{color:green}.code.error{color:red}.direction{font-size:14px;height:14px;line-height:14px;width:14px}\n"], components: [{ type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i6__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fsDateDuration": i4__namespace$1.FsDateDurationPipe } });
460
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ApiLogsComponent, decorators: [{
461
- type: i0.Component,
462
- args: [{
463
- selector: 'fs-system-api-logs',
464
- templateUrl: './api-logs.component.html',
465
- styleUrls: ['./api-logs.component.scss'],
466
- }]
467
- }], ctorParameters: function () { return [{ type: i1__namespace.MatDialog }]; }, propDecorators: { list: [{
468
- type: i0.ViewChild,
469
- args: [i2$2.FsListComponent, { static: true }]
470
- }], loadApiLogs: [{
471
- type: i0.Input
472
- }] } });
473
-
474
- /*! *****************************************************************************
475
- Copyright (c) Microsoft Corporation.
476
-
477
- Permission to use, copy, modify, and/or distribute this software for any
478
- purpose with or without fee is hereby granted.
479
-
480
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
481
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
482
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
483
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
484
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
485
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
486
- PERFORMANCE OF THIS SOFTWARE.
487
- ***************************************************************************** */
488
- /* global Reflect, Promise */
489
- var extendStatics = function (d, b) {
490
- extendStatics = Object.setPrototypeOf ||
491
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
492
- function (d, b) { for (var p in b)
493
- if (Object.prototype.hasOwnProperty.call(b, p))
494
- d[p] = b[p]; };
495
- return extendStatics(d, b);
496
- };
497
- function __extends(d, b) {
498
- if (typeof b !== "function" && b !== null)
499
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
500
- extendStatics(d, b);
501
- function __() { this.constructor = d; }
502
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
503
- }
504
- var __assign = function () {
505
- __assign = Object.assign || function __assign(t) {
506
- for (var s, i = 1, n = arguments.length; i < n; i++) {
507
- s = arguments[i];
508
- for (var p in s)
509
- if (Object.prototype.hasOwnProperty.call(s, p))
510
- t[p] = s[p];
511
- }
512
- return t;
513
- };
514
- return __assign.apply(this, arguments);
515
- };
516
- function __rest(s, e) {
517
- var t = {};
518
- for (var p in s)
519
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
520
- t[p] = s[p];
521
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
522
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
523
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
524
- t[p[i]] = s[p[i]];
525
- }
526
- return t;
527
- }
528
- function __decorate(decorators, target, key, desc) {
529
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
530
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
531
- r = Reflect.decorate(decorators, target, key, desc);
532
- else
533
- for (var i = decorators.length - 1; i >= 0; i--)
534
- if (d = decorators[i])
535
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
536
- return c > 3 && r && Object.defineProperty(target, key, r), r;
537
- }
538
- function __param(paramIndex, decorator) {
539
- return function (target, key) { decorator(target, key, paramIndex); };
540
- }
541
- function __metadata(metadataKey, metadataValue) {
542
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
543
- return Reflect.metadata(metadataKey, metadataValue);
544
- }
545
- function __awaiter(thisArg, _arguments, P, generator) {
546
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
547
- return new (P || (P = Promise))(function (resolve, reject) {
548
- function fulfilled(value) { try {
549
- step(generator.next(value));
550
- }
551
- catch (e) {
552
- reject(e);
553
- } }
554
- function rejected(value) { try {
555
- step(generator["throw"](value));
556
- }
557
- catch (e) {
558
- reject(e);
559
- } }
560
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
561
- step((generator = generator.apply(thisArg, _arguments || [])).next());
562
- });
563
- }
564
- function __generator(thisArg, body) {
565
- var _ = { label: 0, sent: function () { if (t[0] & 1)
566
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
567
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
568
- function verb(n) { return function (v) { return step([n, v]); }; }
569
- function step(op) {
570
- if (f)
571
- throw new TypeError("Generator is already executing.");
572
- while (_)
573
- try {
574
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
575
- return t;
576
- if (y = 0, t)
577
- op = [op[0] & 2, t.value];
578
- switch (op[0]) {
579
- case 0:
580
- case 1:
581
- t = op;
582
- break;
583
- case 4:
584
- _.label++;
585
- return { value: op[1], done: false };
586
- case 5:
587
- _.label++;
588
- y = op[1];
589
- op = [0];
590
- continue;
591
- case 7:
592
- op = _.ops.pop();
593
- _.trys.pop();
594
- continue;
595
- default:
596
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
597
- _ = 0;
598
- continue;
599
- }
600
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
601
- _.label = op[1];
602
- break;
603
- }
604
- if (op[0] === 6 && _.label < t[1]) {
605
- _.label = t[1];
606
- t = op;
607
- break;
608
- }
609
- if (t && _.label < t[2]) {
610
- _.label = t[2];
611
- _.ops.push(op);
612
- break;
613
- }
614
- if (t[2])
615
- _.ops.pop();
616
- _.trys.pop();
617
- continue;
618
- }
619
- op = body.call(thisArg, _);
620
- }
621
- catch (e) {
622
- op = [6, e];
623
- y = 0;
624
- }
625
- finally {
626
- f = t = 0;
627
- }
628
- if (op[0] & 5)
629
- throw op[1];
630
- return { value: op[0] ? op[1] : void 0, done: true };
631
- }
632
- }
633
- var __createBinding = Object.create ? (function (o, m, k, k2) {
634
- if (k2 === undefined)
635
- k2 = k;
636
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
637
- }) : (function (o, m, k, k2) {
638
- if (k2 === undefined)
639
- k2 = k;
640
- o[k2] = m[k];
641
- });
642
- function __exportStar(m, o) {
643
- for (var p in m)
644
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
645
- __createBinding(o, m, p);
646
- }
647
- function __values(o) {
648
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
649
- if (m)
650
- return m.call(o);
651
- if (o && typeof o.length === "number")
652
- return {
653
- next: function () {
654
- if (o && i >= o.length)
655
- o = void 0;
656
- return { value: o && o[i++], done: !o };
657
- }
658
- };
659
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
660
- }
661
- function __read(o, n) {
662
- var m = typeof Symbol === "function" && o[Symbol.iterator];
663
- if (!m)
664
- return o;
665
- var i = m.call(o), r, ar = [], e;
666
- try {
667
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
668
- ar.push(r.value);
669
- }
670
- catch (error) {
671
- e = { error: error };
672
- }
673
- finally {
674
- try {
675
- if (r && !r.done && (m = i["return"]))
676
- m.call(i);
677
- }
678
- finally {
679
- if (e)
680
- throw e.error;
681
- }
682
- }
683
- return ar;
684
- }
685
- /** @deprecated */
686
- function __spread() {
687
- for (var ar = [], i = 0; i < arguments.length; i++)
688
- ar = ar.concat(__read(arguments[i]));
689
- return ar;
690
- }
691
- /** @deprecated */
692
- function __spreadArrays() {
693
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
694
- s += arguments[i].length;
695
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
696
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
697
- r[k] = a[j];
698
- return r;
699
- }
700
- function __spreadArray(to, from, pack) {
701
- if (pack || arguments.length === 2)
702
- for (var i = 0, l = from.length, ar; i < l; i++) {
703
- if (ar || !(i in from)) {
704
- if (!ar)
705
- ar = Array.prototype.slice.call(from, 0, i);
706
- ar[i] = from[i];
707
- }
708
- }
709
- return to.concat(ar || Array.prototype.slice.call(from));
710
- }
711
- function __await(v) {
712
- return this instanceof __await ? (this.v = v, this) : new __await(v);
713
- }
714
- function __asyncGenerator(thisArg, _arguments, generator) {
715
- if (!Symbol.asyncIterator)
716
- throw new TypeError("Symbol.asyncIterator is not defined.");
717
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
718
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
719
- function verb(n) { if (g[n])
720
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
721
- function resume(n, v) { try {
722
- step(g[n](v));
723
- }
724
- catch (e) {
725
- settle(q[0][3], e);
726
- } }
727
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
728
- function fulfill(value) { resume("next", value); }
729
- function reject(value) { resume("throw", value); }
730
- function settle(f, v) { if (f(v), q.shift(), q.length)
731
- resume(q[0][0], q[0][1]); }
732
- }
733
- function __asyncDelegator(o) {
734
- var i, p;
735
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
736
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
737
- }
738
- function __asyncValues(o) {
739
- if (!Symbol.asyncIterator)
740
- throw new TypeError("Symbol.asyncIterator is not defined.");
741
- var m = o[Symbol.asyncIterator], i;
742
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
743
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
744
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
745
- }
746
- function __makeTemplateObject(cooked, raw) {
747
- if (Object.defineProperty) {
748
- Object.defineProperty(cooked, "raw", { value: raw });
749
- }
750
- else {
751
- cooked.raw = raw;
752
- }
753
- return cooked;
754
- }
755
- ;
756
- var __setModuleDefault = Object.create ? (function (o, v) {
757
- Object.defineProperty(o, "default", { enumerable: true, value: v });
758
- }) : function (o, v) {
759
- o["default"] = v;
760
- };
761
- function __importStar(mod) {
762
- if (mod && mod.__esModule)
763
- return mod;
764
- var result = {};
765
- if (mod != null)
766
- for (var k in mod)
767
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
768
- __createBinding(result, mod, k);
769
- __setModuleDefault(result, mod);
770
- return result;
771
- }
772
- function __importDefault(mod) {
773
- return (mod && mod.__esModule) ? mod : { default: mod };
774
- }
775
- function __classPrivateFieldGet(receiver, state, kind, f) {
776
- if (kind === "a" && !f)
777
- throw new TypeError("Private accessor was defined without a getter");
778
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
779
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
780
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
781
- }
782
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
783
- if (kind === "m")
784
- throw new TypeError("Private method is not writable");
785
- if (kind === "a" && !f)
786
- throw new TypeError("Private accessor was defined without a setter");
787
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
788
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
789
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
790
- }
791
-
792
- var CronLogStates = [
793
- { name: 'Message', value: CronLogState.Message, color: '#29B7FF' },
794
- { name: 'Disabled', value: CronLogState.Disabled, color: '#29B7FF' },
795
- { name: 'Reset', value: CronLogState.Reset, color: '#29B7FF' },
796
- { name: 'Enabled', value: CronLogState.Enabled, color: '#29B7FF' },
797
- { name: 'Queued', value: CronLogState.Queued, color: '#29B7FF' },
798
- { name: 'Started', value: CronLogState.Started, color: '#D17333' },
799
- { name: 'Running', value: CronLogState.Running, color: '#34BD43' },
800
- { name: 'Completed', value: CronLogState.Completed, color: '#34BD43' },
801
- { name: 'Failed', value: CronLogState.Failed, color: '#FA7567' },
802
- { name: 'Killed', value: CronLogState.Killed, color: '#FA7567' },
803
- { name: 'Stagnant', value: CronLogState.Stagnant, color: '#FA7567' },
804
- { name: 'Long Running', value: CronLogState.LongRunning, color: '#FA7567' },
805
- ];
806
-
807
- var CronLogComponent = /** @class */ (function () {
808
- function CronLogComponent(_data) {
809
- this._data = _data;
810
- this.CronLogStates = indexNameValue(CronLogStates);
811
- this.CronLogStateColors = {};
812
- }
813
- CronLogComponent.prototype.ngOnInit = function () {
814
- this.cronLog = this._data.cronLog;
815
- this.CronLogStateColors = CronLogStates
816
- .reduce(function (accum, cronLogState) {
817
- accum[cronLogState.value] = cronLogState.color;
818
- return accum;
819
- }, {});
820
- };
821
- return CronLogComponent;
822
- }());
823
- CronLogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CronLogComponent, deps: [{ token: i1.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
824
- CronLogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CronLogComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog *fsSkeleton=\"cronLog\">\r\n <div mat-dialog-title>Cron Log</div>\r\n <mat-dialog-content>\r\n <div class=\"row\">\r\n <fs-label-field>\r\n <fs-label>\r\n Status\r\n </fs-label>\r\n <div [ngStyle]=\"{ color: CronLogStateColors[cronLog.state]}\">\r\n {{CronLogStates[cronLog.state] || cronLog.state}}\r\n </div>\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Date\r\n </fs-label>\r\n <fs-date-ago [date]=\"cronLog.createDate\"></fs-date-ago>\r\n </fs-label-field>\r\n </div>\r\n \r\n <fs-label-field *ngIf=\"cronLog.message\">\r\n <fs-label>\r\n Message\r\n </fs-label>\r\n <div class=\"message\">\r\n {{cronLog.message}}\r\n </div>\r\n </fs-label-field>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\r\n </mat-dialog-actions>\r\n</fs-dialog>\r\n", styles: [".message{white-space:pre-line}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}\n"], components: [{ type: i2__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3__namespace.FsLabelComponent, selector: "fs-label" }, { type: i4__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
825
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CronLogComponent, decorators: [{
826
- type: i0.Component,
827
- args: [{
828
- templateUrl: './cron-log.component.html',
829
- styleUrls: ['./cron-log.component.scss']
830
- }]
831
- }], ctorParameters: function () {
832
- return [{ type: undefined, decorators: [{
833
- type: i0.Inject,
834
- args: [i1.MAT_DIALOG_DATA]
835
- }] }];
836
- } });
837
-
838
- var CronComponent = /** @class */ (function () {
839
- function CronComponent(_data, _dialog, _cdRef) {
840
- this._data = _data;
841
- this._dialog = _dialog;
842
- this._cdRef = _cdRef;
843
- this.tabIndex = 0;
844
- this.CronStates = indexNameValue(CronStates);
845
- this.CronLogStates = indexNameValue(CronLogStates);
846
- this.CronLogStateColors = {};
847
- }
848
- CronComponent.prototype.ngOnInit = function () {
849
- this.load();
850
- this.CronLogStateColors = CronLogStates
851
- .reduce(function (accum, cronLogState) {
852
- accum[cronLogState.value] = cronLogState.color;
853
- return accum;
854
- }, {});
855
- };
856
- CronComponent.prototype.cronLogOpen = function (cronLog) {
857
- this._dialog.open(CronLogComponent, {
858
- data: {
859
- cronLog: cronLog,
860
- },
861
- width: '85%'
862
- });
863
- };
864
- CronComponent.prototype.cronActionClick = function (cronAction) {
865
- var _this = this;
866
- cronAction.action(this.cron)
867
- .subscribe(function () {
868
- _this.load();
869
- });
870
- };
871
- CronComponent.prototype.selectedIndexChange = function (index) {
872
- this.tabIndex = index;
873
- };
874
- CronComponent.prototype.load = function () {
875
- var _this = this;
876
- this._data.loadCron(this._data.cron)
877
- .subscribe(function (cron) {
878
- _this.cron = Object.assign(Object.assign({}, _this._data.cron), cron);
879
- if (_this._data.loadCronLogs) {
880
- _this.config = {
881
- filters: [
882
- {
883
- type: filter.ItemType.Select,
884
- name: 'state',
885
- label: 'Status',
886
- values: __spreadArray([
887
- { name: 'All', value: null }
888
- ], __read(CronLogStates)),
889
- },
890
- {
891
- type: filter.ItemType.DateRange,
892
- name: 'date',
893
- label: ['From Date', 'To Date'],
894
- },
895
- ],
896
- fetch: function (query) {
897
- query = Object.assign(Object.assign({}, query), { cronId: _this.cron.id });
898
- return _this._data.loadCronLogs(query);
899
- },
900
- };
901
- }
902
- _this.cronActions = _this._data.cronActions
903
- .filter(function (cronLogAction) {
904
- return cronLogAction.show(_this.cron);
905
- });
906
- _this._cdRef.markForCheck();
907
- });
908
- };
909
- return CronComponent;
910
- }());
911
- CronComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CronComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialog }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
912
- CronComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CronComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog *fsSkeleton=\"cron\">\r\n <h1 mat-dialog-title>\r\n Cron\r\n <div class=\"small\">{{cron.name}}</div>\r\n </h1>\r\n <mat-dialog-content>\r\n <mat-tab-group (selectedIndexChange)=\"selectedIndexChange($event)\">\r\n <mat-tab label=\"Overview\">\r\n <div class=\"row\">\r\n <fs-label-field>\r\n <fs-label>\r\n Status\r\n </fs-label>\r\n {{CronStates[cron.state]}}\r\n </fs-label-field>\r\n\r\n <fs-label-field *ngIf=\"cron.cronSetting\">\r\n <fs-label>\r\n Run Frequency\r\n </fs-label>\r\n {{cron.cronSetting.summary}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Last Ran\r\n </fs-label>\r\n <ng-container *ngIf=\"cron.duration===null; else lastRan\">\r\n Never\r\n </ng-container>\r\n <ng-template #lastRan>\r\n <fs-date-ago [date]=\"cron.createDate\"></fs-date-ago>\r\n <div><small *ngIf=\"cron.duration\">Duration: {{ cron.duration | fsDateDuration }}</small></div>\r\n </ng-template>\r\n </fs-label-field>\r\n </div>\r\n\r\n <fs-label-field *ngIf=\"cron.message\">\r\n <fs-label>\r\n Last Message\r\n </fs-label>\r\n <div class=\"message\">{{cron.message}}</div>\r\n </fs-label-field>\r\n </mat-tab>\r\n <mat-tab label=\"Logs\" *ngIf=\"config\">\r\n <ng-template matTabContent>\r\n <fs-list [config]=\"config\">\r\n <fs-list-column name=\"state\" title=\"Status\">\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <a \r\n (click)=\"cronLogOpen(row)\"\r\n [ngStyle]=\"{ color: CronLogStateColors[row.state] }\">\r\n {{CronLogStates[row.state] || row.state}}\r\n </a>\r\n </ng-template>\r\n </fs-list-column>\r\n \r\n <fs-list-column title=\"Message\" class=\"col-message\">\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <div class=\"message\">{{row.message}}</div>\r\n </ng-template>\r\n </fs-list-column>\r\n \r\n <fs-list-column title=\"Duration\" class=\"col-message\">\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <ng-container *ngIf=\"row.duration\">\r\n {{row.duration | fsDateDuration: 'hour-minute-second'}}\r\n </ng-container>\r\n </ng-template>\r\n </fs-list-column>\r\n\r\n <fs-list-column name=\"create_date\" title=\"Date\" class=\"col-date\">\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\r\n </ng-template>\r\n </fs-list-column>\r\n </fs-list> \r\n </ng-template>\r\n </mat-tab>\r\n </mat-tab-group>\r\n\r\n </mat-dialog-content>\r\n <mat-dialog-actions> \r\n <button \r\n mat-button \r\n [mat-dialog-close]=\"true\" \r\n color=\"primary\">\r\n Done\r\n </button>\r\n <ng-container *ngIf=\"tabIndex === 0\">\r\n <button \r\n *ngFor=\"let cronAction of cronActions\"\r\n mat-button \r\n (click)=\"cronActionClick(cronAction)\">\r\n {{cronAction.label}}\r\n </button> \r\n </ng-container>\r\n </mat-dialog-actions>\r\n</fs-dialog>\r\n", styles: [":host ::ng-deep .col-message .message{white-space:break-spaces;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}:host ::ng-deep .col-date{white-space:nowrap}h1 .small{line-height:normal}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}.message{white-space:pre-line}\n"], components: [{ type: i2__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3__namespace$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i3__namespace.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3__namespace.FsLabelComponent, selector: "fs-label" }, { type: i4__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace$1.MatTabContent, selector: "[matTabContent]" }, { type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i8__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "fsDateDuration": i4__namespace$1.FsDateDurationPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
913
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CronComponent, decorators: [{
914
- type: i0.Component,
915
- args: [{
916
- templateUrl: './cron.component.html',
917
- styleUrls: ['./cron.component.scss'],
918
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
919
- }]
920
- }], ctorParameters: function () {
921
- return [{ type: undefined, decorators: [{
922
- type: i0.Inject,
923
- args: [i1.MAT_DIALOG_DATA]
924
- }] }, { type: i1__namespace.MatDialog }, { type: i0__namespace.ChangeDetectorRef }];
925
- } });
926
-
927
- var CronsComponent = /** @class */ (function () {
928
- function CronsComponent(_message, _dialog, _prompt) {
929
- this._message = _message;
930
- this._dialog = _dialog;
931
- this._prompt = _prompt;
932
- this.config = null;
933
- this.cronStates = indexNameValue(CronStates);
934
- this.CronState = exports.CronState;
935
- this._destroy$ = new rxjs.Subject();
936
- }
937
- CronsComponent.prototype.ngOnInit = function () {
938
- this._configList();
939
- };
940
- CronsComponent.prototype._configList = function () {
941
- var _this = this;
942
- this.config = {
943
- paging: false,
944
- filters: [
945
- {
946
- type: filter.ItemType.Keyword,
947
- name: 'keyword',
948
- label: 'Search',
949
- },
950
- ],
951
- rowActions: this.getCronActions()
952
- .map(function (rowAction) {
953
- return Object.assign(Object.assign({}, rowAction), { click: function (cron) {
954
- rowAction.action(cron)
955
- .subscribe();
956
- } });
957
- }),
958
- fetch: function (query) {
959
- query.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
960
- return _this.loadCrons(query)
961
- .pipe(operators.map(function (crons) { return ({
962
- data: crons
963
- .map(function (cron) {
964
- return Object.assign(Object.assign({}, cron), { runningDuration: dateFns.differenceInSeconds(i4$1.parse(cron.createDate), new Date()) });
965
- }),
966
- }); }));
967
- },
968
- };
969
- if (this.bulk) {
970
- this.config.selection = {
971
- selectAll: false,
972
- actions: [
973
- {
974
- type: selection.SelectionActionType.Action,
975
- name: 'disable',
976
- label: 'Disable',
977
- },
978
- {
979
- type: selection.SelectionActionType.Action,
980
- name: 'enable',
981
- label: 'Enable',
982
- },
983
- ],
984
- actionSelected: function (action) {
985
- return _this.bulk(action.action.name, action.selected)
986
- .pipe(operators.tap(function () {
987
- _this.list.reload();
988
- _this._message.success('Applied Changes');
989
- }));
990
- },
991
- };
992
- }
993
- };
994
- CronsComponent.prototype.open = function (cron) {
995
- this._dialog.open(CronComponent, {
996
- data: {
997
- cron: cron,
998
- loadCronLogs: this.loadCronLogs,
999
- loadCron: this.loadCron,
1000
- cronActions: this.getCronActions(),
1001
- },
1002
- width: '85%',
1003
- });
1004
- };
1005
- CronsComponent.prototype.getCronActions = function () {
1006
- var _this = this;
1007
- return [
1008
- {
1009
- action: function (data) {
1010
- return _this.queue(data)
1011
- .pipe(operators.tap(function () {
1012
- _this._message.success('Queued cron');
1013
- _this.list.reload();
1014
- }));
1015
- },
1016
- label: 'Queue',
1017
- show: function (cron) {
1018
- return cron.state === exports.CronState.Idle || cron.state === exports.CronState.Failed;
1019
- },
1020
- },
1021
- {
1022
- action: function (data) {
1023
- return _this.run(data)
1024
- .pipe(operators.tap(function () {
1025
- _this._message.success('Cron ran');
1026
- _this.list.reload();
1027
- }));
1028
- },
1029
- label: 'Run',
1030
- show: function (cron) {
1031
- return cron.state === exports.CronState.Idle || cron.state === exports.CronState.Failed;
1032
- },
1033
- },
1034
- {
1035
- action: function (data) {
1036
- return _this.enable(data)
1037
- .pipe(operators.tap(function () {
1038
- _this._message.success('Enabled cron');
1039
- _this.list.reload();
1040
- }));
1041
- },
1042
- label: 'Enable',
1043
- show: function (cron) {
1044
- return cron.state === exports.CronState.Disabled;
1045
- },
1046
- },
1047
- {
1048
- action: function (data) {
1049
- return _this.disable(data)
1050
- .pipe(operators.tap(function () {
1051
- _this._message.success('Disabled cron');
1052
- _this.list.reload();
1053
- }));
1054
- },
1055
- label: 'Disable',
1056
- show: function (cron) {
1057
- return cron.state === exports.CronState.Idle || cron.state === exports.CronState.Failed;
1058
- },
1059
- },
1060
- {
1061
- action: function (data) {
1062
- return _this._prompt.confirm({
1063
- title: 'Confirm',
1064
- template: 'Are you sure you would like to kill the cron?',
1065
- })
1066
- .pipe(operators.switchMap(function () {
1067
- return _this.kill(data);
1068
- }), operators.tap(function () {
1069
- _this._message.success('Killed cron');
1070
- _this.list.reload();
1071
- }), operators.takeUntil(_this._destroy$));
1072
- },
1073
- label: 'Kill',
1074
- show: function (cron) {
1075
- return cron.state === exports.CronState.Running;
1076
- },
1077
- },
1078
- {
1079
- action: function (data) {
1080
- return _this._prompt.confirm({
1081
- title: 'Confirm',
1082
- template: 'Are you sure you would like to reset the cron?',
1083
- })
1084
- .pipe(operators.switchMap(function () {
1085
- return _this.enable(data);
1086
- }), operators.tap(function () {
1087
- _this._message.success('Reset cron');
1088
- _this.list.reload();
1089
- }), operators.takeUntil(_this._destroy$));
1090
- },
1091
- label: 'Reset',
1092
- show: function (cron) {
1093
- return cron.state === exports.CronState.Killing || cron.state === exports.CronState.Running || cron.state === exports.CronState.Failed || cron.state === exports.CronState.Queued;
1094
- },
1095
- },
1096
- ];
1097
- };
1098
- CronsComponent.prototype.ngOnDestroy = function () {
1099
- this._destroy$.next();
1100
- this._destroy$.complete();
1101
- };
1102
- return CronsComponent;
1103
- }());
1104
- CronsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CronsComponent, deps: [{ token: i1__namespace$1.FsMessage }, { token: i1__namespace.MatDialog }, { token: i3__namespace$2.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
1105
- CronsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CronsComponent, selector: "fs-system-crons", inputs: { enable: "enable", disable: "disable", kill: "kill", queue: "queue", run: "run", loadCrons: "loadCrons", loadCron: "loadCron", loadCronLogs: "loadCronLogs", bulk: "bulk" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\">\r\n <fs-list-column>\r\n <ng-template fs-list-header>Name</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <a (click)=\"open(row)\">{{row.name}}</a>\r\n <div *ngIf=\"row.cronSetting\">\r\n <small>{{row.cronSetting.summary}}</small>\r\n </div>\r\n </ng-template>\r\n </fs-list-column>\r\n <fs-list-column align=\"center\">\r\n <ng-template fs-list-header>Status</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <ng-container *ngIf=\"row.host || row.processId; else status\">\r\n <fs-popover \r\n [maxWidth]=\"null\"\r\n [template]=\"statusPopover\" \r\n size=\"small\">\r\n <ng-container *ngTemplateOutlet=\"status\"></ng-container>\r\n </fs-popover>\r\n <ng-template #statusPopover>\r\n <div *ngIf=\"row.host\">Host: {{row.host}}</div>\r\n <div *ngIf=\"row.processId\">Process ID: {{row.processId}}</div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #status>\r\n {{cronStates[row.state]}}\r\n </ng-template>\r\n <ng-container *ngIf=\"row.state === CronState.Running\">\r\n <div class=\"small\">\r\n Duration: {{ row.runningDuration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\r\n </div>\r\n </ng-container> \r\n </ng-template>\r\n </fs-list-column>\r\n <fs-list-column>\r\n <ng-template fs-list-header>Last Ran</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <ng-container *ngIf=\"row.duration===null; else lastRan\">\r\n Never\r\n </ng-container>\r\n <ng-template #lastRan>\r\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\r\n <div class=\"small\" *ngIf=\"row.duration\">\r\n Duration: {{ row.duration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n </fs-list-column>\r\n</fs-list>\r\n", styles: [""], components: [{ type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i7__namespace.FsPopoverComponent, selector: "fs-popover" }, { type: i4__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "fsDateDuration": i4__namespace$1.FsDateDurationPipe } });
1106
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CronsComponent, decorators: [{
1107
- type: i0.Component,
1108
- args: [{
1109
- selector: 'fs-system-crons',
1110
- templateUrl: './crons.component.html',
1111
- styleUrls: ['./crons.component.scss'],
1112
- }]
1113
- }], ctorParameters: function () { return [{ type: i1__namespace$1.FsMessage }, { type: i1__namespace.MatDialog }, { type: i3__namespace$2.FsPrompt }]; }, propDecorators: { list: [{
1114
- type: i0.ViewChild,
1115
- args: [i2$2.FsListComponent, { static: true }]
1116
- }], enable: [{
1117
- type: i0.Input
1118
- }], disable: [{
1119
- type: i0.Input
1120
- }], kill: [{
1121
- type: i0.Input
1122
- }], queue: [{
1123
- type: i0.Input
1124
- }], run: [{
1125
- type: i0.Input
1126
- }], loadCrons: [{
1127
- type: i0.Input
1128
- }], loadCron: [{
1129
- type: i0.Input
1130
- }], loadCronLogs: [{
1131
- type: i0.Input
1132
- }], bulk: [{
1133
- type: i0.Input
1134
- }] } });
1135
-
1136
- var DashboardComponent = /** @class */ (function () {
1137
- function DashboardComponent(_message, _cdRef, _buildService) {
1138
- this._message = _message;
1139
- this._cdRef = _cdRef;
1140
- this._buildService = _buildService;
1141
- this.buttonActions = [];
1142
- this.menuActions = [];
1143
- this._destroy$ = new rxjs.Subject();
1144
- this.actions = [];
1145
- }
1146
- DashboardComponent.prototype.ngOnInit = function () {
1147
- var _this = this;
1148
- this._load();
1149
- this.buttonActions = this.actions.filter(function (item) { return !item.menu; });
1150
- this.menuActions = this.actions.filter(function (item) { return item.menu; });
1151
- this.build = this._buildService.build;
1152
- this._buildService.build$
1153
- .pipe(operators.takeUntil(this._destroy$))
1154
- .subscribe(function (build) {
1155
- _this.build = build;
1156
- _this._cdRef.markForCheck();
1157
- });
1158
- };
1159
- DashboardComponent.prototype._load = function () {
1160
- var _this = this;
1161
- this.load()
1162
- .subscribe(function (dashboard) {
1163
- _this.dashboard = dashboard;
1164
- _this.dashboard.cronRanAttention = !dashboard.cronRan ||
1165
- dateFns.differenceInMinutes(new Date(), new Date(dashboard.cronRan)) > 15;
1166
- _this._cdRef.markForCheck();
1167
- });
1168
- };
1169
- DashboardComponent.prototype.ngOnDestroy = function () {
1170
- this._destroy$.next();
1171
- this._destroy$.complete();
1172
- };
1173
- DashboardComponent.prototype.actionClick = function (action) {
1174
- action.click();
1175
- };
1176
- DashboardComponent.prototype.initClick = function () {
1177
- var _this = this;
1178
- this.init()
1179
- .subscribe(function () {
1180
- _this._message.success('Successfully initialized the system');
1181
- });
1182
- };
1183
- DashboardComponent.prototype.upgradeClick = function () {
1184
- var _this = this;
1185
- this.upgrade()
1186
- .subscribe(function () {
1187
- _this._load();
1188
- _this._message.success('Successfully upgraded the system');
1189
- });
1190
- };
1191
- return DashboardComponent;
1192
- }());
1193
- DashboardComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DashboardComponent, deps: [{ token: i1__namespace$1.FsMessage }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace$3.FsBuildService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1194
- DashboardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DashboardComponent, selector: "fs-system-dashboard", inputs: { init: "init", upgrade: "upgrade", load: "load", actions: "actions" }, ngImport: i0__namespace, template: "<div *fsSkeleton=\"dashboard\">\r\n\r\n <div class=\"h2-container\">\r\n\r\n <div class=\"actions\">\r\n <h2>Actions</h2>\r\n <div class=\"fs-row.gap-tiny.wrap\">\r\n <button mat-raised-button (click)=\"upgradeClick()\">Run Upgrades</button>\r\n <button mat-raised-button (click)=\"initClick()\">Init System</button>\r\n\r\n <button\r\n *ngFor=\"let action of buttonActions\"\r\n mat-raised-button\r\n (click)=\"actionClick(action)\">\r\n {{action.label}}\r\n </button>\r\n\r\n <ng-container *ngIf=\"menuActions.length\">\r\n <fs-menu buttonClass=\"mat-raised-button menu-button\">\r\n <ng-template\r\n *ngFor=\"let action of menuActions\"\r\n fs-menu-item\r\n (click)=\"actionClick(action)\">\r\n {{action.label}}\r\n </ng-template>\r\n </fs-menu>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"fs-row.gap-large.wrap\">\r\n <div>\r\n <h2>Server</h2>\r\n\r\n <fs-label-field>\r\n <fs-label>Date/Time</fs-label>\r\n {{dashboard.serverTime | fsDateFormat: 'date-time'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Timezone</fs-label>\r\n {{dashboard.serverTimezone}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Hostname</fs-label>\r\n {{dashboard.serverHostname}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Directory</fs-label>\r\n {{dashboard.appDirectory}}\r\n </fs-label-field>\r\n </div>\r\n\r\n <div>\r\n <h2>System</h2>\r\n <fs-label-field>\r\n <fs-label>Mode</fs-label>\r\n {{dashboard.appMode}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Notification Recipients</fs-label>\r\n {{dashboard.notifyRecipients.join(', ')}}\r\n </fs-label-field>\r\n </div>\r\n\r\n <div>\r\n <h2>Database</h2>\r\n\r\n <fs-label-field>\r\n <fs-label>Name</fs-label>\r\n {{dashboard.databaseName}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Date/Time</fs-label>\r\n {{dashboard.databaseTime | fsDateFormat: 'date-time'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Timezone</fs-label>\r\n {{dashboard.databaseTimezone}}\r\n </fs-label-field>\r\n </div>\r\n\r\n <div *ngIf=\"build || dashboard.upgrades.length\">\r\n <h2>Build</h2>\r\n\r\n <ng-container *ngIf=\"build\">\r\n <fs-label-field>\r\n <fs-label>Version</fs-label>\r\n {{build.version}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Date</fs-label>\r\n {{ build.date | fsDateFormat: 'date-time' }}\r\n </fs-label-field>\r\n </ng-container>\r\n\r\n <fs-label-field *ngIf=\"dashboard.upgrades.length\">\r\n <fs-label>Pending Upgrades</fs-label>\r\n <span class=\"attention\" [ngClass]=\"{ 'needs-attention': !!dashboard.upgrades.length }\">\r\n {{dashboard.upgrades.length}}\r\n <mat-icon\r\n [matTooltip]=\"dashboard.upgrades.join('\\n')\"\r\n matTooltipClass=\"tooltip-pending-upgrades\"\r\n >\r\n warning\r\n </mat-icon>\r\n </span>\r\n </fs-label-field>\r\n </div>\r\n\r\n <div>\r\n <h2>Cron</h2>\r\n\r\n <fs-label-field>\r\n <fs-label>Last Ran</fs-label>\r\n <span class=\"attention\" [ngClass]=\"{ 'needs-attention': dashboard.cronRanAttention }\">\r\n <span *ngIf=\"!dashboard.cronRan\">Never</span>\r\n <span *ngIf=\"dashboard.cronRan\">{{dashboard.cronRan | fsDateFormat: 'date-time'}}</span>\r\n <mat-icon>warning</mat-icon>\r\n </span>\r\n </fs-label-field>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".actions{margin-bottom:1.25em}table td{padding:3px}.attention{display:flex;align-items:center}.attention mat-icon{display:none;margin-left:2px}.attention.needs-attention{color:#c00}.attention.needs-attention mat-icon{display:inline}::ng-deep .tooltip-pending-upgrades{white-space:pre-line}@media (max-width: 600px){:host ::ng-deep .menu-button{width:100%;border-radius:4px}}@media (min-width: 600px){:host ::ng-deep .menu-button{box-shadow:none}}\n"], components: [{ type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4__namespace$2.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass", "buttonType", "buttonColor"], outputs: ["opened", "closed"] }, { type: i3__namespace.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3__namespace.FsLabelComponent, selector: "fs-label" }, { type: i6__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i5__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i8__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$2.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }, { type: i8__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9__namespace$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], pipes: { "fsDateFormat": i4__namespace$1.FsDateFormatPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1195
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DashboardComponent, decorators: [{
1196
- type: i0.Component,
1197
- args: [{
1198
- selector: 'fs-system-dashboard',
1199
- templateUrl: 'dashboard.component.html',
1200
- styleUrls: ['dashboard.component.scss'],
1201
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1202
- }]
1203
- }], ctorParameters: function () { return [{ type: i1__namespace$1.FsMessage }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$3.FsBuildService }]; }, propDecorators: { init: [{
1204
- type: i0.Input
1205
- }], upgrade: [{
1206
- type: i0.Input
1207
- }], load: [{
1208
- type: i0.Input
1209
- }], actions: [{
1210
- type: i0.Input
1211
- }] } });
1212
-
1213
- var InfoComponent = /** @class */ (function () {
1214
- function InfoComponent() {
1215
- }
1216
- InfoComponent.prototype.ngAfterViewInit = function () {
1217
- this._load();
1218
- };
1219
- InfoComponent.prototype._load = function () {
1220
- var _this = this;
1221
- this.load()
1222
- .subscribe(function (info) {
1223
- info += '<style>body { background: transparent; }</style>';
1224
- var doc = _this.iframe.nativeElement.contentDocument || _this.iframe.nativeElement.contentWindow;
1225
- doc.open();
1226
- doc.write(info);
1227
- doc.close();
1228
- var scrollHeight = (_this.iframe.nativeElement.contentWindow.document.documentElement.scrollHeight + 100);
1229
- _this.iframe.nativeElement.style.height = scrollHeight + "px";
1230
- });
1231
- };
1232
- return InfoComponent;
1233
- }());
1234
- InfoComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: InfoComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1235
- InfoComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: InfoComponent, selector: "fs-system-info", inputs: { load: "load" }, viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true }], ngImport: i0__namespace, template: "<iframe #iframe></iframe>\r\n", styles: ["iframe{width:100%;border:0}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1236
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: InfoComponent, decorators: [{
1237
- type: i0.Component,
1238
- args: [{
1239
- selector: 'fs-system-info',
1240
- templateUrl: 'info.component.html',
1241
- styleUrls: ['info.component.scss'],
1242
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1243
- }]
1244
- }], propDecorators: { iframe: [{
1245
- type: i0.ViewChild,
1246
- args: ['iframe']
1247
- }], load: [{
1248
- type: i0.Input
1249
- }] } });
1250
-
1251
- var ProcessComponent = /** @class */ (function () {
1252
- function ProcessComponent(data, _message, _cdRef) {
1253
- this.data = data;
1254
- this._message = _message;
1255
- this._cdRef = _cdRef;
1256
- this.ProcessStates = indexNameValue(ProcessStates);
1257
- this.ProcessState = exports.ProcessState;
1258
- }
1259
- ProcessComponent.prototype.ngOnInit = function () {
1260
- if (this.data.loadProcess) {
1261
- this.load();
1262
- }
1263
- else {
1264
- this.process = this.data.process;
1265
- }
1266
- };
1267
- ProcessComponent.prototype.load = function () {
1268
- var _this = this;
1269
- this.data.loadProcess(this.data.process)
1270
- .subscribe(function (process) {
1271
- _this.process = process;
1272
- _this._cdRef.markForCheck();
1273
- });
1274
- };
1275
- ProcessComponent.prototype.run = function () {
1276
- var _this = this;
1277
- this._message.success('Running process');
1278
- this.data.run(this.data.process)
1279
- .subscribe(function () {
1280
- _this.load();
1281
- });
1282
- setTimeout(function () {
1283
- _this.load();
1284
- }, 1000);
1285
- };
1286
- ProcessComponent.prototype.download = function () {
1287
- this.data.download(this.data.process);
1288
- };
1289
- return ProcessComponent;
1290
- }());
1291
- ProcessComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ProcessComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace$1.FsMessage }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1292
- ProcessComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ProcessComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog *fsSkeleton=\"process\">\r\n <div mat-dialog-title>Process</div>\r\n <mat-dialog-content>\r\n <div class=\"column\">\r\n <fs-label-field>\r\n <fs-label>\r\n Name\r\n </fs-label>\r\n {{process.prettyName}}\r\n </fs-label-field>\r\n\r\n <div class=\"fs-row.gap-large.wrap\">\r\n <fs-label-field>\r\n <fs-label>\r\n Status\r\n </fs-label>\r\n {{ProcessStates[process.state]}}\r\n </fs-label-field>\r\n\r\n <fs-label-field *ngIf=\"process.notify\">\r\n <fs-label>\r\n Notification Email\r\n </fs-label>\r\n {{process.notify}}\r\n </fs-label-field>\r\n\r\n <fs-label-field *ngIf=\"process.pid\">\r\n <fs-label>\r\n PID\r\n </fs-label>\r\n {{process.pid}}\r\n </fs-label-field>\r\n </div>\r\n\r\n <div class=\"fs-row.gap-large.wrap\">\r\n <fs-label-field *ngIf=\"process.createDate\">\r\n <fs-label>\r\n Create Date\r\n </fs-label>\r\n {{ process.createDate | fsDateFormat: 'date-time' }}\r\n </fs-label-field>\r\n\r\n <fs-label-field *ngIf=\"process.startDate\">\r\n <fs-label>\r\n Start Date\r\n </fs-label>\r\n {{ process.startDate | fsDateFormat: 'date-time' }}\r\n </fs-label-field>\r\n\r\n <fs-label-field *ngIf=\"process.endDate\">\r\n <fs-label>\r\n Complete Date\r\n </fs-label>\r\n {{ process.endDate | fsDateFormat: 'date-time' }}\r\n </fs-label-field>\r\n\r\n <fs-label-field *ngIf=\"process.duration\">\r\n <fs-label>\r\n Duration\r\n </fs-label>\r\n {{ process.duration | fsDateDuration: {hours: true, minutes: true, seconds: true} }}\r\n </fs-label-field>\r\n </div>\r\n\r\n <fs-label-field *ngIf=\"process.message\">\r\n <fs-label>\r\n Message\r\n </fs-label>\r\n {{process.message}}\r\n </fs-label-field>\r\n\r\n <fs-label-field *ngIf=\"process.log\" class=\"log\">\r\n <fs-label>\r\n Log\r\n </fs-label>{{process.log}}\r\n </fs-label-field>\r\n\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button \r\n mat-button \r\n [mat-dialog-close]=\"true\" \r\n color=\"primary\">\r\n Close\r\n </button>\r\n <button\r\n *ngIf=\"process.state === ProcessState.Running && data.loadProcess\"\r\n mat-button\r\n (click)=\"load()\">\r\n Refresh\r\n </button>\r\n <button \r\n *ngIf=\"process.state !== ProcessState.Running && data.run\" \r\n mat-button \r\n (click)=\"run()\">\r\n Run\r\n </button>\r\n <button\r\n *ngIf=\"process.filename\"\r\n mat-button\r\n (click)=\"download()\">\r\n Download\r\n </button> \r\n </mat-dialog-actions>\r\n</fs-dialog>\r\n", styles: [":host ::ng-deep .log .field-content{white-space:pre-wrap;font-family:monospace;font-size:14px}\n"], components: [{ type: i2__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3__namespace.FsLabelComponent, selector: "fs-label" }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i4__namespace$1.FsDateFormatPipe, "fsDateDuration": i4__namespace$1.FsDateDurationPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1293
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ProcessComponent, decorators: [{
1294
- type: i0.Component,
1295
- args: [{
1296
- templateUrl: './process.component.html',
1297
- styleUrls: ['./process.component.scss'],
1298
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1299
- }]
1300
- }], ctorParameters: function () {
1301
- return [{ type: undefined, decorators: [{
1302
- type: i0.Inject,
1303
- args: [i1.MAT_DIALOG_DATA]
1304
- }] }, { type: i1__namespace$1.FsMessage }, { type: i0__namespace.ChangeDetectorRef }];
1305
- } });
1306
-
1307
- var ProcessesComponent = /** @class */ (function () {
1308
- function ProcessesComponent(_dialog, _message) {
1309
- this._dialog = _dialog;
1310
- this._message = _message;
1311
- this.actions = [];
1312
- this.config = null;
1313
- this.ProcessStates = indexNameValue(ProcessStates);
1314
- this.ProcessState = exports.ProcessState;
1315
- this._destroy$ = new rxjs.Subject();
1316
- }
1317
- ProcessesComponent.prototype.ngOnInit = function () {
1318
- this._configList();
1319
- };
1320
- ProcessesComponent.prototype.reload = function () {
1321
- this.list.reload();
1322
- };
1323
- ProcessesComponent.prototype.open = function (process) {
1324
- var _this = this;
1325
- this._dialog.open(ProcessComponent, {
1326
- data: {
1327
- process: process,
1328
- download: this.download,
1329
- run: this.run,
1330
- loadProcess: this.loadProcess,
1331
- },
1332
- width: '85%',
1333
- })
1334
- .afterClosed()
1335
- .pipe(operators.takeUntil(this._destroy$))
1336
- .subscribe(function () {
1337
- _this.reload();
1338
- });
1339
- };
1340
- ProcessesComponent.prototype.ngOnDestroy = function () {
1341
- this._destroy$.next();
1342
- this._destroy$.complete();
1343
- };
1344
- ProcessesComponent.prototype._configList = function () {
1345
- var _this = this;
1346
- this.config = {
1347
- actions: [],
1348
- rowActions: [],
1349
- filters: [
1350
- {
1351
- type: filter.ItemType.Keyword,
1352
- name: 'keyword',
1353
- label: 'Search',
1354
- },
1355
- {
1356
- type: filter.ItemType.Select,
1357
- name: 'state',
1358
- label: 'Status',
1359
- values: ProcessStates,
1360
- },
1361
- ],
1362
- fetch: function (query) {
1363
- return _this.loadProcesses(query)
1364
- .pipe(operators.map(function (response) { return ({ data: response.data, paging: response.paging }); }));
1365
- },
1366
- };
1367
- if (this.run) {
1368
- this.config.rowActions
1369
- .push({
1370
- label: 'Run',
1371
- show: function (process) {
1372
- return process.state !== exports.ProcessState.Running;
1373
- },
1374
- click: function (data) {
1375
- _this._message.info('Running process...');
1376
- _this.run(data)
1377
- .subscribe(function () {
1378
- _this.reload();
1379
- _this._message.success('Succesfully ran process');
1380
- });
1381
- setTimeout(function () {
1382
- _this.reload();
1383
- }, 500);
1384
- },
1385
- });
1386
- }
1387
- if (this.kill) {
1388
- this.config.rowActions.push({
1389
- label: 'Kill',
1390
- show: function (data) {
1391
- return !!data.pid;
1392
- },
1393
- click: function (data) {
1394
- _this._message.info('Killing process...');
1395
- _this.kill(data)
1396
- .subscribe(function () {
1397
- _this.reload();
1398
- _this._message.success('Succesfully killed process');
1399
- });
1400
- setTimeout(function () {
1401
- _this.reload();
1402
- }, 500);
1403
- },
1404
- });
1405
- }
1406
- if (this.delete) {
1407
- this.config.rowActions.push({
1408
- label: 'Delete',
1409
- click: function (data) {
1410
- _this.delete(data)
1411
- .subscribe(function () {
1412
- _this.reload();
1413
- _this._message.success('Deleted process');
1414
- });
1415
- },
1416
- });
1417
- }
1418
- this.actions.forEach(function (action) {
1419
- _this.config.actions.push({
1420
- primary: false,
1421
- label: action.label,
1422
- menu: action.menu,
1423
- click: function (data) {
1424
- if (action.click) {
1425
- action.click(data);
1426
- }
1427
- if (action.component) {
1428
- _this._dialog.open(action.component, {
1429
- width: '800px',
1430
- })
1431
- .afterClosed()
1432
- .pipe(operators.takeUntil(_this._destroy$))
1433
- .subscribe(function () {
1434
- _this.reload();
1435
- });
1436
- }
1437
- },
1438
- });
1439
- });
1440
- };
1441
- return ProcessesComponent;
1442
- }());
1443
- ProcessesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ProcessesComponent, deps: [{ token: i1__namespace.MatDialog }, { token: i1__namespace$1.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
1444
- ProcessesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ProcessesComponent, selector: "fs-system-processes", inputs: { loadProcesses: "loadProcesses", loadProcess: "loadProcess", run: "run", kill: "kill", delete: "delete", download: "download", actions: "actions" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\">\r\n <fs-list-column>\r\n <ng-template fs-list-header>Name</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <a (click)=\"open(row)\">{{row.prettyName}}</a>\r\n </ng-template>\r\n </fs-list-column>\r\n\r\n <fs-list-column>\r\n <ng-template fs-list-header>Status</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{ProcessStates[row.state]}}\r\n <small>\r\n <div *ngIf=\"row.state===ProcessState.Running && row.percent\">Complete: {{ row.percent }}%</div>\r\n <div *ngIf=\"row.state===ProcessState.Completed && row.filename\">Download: <a href=\"javascript:;\" (click)=\"download(row)\">{{ row.filename }}</a></div>\r\n <div *ngIf=\"row.pid\">PID: {{ row.pid }}</div>\r\n <div *ngIf=\"row.state===ProcessState.Running && row.notify\">Notify: {{ row.notify }}</div>\r\n </small>\r\n </ng-template>\r\n </fs-list-column>\r\n\r\n <fs-list-column>\r\n <ng-template fs-list-header>Duration</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{ row.duration | fsDateDuration: {hours: true, minutes: true, seconds: true} }}\r\n </ng-template>\r\n </fs-list-column>\r\n\r\n\r\n <fs-list-column>\r\n <ng-template fs-list-header>Message</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{row.message}}\r\n </ng-template>\r\n </fs-list-column>\r\n\r\n <fs-list-column>\r\n <ng-template fs-list-header>Completed</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <fs-date-ago [date]=\"row.endDate\"></fs-date-ago>\r\n </ng-template>\r\n </fs-list-column>\r\n</fs-list>\r\n", styles: [""], components: [{ type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsDateDuration": i4__namespace$1.FsDateDurationPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1445
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ProcessesComponent, decorators: [{
1446
- type: i0.Component,
1447
- args: [{
1448
- selector: 'fs-system-processes',
1449
- templateUrl: './processes.component.html',
1450
- styleUrls: ['./processes.component.scss'],
1451
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1452
- }]
1453
- }], ctorParameters: function () { return [{ type: i1__namespace.MatDialog }, { type: i1__namespace$1.FsMessage }]; }, propDecorators: { list: [{
1454
- type: i0.ViewChild,
1455
- args: [i2$2.FsListComponent]
1456
- }], loadProcesses: [{
1457
- type: i0.Input
1458
- }], loadProcess: [{
1459
- type: i0.Input
1460
- }], run: [{
1461
- type: i0.Input
1462
- }], kill: [{
1463
- type: i0.Input
1464
- }], delete: [{
1465
- type: i0.Input
1466
- }], download: [{
1467
- type: i0.Input
1468
- }], actions: [{
1469
- type: i0.Input
1470
- }] } });
1471
-
1472
- var ServerLogComponent = /** @class */ (function () {
1473
- function ServerLogComponent(data) {
1474
- this.data = data;
1475
- }
1476
- ServerLogComponent.prototype.ngOnInit = function () {
1477
- if (this.data.log) {
1478
- this.log = this.data.log;
1479
- try {
1480
- this.log.backtrace = JSON.parse(this.log.backtrace);
1481
- }
1482
- catch (e) { }
1483
- try {
1484
- this.log.server = JSON.parse(this.log.server);
1485
- }
1486
- catch (e) { }
1487
- }
1488
- };
1489
- return ServerLogComponent;
1490
- }());
1491
- ServerLogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ServerLogComponent, deps: [{ token: i1.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
1492
- ServerLogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ServerLogComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog *fsSkeleton=\"log\">\r\n <div mat-dialog-title>Log</div>\r\n <mat-dialog-content>\r\n <div class=\"fs-column\">\r\n <fs-label-field>\r\n <fs-label>\r\n Error Type\r\n </fs-label>\r\n {{log.type}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Message\r\n </fs-label>\r\n {{log.message}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n URL\r\n </fs-label>\r\n {{log.url}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Date\r\n </fs-label>\r\n {{log.createDate|fsDateFormat: 'full-date-time'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n File\r\n </fs-label>\r\n {{log.file}} @ {{log.line}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Backtrace\r\n </fs-label>\r\n <pre>{{log.backtrace|json}}</pre>\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n $_SERVER\r\n </fs-label>\r\n <pre>{{log.server|json}}</pre>\r\n </fs-label-field>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\r\n </mat-dialog-actions>\r\n</fs-dialog>\r\n", styles: [""], components: [{ type: i2__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3__namespace.FsLabelComponent, selector: "fs-label" }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i4__namespace$1.FsDateFormatPipe, "json": i8__namespace.JsonPipe } });
1493
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ServerLogComponent, decorators: [{
1494
- type: i0.Component,
1495
- args: [{
1496
- templateUrl: './server-log.component.html',
1497
- styleUrls: ['./server-log.component.scss']
1498
- }]
1499
- }], ctorParameters: function () {
1500
- return [{ type: undefined, decorators: [{
1501
- type: i0.Inject,
1502
- args: [i1.MAT_DIALOG_DATA]
1503
- }] }];
1504
- } });
1505
-
1506
- var ServerLogsComponent = /** @class */ (function () {
1507
- function ServerLogsComponent(_dialog) {
1508
- this._dialog = _dialog;
1509
- this.config = null;
1510
- this.logTypes = [];
1511
- }
1512
- ServerLogsComponent.prototype.ngOnInit = function () {
1513
- this._configList();
1514
- };
1515
- ServerLogsComponent.prototype._configList = function () {
1516
- var _this = this;
1517
- this.config = {
1518
- filters: [
1519
- {
1520
- type: filter.ItemType.Keyword,
1521
- name: 'keyword',
1522
- label: 'Search'
1523
- }
1524
- ],
1525
- fetch: function (query) {
1526
- return _this.loadLogs(query)
1527
- .pipe(operators.map(function (response) { return ({ data: response.data, paging: response.paging }); }));
1528
- }
1529
- };
1530
- };
1531
- ServerLogsComponent.prototype.open = function (log) {
1532
- this._dialog.open(ServerLogComponent, {
1533
- data: { log: log },
1534
- width: '85%'
1535
- });
1536
- };
1537
- return ServerLogsComponent;
1538
- }());
1539
- ServerLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ServerLogsComponent, deps: [{ token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
1540
- ServerLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ServerLogsComponent, selector: "fs-system-server-logs", inputs: { loadLogs: "loadLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, static: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\">\r\n <fs-list-column>\r\n <ng-template fs-list-header>Message</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <a href=\"javascript:;\" (click)=\"open(row)\">{{row.message}}</a>\r\n </ng-template>\r\n </fs-list-column>\r\n <fs-list-column>\r\n <ng-template fs-list-header>Type</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{row.type}}\r\n </ng-template>\r\n </fs-list-column>\r\n <fs-list-column>\r\n <ng-template fs-list-header>Date</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\r\n </ng-template>\r\n </fs-list-column>\r\n </fs-list>\r\n", styles: [""], components: [{ type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
1541
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ServerLogsComponent, decorators: [{
1542
- type: i0.Component,
1543
- args: [{
1544
- selector: 'fs-system-server-logs',
1545
- templateUrl: './server-logs.component.html',
1546
- styleUrls: ['./server-logs.component.scss']
1547
- }]
1548
- }], ctorParameters: function () { return [{ type: i1__namespace.MatDialog }]; }, propDecorators: { list: [{
1549
- type: i0.ViewChild,
1550
- args: ['list', { static: true }]
1551
- }], loadLogs: [{
1552
- type: i0.Input
1553
- }] } });
1554
-
1555
- var KeyNameValuePipe = /** @class */ (function () {
1556
- function KeyNameValuePipe() {
1557
- }
1558
- KeyNameValuePipe.prototype.transform = function (values) {
1559
- return Object.keys(values).map(function (key) {
1560
- return { value: key, name: values[key] };
1561
- });
1562
- };
1563
- return KeyNameValuePipe;
1564
- }());
1565
- KeyNameValuePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KeyNameValuePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1566
- KeyNameValuePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KeyNameValuePipe, name: "keyNameValue" });
1567
- KeyNameValuePipe.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KeyNameValuePipe });
1568
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KeyNameValuePipe, decorators: [{
1569
- type: i0.Pipe,
1570
- args: [{
1571
- name: 'keyNameValue',
1572
- }]
1573
- }, {
1574
- type: i0.Injectable
1575
- }] });
1576
-
1577
- var SettingsComponent = /** @class */ (function () {
1578
- function SettingsComponent(_message, _clipboard, _prompt, _cdRef) {
1579
- this._message = _message;
1580
- this._clipboard = _clipboard;
1581
- this._prompt = _prompt;
1582
- this._cdRef = _cdRef;
1583
- this.fileRemove = new i0.EventEmitter();
1584
- this.fileSelect = new i0.EventEmitter();
1585
- this.groupedSettings = [];
1586
- this.groups = [];
1587
- this.SettingInterfaceType = SettingInterfaceType;
1588
- }
1589
- SettingsComponent.prototype.ngOnInit = function () {
1590
- var _this = this;
1591
- this.loadSettings({
1592
- visible: true,
1593
- })
1594
- .subscribe(function (settings) {
1595
- settings = settings
1596
- .filter(function (setting) {
1597
- return setting.interfaceType !== SettingInterfaceType.None;
1598
- })
1599
- .map(function (setting) {
1600
- switch (setting.interfaceType) {
1601
- case SettingInterfaceType.Date:
1602
- case SettingInterfaceType.Time:
1603
- return Object.assign(Object.assign({}, setting), { value: i4$1.parse(setting.value) });
1604
- case SettingInterfaceType.SelectMultiple:
1605
- return Object.assign(Object.assign({}, setting), { value: Array.isArray(setting.value) ? setting.value : [] });
1606
- }
1607
- return setting;
1608
- });
1609
- _this.groupedSettings = settings.reduce(function (accum, item) {
1610
- if (accum[item.group] === undefined) {
1611
- accum[item.group] = [];
1612
- }
1613
- accum[item.group].push(item);
1614
- return accum;
1615
- }, {});
1616
- _this.groups = Object.keys(_this.groupedSettings);
1617
- _this._cdRef.markForCheck();
1618
- });
1619
- };
1620
- SettingsComponent.prototype.export = function (event, settings) {
1621
- event.stopPropagation();
1622
- var data = settings.map(function (setting) {
1623
- return {
1624
- name: setting.name,
1625
- value: setting.value,
1626
- group: setting.group,
1627
- };
1628
- });
1629
- this._clipboard.copy(JSON.stringify(data));
1630
- this._message.success('Copied to clipboard');
1631
- };
1632
- SettingsComponent.prototype.import = function (event, group) {
1633
- var _this = this;
1634
- event.stopPropagation();
1635
- this._prompt.input({
1636
- label: 'JSON Import',
1637
- title: 'Import Settings',
1638
- commitLabel: 'Import',
1639
- required: true,
1640
- }).subscribe(function (value) {
1641
- if (value) {
1642
- try {
1643
- var settings_1 = _this.groupedSettings[group];
1644
- var data = JSON.parse(value);
1645
- data.forEach(function (item) {
1646
- var setting = settings_1.find(function (s) {
1647
- return item.name === s.name;
1648
- });
1649
- if (setting) {
1650
- Object.assign(setting, item);
1651
- }
1652
- });
1653
- _this._cdRef.markForCheck();
1654
- }
1655
- catch (e) {
1656
- _this._message.error(e);
1657
- }
1658
- }
1659
- });
1660
- };
1661
- SettingsComponent.prototype.saveGroup = function (group) {
1662
- var _this = this;
1663
- var settings = this.groupedSettings[group];
1664
- var values = settings.reduce(function (result, value) {
1665
- return (result[value.name] = value.value, result);
1666
- }, {});
1667
- this.save(group, values)
1668
- .subscribe(function () {
1669
- _this._message.success('Changes Saved');
1670
- });
1671
- };
1672
- return SettingsComponent;
1673
- }());
1674
- SettingsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SettingsComponent, deps: [{ token: i1__namespace$1.FsMessage }, { token: i2__namespace$1.FsClipboard }, { token: i3__namespace$2.FsPrompt }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1675
- SettingsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SettingsComponent, selector: "fs-system-settings", inputs: { loadSettings: "loadSettings", save: "save" }, outputs: { fileRemove: "fileRemove", fileSelect: "fileSelect" }, ngImport: i0__namespace, template: "\r\n<mat-accordion>\r\n <mat-expansion-panel hideToggle *ngFor=\"let group of groups\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <div class=\"title-row\">\r\n <div class=\"title\">{{group || 'General'}}</div>\r\n <div class=\"actions\">\r\n <button\r\n type=\"button\"\r\n [matTooltip]=\"'Export ' + (group || 'General') + ' Settings'\"\r\n mat-icon-button\r\n (click)=\"export($event, groupedSettings[group])\">\r\n <mat-icon>cloud_download</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n [matTooltip]=\"'Import ' + (group || 'General') + ' Settings'\"\r\n mat-icon-button\r\n (click)=\"import($event, group)\">\r\n <mat-icon>cloud_upload</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div \r\n hideToggle \r\n *ngFor=\"let setting of groupedSettings[group]\" \r\n class=\"setting\"\r\n [ngClass]=\"{ 'has-instruction': !! setting.instruction }\">\r\n <mat-form-field \r\n class=\"full-width form-field-multiline-subscript\"\r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.InputBox\">\r\n <input\r\n matInput\r\n [placeholder]=\"setting.label\"\r\n [(ngModel)]=\"setting.value\"\r\n [name]=\"'setting' + setting.id\">\r\n <mat-hint>{{setting.instruction}}</mat-hint>\r\n </mat-form-field>\r\n\r\n <mat-form-field \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Textarea\">\r\n <textarea\r\n matInput\r\n [placeholder]=\"setting.label\"\r\n [(ngModel)]=\"setting.value\"\r\n [name]=\"'setting' + setting.id\">\r\n </textarea>\r\n <mat-hint>{{setting.instruction}}</mat-hint>\r\n </mat-form-field>\r\n\r\n <mat-form-field \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Select || setting.interfaceType===SettingInterfaceType.SelectMultiple\">\r\n <mat-select\r\n [placeholder]=\"setting.label\"\r\n [(ngModel)]=\"setting.value\"\r\n [multiple]=\"setting.interfaceType===SettingInterfaceType.SelectMultiple\"\r\n [name]=\"'setting' + setting.id\">\r\n <mat-option *ngFor=\"let item of setting.values | keyNameValue\" [value]=\"item.value\">\r\n {{item.name}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-hint>{{setting.instruction}}</mat-hint>\r\n </mat-form-field>\r\n\r\n <mat-form-field \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Date\">\r\n <input\r\n matInput\r\n fsDatePicker\r\n [placeholder]=\"setting.label\"\r\n [(ngModel)]=\"setting.value\"\r\n [name]=\"'setting' + setting.id\">\r\n <mat-hint>{{setting.instruction}}</mat-hint>\r\n </mat-form-field>\r\n\r\n <mat-form-field \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Color\">\r\n <input\r\n matInput\r\n fsColorPicker\r\n [placeholder]=\"setting.label\"\r\n [(ngModel)]=\"setting.value\"\r\n [name]=\"'setting' + setting.id\">\r\n <mat-hint>{{setting.instruction}}</mat-hint>\r\n </mat-form-field>\r\n\r\n <mat-form-field \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Time\">\r\n <input\r\n matInput\r\n fsTimePicker\r\n [placeholder]=\"setting.label\"\r\n [(ngModel)]=\"setting.value\"\r\n [name]=\"'setting' + setting.id\">\r\n <mat-hint>{{setting.instruction}}</mat-hint>\r\n </mat-form-field>\r\n\r\n <fs-file-picker\r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.File\"\r\n [allowRemove]=\"true\"\r\n [allowDownload]=\"true\"\r\n (select)=\"fileSelect.emit({ setting: setting, file: $event.file })\"\r\n (remove)=\"fileRemove.emit(setting)\"\r\n [url]=\"setting.value\">\r\n <div fsFileLabel>{{setting.label}}</div>\r\n <div fsFileHint>{{setting.instruction}}</div>\r\n </fs-file-picker>\r\n </div>\r\n\r\n <button mat-raised-button color=\"primary\" type=\"button\" (click)=\"saveGroup(group)\">Save</button>\r\n\r\n </mat-expansion-panel>\r\n\r\n</mat-accordion>\r\n", styles: [".mat-expansion-panel-header{font-size:19px}.full-width{width:100%}.title-row{flex-direction:row;box-sizing:border-box;display:flex;place-content:center flex-start;align-items:center;width:100%}.title-row .title{display:flex;flex:1}:host ::ng-deep .mat-expansion-panel-header-title{margin:0}:host ::ng-deep .mat-expansion-panel .actions{display:none}:host ::ng-deep .mat-expansion-panel.mat-expanded .actions{display:block}:host ::ng-deep .setting.has-instruction fs-file-picker fs-label-message{display:block;padding-bottom:1em}\n"], components: [{ type: i4__namespace$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i4__namespace$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i8__namespace$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i9__namespace$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i10__namespace.FsDatePickerComponent, selector: "[fsDatePicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "startOfDay", "view", "format", "minutes", "weekStartsOn"], outputs: ["change"] }, { type: i11__namespace.FsColorPickerComponent, selector: "[fsColorPicker]", inputs: ["showClear"] }, { type: i10__namespace.FsTimePickerComponent, selector: "[fsTimePicker]", inputs: ["view"] }, { type: i12__namespace.FsFilePickerComponent, selector: "fs-file-picker", inputs: ["minWidth", "minHeight", "imageWidth", "imageHeight", "imageQuality", "label", "showFilename", "allowDownload", "allowReupload", "multiple", "allowRemove", "url", "file", "accept", "disabled", "previewWidth", "previewHeight"], outputs: ["select", "remove", "download"] }], directives: [{ type: i4__namespace$3.MatAccordion, selector: "mat-accordion", inputs: ["multi", "displayMode", "togglePosition", "hideToggle"], exportAs: ["matAccordion"] }, { type: i8__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i9__namespace$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i8__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i15__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i16__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i16__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i16__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7__namespace$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i12__namespace.FsFileLabelDirective, selector: "[fsFileLabel]" }], pipes: { "keyNameValue": KeyNameValuePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1676
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SettingsComponent, decorators: [{
1677
- type: i0.Component,
1678
- args: [{
1679
- selector: 'fs-system-settings',
1680
- templateUrl: './settings.component.html',
1681
- styleUrls: ['./settings.component.scss'],
1682
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1683
- }]
1684
- }], ctorParameters: function () { return [{ type: i1__namespace$1.FsMessage }, { type: i2__namespace$1.FsClipboard }, { type: i3__namespace$2.FsPrompt }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { loadSettings: [{
1685
- type: i0.Input
1686
- }], save: [{
1687
- type: i0.Input
1688
- }], fileRemove: [{
1689
- type: i0.Output
1690
- }], fileSelect: [{
1691
- type: i0.Output
1692
- }] } });
1693
-
1694
- var UpgradeLogsComponent = /** @class */ (function () {
1695
- function UpgradeLogsComponent() {
1696
- this.config = null;
1697
- this.logTypes = [];
1698
- }
1699
- UpgradeLogsComponent.prototype.ngOnInit = function () {
1700
- this._configList();
1701
- };
1702
- UpgradeLogsComponent.prototype._configList = function () {
1703
- var _this = this;
1704
- this.config = {
1705
- paging: false,
1706
- filters: [
1707
- {
1708
- type: filter.ItemType.Keyword,
1709
- name: 'keyword',
1710
- label: 'Search'
1711
- }
1712
- ],
1713
- fetch: function (query) {
1714
- return _this.loadUpgradeLogs(query)
1715
- .pipe(operators.map(function (response) { return ({ data: response.data, paging: response.paging }); }));
1716
- }
1717
- };
1718
- };
1719
- return UpgradeLogsComponent;
1720
- }());
1721
- UpgradeLogsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UpgradeLogsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1722
- UpgradeLogsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: UpgradeLogsComponent, selector: "fs-system-upgrade-logs", inputs: { loadUpgradeLogs: "loadUpgradeLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$2.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\">\r\n <fs-list-column>\r\n <ng-template fs-list-header>Name</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{row.name}}\r\n </ng-template>\r\n </fs-list-column>\r\n\r\n <fs-list-column>\r\n <ng-template fs-list-header>Function</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{row.function}}()\r\n </ng-template>\r\n </fs-list-column>\r\n\r\n <fs-list-column>\r\n <ng-template fs-list-header>Date</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\r\n </ng-template>\r\n </fs-list-column>\r\n</fs-list>\r\n", styles: [""], components: [{ type: i2__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
1723
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UpgradeLogsComponent, decorators: [{
1724
- type: i0.Component,
1725
- args: [{
1726
- selector: 'fs-system-upgrade-logs',
1727
- templateUrl: './upgrade-logs.component.html',
1728
- styleUrls: ['./upgrade-logs.component.scss']
1729
- }]
1730
- }], propDecorators: { list: [{
1731
- type: i0.ViewChild,
1732
- args: [i2$2.FsListComponent, { static: true }]
1733
- }], loadUpgradeLogs: [{
1734
- type: i0.Input
1735
- }] } });
1736
-
1737
- var FS_SYSTEM_CONFIG = new i0.InjectionToken('fs-system-config');
1738
-
1739
- var FsSystemModule = /** @class */ (function () {
1740
- function FsSystemModule() {
1741
- }
1742
- FsSystemModule.forRoot = function (config) {
1743
- return {
1744
- ngModule: FsSystemModule,
1745
- providers: [
1746
- { provide: FS_SYSTEM_CONFIG, useValue: config || {} },
1747
- ],
1748
- };
1749
- };
1750
- return FsSystemModule;
1751
- }());
1752
- FsSystemModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsSystemModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1753
- FsSystemModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsSystemModule, declarations: [DashboardComponent,
1754
- CronsComponent,
1755
- SettingsComponent,
1756
- KeyNameValuePipe,
1757
- ProcessesComponent,
1758
- ServerLogComponent,
1759
- ServerLogsComponent,
1760
- UpgradeLogsComponent,
1761
- ApiLogsComponent,
1762
- ApiLogComponent,
1763
- InfoComponent,
1764
- ProcessComponent,
1765
- CronComponent,
1766
- CronLogComponent], imports: [i8.CommonModule,
1767
- i16.FormsModule,
1768
- i4.MatButtonModule,
1769
- i4$3.MatExpansionModule,
1770
- i9$1.MatTooltipModule,
1771
- i6.MatIconModule,
1772
- i7$1.MatFormFieldModule,
1773
- i15.MatInputModule,
1774
- i8$1.MatSelectModule,
1775
- i1.MatDialogModule,
1776
- i3$1.MatTabsModule,
1777
- i4$1.FsDateModule,
1778
- i5.FsSkeletonModule,
1779
- i2$2.FsListModule,
1780
- i12.FsFileModule,
1781
- fileManager.FsFileManagerModule,
1782
- i3.FsLabelModule,
1783
- i2.FsDialogModule,
1784
- i10.FsDatePickerModule,
1785
- i4$2.FsMenuModule,
1786
- i7.FsPopoverModule,
1787
- i11.FsColorPickerModule], exports: [DashboardComponent,
1788
- CronsComponent,
1789
- SettingsComponent,
1790
- ProcessesComponent,
1791
- ServerLogsComponent,
1792
- UpgradeLogsComponent,
1793
- ApiLogsComponent,
1794
- InfoComponent] });
1795
- FsSystemModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsSystemModule, imports: [[
1796
- i8.CommonModule,
1797
- i16.FormsModule,
1798
- i4.MatButtonModule,
1799
- i4$3.MatExpansionModule,
1800
- i9$1.MatTooltipModule,
1801
- i6.MatIconModule,
1802
- i7$1.MatFormFieldModule,
1803
- i15.MatInputModule,
1804
- i8$1.MatSelectModule,
1805
- i1.MatDialogModule,
1806
- i3$1.MatTabsModule,
1807
- i4$1.FsDateModule,
1808
- i5.FsSkeletonModule,
1809
- i2$2.FsListModule,
1810
- i12.FsFileModule,
1811
- fileManager.FsFileManagerModule,
1812
- i3.FsLabelModule,
1813
- i2.FsDialogModule,
1814
- i10.FsDatePickerModule,
1815
- i4$2.FsMenuModule,
1816
- i7.FsPopoverModule,
1817
- i11.FsColorPickerModule,
1818
- ]] });
1819
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsSystemModule, decorators: [{
1820
- type: i0.NgModule,
1821
- args: [{
1822
- imports: [
1823
- i8.CommonModule,
1824
- i16.FormsModule,
1825
- i4.MatButtonModule,
1826
- i4$3.MatExpansionModule,
1827
- i9$1.MatTooltipModule,
1828
- i6.MatIconModule,
1829
- i7$1.MatFormFieldModule,
1830
- i15.MatInputModule,
1831
- i8$1.MatSelectModule,
1832
- i1.MatDialogModule,
1833
- i3$1.MatTabsModule,
1834
- i4$1.FsDateModule,
1835
- i5.FsSkeletonModule,
1836
- i2$2.FsListModule,
1837
- i12.FsFileModule,
1838
- fileManager.FsFileManagerModule,
1839
- i3.FsLabelModule,
1840
- i2.FsDialogModule,
1841
- i10.FsDatePickerModule,
1842
- i4$2.FsMenuModule,
1843
- i7.FsPopoverModule,
1844
- i11.FsColorPickerModule,
1845
- ],
1846
- exports: [
1847
- DashboardComponent,
1848
- CronsComponent,
1849
- SettingsComponent,
1850
- ProcessesComponent,
1851
- ServerLogsComponent,
1852
- UpgradeLogsComponent,
1853
- ApiLogsComponent,
1854
- InfoComponent,
1855
- ],
1856
- declarations: [
1857
- DashboardComponent,
1858
- CronsComponent,
1859
- SettingsComponent,
1860
- KeyNameValuePipe,
1861
- ProcessesComponent,
1862
- ServerLogComponent,
1863
- ServerLogsComponent,
1864
- UpgradeLogsComponent,
1865
- ApiLogsComponent,
1866
- ApiLogComponent,
1867
- InfoComponent,
1868
- ProcessComponent,
1869
- CronComponent,
1870
- CronLogComponent,
1871
- ],
1872
- }]
1873
- }] });
1874
-
1875
- /**
1876
- * Generated bundle index. Do not edit.
1877
- */
1878
-
1879
- exports.ApiLogComponent = ApiLogComponent;
1880
- exports.ApiLogStates = ApiLogStates;
1881
- exports.ApiLogsComponent = ApiLogsComponent;
1882
- exports.CronComponent = CronComponent;
1883
- exports.CronLogComponent = CronLogComponent;
1884
- exports.CronStates = CronStates;
1885
- exports.CronsComponent = CronsComponent;
1886
- exports.DashboardComponent = DashboardComponent;
1887
- exports.FS_SYSTEM_CONFIG = FS_SYSTEM_CONFIG;
1888
- exports.FsSystemModule = FsSystemModule;
1889
- exports.FsSystemQueryLogsModule = FsSystemQueryLogsModule;
1890
- exports.InfoComponent = InfoComponent;
1891
- exports.KeyNameValuePipe = KeyNameValuePipe;
1892
- exports.ProcessComponent = ProcessComponent;
1893
- exports.ProcessStates = ProcessStates;
1894
- exports.ProcessesComponent = ProcessesComponent;
1895
- exports.QueryLogsComponent = QueryLogsComponent;
1896
- exports.ServerLogComponent = ServerLogComponent;
1897
- exports.ServerLogsComponent = ServerLogsComponent;
1898
- exports.SettingsComponent = SettingsComponent;
1899
- exports.UpgradeLogsComponent = UpgradeLogsComponent;
1900
-
1901
- Object.defineProperty(exports, '__esModule', { value: true });
1902
-
1903
- }));
1904
- //# sourceMappingURL=firestitch-system.umd.js.map