@firestitch/system 9.1.8 → 9.2.2
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/app/components/api-logs/api-logs.component.d.ts +1 -3
- package/app/components/crons/crons.component.d.ts +1 -3
- package/app/components/dashboard/dashboard.component.d.ts +1 -3
- package/app/components/processes/processes.component.d.ts +1 -3
- package/app/components/server-logs/server-logs.component.d.ts +1 -3
- package/app/components/settings/settings.component.d.ts +1 -3
- package/app/components/upgrade-logs/upgrade-logs.component.d.ts +0 -3
- package/app/enums/setting-interface-type.enum.d.ts +4 -2
- package/app/interfaces/system-config.d.ts +0 -1
- package/bundles/firestitch-system.umd.js +54 -114
- package/bundles/firestitch-system.umd.js.map +1 -1
- package/bundles/firestitch-system.umd.min.js +2 -2
- package/bundles/firestitch-system.umd.min.js.map +1 -1
- package/esm2015/app/components/api-logs/api-logs.component.js +5 -9
- package/esm2015/app/components/crons/crons.component.js +8 -12
- package/esm2015/app/components/dashboard/dashboard.component.js +3 -7
- package/esm2015/app/components/processes/processes.component.js +4 -8
- package/esm2015/app/components/server-logs/server-logs.component.js +6 -10
- package/esm2015/app/components/settings/settings.component.js +10 -9
- package/esm2015/app/components/upgrade-logs/upgrade-logs.component.js +4 -10
- package/esm2015/app/enums/setting-interface-type.enum.js +4 -2
- package/esm2015/app/fs-system.module.js +1 -5
- package/esm2015/app/interfaces/system-config.js +1 -1
- package/esm2015/app/pipes/key-name-value.pipe.js +2 -2
- package/esm2015/firestitch-system.js +15 -17
- package/esm5/app/components/api-logs/api-logs.component.js +5 -9
- package/esm5/app/components/crons/crons.component.js +8 -12
- package/esm5/app/components/dashboard/dashboard.component.js +3 -7
- package/esm5/app/components/processes/processes.component.js +4 -8
- package/esm5/app/components/server-logs/server-logs.component.js +6 -10
- package/esm5/app/components/settings/settings.component.js +10 -9
- package/esm5/app/components/upgrade-logs/upgrade-logs.component.js +4 -10
- package/esm5/app/enums/setting-interface-type.enum.js +4 -2
- package/esm5/app/fs-system.module.js +1 -5
- package/esm5/app/interfaces/system-config.js +1 -1
- package/esm5/app/pipes/key-name-value.pipe.js +1 -1
- package/esm5/firestitch-system.js +15 -17
- package/fesm2015/firestitch-system.js +41 -98
- package/fesm2015/firestitch-system.js.map +1 -1
- package/fesm5/firestitch-system.js +40 -100
- package/fesm5/firestitch-system.js.map +1 -1
- package/firestitch-system.d.ts +14 -17
- package/firestitch-system.metadata.json +1 -1
- package/package.json +1 -1
- package/app/services/index.d.ts +0 -1
- package/app/services/system.service.d.ts +0 -7
- package/esm2015/app/services/index.js +0 -2
- package/esm2015/app/services/system.service.js +0 -43
- package/esm5/app/services/index.js +0 -2
- package/esm5/app/services/system.service.js +0 -46
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { __decorate,
|
|
2
|
-
import { InjectionToken,
|
|
3
|
-
import * as _snakecaseKeys from 'snakecase-keys';
|
|
4
|
-
import * as _camelcaseKeys from 'camelcase-keys';
|
|
5
|
-
import { isArray, groupBy, reduce } from 'lodash-es';
|
|
1
|
+
import { __decorate, __metadata, __param } from 'tslib';
|
|
2
|
+
import { InjectionToken, ChangeDetectorRef, Input, Component, ChangeDetectionStrategy, Inject, ViewChild, EventEmitter, Output, Pipe, Injectable, ElementRef, NgModule } from '@angular/core';
|
|
6
3
|
import { CommonModule } from '@angular/common';
|
|
7
4
|
import { FormsModule } from '@angular/forms';
|
|
8
5
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
@@ -31,52 +28,16 @@ import { differenceInMinutes } from 'date-fns';
|
|
|
31
28
|
import { ItemType } from '@firestitch/filter';
|
|
32
29
|
import { SelectionActionType } from '@firestitch/selection';
|
|
33
30
|
import { FsPrompt } from '@firestitch/prompt';
|
|
31
|
+
import { groupBy, reduce } from 'lodash-es';
|
|
34
32
|
import { ClipboardService, ClipboardModule } from 'ngx-clipboard';
|
|
35
33
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
36
34
|
|
|
37
35
|
const FS_SYSTEM_CONFIG = new InjectionToken('fs-system-config');
|
|
38
36
|
|
|
39
|
-
const snakecaseKeys = _snakecaseKeys;
|
|
40
|
-
const camelcaseKeys = _camelcaseKeys;
|
|
41
|
-
let SystemService = class SystemService {
|
|
42
|
-
constructor(_config) {
|
|
43
|
-
this._config = _config;
|
|
44
|
-
}
|
|
45
|
-
input(data) {
|
|
46
|
-
if (isArray(data)) {
|
|
47
|
-
return data.map(item => {
|
|
48
|
-
return this._config.case === 'snake' ? camelcaseKeys(item, { deep: true }) : item;
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
return this._config.case === 'snake' ? camelcaseKeys(data, { deep: true }) : data;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
output(data) {
|
|
56
|
-
if (isArray(data)) {
|
|
57
|
-
return data.map(item => {
|
|
58
|
-
return this._config.case === 'snake' ? snakecaseKeys(item, { deep: true }) : item;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
return this._config.case === 'snake' ? snakecaseKeys(data, { deep: true }) : data;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
SystemService.ctorParameters = () => [
|
|
67
|
-
{ type: undefined, decorators: [{ type: Inject, args: [FS_SYSTEM_CONFIG,] }] }
|
|
68
|
-
];
|
|
69
|
-
SystemService = __decorate([
|
|
70
|
-
Injectable(),
|
|
71
|
-
__param(0, Inject(FS_SYSTEM_CONFIG)),
|
|
72
|
-
__metadata("design:paramtypes", [Object])
|
|
73
|
-
], SystemService);
|
|
74
|
-
|
|
75
37
|
let DashboardComponent = class DashboardComponent {
|
|
76
|
-
constructor(_message, _cdRef,
|
|
38
|
+
constructor(_message, _cdRef, _buildService) {
|
|
77
39
|
this._message = _message;
|
|
78
40
|
this._cdRef = _cdRef;
|
|
79
|
-
this._systemService = _systemService;
|
|
80
41
|
this._buildService = _buildService;
|
|
81
42
|
this.buttonActions = [];
|
|
82
43
|
this.menuActions = [];
|
|
@@ -98,7 +59,7 @@ let DashboardComponent = class DashboardComponent {
|
|
|
98
59
|
_load() {
|
|
99
60
|
this.load()
|
|
100
61
|
.subscribe((dashboard) => {
|
|
101
|
-
this.dashboard =
|
|
62
|
+
this.dashboard = dashboard;
|
|
102
63
|
this.dashboard.cronRanAttention = !dashboard.cronRan ||
|
|
103
64
|
differenceInMinutes(new Date(), new Date(dashboard.cronRan)) > 15;
|
|
104
65
|
this._cdRef.markForCheck();
|
|
@@ -128,7 +89,6 @@ let DashboardComponent = class DashboardComponent {
|
|
|
128
89
|
DashboardComponent.ctorParameters = () => [
|
|
129
90
|
{ type: FsMessage },
|
|
130
91
|
{ type: ChangeDetectorRef },
|
|
131
|
-
{ type: SystemService },
|
|
132
92
|
{ type: FsBuildService }
|
|
133
93
|
];
|
|
134
94
|
__decorate([
|
|
@@ -156,7 +116,6 @@ DashboardComponent = __decorate([
|
|
|
156
116
|
}),
|
|
157
117
|
__metadata("design:paramtypes", [FsMessage,
|
|
158
118
|
ChangeDetectorRef,
|
|
159
|
-
SystemService,
|
|
160
119
|
FsBuildService])
|
|
161
120
|
], DashboardComponent);
|
|
162
121
|
|
|
@@ -182,12 +141,14 @@ var SettingInterfaceType;
|
|
|
182
141
|
SettingInterfaceType["RadioButton"] = "R";
|
|
183
142
|
SettingInterfaceType["InputBox"] = "I";
|
|
184
143
|
SettingInterfaceType["Textarea"] = "T";
|
|
185
|
-
SettingInterfaceType["
|
|
144
|
+
SettingInterfaceType["Select"] = "D";
|
|
145
|
+
SettingInterfaceType["SelectMultiple"] = "W";
|
|
186
146
|
SettingInterfaceType["Date"] = "A";
|
|
187
147
|
SettingInterfaceType["File"] = "F";
|
|
188
148
|
SettingInterfaceType["Static"] = "S";
|
|
189
149
|
SettingInterfaceType["Password"] = "P";
|
|
190
150
|
SettingInterfaceType["Time"] = "M";
|
|
151
|
+
SettingInterfaceType["None"] = "N";
|
|
191
152
|
})(SettingInterfaceType || (SettingInterfaceType = {}));
|
|
192
153
|
|
|
193
154
|
var ApiLogState;
|
|
@@ -374,9 +335,8 @@ CronComponent = __decorate([
|
|
|
374
335
|
], CronComponent);
|
|
375
336
|
|
|
376
337
|
let CronsComponent = class CronsComponent {
|
|
377
|
-
constructor(_message,
|
|
338
|
+
constructor(_message, _dialog) {
|
|
378
339
|
this._message = _message;
|
|
379
|
-
this._systemService = _systemService;
|
|
380
340
|
this._dialog = _dialog;
|
|
381
341
|
this.config = null;
|
|
382
342
|
this.cronStates = indexNameValue(CronStates);
|
|
@@ -404,7 +364,7 @@ let CronsComponent = class CronsComponent {
|
|
|
404
364
|
fetch: query => {
|
|
405
365
|
query.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
406
366
|
return this.loadCrons(query)
|
|
407
|
-
.pipe(map((response) => ({ data:
|
|
367
|
+
.pipe(map((response) => ({ data: response })));
|
|
408
368
|
},
|
|
409
369
|
};
|
|
410
370
|
if (this.bulk) {
|
|
@@ -447,7 +407,7 @@ let CronsComponent = class CronsComponent {
|
|
|
447
407
|
return [
|
|
448
408
|
{
|
|
449
409
|
action: (data) => {
|
|
450
|
-
return this.queue(
|
|
410
|
+
return this.queue(data)
|
|
451
411
|
.pipe(tap(() => {
|
|
452
412
|
this._message.success('Queued cron');
|
|
453
413
|
this.list.reload();
|
|
@@ -460,7 +420,7 @@ let CronsComponent = class CronsComponent {
|
|
|
460
420
|
},
|
|
461
421
|
{
|
|
462
422
|
action: (data) => {
|
|
463
|
-
return this.run(
|
|
423
|
+
return this.run(data)
|
|
464
424
|
.pipe(tap(() => {
|
|
465
425
|
this._message.success('Cron ran');
|
|
466
426
|
this.list.reload();
|
|
@@ -473,7 +433,7 @@ let CronsComponent = class CronsComponent {
|
|
|
473
433
|
},
|
|
474
434
|
{
|
|
475
435
|
action: (data) => {
|
|
476
|
-
return this.enable(
|
|
436
|
+
return this.enable(data)
|
|
477
437
|
.pipe(tap(() => {
|
|
478
438
|
this._message.success('Enabled cron');
|
|
479
439
|
this.list.reload();
|
|
@@ -486,7 +446,7 @@ let CronsComponent = class CronsComponent {
|
|
|
486
446
|
},
|
|
487
447
|
{
|
|
488
448
|
action: (data) => {
|
|
489
|
-
return this.disable(
|
|
449
|
+
return this.disable(data)
|
|
490
450
|
.pipe(tap(() => {
|
|
491
451
|
this._message.success('Disabled cron');
|
|
492
452
|
this.list.reload();
|
|
@@ -499,7 +459,7 @@ let CronsComponent = class CronsComponent {
|
|
|
499
459
|
},
|
|
500
460
|
{
|
|
501
461
|
action: (data) => {
|
|
502
|
-
return this.kill(
|
|
462
|
+
return this.kill(data)
|
|
503
463
|
.pipe(tap(() => {
|
|
504
464
|
this._message.success('Killed cron');
|
|
505
465
|
this.list.reload();
|
|
@@ -515,7 +475,6 @@ let CronsComponent = class CronsComponent {
|
|
|
515
475
|
};
|
|
516
476
|
CronsComponent.ctorParameters = () => [
|
|
517
477
|
{ type: FsMessage },
|
|
518
|
-
{ type: SystemService },
|
|
519
478
|
{ type: MatDialog }
|
|
520
479
|
];
|
|
521
480
|
__decorate([
|
|
@@ -565,14 +524,12 @@ CronsComponent = __decorate([
|
|
|
565
524
|
styles: [""]
|
|
566
525
|
}),
|
|
567
526
|
__metadata("design:paramtypes", [FsMessage,
|
|
568
|
-
SystemService,
|
|
569
527
|
MatDialog])
|
|
570
528
|
], CronsComponent);
|
|
571
529
|
|
|
572
530
|
let SettingsComponent = class SettingsComponent {
|
|
573
|
-
constructor(_message,
|
|
531
|
+
constructor(_message, _clipboardService, _prompt, _cdRef) {
|
|
574
532
|
this._message = _message;
|
|
575
|
-
this._systemService = _systemService;
|
|
576
533
|
this._clipboardService = _clipboardService;
|
|
577
534
|
this._prompt = _prompt;
|
|
578
535
|
this._cdRef = _cdRef;
|
|
@@ -585,12 +542,17 @@ let SettingsComponent = class SettingsComponent {
|
|
|
585
542
|
ngOnInit() {
|
|
586
543
|
this.loadSettings()
|
|
587
544
|
.subscribe((settings) => {
|
|
588
|
-
settings =
|
|
589
|
-
|
|
545
|
+
settings = settings
|
|
546
|
+
.filter((setting) => {
|
|
547
|
+
return setting.interfaceType !== SettingInterfaceType.None;
|
|
548
|
+
})
|
|
549
|
+
.map((setting) => {
|
|
590
550
|
switch (setting.interfaceType) {
|
|
591
551
|
case SettingInterfaceType.Date:
|
|
592
552
|
case SettingInterfaceType.Time:
|
|
593
553
|
setting.value = parse(setting.value);
|
|
554
|
+
case SettingInterfaceType.SelectMultiple:
|
|
555
|
+
setting.value = Array.isArray(setting.value) ? setting.value : [];
|
|
594
556
|
break;
|
|
595
557
|
}
|
|
596
558
|
return setting;
|
|
@@ -655,7 +617,6 @@ let SettingsComponent = class SettingsComponent {
|
|
|
655
617
|
};
|
|
656
618
|
SettingsComponent.ctorParameters = () => [
|
|
657
619
|
{ type: FsMessage },
|
|
658
|
-
{ type: SystemService },
|
|
659
620
|
{ type: ClipboardService },
|
|
660
621
|
{ type: FsPrompt },
|
|
661
622
|
{ type: ChangeDetectorRef }
|
|
@@ -679,12 +640,11 @@ __decorate([
|
|
|
679
640
|
SettingsComponent = __decorate([
|
|
680
641
|
Component({
|
|
681
642
|
selector: 'fs-system-settings',
|
|
682
|
-
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 hideToggle *ngFor=\"let setting of groupedSettings[group]\">\r\n <mat-form-field class=\"full-width\"
|
|
643
|
+
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 hideToggle *ngFor=\"let setting of groupedSettings[group]\">\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.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 </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",
|
|
683
644
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
684
645
|
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}"]
|
|
685
646
|
}),
|
|
686
647
|
__metadata("design:paramtypes", [FsMessage,
|
|
687
|
-
SystemService,
|
|
688
648
|
ClipboardService,
|
|
689
649
|
FsPrompt,
|
|
690
650
|
ChangeDetectorRef])
|
|
@@ -753,7 +713,7 @@ FileManagerComponent = __decorate([
|
|
|
753
713
|
|
|
754
714
|
let KeyNameValuePipe = class KeyNameValuePipe {
|
|
755
715
|
transform(values) {
|
|
756
|
-
return Object.keys(values).map(key => {
|
|
716
|
+
return Object.keys(values).map((key) => {
|
|
757
717
|
return { value: key, name: values[key] };
|
|
758
718
|
});
|
|
759
719
|
}
|
|
@@ -801,8 +761,7 @@ ProcessComponent = __decorate([
|
|
|
801
761
|
], ProcessComponent);
|
|
802
762
|
|
|
803
763
|
let ProcessesComponent = class ProcessesComponent {
|
|
804
|
-
constructor(
|
|
805
|
-
this._systemService = _systemService;
|
|
764
|
+
constructor(_dialog, _message) {
|
|
806
765
|
this._dialog = _dialog;
|
|
807
766
|
this._message = _message;
|
|
808
767
|
this.actions = [];
|
|
@@ -833,7 +792,7 @@ let ProcessesComponent = class ProcessesComponent {
|
|
|
833
792
|
],
|
|
834
793
|
fetch: query => {
|
|
835
794
|
return this.loadProcesses(query)
|
|
836
|
-
.pipe(map((response) => ({ data:
|
|
795
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
837
796
|
}
|
|
838
797
|
};
|
|
839
798
|
if (this.run) {
|
|
@@ -921,7 +880,6 @@ let ProcessesComponent = class ProcessesComponent {
|
|
|
921
880
|
}
|
|
922
881
|
};
|
|
923
882
|
ProcessesComponent.ctorParameters = () => [
|
|
924
|
-
{ type: SystemService },
|
|
925
883
|
{ type: MatDialog },
|
|
926
884
|
{ type: FsMessage }
|
|
927
885
|
];
|
|
@@ -963,8 +921,7 @@ ProcessesComponent = __decorate([
|
|
|
963
921
|
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",
|
|
964
922
|
styles: [""]
|
|
965
923
|
}),
|
|
966
|
-
__metadata("design:paramtypes", [
|
|
967
|
-
MatDialog,
|
|
924
|
+
__metadata("design:paramtypes", [MatDialog,
|
|
968
925
|
FsMessage])
|
|
969
926
|
], ProcessesComponent);
|
|
970
927
|
|
|
@@ -999,9 +956,8 @@ ServerLogComponent = __decorate([
|
|
|
999
956
|
], ServerLogComponent);
|
|
1000
957
|
|
|
1001
958
|
let ServerLogsComponent = class ServerLogsComponent {
|
|
1002
|
-
constructor(_dialog
|
|
959
|
+
constructor(_dialog) {
|
|
1003
960
|
this._dialog = _dialog;
|
|
1004
|
-
this._systemService = _systemService;
|
|
1005
961
|
this.config = null;
|
|
1006
962
|
this.logTypes = [];
|
|
1007
963
|
}
|
|
@@ -1019,20 +975,19 @@ let ServerLogsComponent = class ServerLogsComponent {
|
|
|
1019
975
|
],
|
|
1020
976
|
fetch: query => {
|
|
1021
977
|
return this.loadLogs(query)
|
|
1022
|
-
.pipe(map((response) => ({ data:
|
|
978
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1023
979
|
}
|
|
1024
980
|
};
|
|
1025
981
|
}
|
|
1026
982
|
open(log) {
|
|
1027
|
-
|
|
983
|
+
this._dialog.open(ServerLogComponent, {
|
|
1028
984
|
data: { log: log },
|
|
1029
985
|
width: '85%'
|
|
1030
986
|
});
|
|
1031
987
|
}
|
|
1032
988
|
};
|
|
1033
989
|
ServerLogsComponent.ctorParameters = () => [
|
|
1034
|
-
{ type: MatDialog }
|
|
1035
|
-
{ type: SystemService }
|
|
990
|
+
{ type: MatDialog }
|
|
1036
991
|
];
|
|
1037
992
|
__decorate([
|
|
1038
993
|
ViewChild('list', { static: true }),
|
|
@@ -1048,13 +1003,11 @@ ServerLogsComponent = __decorate([
|
|
|
1048
1003
|
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",
|
|
1049
1004
|
styles: [""]
|
|
1050
1005
|
}),
|
|
1051
|
-
__metadata("design:paramtypes", [MatDialog
|
|
1052
|
-
SystemService])
|
|
1006
|
+
__metadata("design:paramtypes", [MatDialog])
|
|
1053
1007
|
], ServerLogsComponent);
|
|
1054
1008
|
|
|
1055
1009
|
let UpgradeLogsComponent = class UpgradeLogsComponent {
|
|
1056
|
-
constructor(
|
|
1057
|
-
this._systemService = _systemService;
|
|
1010
|
+
constructor() {
|
|
1058
1011
|
this.config = null;
|
|
1059
1012
|
this.logTypes = [];
|
|
1060
1013
|
}
|
|
@@ -1073,14 +1026,11 @@ let UpgradeLogsComponent = class UpgradeLogsComponent {
|
|
|
1073
1026
|
],
|
|
1074
1027
|
fetch: query => {
|
|
1075
1028
|
return this.loadUpgradeLogs(query)
|
|
1076
|
-
.pipe(map((response) => ({ data:
|
|
1029
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1077
1030
|
}
|
|
1078
1031
|
};
|
|
1079
1032
|
}
|
|
1080
1033
|
};
|
|
1081
|
-
UpgradeLogsComponent.ctorParameters = () => [
|
|
1082
|
-
{ type: SystemService }
|
|
1083
|
-
];
|
|
1084
1034
|
__decorate([
|
|
1085
1035
|
ViewChild(FsListComponent, { static: true }),
|
|
1086
1036
|
__metadata("design:type", FsListComponent)
|
|
@@ -1094,8 +1044,7 @@ UpgradeLogsComponent = __decorate([
|
|
|
1094
1044
|
selector: 'fs-system-upgrade-logs',
|
|
1095
1045
|
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",
|
|
1096
1046
|
styles: [""]
|
|
1097
|
-
})
|
|
1098
|
-
__metadata("design:paramtypes", [SystemService])
|
|
1047
|
+
})
|
|
1099
1048
|
], UpgradeLogsComponent);
|
|
1100
1049
|
|
|
1101
1050
|
let ApiLogComponent = class ApiLogComponent {
|
|
@@ -1124,9 +1073,8 @@ ApiLogComponent = __decorate([
|
|
|
1124
1073
|
], ApiLogComponent);
|
|
1125
1074
|
|
|
1126
1075
|
let ApiLogsComponent = class ApiLogsComponent {
|
|
1127
|
-
constructor(_dialog
|
|
1076
|
+
constructor(_dialog) {
|
|
1128
1077
|
this._dialog = _dialog;
|
|
1129
|
-
this._systemService = _systemService;
|
|
1130
1078
|
this.config = null;
|
|
1131
1079
|
this.apiLogStates = indexNameValue(ApiLogStates);
|
|
1132
1080
|
}
|
|
@@ -1156,7 +1104,7 @@ let ApiLogsComponent = class ApiLogsComponent {
|
|
|
1156
1104
|
fetch: query => {
|
|
1157
1105
|
Object.assign(query, {});
|
|
1158
1106
|
return this.loadApiLogs(query)
|
|
1159
|
-
.pipe(map((response) => ({ data:
|
|
1107
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1160
1108
|
}
|
|
1161
1109
|
};
|
|
1162
1110
|
}
|
|
@@ -1168,8 +1116,7 @@ let ApiLogsComponent = class ApiLogsComponent {
|
|
|
1168
1116
|
}
|
|
1169
1117
|
};
|
|
1170
1118
|
ApiLogsComponent.ctorParameters = () => [
|
|
1171
|
-
{ type: MatDialog }
|
|
1172
|
-
{ type: SystemService }
|
|
1119
|
+
{ type: MatDialog }
|
|
1173
1120
|
];
|
|
1174
1121
|
__decorate([
|
|
1175
1122
|
ViewChild(FsListComponent, { static: true }),
|
|
@@ -1185,8 +1132,7 @@ ApiLogsComponent = __decorate([
|
|
|
1185
1132
|
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 href=\"javascript:;\" (click)=\"open(row)\">{{row.type || 'Unknown'}}</a>\r\n </ng-template>\r\n </fs-list-column>\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 <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 {{apiLogStates[row.state]}}\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 <div><small *ngIf=\"row.length\">Duration: {{ row.length | fsDateDuration }}</small></div>\r\n </ng-template>\r\n </fs-list-column>\r\n </fs-list>\r\n",
|
|
1186
1133
|
styles: [""]
|
|
1187
1134
|
}),
|
|
1188
|
-
__metadata("design:paramtypes", [MatDialog
|
|
1189
|
-
SystemService])
|
|
1135
|
+
__metadata("design:paramtypes", [MatDialog])
|
|
1190
1136
|
], ApiLogsComponent);
|
|
1191
1137
|
|
|
1192
1138
|
let InfoComponent = class InfoComponent {
|
|
@@ -1288,9 +1234,6 @@ FsSystemModule = FsSystemModule_1 = __decorate([
|
|
|
1288
1234
|
CronComponent,
|
|
1289
1235
|
CronLogComponent,
|
|
1290
1236
|
],
|
|
1291
|
-
providers: [
|
|
1292
|
-
SystemService
|
|
1293
|
-
],
|
|
1294
1237
|
})
|
|
1295
1238
|
], FsSystemModule);
|
|
1296
1239
|
|
|
@@ -1298,5 +1241,5 @@ FsSystemModule = FsSystemModule_1 = __decorate([
|
|
|
1298
1241
|
* Generated bundle index. Do not edit.
|
|
1299
1242
|
*/
|
|
1300
1243
|
|
|
1301
|
-
export { ApiLogState, ApiLogStates, CronState, CronStates, FS_SYSTEM_CONFIG, FsSystemModule, ProcessState, ProcessStates, DashboardComponent as ɵa,
|
|
1244
|
+
export { ApiLogState, ApiLogStates, CronState, CronStates, FS_SYSTEM_CONFIG, FsSystemModule, ProcessState, ProcessStates, DashboardComponent as ɵa, CronsComponent as ɵb, SettingsComponent as ɵc, FileManagerComponent as ɵd, ProcessesComponent as ɵe, ServerLogsComponent as ɵf, UpgradeLogsComponent as ɵg, ApiLogsComponent as ɵh, InfoComponent as ɵi, KeyNameValuePipe as ɵj, ServerLogComponent as ɵk, ApiLogComponent as ɵl, ProcessComponent as ɵm, CronComponent as ɵn, CronLogComponent as ɵo };
|
|
1302
1245
|
//# sourceMappingURL=firestitch-system.js.map
|