@firestitch/system 12.5.5 → 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.
- package/esm2020/app/modules/query-logs/components/explain/explain.component.mjs +24 -0
- package/esm2020/app/modules/query-logs/components/query-log/query-log.component.mjs +58 -0
- package/esm2020/app/modules/query-logs/components/query-logs/query-logs.component.mjs +84 -0
- package/{esm2015/app/modules/query-logs/query-logs.module.js → esm2020/app/modules/query-logs/query-logs.module.mjs} +5 -5
- package/esm2020/app/modules/system/components/api-log/api-log.component.mjs +34 -0
- package/esm2020/app/modules/system/components/api-logs/api-logs.component.mjs +69 -0
- package/esm2020/app/modules/system/components/cron/cron.component.mjs +104 -0
- package/esm2020/app/modules/system/components/cron-log/cron-log.component.mjs +37 -0
- package/esm2020/app/modules/system/components/crons/crons.component.mjs +231 -0
- package/esm2020/app/modules/system/components/dashboard/dashboard.component.mjs +84 -0
- package/esm2020/app/modules/system/components/info/info.component.mjs +31 -0
- package/esm2020/app/modules/system/components/process/process.component.mjs +62 -0
- package/esm2020/app/modules/system/components/processes/processes.component.mjs +174 -0
- package/esm2020/app/modules/system/components/server-log/server-log.component.mjs +38 -0
- package/esm2020/app/modules/system/components/server-logs/server-logs.component.mjs +53 -0
- package/esm2020/app/modules/system/components/settings/settings.component.mjs +138 -0
- package/esm2020/app/modules/system/components/upgrade-logs/upgrade-logs.component.mjs +44 -0
- package/{esm2015/app/modules/system/fs-system.module.js → esm2020/app/modules/system/fs-system.module.mjs} +5 -5
- package/{esm2015/app/modules/system/pipes/key-name-value.pipe.js → esm2020/app/modules/system/pipes/key-name-value.pipe.mjs} +5 -5
- package/fesm2015/firestitch-system.mjs +1447 -0
- package/fesm2015/firestitch-system.mjs.map +1 -0
- package/fesm2020/firestitch-system.mjs +1449 -0
- package/fesm2020/firestitch-system.mjs.map +1 -0
- package/package.json +20 -7
- package/styles.scss +3 -0
- package/bundles/firestitch-system.umd.js +0 -1904
- package/bundles/firestitch-system.umd.js.map +0 -1
- package/esm2015/app/modules/query-logs/components/explain/explain.component.js +0 -27
- package/esm2015/app/modules/query-logs/components/query-log/query-log.component.js +0 -63
- package/esm2015/app/modules/query-logs/components/query-logs/query-logs.component.js +0 -89
- package/esm2015/app/modules/system/components/api-log/api-log.component.js +0 -37
- package/esm2015/app/modules/system/components/api-logs/api-logs.component.js +0 -73
- package/esm2015/app/modules/system/components/cron/cron.component.js +0 -102
- package/esm2015/app/modules/system/components/cron-log/cron-log.component.js +0 -40
- package/esm2015/app/modules/system/components/crons/crons.component.js +0 -229
- package/esm2015/app/modules/system/components/dashboard/dashboard.component.js +0 -89
- package/esm2015/app/modules/system/components/info/info.component.js +0 -36
- package/esm2015/app/modules/system/components/process/process.component.js +0 -66
- package/esm2015/app/modules/system/components/processes/processes.component.js +0 -179
- package/esm2015/app/modules/system/components/server-log/server-log.component.js +0 -41
- package/esm2015/app/modules/system/components/server-logs/server-logs.component.js +0 -57
- package/esm2015/app/modules/system/components/settings/settings.component.js +0 -137
- package/esm2015/app/modules/system/components/upgrade-logs/upgrade-logs.component.js +0 -48
- package/fesm2015/firestitch-system.js +0 -1498
- package/fesm2015/firestitch-system.js.map +0 -1
- /package/{esm2015/app/modules/query-logs/components/explain/index.js → esm2020/app/modules/query-logs/components/explain/index.mjs} +0 -0
- /package/{esm2015/app/modules/query-logs/components/index.js → esm2020/app/modules/query-logs/components/index.mjs} +0 -0
- /package/{esm2015/app/modules/query-logs/components/query-log/index.js → esm2020/app/modules/query-logs/components/query-log/index.mjs} +0 -0
- /package/{esm2015/app/modules/query-logs/components/query-logs/index.js → esm2020/app/modules/query-logs/components/query-logs/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/api-log/index.js → esm2020/app/modules/system/components/api-log/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/api-logs/index.js → esm2020/app/modules/system/components/api-logs/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/cron/index.js → esm2020/app/modules/system/components/cron/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/cron-log/index.js → esm2020/app/modules/system/components/cron-log/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/crons/index.js → esm2020/app/modules/system/components/crons/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/dashboard/index.js → esm2020/app/modules/system/components/dashboard/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/info/index.js → esm2020/app/modules/system/components/info/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/process/index.js → esm2020/app/modules/system/components/process/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/processes/index.js → esm2020/app/modules/system/components/processes/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/server-log/index.js → esm2020/app/modules/system/components/server-log/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/server-logs/index.js → esm2020/app/modules/system/components/server-logs/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/settings/index.js → esm2020/app/modules/system/components/settings/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/components/upgrade-logs/index.js → esm2020/app/modules/system/components/upgrade-logs/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/consts/api-log-states.const.js → esm2020/app/modules/system/consts/api-log-states.const.mjs} +0 -0
- /package/{esm2015/app/modules/system/consts/cron-log-states.const.js → esm2020/app/modules/system/consts/cron-log-states.const.mjs} +0 -0
- /package/{esm2015/app/modules/system/consts/cron-states.const.js → esm2020/app/modules/system/consts/cron-states.const.mjs} +0 -0
- /package/{esm2015/app/modules/system/consts/index.js → esm2020/app/modules/system/consts/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/consts/process-states.const.js → esm2020/app/modules/system/consts/process-states.const.mjs} +0 -0
- /package/{esm2015/app/modules/system/enums/api-log-state.enum.js → esm2020/app/modules/system/enums/api-log-state.enum.mjs} +0 -0
- /package/{esm2015/app/modules/system/enums/cron-log-state.enum.js → esm2020/app/modules/system/enums/cron-log-state.enum.mjs} +0 -0
- /package/{esm2015/app/modules/system/enums/cron-state.enum.js → esm2020/app/modules/system/enums/cron-state.enum.mjs} +0 -0
- /package/{esm2015/app/modules/system/enums/index.js → esm2020/app/modules/system/enums/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/enums/process-state.enum.js → esm2020/app/modules/system/enums/process-state.enum.mjs} +0 -0
- /package/{esm2015/app/modules/system/enums/setting-interface-type.enum.js → esm2020/app/modules/system/enums/setting-interface-type.enum.mjs} +0 -0
- /package/{esm2015/app/modules/system/helpers/index-name-value.js → esm2020/app/modules/system/helpers/index-name-value.mjs} +0 -0
- /package/{esm2015/app/modules/system/injectors/system-config.injector.js → esm2020/app/modules/system/injectors/system-config.injector.mjs} +0 -0
- /package/{esm2015/app/modules/system/interfaces/dashboard-action.js → esm2020/app/modules/system/interfaces/dashboard-action.mjs} +0 -0
- /package/{esm2015/app/modules/system/interfaces/index.js → esm2020/app/modules/system/interfaces/index.mjs} +0 -0
- /package/{esm2015/app/modules/system/interfaces/process-action.js → esm2020/app/modules/system/interfaces/process-action.mjs} +0 -0
- /package/{esm2015/app/modules/system/interfaces/system-config.js → esm2020/app/modules/system/interfaces/system-config.mjs} +0 -0
- /package/{esm2015/firestitch-system.js → esm2020/firestitch-system.mjs} +0 -0
- /package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
|
@@ -1,1498 +0,0 @@
|
|
|
1
|
-
import * as i8 from '@angular/common';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, ChangeDetectionStrategy, Inject, ViewChild, Input, NgModule, Pipe, Injectable, EventEmitter, Output, InjectionToken } from '@angular/core';
|
|
5
|
-
import * as i16 from '@angular/forms';
|
|
6
|
-
import { FormsModule } from '@angular/forms';
|
|
7
|
-
import { RouterModule } from '@angular/router';
|
|
8
|
-
import * as i4 from '@angular/material/button';
|
|
9
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
10
|
-
import * as i1 from '@angular/material/dialog';
|
|
11
|
-
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
12
|
-
import * as i3$1 from '@angular/material/tabs';
|
|
13
|
-
import { MatTabsModule } from '@angular/material/tabs';
|
|
14
|
-
import * as i2$1 from '@firestitch/clipboard';
|
|
15
|
-
import { FsClipboardModule } from '@firestitch/clipboard';
|
|
16
|
-
import * as i9 from '@firestitch/common';
|
|
17
|
-
import { FsCommonModule } from '@firestitch/common';
|
|
18
|
-
import * as i4$1 from '@firestitch/date';
|
|
19
|
-
import { FsDateModule, parse } from '@firestitch/date';
|
|
20
|
-
import * as i2 from '@firestitch/dialog';
|
|
21
|
-
import { FsDialogModule } from '@firestitch/dialog';
|
|
22
|
-
import { FsFormModule } from '@firestitch/form';
|
|
23
|
-
import * as i3 from '@firestitch/label';
|
|
24
|
-
import { FsLabelModule } from '@firestitch/label';
|
|
25
|
-
import * as i2$2 from '@firestitch/list';
|
|
26
|
-
import { FsListComponent, FsListModule } from '@firestitch/list';
|
|
27
|
-
import * as i7 from '@firestitch/popover';
|
|
28
|
-
import { FsPopoverModule } from '@firestitch/popover';
|
|
29
|
-
import { ItemType } from '@firestitch/filter';
|
|
30
|
-
import { map, tap, switchMap, takeUntil } from 'rxjs/operators';
|
|
31
|
-
import * as i4$3 from '@angular/material/expansion';
|
|
32
|
-
import { MatExpansionModule } from '@angular/material/expansion';
|
|
33
|
-
import * as i7$1 from '@angular/material/form-field';
|
|
34
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
35
|
-
import * as i6 from '@angular/material/icon';
|
|
36
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
37
|
-
import * as i15 from '@angular/material/input';
|
|
38
|
-
import { MatInputModule } from '@angular/material/input';
|
|
39
|
-
import * as i8$1 from '@angular/material/select';
|
|
40
|
-
import { MatSelectModule } from '@angular/material/select';
|
|
41
|
-
import * as i9$1 from '@angular/material/tooltip';
|
|
42
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
43
|
-
import * as i11 from '@firestitch/colorpicker';
|
|
44
|
-
import { FsColorPickerModule } from '@firestitch/colorpicker';
|
|
45
|
-
import * as i10 from '@firestitch/datepicker';
|
|
46
|
-
import { FsDatePickerModule } from '@firestitch/datepicker';
|
|
47
|
-
import * as i12 from '@firestitch/file';
|
|
48
|
-
import { FsFileModule } from '@firestitch/file';
|
|
49
|
-
import { FsFileManagerModule } from '@firestitch/file-manager';
|
|
50
|
-
import * as i4$2 from '@firestitch/menu';
|
|
51
|
-
import { FsMenuModule } from '@firestitch/menu';
|
|
52
|
-
import * as i5 from '@firestitch/skeleton';
|
|
53
|
-
import { FsSkeletonModule } from '@firestitch/skeleton';
|
|
54
|
-
import * as i1$1 from '@firestitch/message';
|
|
55
|
-
import * as i3$2 from '@firestitch/prompt';
|
|
56
|
-
import { SelectionActionType } from '@firestitch/selection';
|
|
57
|
-
import { Subject } from 'rxjs';
|
|
58
|
-
import { differenceInSeconds, differenceInMinutes } from 'date-fns';
|
|
59
|
-
import * as i2$3 from '@firestitch/build';
|
|
60
|
-
import * as i9$2 from '@angular/material/core';
|
|
61
|
-
|
|
62
|
-
class ExplainComponent {
|
|
63
|
-
constructor(_data) {
|
|
64
|
-
this._data = _data;
|
|
65
|
-
this.explain = _data.explain;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
ExplainComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExplainComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
-
ExplainComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ExplainComponent, selector: "ng-component", ngImport: i0, 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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4.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.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "json": i8.JsonPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ExplainComponent, decorators: [{
|
|
71
|
-
type: Component,
|
|
72
|
-
args: [{
|
|
73
|
-
templateUrl: './explain.component.html',
|
|
74
|
-
styleUrls: ['./explain.component.scss'],
|
|
75
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
76
|
-
}]
|
|
77
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
78
|
-
type: Inject,
|
|
79
|
-
args: [MAT_DIALOG_DATA]
|
|
80
|
-
}] }]; } });
|
|
81
|
-
|
|
82
|
-
class QueryLogComponent {
|
|
83
|
-
constructor(_data, _dialog) {
|
|
84
|
-
this._data = _data;
|
|
85
|
-
this._dialog = _dialog;
|
|
86
|
-
this.accessTypes = {
|
|
87
|
-
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.',
|
|
88
|
-
system: 'The table is empty or has one row.',
|
|
89
|
-
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',
|
|
90
|
-
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)',
|
|
91
|
-
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.',
|
|
92
|
-
fulltext: 'Operation (JOIN) is using the table’s fulltext index',
|
|
93
|
-
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.',
|
|
94
|
-
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.',
|
|
95
|
-
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)',
|
|
96
|
-
unique_subquery: '',
|
|
97
|
-
ALL: 'MySQL scans the entire table to satisfy the query',
|
|
98
|
-
};
|
|
99
|
-
this.queryLog = _data.queryLog;
|
|
100
|
-
}
|
|
101
|
-
openExplain() {
|
|
102
|
-
this._dialog.open(ExplainComponent, {
|
|
103
|
-
data: { explain: this.explain },
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
get explain() {
|
|
107
|
-
return this.queryLog.explain;
|
|
108
|
-
}
|
|
109
|
-
get queryBlock() {
|
|
110
|
-
var _a;
|
|
111
|
-
return (_a = this.explain) === null || _a === void 0 ? void 0 : _a.queryBlock;
|
|
112
|
-
}
|
|
113
|
-
get orderingOperation() {
|
|
114
|
-
var _a;
|
|
115
|
-
return (_a = this.queryBlock) === null || _a === void 0 ? void 0 : _a.orderingOperation;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
QueryLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueryLogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
119
|
-
QueryLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QueryLogComponent, selector: "ng-component", ngImport: i0, 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 </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.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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i3$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i2$1.FsClipboardButtonComponent, selector: "fs-clipboard-button", inputs: ["content"] }, { type: i4.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.FsPopoverComponent, selector: "fs-popover" }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fsFormatTruncate": i9.FsFormatTruncatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueryLogComponent, decorators: [{
|
|
121
|
-
type: Component,
|
|
122
|
-
args: [{
|
|
123
|
-
templateUrl: './query-log.component.html',
|
|
124
|
-
styleUrls: ['./query-log.component.scss'],
|
|
125
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
126
|
-
}]
|
|
127
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
128
|
-
type: Inject,
|
|
129
|
-
args: [MAT_DIALOG_DATA]
|
|
130
|
-
}] }, { type: i1.MatDialog }]; } });
|
|
131
|
-
|
|
132
|
-
class QueryLogsComponent {
|
|
133
|
-
constructor(_dialog) {
|
|
134
|
-
this._dialog = _dialog;
|
|
135
|
-
}
|
|
136
|
-
openQueryLog(queryLog) {
|
|
137
|
-
this._dialog.open(QueryLogComponent, {
|
|
138
|
-
data: { queryLog },
|
|
139
|
-
width: '100%',
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
ngOnInit() {
|
|
143
|
-
this.listConfig = {
|
|
144
|
-
filters: [
|
|
145
|
-
{
|
|
146
|
-
name: 'keyword',
|
|
147
|
-
type: ItemType.Keyword,
|
|
148
|
-
label: 'Search',
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
name: 'optimized',
|
|
152
|
-
type: ItemType.Select,
|
|
153
|
-
label: 'Optimization',
|
|
154
|
-
values: [
|
|
155
|
-
{ name: 'Any', value: undefined },
|
|
156
|
-
{ name: 'Yes', value: 'true' },
|
|
157
|
-
{ name: 'No', value: 'false' },
|
|
158
|
-
],
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
name: 'createDate',
|
|
162
|
-
type: ItemType.DateTimeRange,
|
|
163
|
-
label: ['From Date', 'To Date'],
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
name: 'duration',
|
|
167
|
-
type: ItemType.Range,
|
|
168
|
-
label: ['Min Duration', 'Max Duration'],
|
|
169
|
-
},
|
|
170
|
-
],
|
|
171
|
-
actions: [
|
|
172
|
-
{
|
|
173
|
-
label: 'Purge',
|
|
174
|
-
primary: false,
|
|
175
|
-
click: () => {
|
|
176
|
-
this.purgeQueryLogs()
|
|
177
|
-
.subscribe(() => {
|
|
178
|
-
this.list.reload();
|
|
179
|
-
});
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
],
|
|
183
|
-
fetch: (query) => {
|
|
184
|
-
return this.loadQueryLogs(query)
|
|
185
|
-
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
QueryLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueryLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
191
|
-
QueryLogsComponent.ɵcmp = i0.ɵɵ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: FsListComponent, descendants: true }], ngImport: i0, 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$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fsFormatTruncate": i9.FsFormatTruncatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QueryLogsComponent, decorators: [{
|
|
193
|
-
type: Component,
|
|
194
|
-
args: [{
|
|
195
|
-
selector: 'fs-system-query-logs',
|
|
196
|
-
templateUrl: './query-logs.component.html',
|
|
197
|
-
styleUrls: ['./query-logs.component.scss'],
|
|
198
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
199
|
-
}]
|
|
200
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
|
|
201
|
-
type: ViewChild,
|
|
202
|
-
args: [FsListComponent]
|
|
203
|
-
}], loadQueryLogs: [{
|
|
204
|
-
type: Input
|
|
205
|
-
}], purgeQueryLogs: [{
|
|
206
|
-
type: Input
|
|
207
|
-
}] } });
|
|
208
|
-
|
|
209
|
-
class FsSystemQueryLogsModule {
|
|
210
|
-
}
|
|
211
|
-
FsSystemQueryLogsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSystemQueryLogsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
212
|
-
FsSystemQueryLogsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSystemQueryLogsModule, declarations: [QueryLogsComponent,
|
|
213
|
-
QueryLogComponent,
|
|
214
|
-
ExplainComponent], imports: [CommonModule,
|
|
215
|
-
RouterModule,
|
|
216
|
-
CommonModule,
|
|
217
|
-
FormsModule,
|
|
218
|
-
MatTabsModule,
|
|
219
|
-
MatButtonModule,
|
|
220
|
-
MatDialogModule,
|
|
221
|
-
FsFormModule,
|
|
222
|
-
FsLabelModule,
|
|
223
|
-
FsPopoverModule,
|
|
224
|
-
FsCommonModule,
|
|
225
|
-
FsDateModule,
|
|
226
|
-
FsDialogModule,
|
|
227
|
-
FsListModule,
|
|
228
|
-
FsClipboardModule], exports: [QueryLogsComponent] });
|
|
229
|
-
FsSystemQueryLogsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSystemQueryLogsModule, imports: [[
|
|
230
|
-
CommonModule,
|
|
231
|
-
RouterModule,
|
|
232
|
-
CommonModule,
|
|
233
|
-
FormsModule,
|
|
234
|
-
MatTabsModule,
|
|
235
|
-
MatButtonModule,
|
|
236
|
-
MatDialogModule,
|
|
237
|
-
FsFormModule,
|
|
238
|
-
FsLabelModule,
|
|
239
|
-
FsPopoverModule,
|
|
240
|
-
FsCommonModule,
|
|
241
|
-
FsDateModule,
|
|
242
|
-
FsDialogModule,
|
|
243
|
-
FsListModule,
|
|
244
|
-
FsClipboardModule,
|
|
245
|
-
]] });
|
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSystemQueryLogsModule, decorators: [{
|
|
247
|
-
type: NgModule,
|
|
248
|
-
args: [{
|
|
249
|
-
imports: [
|
|
250
|
-
CommonModule,
|
|
251
|
-
RouterModule,
|
|
252
|
-
CommonModule,
|
|
253
|
-
FormsModule,
|
|
254
|
-
MatTabsModule,
|
|
255
|
-
MatButtonModule,
|
|
256
|
-
MatDialogModule,
|
|
257
|
-
FsFormModule,
|
|
258
|
-
FsLabelModule,
|
|
259
|
-
FsPopoverModule,
|
|
260
|
-
FsCommonModule,
|
|
261
|
-
FsDateModule,
|
|
262
|
-
FsDialogModule,
|
|
263
|
-
FsListModule,
|
|
264
|
-
FsClipboardModule,
|
|
265
|
-
],
|
|
266
|
-
declarations: [
|
|
267
|
-
QueryLogsComponent,
|
|
268
|
-
QueryLogComponent,
|
|
269
|
-
ExplainComponent,
|
|
270
|
-
],
|
|
271
|
-
exports: [
|
|
272
|
-
QueryLogsComponent,
|
|
273
|
-
],
|
|
274
|
-
}]
|
|
275
|
-
}] });
|
|
276
|
-
|
|
277
|
-
var CronState;
|
|
278
|
-
(function (CronState) {
|
|
279
|
-
CronState["Running"] = "running";
|
|
280
|
-
CronState["Idle"] = "idle";
|
|
281
|
-
CronState["Failed"] = "failed";
|
|
282
|
-
CronState["Queued"] = "queued";
|
|
283
|
-
CronState["Disabled"] = "disabled";
|
|
284
|
-
CronState["Enabled"] = "enabled";
|
|
285
|
-
CronState["Killing"] = "killing";
|
|
286
|
-
})(CronState || (CronState = {}));
|
|
287
|
-
|
|
288
|
-
var SettingInterfaceType;
|
|
289
|
-
(function (SettingInterfaceType) {
|
|
290
|
-
SettingInterfaceType["RadioButton"] = "R";
|
|
291
|
-
SettingInterfaceType["InputBox"] = "I";
|
|
292
|
-
SettingInterfaceType["Textarea"] = "T";
|
|
293
|
-
SettingInterfaceType["Select"] = "D";
|
|
294
|
-
SettingInterfaceType["SelectMultiple"] = "W";
|
|
295
|
-
SettingInterfaceType["Date"] = "A";
|
|
296
|
-
SettingInterfaceType["File"] = "F";
|
|
297
|
-
SettingInterfaceType["Static"] = "S";
|
|
298
|
-
SettingInterfaceType["Password"] = "P";
|
|
299
|
-
SettingInterfaceType["Time"] = "M";
|
|
300
|
-
SettingInterfaceType["None"] = "N";
|
|
301
|
-
SettingInterfaceType["Color"] = "C";
|
|
302
|
-
})(SettingInterfaceType || (SettingInterfaceType = {}));
|
|
303
|
-
|
|
304
|
-
var ApiLogState;
|
|
305
|
-
(function (ApiLogState) {
|
|
306
|
-
ApiLogState["Success"] = "success";
|
|
307
|
-
ApiLogState["Failed"] = "failed";
|
|
308
|
-
ApiLogState["Deleted"] = "deleted";
|
|
309
|
-
})(ApiLogState || (ApiLogState = {}));
|
|
310
|
-
|
|
311
|
-
var ProcessState;
|
|
312
|
-
(function (ProcessState) {
|
|
313
|
-
ProcessState["Queued"] = "Q";
|
|
314
|
-
ProcessState["Running"] = "R";
|
|
315
|
-
ProcessState["Completed"] = "C";
|
|
316
|
-
ProcessState["Killed"] = "K";
|
|
317
|
-
ProcessState["Deleted"] = "D";
|
|
318
|
-
ProcessState["Failed"] = "F";
|
|
319
|
-
})(ProcessState || (ProcessState = {}));
|
|
320
|
-
|
|
321
|
-
var CronLogState;
|
|
322
|
-
(function (CronLogState) {
|
|
323
|
-
CronLogState["Message"] = "message";
|
|
324
|
-
CronLogState["Disabled"] = "disabled";
|
|
325
|
-
CronLogState["Enabled"] = "enabled";
|
|
326
|
-
CronLogState["Started"] = "started";
|
|
327
|
-
CronLogState["Running"] = "running";
|
|
328
|
-
CronLogState["Completed"] = "completed";
|
|
329
|
-
CronLogState["Failed"] = "failed";
|
|
330
|
-
CronLogState["Killed"] = "killed";
|
|
331
|
-
CronLogState["Queued"] = "queued";
|
|
332
|
-
CronLogState["Reset"] = "reset";
|
|
333
|
-
CronLogState["Stagnant"] = "stagnant";
|
|
334
|
-
CronLogState["LongRunning"] = "long_running";
|
|
335
|
-
})(CronLogState || (CronLogState = {}));
|
|
336
|
-
|
|
337
|
-
const CronStates = [
|
|
338
|
-
{ name: 'Running', value: CronState.Running },
|
|
339
|
-
{ name: 'Idle', value: CronState.Idle },
|
|
340
|
-
{ name: 'Failed', value: CronState.Failed },
|
|
341
|
-
{ name: 'Queued', value: CronState.Queued },
|
|
342
|
-
{ name: 'Disabled', value: CronState.Disabled },
|
|
343
|
-
{ name: 'Killing', value: CronState.Killing },
|
|
344
|
-
{ name: 'Enabled', value: CronState.Enabled },
|
|
345
|
-
];
|
|
346
|
-
|
|
347
|
-
const ApiLogStates = [
|
|
348
|
-
{ name: 'Success', value: ApiLogState.Success },
|
|
349
|
-
{ name: 'Failed', value: ApiLogState.Failed },
|
|
350
|
-
{ name: 'Deleted', value: ApiLogState.Deleted }
|
|
351
|
-
];
|
|
352
|
-
|
|
353
|
-
const ProcessStates = [
|
|
354
|
-
{ name: 'Queued', value: ProcessState.Queued },
|
|
355
|
-
{ name: 'Running', value: ProcessState.Running },
|
|
356
|
-
{ name: 'Completed', value: ProcessState.Completed },
|
|
357
|
-
{ name: 'Killed', value: ProcessState.Killed },
|
|
358
|
-
{ name: 'Failed', value: ProcessState.Failed },
|
|
359
|
-
{ name: 'Deleted', value: ProcessState.Deleted }
|
|
360
|
-
];
|
|
361
|
-
|
|
362
|
-
function indexNameValue(arry) {
|
|
363
|
-
const obj = {};
|
|
364
|
-
arry.forEach(item => {
|
|
365
|
-
obj[item.value] = item.name;
|
|
366
|
-
});
|
|
367
|
-
return obj;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
class ApiLogComponent {
|
|
371
|
-
constructor(_dialogRef, data) {
|
|
372
|
-
this._dialogRef = _dialogRef;
|
|
373
|
-
this.data = data;
|
|
374
|
-
}
|
|
375
|
-
ngOnInit() {
|
|
376
|
-
this.apiLogStates = indexNameValue(ApiLogStates);
|
|
377
|
-
if (this.data.apiLog) {
|
|
378
|
-
this.apiLog = this.data.apiLog;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
ApiLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiLogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
383
|
-
ApiLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ApiLogComponent, selector: "ng-component", ngImport: i0, 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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i4.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.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i4$1.FsDateFormatPipe, "fsDateDuration": i4$1.FsDateDurationPipe, "json": i8.JsonPipe } });
|
|
384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiLogComponent, decorators: [{
|
|
385
|
-
type: Component,
|
|
386
|
-
args: [{
|
|
387
|
-
templateUrl: './api-log.component.html',
|
|
388
|
-
styleUrls: ['./api-log.component.scss']
|
|
389
|
-
}]
|
|
390
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
391
|
-
type: Inject,
|
|
392
|
-
args: [MAT_DIALOG_DATA]
|
|
393
|
-
}] }]; } });
|
|
394
|
-
|
|
395
|
-
class ApiLogsComponent {
|
|
396
|
-
constructor(_dialog) {
|
|
397
|
-
this._dialog = _dialog;
|
|
398
|
-
this.config = null;
|
|
399
|
-
this.apiLogStates = indexNameValue(ApiLogStates);
|
|
400
|
-
}
|
|
401
|
-
ngOnInit() {
|
|
402
|
-
this._configList();
|
|
403
|
-
}
|
|
404
|
-
_configList() {
|
|
405
|
-
this.config = {
|
|
406
|
-
filters: [
|
|
407
|
-
{
|
|
408
|
-
type: ItemType.Keyword,
|
|
409
|
-
name: 'keyword',
|
|
410
|
-
label: 'Search',
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
type: ItemType.Select,
|
|
414
|
-
name: 'state',
|
|
415
|
-
label: 'Status',
|
|
416
|
-
values: ApiLogStates,
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
name: 'createDate',
|
|
420
|
-
type: ItemType.DateRange,
|
|
421
|
-
label: ['From Date', 'To Date'],
|
|
422
|
-
},
|
|
423
|
-
],
|
|
424
|
-
fetch: (query) => {
|
|
425
|
-
Object.assign(query, {});
|
|
426
|
-
return this.loadApiLogs(query)
|
|
427
|
-
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
428
|
-
},
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
open(apiLog) {
|
|
432
|
-
this._dialog.open(ApiLogComponent, {
|
|
433
|
-
data: { apiLog },
|
|
434
|
-
width: '85%',
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
ApiLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
439
|
-
ApiLogsComponent.ɵcmp = i0.ɵɵ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: FsListComponent, descendants: true, static: true }], ngImport: i0, 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$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fsDateDuration": i4$1.FsDateDurationPipe } });
|
|
440
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiLogsComponent, decorators: [{
|
|
441
|
-
type: Component,
|
|
442
|
-
args: [{
|
|
443
|
-
selector: 'fs-system-api-logs',
|
|
444
|
-
templateUrl: './api-logs.component.html',
|
|
445
|
-
styleUrls: ['./api-logs.component.scss'],
|
|
446
|
-
}]
|
|
447
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
|
|
448
|
-
type: ViewChild,
|
|
449
|
-
args: [FsListComponent, { static: true }]
|
|
450
|
-
}], loadApiLogs: [{
|
|
451
|
-
type: Input
|
|
452
|
-
}] } });
|
|
453
|
-
|
|
454
|
-
const CronLogStates = [
|
|
455
|
-
{ name: 'Message', value: CronLogState.Message, color: '#29B7FF' },
|
|
456
|
-
{ name: 'Disabled', value: CronLogState.Disabled, color: '#29B7FF' },
|
|
457
|
-
{ name: 'Reset', value: CronLogState.Reset, color: '#29B7FF' },
|
|
458
|
-
{ name: 'Enabled', value: CronLogState.Enabled, color: '#29B7FF' },
|
|
459
|
-
{ name: 'Queued', value: CronLogState.Queued, color: '#29B7FF' },
|
|
460
|
-
{ name: 'Started', value: CronLogState.Started, color: '#D17333' },
|
|
461
|
-
{ name: 'Running', value: CronLogState.Running, color: '#34BD43' },
|
|
462
|
-
{ name: 'Completed', value: CronLogState.Completed, color: '#34BD43' },
|
|
463
|
-
{ name: 'Failed', value: CronLogState.Failed, color: '#FA7567' },
|
|
464
|
-
{ name: 'Killed', value: CronLogState.Killed, color: '#FA7567' },
|
|
465
|
-
{ name: 'Stagnant', value: CronLogState.Stagnant, color: '#FA7567' },
|
|
466
|
-
{ name: 'Long Running', value: CronLogState.LongRunning, color: '#FA7567' },
|
|
467
|
-
];
|
|
468
|
-
|
|
469
|
-
class CronLogComponent {
|
|
470
|
-
constructor(_data) {
|
|
471
|
-
this._data = _data;
|
|
472
|
-
this.CronLogStates = indexNameValue(CronLogStates);
|
|
473
|
-
this.CronLogStateColors = {};
|
|
474
|
-
}
|
|
475
|
-
ngOnInit() {
|
|
476
|
-
this.cronLog = this._data.cronLog;
|
|
477
|
-
this.CronLogStateColors = CronLogStates
|
|
478
|
-
.reduce((accum, cronLogState) => {
|
|
479
|
-
accum[cronLogState.value] = cronLogState.color;
|
|
480
|
-
return accum;
|
|
481
|
-
}, {});
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
CronLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CronLogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
485
|
-
CronLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CronLogComponent, selector: "ng-component", ngImport: i0, 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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i4$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i4.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.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
|
|
486
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CronLogComponent, decorators: [{
|
|
487
|
-
type: Component,
|
|
488
|
-
args: [{
|
|
489
|
-
templateUrl: './cron-log.component.html',
|
|
490
|
-
styleUrls: ['./cron-log.component.scss']
|
|
491
|
-
}]
|
|
492
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
493
|
-
type: Inject,
|
|
494
|
-
args: [MAT_DIALOG_DATA]
|
|
495
|
-
}] }]; } });
|
|
496
|
-
|
|
497
|
-
class CronComponent {
|
|
498
|
-
constructor(_data, _dialog, _cdRef) {
|
|
499
|
-
this._data = _data;
|
|
500
|
-
this._dialog = _dialog;
|
|
501
|
-
this._cdRef = _cdRef;
|
|
502
|
-
this.tabIndex = 0;
|
|
503
|
-
this.CronStates = indexNameValue(CronStates);
|
|
504
|
-
this.CronLogStates = indexNameValue(CronLogStates);
|
|
505
|
-
this.CronLogStateColors = {};
|
|
506
|
-
}
|
|
507
|
-
ngOnInit() {
|
|
508
|
-
this.load();
|
|
509
|
-
this.CronLogStateColors = CronLogStates
|
|
510
|
-
.reduce((accum, cronLogState) => {
|
|
511
|
-
accum[cronLogState.value] = cronLogState.color;
|
|
512
|
-
return accum;
|
|
513
|
-
}, {});
|
|
514
|
-
}
|
|
515
|
-
cronLogOpen(cronLog) {
|
|
516
|
-
this._dialog.open(CronLogComponent, {
|
|
517
|
-
data: {
|
|
518
|
-
cronLog,
|
|
519
|
-
},
|
|
520
|
-
width: '85%'
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
cronActionClick(cronAction) {
|
|
524
|
-
cronAction.action(this.cron)
|
|
525
|
-
.subscribe(() => {
|
|
526
|
-
this.load();
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
selectedIndexChange(index) {
|
|
530
|
-
this.tabIndex = index;
|
|
531
|
-
}
|
|
532
|
-
load() {
|
|
533
|
-
this._data.loadCron(this._data.cron)
|
|
534
|
-
.subscribe((cron) => {
|
|
535
|
-
this.cron = Object.assign(Object.assign({}, this._data.cron), cron);
|
|
536
|
-
if (this._data.loadCronLogs) {
|
|
537
|
-
this.config = {
|
|
538
|
-
filters: [
|
|
539
|
-
{
|
|
540
|
-
type: ItemType.Select,
|
|
541
|
-
name: 'state',
|
|
542
|
-
label: 'Status',
|
|
543
|
-
values: [
|
|
544
|
-
{ name: 'All', value: null },
|
|
545
|
-
...CronLogStates,
|
|
546
|
-
],
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
type: ItemType.DateRange,
|
|
550
|
-
name: 'date',
|
|
551
|
-
label: ['From Date', 'To Date'],
|
|
552
|
-
},
|
|
553
|
-
],
|
|
554
|
-
fetch: (query) => {
|
|
555
|
-
query = Object.assign(Object.assign({}, query), { cronId: this.cron.id });
|
|
556
|
-
return this._data.loadCronLogs(query);
|
|
557
|
-
},
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
this.cronActions = this._data.cronActions
|
|
561
|
-
.filter((cronLogAction) => {
|
|
562
|
-
return cronLogAction.show(this.cron);
|
|
563
|
-
});
|
|
564
|
-
this._cdRef.markForCheck();
|
|
565
|
-
});
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
CronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CronComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
569
|
-
CronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CronComponent, selector: "ng-component", ngImport: i0, 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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i4$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4.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.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.MatTabContent, selector: "[matTabContent]" }, { type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "fsDateDuration": i4$1.FsDateDurationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
570
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CronComponent, decorators: [{
|
|
571
|
-
type: Component,
|
|
572
|
-
args: [{
|
|
573
|
-
templateUrl: './cron.component.html',
|
|
574
|
-
styleUrls: ['./cron.component.scss'],
|
|
575
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
576
|
-
}]
|
|
577
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
578
|
-
type: Inject,
|
|
579
|
-
args: [MAT_DIALOG_DATA]
|
|
580
|
-
}] }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }]; } });
|
|
581
|
-
|
|
582
|
-
class CronsComponent {
|
|
583
|
-
constructor(_message, _dialog, _prompt) {
|
|
584
|
-
this._message = _message;
|
|
585
|
-
this._dialog = _dialog;
|
|
586
|
-
this._prompt = _prompt;
|
|
587
|
-
this.config = null;
|
|
588
|
-
this.cronStates = indexNameValue(CronStates);
|
|
589
|
-
this.CronState = CronState;
|
|
590
|
-
this._destroy$ = new Subject();
|
|
591
|
-
}
|
|
592
|
-
ngOnInit() {
|
|
593
|
-
this._configList();
|
|
594
|
-
}
|
|
595
|
-
_configList() {
|
|
596
|
-
this.config = {
|
|
597
|
-
paging: false,
|
|
598
|
-
filters: [
|
|
599
|
-
{
|
|
600
|
-
type: ItemType.Keyword,
|
|
601
|
-
name: 'keyword',
|
|
602
|
-
label: 'Search',
|
|
603
|
-
},
|
|
604
|
-
],
|
|
605
|
-
rowActions: this.getCronActions()
|
|
606
|
-
.map((rowAction) => {
|
|
607
|
-
return Object.assign(Object.assign({}, rowAction), { click: (cron) => {
|
|
608
|
-
rowAction.action(cron)
|
|
609
|
-
.subscribe();
|
|
610
|
-
} });
|
|
611
|
-
}),
|
|
612
|
-
fetch: (query) => {
|
|
613
|
-
query.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
614
|
-
return this.loadCrons(query)
|
|
615
|
-
.pipe(map((crons) => ({
|
|
616
|
-
data: crons
|
|
617
|
-
.map((cron) => {
|
|
618
|
-
return Object.assign(Object.assign({}, cron), { runningDuration: differenceInSeconds(parse(cron.createDate), new Date()) });
|
|
619
|
-
}),
|
|
620
|
-
})));
|
|
621
|
-
},
|
|
622
|
-
};
|
|
623
|
-
if (this.bulk) {
|
|
624
|
-
this.config.selection = {
|
|
625
|
-
selectAll: false,
|
|
626
|
-
actions: [
|
|
627
|
-
{
|
|
628
|
-
type: SelectionActionType.Action,
|
|
629
|
-
name: 'disable',
|
|
630
|
-
label: 'Disable',
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
type: SelectionActionType.Action,
|
|
634
|
-
name: 'enable',
|
|
635
|
-
label: 'Enable',
|
|
636
|
-
},
|
|
637
|
-
],
|
|
638
|
-
actionSelected: (action) => {
|
|
639
|
-
return this.bulk(action.action.name, action.selected)
|
|
640
|
-
.pipe(tap(() => {
|
|
641
|
-
this.list.reload();
|
|
642
|
-
this._message.success('Applied Changes');
|
|
643
|
-
}));
|
|
644
|
-
},
|
|
645
|
-
};
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
open(cron) {
|
|
649
|
-
this._dialog.open(CronComponent, {
|
|
650
|
-
data: {
|
|
651
|
-
cron,
|
|
652
|
-
loadCronLogs: this.loadCronLogs,
|
|
653
|
-
loadCron: this.loadCron,
|
|
654
|
-
cronActions: this.getCronActions(),
|
|
655
|
-
},
|
|
656
|
-
width: '85%',
|
|
657
|
-
});
|
|
658
|
-
}
|
|
659
|
-
getCronActions() {
|
|
660
|
-
return [
|
|
661
|
-
{
|
|
662
|
-
action: (data) => {
|
|
663
|
-
return this.queue(data)
|
|
664
|
-
.pipe(tap(() => {
|
|
665
|
-
this._message.success('Queued cron');
|
|
666
|
-
this.list.reload();
|
|
667
|
-
}));
|
|
668
|
-
},
|
|
669
|
-
label: 'Queue',
|
|
670
|
-
show: (cron) => {
|
|
671
|
-
return cron.state === CronState.Idle || cron.state === CronState.Failed;
|
|
672
|
-
},
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
action: (data) => {
|
|
676
|
-
return this.run(data)
|
|
677
|
-
.pipe(tap(() => {
|
|
678
|
-
this._message.success('Cron ran');
|
|
679
|
-
this.list.reload();
|
|
680
|
-
}));
|
|
681
|
-
},
|
|
682
|
-
label: 'Run',
|
|
683
|
-
show: (cron) => {
|
|
684
|
-
return cron.state === CronState.Idle || cron.state === CronState.Failed;
|
|
685
|
-
},
|
|
686
|
-
},
|
|
687
|
-
{
|
|
688
|
-
action: (data) => {
|
|
689
|
-
return this.enable(data)
|
|
690
|
-
.pipe(tap(() => {
|
|
691
|
-
this._message.success('Enabled cron');
|
|
692
|
-
this.list.reload();
|
|
693
|
-
}));
|
|
694
|
-
},
|
|
695
|
-
label: 'Enable',
|
|
696
|
-
show: (cron) => {
|
|
697
|
-
return cron.state === CronState.Disabled;
|
|
698
|
-
},
|
|
699
|
-
},
|
|
700
|
-
{
|
|
701
|
-
action: (data) => {
|
|
702
|
-
return this.disable(data)
|
|
703
|
-
.pipe(tap(() => {
|
|
704
|
-
this._message.success('Disabled cron');
|
|
705
|
-
this.list.reload();
|
|
706
|
-
}));
|
|
707
|
-
},
|
|
708
|
-
label: 'Disable',
|
|
709
|
-
show: (cron) => {
|
|
710
|
-
return cron.state === CronState.Idle || cron.state === CronState.Failed;
|
|
711
|
-
},
|
|
712
|
-
},
|
|
713
|
-
{
|
|
714
|
-
action: (data) => {
|
|
715
|
-
return this._prompt.confirm({
|
|
716
|
-
title: 'Confirm',
|
|
717
|
-
template: 'Are you sure you would like to kill the cron?',
|
|
718
|
-
})
|
|
719
|
-
.pipe(switchMap(() => {
|
|
720
|
-
return this.kill(data);
|
|
721
|
-
}), tap(() => {
|
|
722
|
-
this._message.success('Killed cron');
|
|
723
|
-
this.list.reload();
|
|
724
|
-
}), takeUntil(this._destroy$));
|
|
725
|
-
},
|
|
726
|
-
label: 'Kill',
|
|
727
|
-
show: (cron) => {
|
|
728
|
-
return cron.state === CronState.Running;
|
|
729
|
-
},
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
action: (data) => {
|
|
733
|
-
return this._prompt.confirm({
|
|
734
|
-
title: 'Confirm',
|
|
735
|
-
template: 'Are you sure you would like to reset the cron?',
|
|
736
|
-
})
|
|
737
|
-
.pipe(switchMap(() => {
|
|
738
|
-
return this.enable(data);
|
|
739
|
-
}), tap(() => {
|
|
740
|
-
this._message.success('Reset cron');
|
|
741
|
-
this.list.reload();
|
|
742
|
-
}), takeUntil(this._destroy$));
|
|
743
|
-
},
|
|
744
|
-
label: 'Reset',
|
|
745
|
-
show: (cron) => {
|
|
746
|
-
return cron.state === CronState.Killing || cron.state === CronState.Running || cron.state === CronState.Failed || cron.state === CronState.Queued;
|
|
747
|
-
},
|
|
748
|
-
},
|
|
749
|
-
];
|
|
750
|
-
}
|
|
751
|
-
ngOnDestroy() {
|
|
752
|
-
this._destroy$.next();
|
|
753
|
-
this._destroy$.complete();
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
CronsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CronsComponent, deps: [{ token: i1$1.FsMessage }, { token: i1.MatDialog }, { token: i3$2.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
|
757
|
-
CronsComponent.ɵcmp = i0.ɵɵ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: FsListComponent, descendants: true, static: true }], ngImport: i0, 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$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i7.FsPopoverComponent, selector: "fs-popover" }, { type: i4$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "fsDateDuration": i4$1.FsDateDurationPipe } });
|
|
758
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CronsComponent, decorators: [{
|
|
759
|
-
type: Component,
|
|
760
|
-
args: [{
|
|
761
|
-
selector: 'fs-system-crons',
|
|
762
|
-
templateUrl: './crons.component.html',
|
|
763
|
-
styleUrls: ['./crons.component.scss'],
|
|
764
|
-
}]
|
|
765
|
-
}], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i1.MatDialog }, { type: i3$2.FsPrompt }]; }, propDecorators: { list: [{
|
|
766
|
-
type: ViewChild,
|
|
767
|
-
args: [FsListComponent, { static: true }]
|
|
768
|
-
}], enable: [{
|
|
769
|
-
type: Input
|
|
770
|
-
}], disable: [{
|
|
771
|
-
type: Input
|
|
772
|
-
}], kill: [{
|
|
773
|
-
type: Input
|
|
774
|
-
}], queue: [{
|
|
775
|
-
type: Input
|
|
776
|
-
}], run: [{
|
|
777
|
-
type: Input
|
|
778
|
-
}], loadCrons: [{
|
|
779
|
-
type: Input
|
|
780
|
-
}], loadCron: [{
|
|
781
|
-
type: Input
|
|
782
|
-
}], loadCronLogs: [{
|
|
783
|
-
type: Input
|
|
784
|
-
}], bulk: [{
|
|
785
|
-
type: Input
|
|
786
|
-
}] } });
|
|
787
|
-
|
|
788
|
-
class DashboardComponent {
|
|
789
|
-
constructor(_message, _cdRef, _buildService) {
|
|
790
|
-
this._message = _message;
|
|
791
|
-
this._cdRef = _cdRef;
|
|
792
|
-
this._buildService = _buildService;
|
|
793
|
-
this.buttonActions = [];
|
|
794
|
-
this.menuActions = [];
|
|
795
|
-
this._destroy$ = new Subject();
|
|
796
|
-
this.actions = [];
|
|
797
|
-
}
|
|
798
|
-
ngOnInit() {
|
|
799
|
-
this._load();
|
|
800
|
-
this.buttonActions = this.actions.filter(item => { return !item.menu; });
|
|
801
|
-
this.menuActions = this.actions.filter(item => { return item.menu; });
|
|
802
|
-
this.build = this._buildService.build;
|
|
803
|
-
this._buildService.build$
|
|
804
|
-
.pipe(takeUntil(this._destroy$))
|
|
805
|
-
.subscribe((build) => {
|
|
806
|
-
this.build = build;
|
|
807
|
-
this._cdRef.markForCheck();
|
|
808
|
-
});
|
|
809
|
-
}
|
|
810
|
-
_load() {
|
|
811
|
-
this.load()
|
|
812
|
-
.subscribe((dashboard) => {
|
|
813
|
-
this.dashboard = dashboard;
|
|
814
|
-
this.dashboard.cronRanAttention = !dashboard.cronRan ||
|
|
815
|
-
differenceInMinutes(new Date(), new Date(dashboard.cronRan)) > 15;
|
|
816
|
-
this._cdRef.markForCheck();
|
|
817
|
-
});
|
|
818
|
-
}
|
|
819
|
-
ngOnDestroy() {
|
|
820
|
-
this._destroy$.next();
|
|
821
|
-
this._destroy$.complete();
|
|
822
|
-
}
|
|
823
|
-
actionClick(action) {
|
|
824
|
-
action.click();
|
|
825
|
-
}
|
|
826
|
-
initClick() {
|
|
827
|
-
this.init()
|
|
828
|
-
.subscribe(() => {
|
|
829
|
-
this._message.success('Successfully initialized the system');
|
|
830
|
-
});
|
|
831
|
-
}
|
|
832
|
-
upgradeClick() {
|
|
833
|
-
this.upgrade()
|
|
834
|
-
.subscribe(() => {
|
|
835
|
-
this._load();
|
|
836
|
-
this._message.success('Successfully upgraded the system');
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
DashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DashboardComponent, deps: [{ token: i1$1.FsMessage }, { token: i0.ChangeDetectorRef }, { token: i2$3.FsBuildService }], target: i0.ɵɵFactoryTarget.Component });
|
|
841
|
-
DashboardComponent.ɵcmp = i0.ɵɵ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, 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.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$2.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass", "buttonType", "buttonColor"], outputs: ["opened", "closed"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i5.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$2.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], pipes: { "fsDateFormat": i4$1.FsDateFormatPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DashboardComponent, decorators: [{
|
|
843
|
-
type: Component,
|
|
844
|
-
args: [{
|
|
845
|
-
selector: 'fs-system-dashboard',
|
|
846
|
-
templateUrl: 'dashboard.component.html',
|
|
847
|
-
styleUrls: ['dashboard.component.scss'],
|
|
848
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
849
|
-
}]
|
|
850
|
-
}], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i0.ChangeDetectorRef }, { type: i2$3.FsBuildService }]; }, propDecorators: { init: [{
|
|
851
|
-
type: Input
|
|
852
|
-
}], upgrade: [{
|
|
853
|
-
type: Input
|
|
854
|
-
}], load: [{
|
|
855
|
-
type: Input
|
|
856
|
-
}], actions: [{
|
|
857
|
-
type: Input
|
|
858
|
-
}] } });
|
|
859
|
-
|
|
860
|
-
class InfoComponent {
|
|
861
|
-
ngAfterViewInit() {
|
|
862
|
-
this._load();
|
|
863
|
-
}
|
|
864
|
-
_load() {
|
|
865
|
-
this.load()
|
|
866
|
-
.subscribe((info) => {
|
|
867
|
-
info += '<style>body { background: transparent; }</style>';
|
|
868
|
-
const doc = this.iframe.nativeElement.contentDocument || this.iframe.nativeElement.contentWindow;
|
|
869
|
-
doc.open();
|
|
870
|
-
doc.write(info);
|
|
871
|
-
doc.close();
|
|
872
|
-
const scrollHeight = (this.iframe.nativeElement.contentWindow.document.documentElement.scrollHeight + 100);
|
|
873
|
-
this.iframe.nativeElement.style.height = `${scrollHeight}px`;
|
|
874
|
-
});
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
InfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
878
|
-
InfoComponent.ɵcmp = i0.ɵɵ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, template: "<iframe #iframe></iframe>\r\n", styles: ["iframe{width:100%;border:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
879
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: InfoComponent, decorators: [{
|
|
880
|
-
type: Component,
|
|
881
|
-
args: [{
|
|
882
|
-
selector: 'fs-system-info',
|
|
883
|
-
templateUrl: 'info.component.html',
|
|
884
|
-
styleUrls: ['info.component.scss'],
|
|
885
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
886
|
-
}]
|
|
887
|
-
}], propDecorators: { iframe: [{
|
|
888
|
-
type: ViewChild,
|
|
889
|
-
args: ['iframe']
|
|
890
|
-
}], load: [{
|
|
891
|
-
type: Input
|
|
892
|
-
}] } });
|
|
893
|
-
|
|
894
|
-
class ProcessComponent {
|
|
895
|
-
constructor(data, _message, _cdRef) {
|
|
896
|
-
this.data = data;
|
|
897
|
-
this._message = _message;
|
|
898
|
-
this._cdRef = _cdRef;
|
|
899
|
-
this.ProcessStates = indexNameValue(ProcessStates);
|
|
900
|
-
this.ProcessState = ProcessState;
|
|
901
|
-
}
|
|
902
|
-
ngOnInit() {
|
|
903
|
-
if (this.data.loadProcess) {
|
|
904
|
-
this.load();
|
|
905
|
-
}
|
|
906
|
-
else {
|
|
907
|
-
this.process = this.data.process;
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
load() {
|
|
911
|
-
this.data.loadProcess(this.data.process)
|
|
912
|
-
.subscribe((process) => {
|
|
913
|
-
this.process = process;
|
|
914
|
-
this._cdRef.markForCheck();
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
run() {
|
|
918
|
-
this._message.success('Running process');
|
|
919
|
-
this.data.run(this.data.process)
|
|
920
|
-
.subscribe(() => {
|
|
921
|
-
this.load();
|
|
922
|
-
});
|
|
923
|
-
setTimeout(() => {
|
|
924
|
-
this.load();
|
|
925
|
-
}, 1000);
|
|
926
|
-
}
|
|
927
|
-
download() {
|
|
928
|
-
this.data.download(this.data.process);
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
ProcessComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProcessComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.FsMessage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
932
|
-
ProcessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ProcessComponent, selector: "ng-component", ngImport: i0, 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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i4.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.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i4$1.FsDateFormatPipe, "fsDateDuration": i4$1.FsDateDurationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
933
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProcessComponent, decorators: [{
|
|
934
|
-
type: Component,
|
|
935
|
-
args: [{
|
|
936
|
-
templateUrl: './process.component.html',
|
|
937
|
-
styleUrls: ['./process.component.scss'],
|
|
938
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
939
|
-
}]
|
|
940
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
941
|
-
type: Inject,
|
|
942
|
-
args: [MAT_DIALOG_DATA]
|
|
943
|
-
}] }, { type: i1$1.FsMessage }, { type: i0.ChangeDetectorRef }]; } });
|
|
944
|
-
|
|
945
|
-
class ProcessesComponent {
|
|
946
|
-
constructor(_dialog, _message) {
|
|
947
|
-
this._dialog = _dialog;
|
|
948
|
-
this._message = _message;
|
|
949
|
-
this.actions = [];
|
|
950
|
-
this.config = null;
|
|
951
|
-
this.ProcessStates = indexNameValue(ProcessStates);
|
|
952
|
-
this.ProcessState = ProcessState;
|
|
953
|
-
this._destroy$ = new Subject();
|
|
954
|
-
}
|
|
955
|
-
ngOnInit() {
|
|
956
|
-
this._configList();
|
|
957
|
-
}
|
|
958
|
-
reload() {
|
|
959
|
-
this.list.reload();
|
|
960
|
-
}
|
|
961
|
-
open(process) {
|
|
962
|
-
this._dialog.open(ProcessComponent, {
|
|
963
|
-
data: {
|
|
964
|
-
process,
|
|
965
|
-
download: this.download,
|
|
966
|
-
run: this.run,
|
|
967
|
-
loadProcess: this.loadProcess,
|
|
968
|
-
},
|
|
969
|
-
width: '85%',
|
|
970
|
-
})
|
|
971
|
-
.afterClosed()
|
|
972
|
-
.pipe(takeUntil(this._destroy$))
|
|
973
|
-
.subscribe(() => {
|
|
974
|
-
this.reload();
|
|
975
|
-
});
|
|
976
|
-
}
|
|
977
|
-
ngOnDestroy() {
|
|
978
|
-
this._destroy$.next();
|
|
979
|
-
this._destroy$.complete();
|
|
980
|
-
}
|
|
981
|
-
_configList() {
|
|
982
|
-
this.config = {
|
|
983
|
-
actions: [],
|
|
984
|
-
rowActions: [],
|
|
985
|
-
filters: [
|
|
986
|
-
{
|
|
987
|
-
type: ItemType.Keyword,
|
|
988
|
-
name: 'keyword',
|
|
989
|
-
label: 'Search',
|
|
990
|
-
},
|
|
991
|
-
{
|
|
992
|
-
type: ItemType.Select,
|
|
993
|
-
name: 'state',
|
|
994
|
-
label: 'Status',
|
|
995
|
-
values: ProcessStates,
|
|
996
|
-
},
|
|
997
|
-
],
|
|
998
|
-
fetch: (query) => {
|
|
999
|
-
return this.loadProcesses(query)
|
|
1000
|
-
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1001
|
-
},
|
|
1002
|
-
};
|
|
1003
|
-
if (this.run) {
|
|
1004
|
-
this.config.rowActions
|
|
1005
|
-
.push({
|
|
1006
|
-
label: 'Run',
|
|
1007
|
-
show: (process) => {
|
|
1008
|
-
return process.state !== ProcessState.Running;
|
|
1009
|
-
},
|
|
1010
|
-
click: (data) => {
|
|
1011
|
-
this._message.info('Running process...');
|
|
1012
|
-
this.run(data)
|
|
1013
|
-
.subscribe(() => {
|
|
1014
|
-
this.reload();
|
|
1015
|
-
this._message.success('Succesfully ran process');
|
|
1016
|
-
});
|
|
1017
|
-
setTimeout(() => {
|
|
1018
|
-
this.reload();
|
|
1019
|
-
}, 500);
|
|
1020
|
-
},
|
|
1021
|
-
});
|
|
1022
|
-
}
|
|
1023
|
-
if (this.kill) {
|
|
1024
|
-
this.config.rowActions.push({
|
|
1025
|
-
label: 'Kill',
|
|
1026
|
-
show: (data) => {
|
|
1027
|
-
return !!data.pid;
|
|
1028
|
-
},
|
|
1029
|
-
click: (data) => {
|
|
1030
|
-
this._message.info('Killing process...');
|
|
1031
|
-
this.kill(data)
|
|
1032
|
-
.subscribe(() => {
|
|
1033
|
-
this.reload();
|
|
1034
|
-
this._message.success('Succesfully killed process');
|
|
1035
|
-
});
|
|
1036
|
-
setTimeout(() => {
|
|
1037
|
-
this.reload();
|
|
1038
|
-
}, 500);
|
|
1039
|
-
},
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
|
-
if (this.delete) {
|
|
1043
|
-
this.config.rowActions.push({
|
|
1044
|
-
label: 'Delete',
|
|
1045
|
-
click: (data) => {
|
|
1046
|
-
this.delete(data)
|
|
1047
|
-
.subscribe(() => {
|
|
1048
|
-
this.reload();
|
|
1049
|
-
this._message.success('Deleted process');
|
|
1050
|
-
});
|
|
1051
|
-
},
|
|
1052
|
-
});
|
|
1053
|
-
}
|
|
1054
|
-
this.actions.forEach((action) => {
|
|
1055
|
-
this.config.actions.push({
|
|
1056
|
-
primary: false,
|
|
1057
|
-
label: action.label,
|
|
1058
|
-
menu: action.menu,
|
|
1059
|
-
click: (data) => {
|
|
1060
|
-
if (action.click) {
|
|
1061
|
-
action.click(data);
|
|
1062
|
-
}
|
|
1063
|
-
if (action.component) {
|
|
1064
|
-
this._dialog.open(action.component, {
|
|
1065
|
-
width: '800px',
|
|
1066
|
-
})
|
|
1067
|
-
.afterClosed()
|
|
1068
|
-
.pipe(takeUntil(this._destroy$))
|
|
1069
|
-
.subscribe(() => {
|
|
1070
|
-
this.reload();
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
},
|
|
1074
|
-
});
|
|
1075
|
-
});
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
ProcessesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProcessesComponent, deps: [{ token: i1.MatDialog }, { token: i1$1.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
|
1079
|
-
ProcessesComponent.ɵcmp = i0.ɵɵ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: FsListComponent, descendants: true }], ngImport: i0, 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$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsDateDuration": i4$1.FsDateDurationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1080
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProcessesComponent, decorators: [{
|
|
1081
|
-
type: Component,
|
|
1082
|
-
args: [{
|
|
1083
|
-
selector: 'fs-system-processes',
|
|
1084
|
-
templateUrl: './processes.component.html',
|
|
1085
|
-
styleUrls: ['./processes.component.scss'],
|
|
1086
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1087
|
-
}]
|
|
1088
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i1$1.FsMessage }]; }, propDecorators: { list: [{
|
|
1089
|
-
type: ViewChild,
|
|
1090
|
-
args: [FsListComponent]
|
|
1091
|
-
}], loadProcesses: [{
|
|
1092
|
-
type: Input
|
|
1093
|
-
}], loadProcess: [{
|
|
1094
|
-
type: Input
|
|
1095
|
-
}], run: [{
|
|
1096
|
-
type: Input
|
|
1097
|
-
}], kill: [{
|
|
1098
|
-
type: Input
|
|
1099
|
-
}], delete: [{
|
|
1100
|
-
type: Input
|
|
1101
|
-
}], download: [{
|
|
1102
|
-
type: Input
|
|
1103
|
-
}], actions: [{
|
|
1104
|
-
type: Input
|
|
1105
|
-
}] } });
|
|
1106
|
-
|
|
1107
|
-
class ServerLogComponent {
|
|
1108
|
-
constructor(data) {
|
|
1109
|
-
this.data = data;
|
|
1110
|
-
}
|
|
1111
|
-
ngOnInit() {
|
|
1112
|
-
if (this.data.log) {
|
|
1113
|
-
this.log = this.data.log;
|
|
1114
|
-
try {
|
|
1115
|
-
this.log.backtrace = JSON.parse(this.log.backtrace);
|
|
1116
|
-
}
|
|
1117
|
-
catch (e) { }
|
|
1118
|
-
try {
|
|
1119
|
-
this.log.server = JSON.parse(this.log.server);
|
|
1120
|
-
}
|
|
1121
|
-
catch (e) { }
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
ServerLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ServerLogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
1126
|
-
ServerLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ServerLogComponent, selector: "ng-component", ngImport: i0, 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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i4.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.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i4$1.FsDateFormatPipe, "json": i8.JsonPipe } });
|
|
1127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ServerLogComponent, decorators: [{
|
|
1128
|
-
type: Component,
|
|
1129
|
-
args: [{
|
|
1130
|
-
templateUrl: './server-log.component.html',
|
|
1131
|
-
styleUrls: ['./server-log.component.scss']
|
|
1132
|
-
}]
|
|
1133
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
1134
|
-
type: Inject,
|
|
1135
|
-
args: [MAT_DIALOG_DATA]
|
|
1136
|
-
}] }]; } });
|
|
1137
|
-
|
|
1138
|
-
class ServerLogsComponent {
|
|
1139
|
-
constructor(_dialog) {
|
|
1140
|
-
this._dialog = _dialog;
|
|
1141
|
-
this.config = null;
|
|
1142
|
-
this.logTypes = [];
|
|
1143
|
-
}
|
|
1144
|
-
ngOnInit() {
|
|
1145
|
-
this._configList();
|
|
1146
|
-
}
|
|
1147
|
-
_configList() {
|
|
1148
|
-
this.config = {
|
|
1149
|
-
filters: [
|
|
1150
|
-
{
|
|
1151
|
-
type: ItemType.Keyword,
|
|
1152
|
-
name: 'keyword',
|
|
1153
|
-
label: 'Search'
|
|
1154
|
-
}
|
|
1155
|
-
],
|
|
1156
|
-
fetch: query => {
|
|
1157
|
-
return this.loadLogs(query)
|
|
1158
|
-
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1159
|
-
}
|
|
1160
|
-
};
|
|
1161
|
-
}
|
|
1162
|
-
open(log) {
|
|
1163
|
-
this._dialog.open(ServerLogComponent, {
|
|
1164
|
-
data: { log: log },
|
|
1165
|
-
width: '85%'
|
|
1166
|
-
});
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
ServerLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ServerLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
1170
|
-
ServerLogsComponent.ɵcmp = i0.ɵɵ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, 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$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
|
|
1171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ServerLogsComponent, decorators: [{
|
|
1172
|
-
type: Component,
|
|
1173
|
-
args: [{
|
|
1174
|
-
selector: 'fs-system-server-logs',
|
|
1175
|
-
templateUrl: './server-logs.component.html',
|
|
1176
|
-
styleUrls: ['./server-logs.component.scss']
|
|
1177
|
-
}]
|
|
1178
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
|
|
1179
|
-
type: ViewChild,
|
|
1180
|
-
args: ['list', { static: true }]
|
|
1181
|
-
}], loadLogs: [{
|
|
1182
|
-
type: Input
|
|
1183
|
-
}] } });
|
|
1184
|
-
|
|
1185
|
-
class KeyNameValuePipe {
|
|
1186
|
-
transform(values) {
|
|
1187
|
-
return Object.keys(values).map((key) => {
|
|
1188
|
-
return { value: key, name: values[key] };
|
|
1189
|
-
});
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
KeyNameValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: KeyNameValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1193
|
-
KeyNameValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: KeyNameValuePipe, name: "keyNameValue" });
|
|
1194
|
-
KeyNameValuePipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: KeyNameValuePipe });
|
|
1195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: KeyNameValuePipe, decorators: [{
|
|
1196
|
-
type: Pipe,
|
|
1197
|
-
args: [{
|
|
1198
|
-
name: 'keyNameValue',
|
|
1199
|
-
}]
|
|
1200
|
-
}, {
|
|
1201
|
-
type: Injectable
|
|
1202
|
-
}] });
|
|
1203
|
-
|
|
1204
|
-
class SettingsComponent {
|
|
1205
|
-
constructor(_message, _clipboard, _prompt, _cdRef) {
|
|
1206
|
-
this._message = _message;
|
|
1207
|
-
this._clipboard = _clipboard;
|
|
1208
|
-
this._prompt = _prompt;
|
|
1209
|
-
this._cdRef = _cdRef;
|
|
1210
|
-
this.fileRemove = new EventEmitter();
|
|
1211
|
-
this.fileSelect = new EventEmitter();
|
|
1212
|
-
this.groupedSettings = [];
|
|
1213
|
-
this.groups = [];
|
|
1214
|
-
this.SettingInterfaceType = SettingInterfaceType;
|
|
1215
|
-
}
|
|
1216
|
-
ngOnInit() {
|
|
1217
|
-
this.loadSettings({
|
|
1218
|
-
visible: true,
|
|
1219
|
-
})
|
|
1220
|
-
.subscribe((settings) => {
|
|
1221
|
-
settings = settings
|
|
1222
|
-
.filter((setting) => {
|
|
1223
|
-
return setting.interfaceType !== SettingInterfaceType.None;
|
|
1224
|
-
})
|
|
1225
|
-
.map((setting) => {
|
|
1226
|
-
switch (setting.interfaceType) {
|
|
1227
|
-
case SettingInterfaceType.Date:
|
|
1228
|
-
case SettingInterfaceType.Time:
|
|
1229
|
-
return Object.assign(Object.assign({}, setting), { value: parse(setting.value) });
|
|
1230
|
-
case SettingInterfaceType.SelectMultiple:
|
|
1231
|
-
return Object.assign(Object.assign({}, setting), { value: Array.isArray(setting.value) ? setting.value : [] });
|
|
1232
|
-
}
|
|
1233
|
-
return setting;
|
|
1234
|
-
});
|
|
1235
|
-
this.groupedSettings = settings.reduce((accum, item) => {
|
|
1236
|
-
if (accum[item.group] === undefined) {
|
|
1237
|
-
accum[item.group] = [];
|
|
1238
|
-
}
|
|
1239
|
-
accum[item.group].push(item);
|
|
1240
|
-
return accum;
|
|
1241
|
-
}, {});
|
|
1242
|
-
this.groups = Object.keys(this.groupedSettings);
|
|
1243
|
-
this._cdRef.markForCheck();
|
|
1244
|
-
});
|
|
1245
|
-
}
|
|
1246
|
-
export(event, settings) {
|
|
1247
|
-
event.stopPropagation();
|
|
1248
|
-
const data = settings.map((setting) => {
|
|
1249
|
-
return {
|
|
1250
|
-
name: setting.name,
|
|
1251
|
-
value: setting.value,
|
|
1252
|
-
group: setting.group,
|
|
1253
|
-
};
|
|
1254
|
-
});
|
|
1255
|
-
this._clipboard.copy(JSON.stringify(data));
|
|
1256
|
-
this._message.success('Copied to clipboard');
|
|
1257
|
-
}
|
|
1258
|
-
import(event, group) {
|
|
1259
|
-
event.stopPropagation();
|
|
1260
|
-
this._prompt.input({
|
|
1261
|
-
label: 'JSON Import',
|
|
1262
|
-
title: 'Import Settings',
|
|
1263
|
-
commitLabel: 'Import',
|
|
1264
|
-
required: true,
|
|
1265
|
-
}).subscribe((value) => {
|
|
1266
|
-
if (value) {
|
|
1267
|
-
try {
|
|
1268
|
-
const settings = this.groupedSettings[group];
|
|
1269
|
-
const data = JSON.parse(value);
|
|
1270
|
-
data.forEach((item) => {
|
|
1271
|
-
const setting = settings.find((s) => {
|
|
1272
|
-
return item.name === s.name;
|
|
1273
|
-
});
|
|
1274
|
-
if (setting) {
|
|
1275
|
-
Object.assign(setting, item);
|
|
1276
|
-
}
|
|
1277
|
-
});
|
|
1278
|
-
this._cdRef.markForCheck();
|
|
1279
|
-
}
|
|
1280
|
-
catch (e) {
|
|
1281
|
-
this._message.error(e);
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
});
|
|
1285
|
-
}
|
|
1286
|
-
saveGroup(group) {
|
|
1287
|
-
const settings = this.groupedSettings[group];
|
|
1288
|
-
const values = settings.reduce((result, value) => {
|
|
1289
|
-
return (result[value.name] = value.value, result);
|
|
1290
|
-
}, {});
|
|
1291
|
-
this.save(group, values)
|
|
1292
|
-
.subscribe(() => {
|
|
1293
|
-
this._message.success('Changes Saved');
|
|
1294
|
-
});
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
SettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SettingsComponent, deps: [{ token: i1$1.FsMessage }, { token: i2$1.FsClipboard }, { token: i3$2.FsPrompt }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1298
|
-
SettingsComponent.ɵcmp = i0.ɵɵ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, 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$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i4$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { type: i4.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.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i8$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i9$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i10.FsDatePickerComponent, selector: "[fsDatePicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "startOfDay", "view", "format", "minutes", "weekStartsOn"], outputs: ["change"] }, { type: i11.FsColorPickerComponent, selector: "[fsColorPicker]", inputs: ["showClear"] }, { type: i10.FsTimePickerComponent, selector: "[fsTimePicker]", inputs: ["view"] }, { type: i12.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$3.MatAccordion, selector: "mat-accordion", inputs: ["multi", "displayMode", "togglePosition", "hideToggle"], exportAs: ["matAccordion"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i9$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i15.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.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i16.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i12.FsFileLabelDirective, selector: "[fsFileLabel]" }], pipes: { "keyNameValue": KeyNameValuePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SettingsComponent, decorators: [{
|
|
1300
|
-
type: Component,
|
|
1301
|
-
args: [{
|
|
1302
|
-
selector: 'fs-system-settings',
|
|
1303
|
-
templateUrl: './settings.component.html',
|
|
1304
|
-
styleUrls: ['./settings.component.scss'],
|
|
1305
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1306
|
-
}]
|
|
1307
|
-
}], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i2$1.FsClipboard }, { type: i3$2.FsPrompt }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { loadSettings: [{
|
|
1308
|
-
type: Input
|
|
1309
|
-
}], save: [{
|
|
1310
|
-
type: Input
|
|
1311
|
-
}], fileRemove: [{
|
|
1312
|
-
type: Output
|
|
1313
|
-
}], fileSelect: [{
|
|
1314
|
-
type: Output
|
|
1315
|
-
}] } });
|
|
1316
|
-
|
|
1317
|
-
class UpgradeLogsComponent {
|
|
1318
|
-
constructor() {
|
|
1319
|
-
this.config = null;
|
|
1320
|
-
this.logTypes = [];
|
|
1321
|
-
}
|
|
1322
|
-
ngOnInit() {
|
|
1323
|
-
this._configList();
|
|
1324
|
-
}
|
|
1325
|
-
_configList() {
|
|
1326
|
-
this.config = {
|
|
1327
|
-
paging: false,
|
|
1328
|
-
filters: [
|
|
1329
|
-
{
|
|
1330
|
-
type: ItemType.Keyword,
|
|
1331
|
-
name: 'keyword',
|
|
1332
|
-
label: 'Search'
|
|
1333
|
-
}
|
|
1334
|
-
],
|
|
1335
|
-
fetch: query => {
|
|
1336
|
-
return this.loadUpgradeLogs(query)
|
|
1337
|
-
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1338
|
-
}
|
|
1339
|
-
};
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
UpgradeLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UpgradeLogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1343
|
-
UpgradeLogsComponent.ɵcmp = i0.ɵɵ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: FsListComponent, descendants: true, static: true }], ngImport: i0, 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$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
|
|
1344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UpgradeLogsComponent, decorators: [{
|
|
1345
|
-
type: Component,
|
|
1346
|
-
args: [{
|
|
1347
|
-
selector: 'fs-system-upgrade-logs',
|
|
1348
|
-
templateUrl: './upgrade-logs.component.html',
|
|
1349
|
-
styleUrls: ['./upgrade-logs.component.scss']
|
|
1350
|
-
}]
|
|
1351
|
-
}], propDecorators: { list: [{
|
|
1352
|
-
type: ViewChild,
|
|
1353
|
-
args: [FsListComponent, { static: true }]
|
|
1354
|
-
}], loadUpgradeLogs: [{
|
|
1355
|
-
type: Input
|
|
1356
|
-
}] } });
|
|
1357
|
-
|
|
1358
|
-
const FS_SYSTEM_CONFIG = new InjectionToken('fs-system-config');
|
|
1359
|
-
|
|
1360
|
-
class FsSystemModule {
|
|
1361
|
-
static forRoot(config) {
|
|
1362
|
-
return {
|
|
1363
|
-
ngModule: FsSystemModule,
|
|
1364
|
-
providers: [
|
|
1365
|
-
{ provide: FS_SYSTEM_CONFIG, useValue: config || {} },
|
|
1366
|
-
],
|
|
1367
|
-
};
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
FsSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1371
|
-
FsSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSystemModule, declarations: [DashboardComponent,
|
|
1372
|
-
CronsComponent,
|
|
1373
|
-
SettingsComponent,
|
|
1374
|
-
KeyNameValuePipe,
|
|
1375
|
-
ProcessesComponent,
|
|
1376
|
-
ServerLogComponent,
|
|
1377
|
-
ServerLogsComponent,
|
|
1378
|
-
UpgradeLogsComponent,
|
|
1379
|
-
ApiLogsComponent,
|
|
1380
|
-
ApiLogComponent,
|
|
1381
|
-
InfoComponent,
|
|
1382
|
-
ProcessComponent,
|
|
1383
|
-
CronComponent,
|
|
1384
|
-
CronLogComponent], imports: [CommonModule,
|
|
1385
|
-
FormsModule,
|
|
1386
|
-
MatButtonModule,
|
|
1387
|
-
MatExpansionModule,
|
|
1388
|
-
MatTooltipModule,
|
|
1389
|
-
MatIconModule,
|
|
1390
|
-
MatFormFieldModule,
|
|
1391
|
-
MatInputModule,
|
|
1392
|
-
MatSelectModule,
|
|
1393
|
-
MatDialogModule,
|
|
1394
|
-
MatTabsModule,
|
|
1395
|
-
FsDateModule,
|
|
1396
|
-
FsSkeletonModule,
|
|
1397
|
-
FsListModule,
|
|
1398
|
-
FsFileModule,
|
|
1399
|
-
FsFileManagerModule,
|
|
1400
|
-
FsLabelModule,
|
|
1401
|
-
FsDialogModule,
|
|
1402
|
-
FsDatePickerModule,
|
|
1403
|
-
FsMenuModule,
|
|
1404
|
-
FsPopoverModule,
|
|
1405
|
-
FsColorPickerModule], exports: [DashboardComponent,
|
|
1406
|
-
CronsComponent,
|
|
1407
|
-
SettingsComponent,
|
|
1408
|
-
ProcessesComponent,
|
|
1409
|
-
ServerLogsComponent,
|
|
1410
|
-
UpgradeLogsComponent,
|
|
1411
|
-
ApiLogsComponent,
|
|
1412
|
-
InfoComponent] });
|
|
1413
|
-
FsSystemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSystemModule, imports: [[
|
|
1414
|
-
CommonModule,
|
|
1415
|
-
FormsModule,
|
|
1416
|
-
MatButtonModule,
|
|
1417
|
-
MatExpansionModule,
|
|
1418
|
-
MatTooltipModule,
|
|
1419
|
-
MatIconModule,
|
|
1420
|
-
MatFormFieldModule,
|
|
1421
|
-
MatInputModule,
|
|
1422
|
-
MatSelectModule,
|
|
1423
|
-
MatDialogModule,
|
|
1424
|
-
MatTabsModule,
|
|
1425
|
-
FsDateModule,
|
|
1426
|
-
FsSkeletonModule,
|
|
1427
|
-
FsListModule,
|
|
1428
|
-
FsFileModule,
|
|
1429
|
-
FsFileManagerModule,
|
|
1430
|
-
FsLabelModule,
|
|
1431
|
-
FsDialogModule,
|
|
1432
|
-
FsDatePickerModule,
|
|
1433
|
-
FsMenuModule,
|
|
1434
|
-
FsPopoverModule,
|
|
1435
|
-
FsColorPickerModule,
|
|
1436
|
-
]] });
|
|
1437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsSystemModule, decorators: [{
|
|
1438
|
-
type: NgModule,
|
|
1439
|
-
args: [{
|
|
1440
|
-
imports: [
|
|
1441
|
-
CommonModule,
|
|
1442
|
-
FormsModule,
|
|
1443
|
-
MatButtonModule,
|
|
1444
|
-
MatExpansionModule,
|
|
1445
|
-
MatTooltipModule,
|
|
1446
|
-
MatIconModule,
|
|
1447
|
-
MatFormFieldModule,
|
|
1448
|
-
MatInputModule,
|
|
1449
|
-
MatSelectModule,
|
|
1450
|
-
MatDialogModule,
|
|
1451
|
-
MatTabsModule,
|
|
1452
|
-
FsDateModule,
|
|
1453
|
-
FsSkeletonModule,
|
|
1454
|
-
FsListModule,
|
|
1455
|
-
FsFileModule,
|
|
1456
|
-
FsFileManagerModule,
|
|
1457
|
-
FsLabelModule,
|
|
1458
|
-
FsDialogModule,
|
|
1459
|
-
FsDatePickerModule,
|
|
1460
|
-
FsMenuModule,
|
|
1461
|
-
FsPopoverModule,
|
|
1462
|
-
FsColorPickerModule,
|
|
1463
|
-
],
|
|
1464
|
-
exports: [
|
|
1465
|
-
DashboardComponent,
|
|
1466
|
-
CronsComponent,
|
|
1467
|
-
SettingsComponent,
|
|
1468
|
-
ProcessesComponent,
|
|
1469
|
-
ServerLogsComponent,
|
|
1470
|
-
UpgradeLogsComponent,
|
|
1471
|
-
ApiLogsComponent,
|
|
1472
|
-
InfoComponent,
|
|
1473
|
-
],
|
|
1474
|
-
declarations: [
|
|
1475
|
-
DashboardComponent,
|
|
1476
|
-
CronsComponent,
|
|
1477
|
-
SettingsComponent,
|
|
1478
|
-
KeyNameValuePipe,
|
|
1479
|
-
ProcessesComponent,
|
|
1480
|
-
ServerLogComponent,
|
|
1481
|
-
ServerLogsComponent,
|
|
1482
|
-
UpgradeLogsComponent,
|
|
1483
|
-
ApiLogsComponent,
|
|
1484
|
-
ApiLogComponent,
|
|
1485
|
-
InfoComponent,
|
|
1486
|
-
ProcessComponent,
|
|
1487
|
-
CronComponent,
|
|
1488
|
-
CronLogComponent,
|
|
1489
|
-
],
|
|
1490
|
-
}]
|
|
1491
|
-
}] });
|
|
1492
|
-
|
|
1493
|
-
/**
|
|
1494
|
-
* Generated bundle index. Do not edit.
|
|
1495
|
-
*/
|
|
1496
|
-
|
|
1497
|
-
export { ApiLogComponent, ApiLogState, ApiLogStates, ApiLogsComponent, CronComponent, CronLogComponent, CronState, CronStates, CronsComponent, DashboardComponent, FS_SYSTEM_CONFIG, FsSystemModule, FsSystemQueryLogsModule, InfoComponent, KeyNameValuePipe, ProcessComponent, ProcessState, ProcessStates, ProcessesComponent, QueryLogsComponent, ServerLogComponent, ServerLogsComponent, SettingsComponent, UpgradeLogsComponent };
|
|
1498
|
-
//# sourceMappingURL=firestitch-system.js.map
|