@firestitch/system 9.1.7 → 9.2.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/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 +59 -115
- 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 +13 -13
- 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 +13 -13
- 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 +46 -99
- package/fesm2015/firestitch-system.js.map +1 -1
- package/fesm5/firestitch-system.js +45 -101
- 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) {
|
|
@@ -423,7 +383,11 @@ let CronsComponent = class CronsComponent {
|
|
|
423
383
|
},
|
|
424
384
|
],
|
|
425
385
|
actionSelected: (action) => {
|
|
426
|
-
return this.bulk(action.action.name, action.selected)
|
|
386
|
+
return this.bulk(action.action.name, action.selected)
|
|
387
|
+
.pipe(tap(() => {
|
|
388
|
+
this.list.reload();
|
|
389
|
+
this._message.success('Applied Changes');
|
|
390
|
+
}));
|
|
427
391
|
},
|
|
428
392
|
};
|
|
429
393
|
}
|
|
@@ -443,7 +407,7 @@ let CronsComponent = class CronsComponent {
|
|
|
443
407
|
return [
|
|
444
408
|
{
|
|
445
409
|
action: (data) => {
|
|
446
|
-
return this.queue(
|
|
410
|
+
return this.queue(data)
|
|
447
411
|
.pipe(tap(() => {
|
|
448
412
|
this._message.success('Queued cron');
|
|
449
413
|
this.list.reload();
|
|
@@ -456,7 +420,7 @@ let CronsComponent = class CronsComponent {
|
|
|
456
420
|
},
|
|
457
421
|
{
|
|
458
422
|
action: (data) => {
|
|
459
|
-
return this.run(
|
|
423
|
+
return this.run(data)
|
|
460
424
|
.pipe(tap(() => {
|
|
461
425
|
this._message.success('Cron ran');
|
|
462
426
|
this.list.reload();
|
|
@@ -469,7 +433,7 @@ let CronsComponent = class CronsComponent {
|
|
|
469
433
|
},
|
|
470
434
|
{
|
|
471
435
|
action: (data) => {
|
|
472
|
-
return this.enable(
|
|
436
|
+
return this.enable(data)
|
|
473
437
|
.pipe(tap(() => {
|
|
474
438
|
this._message.success('Enabled cron');
|
|
475
439
|
this.list.reload();
|
|
@@ -482,7 +446,7 @@ let CronsComponent = class CronsComponent {
|
|
|
482
446
|
},
|
|
483
447
|
{
|
|
484
448
|
action: (data) => {
|
|
485
|
-
return this.disable(
|
|
449
|
+
return this.disable(data)
|
|
486
450
|
.pipe(tap(() => {
|
|
487
451
|
this._message.success('Disabled cron');
|
|
488
452
|
this.list.reload();
|
|
@@ -495,7 +459,7 @@ let CronsComponent = class CronsComponent {
|
|
|
495
459
|
},
|
|
496
460
|
{
|
|
497
461
|
action: (data) => {
|
|
498
|
-
return this.kill(
|
|
462
|
+
return this.kill(data)
|
|
499
463
|
.pipe(tap(() => {
|
|
500
464
|
this._message.success('Killed cron');
|
|
501
465
|
this.list.reload();
|
|
@@ -511,7 +475,6 @@ let CronsComponent = class CronsComponent {
|
|
|
511
475
|
};
|
|
512
476
|
CronsComponent.ctorParameters = () => [
|
|
513
477
|
{ type: FsMessage },
|
|
514
|
-
{ type: SystemService },
|
|
515
478
|
{ type: MatDialog }
|
|
516
479
|
];
|
|
517
480
|
__decorate([
|
|
@@ -561,14 +524,12 @@ CronsComponent = __decorate([
|
|
|
561
524
|
styles: [""]
|
|
562
525
|
}),
|
|
563
526
|
__metadata("design:paramtypes", [FsMessage,
|
|
564
|
-
SystemService,
|
|
565
527
|
MatDialog])
|
|
566
528
|
], CronsComponent);
|
|
567
529
|
|
|
568
530
|
let SettingsComponent = class SettingsComponent {
|
|
569
|
-
constructor(_message,
|
|
531
|
+
constructor(_message, _clipboardService, _prompt, _cdRef) {
|
|
570
532
|
this._message = _message;
|
|
571
|
-
this._systemService = _systemService;
|
|
572
533
|
this._clipboardService = _clipboardService;
|
|
573
534
|
this._prompt = _prompt;
|
|
574
535
|
this._cdRef = _cdRef;
|
|
@@ -581,12 +542,17 @@ let SettingsComponent = class SettingsComponent {
|
|
|
581
542
|
ngOnInit() {
|
|
582
543
|
this.loadSettings()
|
|
583
544
|
.subscribe((settings) => {
|
|
584
|
-
settings =
|
|
585
|
-
|
|
545
|
+
settings = settings
|
|
546
|
+
.filter((setting) => {
|
|
547
|
+
return setting.interfaceType !== SettingInterfaceType.None;
|
|
548
|
+
})
|
|
549
|
+
.map((setting) => {
|
|
586
550
|
switch (setting.interfaceType) {
|
|
587
551
|
case SettingInterfaceType.Date:
|
|
588
552
|
case SettingInterfaceType.Time:
|
|
589
553
|
setting.value = parse(setting.value);
|
|
554
|
+
case SettingInterfaceType.SelectMultiple:
|
|
555
|
+
setting.value = Array.isArray(setting.value) ? setting.value : [];
|
|
590
556
|
break;
|
|
591
557
|
}
|
|
592
558
|
return setting;
|
|
@@ -651,7 +617,6 @@ let SettingsComponent = class SettingsComponent {
|
|
|
651
617
|
};
|
|
652
618
|
SettingsComponent.ctorParameters = () => [
|
|
653
619
|
{ type: FsMessage },
|
|
654
|
-
{ type: SystemService },
|
|
655
620
|
{ type: ClipboardService },
|
|
656
621
|
{ type: FsPrompt },
|
|
657
622
|
{ type: ChangeDetectorRef }
|
|
@@ -675,12 +640,11 @@ __decorate([
|
|
|
675
640
|
SettingsComponent = __decorate([
|
|
676
641
|
Component({
|
|
677
642
|
selector: 'fs-system-settings',
|
|
678
|
-
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\" *ngIf=\"setting.interfaceType===SettingInterfaceType.InputBox\">\r\n <input\r\n matInput\r\n [placeholder]=\"setting.label\"\r\n [(ngModel)]=\"setting.value\"\r\n [name]=\"'
|
|
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 class=\"full-width\" *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 class=\"full-width\" *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 class=\"full-width\" *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 class=\"full-width\" *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 class=\"full-width\" *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",
|
|
679
644
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
680
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}"]
|
|
681
646
|
}),
|
|
682
647
|
__metadata("design:paramtypes", [FsMessage,
|
|
683
|
-
SystemService,
|
|
684
648
|
ClipboardService,
|
|
685
649
|
FsPrompt,
|
|
686
650
|
ChangeDetectorRef])
|
|
@@ -749,7 +713,7 @@ FileManagerComponent = __decorate([
|
|
|
749
713
|
|
|
750
714
|
let KeyNameValuePipe = class KeyNameValuePipe {
|
|
751
715
|
transform(values) {
|
|
752
|
-
return Object.keys(values).map(key => {
|
|
716
|
+
return Object.keys(values).map((key) => {
|
|
753
717
|
return { value: key, name: values[key] };
|
|
754
718
|
});
|
|
755
719
|
}
|
|
@@ -797,8 +761,7 @@ ProcessComponent = __decorate([
|
|
|
797
761
|
], ProcessComponent);
|
|
798
762
|
|
|
799
763
|
let ProcessesComponent = class ProcessesComponent {
|
|
800
|
-
constructor(
|
|
801
|
-
this._systemService = _systemService;
|
|
764
|
+
constructor(_dialog, _message) {
|
|
802
765
|
this._dialog = _dialog;
|
|
803
766
|
this._message = _message;
|
|
804
767
|
this.actions = [];
|
|
@@ -829,7 +792,7 @@ let ProcessesComponent = class ProcessesComponent {
|
|
|
829
792
|
],
|
|
830
793
|
fetch: query => {
|
|
831
794
|
return this.loadProcesses(query)
|
|
832
|
-
.pipe(map((response) => ({ data:
|
|
795
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
833
796
|
}
|
|
834
797
|
};
|
|
835
798
|
if (this.run) {
|
|
@@ -917,7 +880,6 @@ let ProcessesComponent = class ProcessesComponent {
|
|
|
917
880
|
}
|
|
918
881
|
};
|
|
919
882
|
ProcessesComponent.ctorParameters = () => [
|
|
920
|
-
{ type: SystemService },
|
|
921
883
|
{ type: MatDialog },
|
|
922
884
|
{ type: FsMessage }
|
|
923
885
|
];
|
|
@@ -959,8 +921,7 @@ ProcessesComponent = __decorate([
|
|
|
959
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",
|
|
960
922
|
styles: [""]
|
|
961
923
|
}),
|
|
962
|
-
__metadata("design:paramtypes", [
|
|
963
|
-
MatDialog,
|
|
924
|
+
__metadata("design:paramtypes", [MatDialog,
|
|
964
925
|
FsMessage])
|
|
965
926
|
], ProcessesComponent);
|
|
966
927
|
|
|
@@ -995,9 +956,8 @@ ServerLogComponent = __decorate([
|
|
|
995
956
|
], ServerLogComponent);
|
|
996
957
|
|
|
997
958
|
let ServerLogsComponent = class ServerLogsComponent {
|
|
998
|
-
constructor(_dialog
|
|
959
|
+
constructor(_dialog) {
|
|
999
960
|
this._dialog = _dialog;
|
|
1000
|
-
this._systemService = _systemService;
|
|
1001
961
|
this.config = null;
|
|
1002
962
|
this.logTypes = [];
|
|
1003
963
|
}
|
|
@@ -1015,20 +975,19 @@ let ServerLogsComponent = class ServerLogsComponent {
|
|
|
1015
975
|
],
|
|
1016
976
|
fetch: query => {
|
|
1017
977
|
return this.loadLogs(query)
|
|
1018
|
-
.pipe(map((response) => ({ data:
|
|
978
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1019
979
|
}
|
|
1020
980
|
};
|
|
1021
981
|
}
|
|
1022
982
|
open(log) {
|
|
1023
|
-
|
|
983
|
+
this._dialog.open(ServerLogComponent, {
|
|
1024
984
|
data: { log: log },
|
|
1025
985
|
width: '85%'
|
|
1026
986
|
});
|
|
1027
987
|
}
|
|
1028
988
|
};
|
|
1029
989
|
ServerLogsComponent.ctorParameters = () => [
|
|
1030
|
-
{ type: MatDialog }
|
|
1031
|
-
{ type: SystemService }
|
|
990
|
+
{ type: MatDialog }
|
|
1032
991
|
];
|
|
1033
992
|
__decorate([
|
|
1034
993
|
ViewChild('list', { static: true }),
|
|
@@ -1044,13 +1003,11 @@ ServerLogsComponent = __decorate([
|
|
|
1044
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",
|
|
1045
1004
|
styles: [""]
|
|
1046
1005
|
}),
|
|
1047
|
-
__metadata("design:paramtypes", [MatDialog
|
|
1048
|
-
SystemService])
|
|
1006
|
+
__metadata("design:paramtypes", [MatDialog])
|
|
1049
1007
|
], ServerLogsComponent);
|
|
1050
1008
|
|
|
1051
1009
|
let UpgradeLogsComponent = class UpgradeLogsComponent {
|
|
1052
|
-
constructor(
|
|
1053
|
-
this._systemService = _systemService;
|
|
1010
|
+
constructor() {
|
|
1054
1011
|
this.config = null;
|
|
1055
1012
|
this.logTypes = [];
|
|
1056
1013
|
}
|
|
@@ -1069,14 +1026,11 @@ let UpgradeLogsComponent = class UpgradeLogsComponent {
|
|
|
1069
1026
|
],
|
|
1070
1027
|
fetch: query => {
|
|
1071
1028
|
return this.loadUpgradeLogs(query)
|
|
1072
|
-
.pipe(map((response) => ({ data:
|
|
1029
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1073
1030
|
}
|
|
1074
1031
|
};
|
|
1075
1032
|
}
|
|
1076
1033
|
};
|
|
1077
|
-
UpgradeLogsComponent.ctorParameters = () => [
|
|
1078
|
-
{ type: SystemService }
|
|
1079
|
-
];
|
|
1080
1034
|
__decorate([
|
|
1081
1035
|
ViewChild(FsListComponent, { static: true }),
|
|
1082
1036
|
__metadata("design:type", FsListComponent)
|
|
@@ -1090,8 +1044,7 @@ UpgradeLogsComponent = __decorate([
|
|
|
1090
1044
|
selector: 'fs-system-upgrade-logs',
|
|
1091
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",
|
|
1092
1046
|
styles: [""]
|
|
1093
|
-
})
|
|
1094
|
-
__metadata("design:paramtypes", [SystemService])
|
|
1047
|
+
})
|
|
1095
1048
|
], UpgradeLogsComponent);
|
|
1096
1049
|
|
|
1097
1050
|
let ApiLogComponent = class ApiLogComponent {
|
|
@@ -1120,9 +1073,8 @@ ApiLogComponent = __decorate([
|
|
|
1120
1073
|
], ApiLogComponent);
|
|
1121
1074
|
|
|
1122
1075
|
let ApiLogsComponent = class ApiLogsComponent {
|
|
1123
|
-
constructor(_dialog
|
|
1076
|
+
constructor(_dialog) {
|
|
1124
1077
|
this._dialog = _dialog;
|
|
1125
|
-
this._systemService = _systemService;
|
|
1126
1078
|
this.config = null;
|
|
1127
1079
|
this.apiLogStates = indexNameValue(ApiLogStates);
|
|
1128
1080
|
}
|
|
@@ -1152,7 +1104,7 @@ let ApiLogsComponent = class ApiLogsComponent {
|
|
|
1152
1104
|
fetch: query => {
|
|
1153
1105
|
Object.assign(query, {});
|
|
1154
1106
|
return this.loadApiLogs(query)
|
|
1155
|
-
.pipe(map((response) => ({ data:
|
|
1107
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1156
1108
|
}
|
|
1157
1109
|
};
|
|
1158
1110
|
}
|
|
@@ -1164,8 +1116,7 @@ let ApiLogsComponent = class ApiLogsComponent {
|
|
|
1164
1116
|
}
|
|
1165
1117
|
};
|
|
1166
1118
|
ApiLogsComponent.ctorParameters = () => [
|
|
1167
|
-
{ type: MatDialog }
|
|
1168
|
-
{ type: SystemService }
|
|
1119
|
+
{ type: MatDialog }
|
|
1169
1120
|
];
|
|
1170
1121
|
__decorate([
|
|
1171
1122
|
ViewChild(FsListComponent, { static: true }),
|
|
@@ -1181,8 +1132,7 @@ ApiLogsComponent = __decorate([
|
|
|
1181
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",
|
|
1182
1133
|
styles: [""]
|
|
1183
1134
|
}),
|
|
1184
|
-
__metadata("design:paramtypes", [MatDialog
|
|
1185
|
-
SystemService])
|
|
1135
|
+
__metadata("design:paramtypes", [MatDialog])
|
|
1186
1136
|
], ApiLogsComponent);
|
|
1187
1137
|
|
|
1188
1138
|
let InfoComponent = class InfoComponent {
|
|
@@ -1284,9 +1234,6 @@ FsSystemModule = FsSystemModule_1 = __decorate([
|
|
|
1284
1234
|
CronComponent,
|
|
1285
1235
|
CronLogComponent,
|
|
1286
1236
|
],
|
|
1287
|
-
providers: [
|
|
1288
|
-
SystemService
|
|
1289
|
-
],
|
|
1290
1237
|
})
|
|
1291
1238
|
], FsSystemModule);
|
|
1292
1239
|
|
|
@@ -1294,5 +1241,5 @@ FsSystemModule = FsSystemModule_1 = __decorate([
|
|
|
1294
1241
|
* Generated bundle index. Do not edit.
|
|
1295
1242
|
*/
|
|
1296
1243
|
|
|
1297
|
-
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 };
|
|
1298
1245
|
//# sourceMappingURL=firestitch-system.js.map
|