@firestitch/system 9.1.6 → 9.2.0
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 +2 -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 +2 -1
- package/app/interfaces/system-config.d.ts +0 -1
- package/bundles/firestitch-system.umd.js +77 -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 +38 -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 +5 -8
- package/esm2015/app/components/upgrade-logs/upgrade-logs.component.js +4 -10
- package/esm2015/app/enums/setting-interface-type.enum.js +3 -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 +38 -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 +5 -8
- package/esm5/app/components/upgrade-logs/upgrade-logs.component.js +4 -10
- package/esm5/app/enums/setting-interface-type.enum.js +3 -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 +65 -98
- package/fesm2015/firestitch-system.js.map +1 -1
- package/fesm5/firestitch-system.js +64 -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';
|
|
@@ -29,53 +26,18 @@ import { takeUntil, map, tap } from 'rxjs/operators';
|
|
|
29
26
|
import { Subject } from 'rxjs';
|
|
30
27
|
import { differenceInMinutes } from 'date-fns';
|
|
31
28
|
import { ItemType } from '@firestitch/filter';
|
|
29
|
+
import { SelectionActionType } from '@firestitch/selection';
|
|
32
30
|
import { FsPrompt } from '@firestitch/prompt';
|
|
31
|
+
import { groupBy, reduce } from 'lodash-es';
|
|
33
32
|
import { ClipboardService, ClipboardModule } from 'ngx-clipboard';
|
|
34
33
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
35
34
|
|
|
36
35
|
const FS_SYSTEM_CONFIG = new InjectionToken('fs-system-config');
|
|
37
36
|
|
|
38
|
-
const snakecaseKeys = _snakecaseKeys;
|
|
39
|
-
const camelcaseKeys = _camelcaseKeys;
|
|
40
|
-
let SystemService = class SystemService {
|
|
41
|
-
constructor(_config) {
|
|
42
|
-
this._config = _config;
|
|
43
|
-
}
|
|
44
|
-
input(data) {
|
|
45
|
-
if (isArray(data)) {
|
|
46
|
-
return data.map(item => {
|
|
47
|
-
return this._config.case === 'snake' ? camelcaseKeys(item, { deep: true }) : item;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
return this._config.case === 'snake' ? camelcaseKeys(data, { deep: true }) : data;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
output(data) {
|
|
55
|
-
if (isArray(data)) {
|
|
56
|
-
return data.map(item => {
|
|
57
|
-
return this._config.case === 'snake' ? snakecaseKeys(item, { deep: true }) : item;
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
return this._config.case === 'snake' ? snakecaseKeys(data, { deep: true }) : data;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
SystemService.ctorParameters = () => [
|
|
66
|
-
{ type: undefined, decorators: [{ type: Inject, args: [FS_SYSTEM_CONFIG,] }] }
|
|
67
|
-
];
|
|
68
|
-
SystemService = __decorate([
|
|
69
|
-
Injectable(),
|
|
70
|
-
__param(0, Inject(FS_SYSTEM_CONFIG)),
|
|
71
|
-
__metadata("design:paramtypes", [Object])
|
|
72
|
-
], SystemService);
|
|
73
|
-
|
|
74
37
|
let DashboardComponent = class DashboardComponent {
|
|
75
|
-
constructor(_message, _cdRef,
|
|
38
|
+
constructor(_message, _cdRef, _buildService) {
|
|
76
39
|
this._message = _message;
|
|
77
40
|
this._cdRef = _cdRef;
|
|
78
|
-
this._systemService = _systemService;
|
|
79
41
|
this._buildService = _buildService;
|
|
80
42
|
this.buttonActions = [];
|
|
81
43
|
this.menuActions = [];
|
|
@@ -97,7 +59,7 @@ let DashboardComponent = class DashboardComponent {
|
|
|
97
59
|
_load() {
|
|
98
60
|
this.load()
|
|
99
61
|
.subscribe((dashboard) => {
|
|
100
|
-
this.dashboard =
|
|
62
|
+
this.dashboard = dashboard;
|
|
101
63
|
this.dashboard.cronRanAttention = !dashboard.cronRan ||
|
|
102
64
|
differenceInMinutes(new Date(), new Date(dashboard.cronRan)) > 15;
|
|
103
65
|
this._cdRef.markForCheck();
|
|
@@ -127,7 +89,6 @@ let DashboardComponent = class DashboardComponent {
|
|
|
127
89
|
DashboardComponent.ctorParameters = () => [
|
|
128
90
|
{ type: FsMessage },
|
|
129
91
|
{ type: ChangeDetectorRef },
|
|
130
|
-
{ type: SystemService },
|
|
131
92
|
{ type: FsBuildService }
|
|
132
93
|
];
|
|
133
94
|
__decorate([
|
|
@@ -155,7 +116,6 @@ DashboardComponent = __decorate([
|
|
|
155
116
|
}),
|
|
156
117
|
__metadata("design:paramtypes", [FsMessage,
|
|
157
118
|
ChangeDetectorRef,
|
|
158
|
-
SystemService,
|
|
159
119
|
FsBuildService])
|
|
160
120
|
], DashboardComponent);
|
|
161
121
|
|
|
@@ -181,7 +141,8 @@ var SettingInterfaceType;
|
|
|
181
141
|
SettingInterfaceType["RadioButton"] = "R";
|
|
182
142
|
SettingInterfaceType["InputBox"] = "I";
|
|
183
143
|
SettingInterfaceType["Textarea"] = "T";
|
|
184
|
-
SettingInterfaceType["
|
|
144
|
+
SettingInterfaceType["Select"] = "D";
|
|
145
|
+
SettingInterfaceType["SelectMultiple"] = "W";
|
|
185
146
|
SettingInterfaceType["Date"] = "A";
|
|
186
147
|
SettingInterfaceType["File"] = "F";
|
|
187
148
|
SettingInterfaceType["Static"] = "S";
|
|
@@ -373,9 +334,8 @@ CronComponent = __decorate([
|
|
|
373
334
|
], CronComponent);
|
|
374
335
|
|
|
375
336
|
let CronsComponent = class CronsComponent {
|
|
376
|
-
constructor(_message,
|
|
337
|
+
constructor(_message, _dialog) {
|
|
377
338
|
this._message = _message;
|
|
378
|
-
this._systemService = _systemService;
|
|
379
339
|
this._dialog = _dialog;
|
|
380
340
|
this.config = null;
|
|
381
341
|
this.cronStates = indexNameValue(CronStates);
|
|
@@ -403,9 +363,33 @@ let CronsComponent = class CronsComponent {
|
|
|
403
363
|
fetch: query => {
|
|
404
364
|
query.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
405
365
|
return this.loadCrons(query)
|
|
406
|
-
.pipe(map((response) => ({ data:
|
|
407
|
-
}
|
|
366
|
+
.pipe(map((response) => ({ data: response })));
|
|
367
|
+
},
|
|
408
368
|
};
|
|
369
|
+
if (this.bulk) {
|
|
370
|
+
this.config.selection = {
|
|
371
|
+
selectAll: false,
|
|
372
|
+
actions: [
|
|
373
|
+
{
|
|
374
|
+
type: SelectionActionType.Action,
|
|
375
|
+
name: 'disable',
|
|
376
|
+
label: 'Disable'
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
type: SelectionActionType.Action,
|
|
380
|
+
name: 'enable',
|
|
381
|
+
label: 'Enable'
|
|
382
|
+
},
|
|
383
|
+
],
|
|
384
|
+
actionSelected: (action) => {
|
|
385
|
+
return this.bulk(action.action.name, action.selected)
|
|
386
|
+
.pipe(tap(() => {
|
|
387
|
+
this.list.reload();
|
|
388
|
+
this._message.success('Applied Changes');
|
|
389
|
+
}));
|
|
390
|
+
},
|
|
391
|
+
};
|
|
392
|
+
}
|
|
409
393
|
}
|
|
410
394
|
open(cron) {
|
|
411
395
|
this._dialog.open(CronComponent, {
|
|
@@ -422,7 +406,7 @@ let CronsComponent = class CronsComponent {
|
|
|
422
406
|
return [
|
|
423
407
|
{
|
|
424
408
|
action: (data) => {
|
|
425
|
-
return this.queue(
|
|
409
|
+
return this.queue(data)
|
|
426
410
|
.pipe(tap(() => {
|
|
427
411
|
this._message.success('Queued cron');
|
|
428
412
|
this.list.reload();
|
|
@@ -435,7 +419,7 @@ let CronsComponent = class CronsComponent {
|
|
|
435
419
|
},
|
|
436
420
|
{
|
|
437
421
|
action: (data) => {
|
|
438
|
-
return this.run(
|
|
422
|
+
return this.run(data)
|
|
439
423
|
.pipe(tap(() => {
|
|
440
424
|
this._message.success('Cron ran');
|
|
441
425
|
this.list.reload();
|
|
@@ -448,7 +432,7 @@ let CronsComponent = class CronsComponent {
|
|
|
448
432
|
},
|
|
449
433
|
{
|
|
450
434
|
action: (data) => {
|
|
451
|
-
return this.enable(
|
|
435
|
+
return this.enable(data)
|
|
452
436
|
.pipe(tap(() => {
|
|
453
437
|
this._message.success('Enabled cron');
|
|
454
438
|
this.list.reload();
|
|
@@ -461,7 +445,7 @@ let CronsComponent = class CronsComponent {
|
|
|
461
445
|
},
|
|
462
446
|
{
|
|
463
447
|
action: (data) => {
|
|
464
|
-
return this.disable(
|
|
448
|
+
return this.disable(data)
|
|
465
449
|
.pipe(tap(() => {
|
|
466
450
|
this._message.success('Disabled cron');
|
|
467
451
|
this.list.reload();
|
|
@@ -474,7 +458,7 @@ let CronsComponent = class CronsComponent {
|
|
|
474
458
|
},
|
|
475
459
|
{
|
|
476
460
|
action: (data) => {
|
|
477
|
-
return this.kill(
|
|
461
|
+
return this.kill(data)
|
|
478
462
|
.pipe(tap(() => {
|
|
479
463
|
this._message.success('Killed cron');
|
|
480
464
|
this.list.reload();
|
|
@@ -490,7 +474,6 @@ let CronsComponent = class CronsComponent {
|
|
|
490
474
|
};
|
|
491
475
|
CronsComponent.ctorParameters = () => [
|
|
492
476
|
{ type: FsMessage },
|
|
493
|
-
{ type: SystemService },
|
|
494
477
|
{ type: MatDialog }
|
|
495
478
|
];
|
|
496
479
|
__decorate([
|
|
@@ -529,6 +512,10 @@ __decorate([
|
|
|
529
512
|
Input(),
|
|
530
513
|
__metadata("design:type", Function)
|
|
531
514
|
], CronsComponent.prototype, "loadCronLogs", void 0);
|
|
515
|
+
__decorate([
|
|
516
|
+
Input(),
|
|
517
|
+
__metadata("design:type", Function)
|
|
518
|
+
], CronsComponent.prototype, "bulk", void 0);
|
|
532
519
|
CronsComponent = __decorate([
|
|
533
520
|
Component({
|
|
534
521
|
selector: 'fs-system-crons',
|
|
@@ -536,14 +523,12 @@ CronsComponent = __decorate([
|
|
|
536
523
|
styles: [""]
|
|
537
524
|
}),
|
|
538
525
|
__metadata("design:paramtypes", [FsMessage,
|
|
539
|
-
SystemService,
|
|
540
526
|
MatDialog])
|
|
541
527
|
], CronsComponent);
|
|
542
528
|
|
|
543
529
|
let SettingsComponent = class SettingsComponent {
|
|
544
|
-
constructor(_message,
|
|
530
|
+
constructor(_message, _clipboardService, _prompt, _cdRef) {
|
|
545
531
|
this._message = _message;
|
|
546
|
-
this._systemService = _systemService;
|
|
547
532
|
this._clipboardService = _clipboardService;
|
|
548
533
|
this._prompt = _prompt;
|
|
549
534
|
this._cdRef = _cdRef;
|
|
@@ -556,12 +541,13 @@ let SettingsComponent = class SettingsComponent {
|
|
|
556
541
|
ngOnInit() {
|
|
557
542
|
this.loadSettings()
|
|
558
543
|
.subscribe((settings) => {
|
|
559
|
-
settings = this._systemService.input(settings);
|
|
560
544
|
settings = settings.map((setting) => {
|
|
561
545
|
switch (setting.interfaceType) {
|
|
562
546
|
case SettingInterfaceType.Date:
|
|
563
547
|
case SettingInterfaceType.Time:
|
|
564
548
|
setting.value = parse(setting.value);
|
|
549
|
+
case SettingInterfaceType.SelectMultiple:
|
|
550
|
+
setting.value = Array.isArray(setting.value) ? setting.value : [];
|
|
565
551
|
break;
|
|
566
552
|
}
|
|
567
553
|
return setting;
|
|
@@ -626,7 +612,6 @@ let SettingsComponent = class SettingsComponent {
|
|
|
626
612
|
};
|
|
627
613
|
SettingsComponent.ctorParameters = () => [
|
|
628
614
|
{ type: FsMessage },
|
|
629
|
-
{ type: SystemService },
|
|
630
615
|
{ type: ClipboardService },
|
|
631
616
|
{ type: FsPrompt },
|
|
632
617
|
{ type: ChangeDetectorRef }
|
|
@@ -650,12 +635,11 @@ __decorate([
|
|
|
650
635
|
SettingsComponent = __decorate([
|
|
651
636
|
Component({
|
|
652
637
|
selector: 'fs-system-settings',
|
|
653
|
-
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]=\"'
|
|
638
|
+
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",
|
|
654
639
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
655
640
|
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}"]
|
|
656
641
|
}),
|
|
657
642
|
__metadata("design:paramtypes", [FsMessage,
|
|
658
|
-
SystemService,
|
|
659
643
|
ClipboardService,
|
|
660
644
|
FsPrompt,
|
|
661
645
|
ChangeDetectorRef])
|
|
@@ -724,7 +708,7 @@ FileManagerComponent = __decorate([
|
|
|
724
708
|
|
|
725
709
|
let KeyNameValuePipe = class KeyNameValuePipe {
|
|
726
710
|
transform(values) {
|
|
727
|
-
return Object.keys(values).map(key => {
|
|
711
|
+
return Object.keys(values).map((key) => {
|
|
728
712
|
return { value: key, name: values[key] };
|
|
729
713
|
});
|
|
730
714
|
}
|
|
@@ -772,8 +756,7 @@ ProcessComponent = __decorate([
|
|
|
772
756
|
], ProcessComponent);
|
|
773
757
|
|
|
774
758
|
let ProcessesComponent = class ProcessesComponent {
|
|
775
|
-
constructor(
|
|
776
|
-
this._systemService = _systemService;
|
|
759
|
+
constructor(_dialog, _message) {
|
|
777
760
|
this._dialog = _dialog;
|
|
778
761
|
this._message = _message;
|
|
779
762
|
this.actions = [];
|
|
@@ -804,7 +787,7 @@ let ProcessesComponent = class ProcessesComponent {
|
|
|
804
787
|
],
|
|
805
788
|
fetch: query => {
|
|
806
789
|
return this.loadProcesses(query)
|
|
807
|
-
.pipe(map((response) => ({ data:
|
|
790
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
808
791
|
}
|
|
809
792
|
};
|
|
810
793
|
if (this.run) {
|
|
@@ -892,7 +875,6 @@ let ProcessesComponent = class ProcessesComponent {
|
|
|
892
875
|
}
|
|
893
876
|
};
|
|
894
877
|
ProcessesComponent.ctorParameters = () => [
|
|
895
|
-
{ type: SystemService },
|
|
896
878
|
{ type: MatDialog },
|
|
897
879
|
{ type: FsMessage }
|
|
898
880
|
];
|
|
@@ -934,8 +916,7 @@ ProcessesComponent = __decorate([
|
|
|
934
916
|
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",
|
|
935
917
|
styles: [""]
|
|
936
918
|
}),
|
|
937
|
-
__metadata("design:paramtypes", [
|
|
938
|
-
MatDialog,
|
|
919
|
+
__metadata("design:paramtypes", [MatDialog,
|
|
939
920
|
FsMessage])
|
|
940
921
|
], ProcessesComponent);
|
|
941
922
|
|
|
@@ -970,9 +951,8 @@ ServerLogComponent = __decorate([
|
|
|
970
951
|
], ServerLogComponent);
|
|
971
952
|
|
|
972
953
|
let ServerLogsComponent = class ServerLogsComponent {
|
|
973
|
-
constructor(_dialog
|
|
954
|
+
constructor(_dialog) {
|
|
974
955
|
this._dialog = _dialog;
|
|
975
|
-
this._systemService = _systemService;
|
|
976
956
|
this.config = null;
|
|
977
957
|
this.logTypes = [];
|
|
978
958
|
}
|
|
@@ -990,20 +970,19 @@ let ServerLogsComponent = class ServerLogsComponent {
|
|
|
990
970
|
],
|
|
991
971
|
fetch: query => {
|
|
992
972
|
return this.loadLogs(query)
|
|
993
|
-
.pipe(map((response) => ({ data:
|
|
973
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
994
974
|
}
|
|
995
975
|
};
|
|
996
976
|
}
|
|
997
977
|
open(log) {
|
|
998
|
-
|
|
978
|
+
this._dialog.open(ServerLogComponent, {
|
|
999
979
|
data: { log: log },
|
|
1000
980
|
width: '85%'
|
|
1001
981
|
});
|
|
1002
982
|
}
|
|
1003
983
|
};
|
|
1004
984
|
ServerLogsComponent.ctorParameters = () => [
|
|
1005
|
-
{ type: MatDialog }
|
|
1006
|
-
{ type: SystemService }
|
|
985
|
+
{ type: MatDialog }
|
|
1007
986
|
];
|
|
1008
987
|
__decorate([
|
|
1009
988
|
ViewChild('list', { static: true }),
|
|
@@ -1019,13 +998,11 @@ ServerLogsComponent = __decorate([
|
|
|
1019
998
|
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",
|
|
1020
999
|
styles: [""]
|
|
1021
1000
|
}),
|
|
1022
|
-
__metadata("design:paramtypes", [MatDialog
|
|
1023
|
-
SystemService])
|
|
1001
|
+
__metadata("design:paramtypes", [MatDialog])
|
|
1024
1002
|
], ServerLogsComponent);
|
|
1025
1003
|
|
|
1026
1004
|
let UpgradeLogsComponent = class UpgradeLogsComponent {
|
|
1027
|
-
constructor(
|
|
1028
|
-
this._systemService = _systemService;
|
|
1005
|
+
constructor() {
|
|
1029
1006
|
this.config = null;
|
|
1030
1007
|
this.logTypes = [];
|
|
1031
1008
|
}
|
|
@@ -1044,14 +1021,11 @@ let UpgradeLogsComponent = class UpgradeLogsComponent {
|
|
|
1044
1021
|
],
|
|
1045
1022
|
fetch: query => {
|
|
1046
1023
|
return this.loadUpgradeLogs(query)
|
|
1047
|
-
.pipe(map((response) => ({ data:
|
|
1024
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1048
1025
|
}
|
|
1049
1026
|
};
|
|
1050
1027
|
}
|
|
1051
1028
|
};
|
|
1052
|
-
UpgradeLogsComponent.ctorParameters = () => [
|
|
1053
|
-
{ type: SystemService }
|
|
1054
|
-
];
|
|
1055
1029
|
__decorate([
|
|
1056
1030
|
ViewChild(FsListComponent, { static: true }),
|
|
1057
1031
|
__metadata("design:type", FsListComponent)
|
|
@@ -1065,8 +1039,7 @@ UpgradeLogsComponent = __decorate([
|
|
|
1065
1039
|
selector: 'fs-system-upgrade-logs',
|
|
1066
1040
|
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",
|
|
1067
1041
|
styles: [""]
|
|
1068
|
-
})
|
|
1069
|
-
__metadata("design:paramtypes", [SystemService])
|
|
1042
|
+
})
|
|
1070
1043
|
], UpgradeLogsComponent);
|
|
1071
1044
|
|
|
1072
1045
|
let ApiLogComponent = class ApiLogComponent {
|
|
@@ -1095,9 +1068,8 @@ ApiLogComponent = __decorate([
|
|
|
1095
1068
|
], ApiLogComponent);
|
|
1096
1069
|
|
|
1097
1070
|
let ApiLogsComponent = class ApiLogsComponent {
|
|
1098
|
-
constructor(_dialog
|
|
1071
|
+
constructor(_dialog) {
|
|
1099
1072
|
this._dialog = _dialog;
|
|
1100
|
-
this._systemService = _systemService;
|
|
1101
1073
|
this.config = null;
|
|
1102
1074
|
this.apiLogStates = indexNameValue(ApiLogStates);
|
|
1103
1075
|
}
|
|
@@ -1127,7 +1099,7 @@ let ApiLogsComponent = class ApiLogsComponent {
|
|
|
1127
1099
|
fetch: query => {
|
|
1128
1100
|
Object.assign(query, {});
|
|
1129
1101
|
return this.loadApiLogs(query)
|
|
1130
|
-
.pipe(map((response) => ({ data:
|
|
1102
|
+
.pipe(map((response) => ({ data: response.data, paging: response.paging })));
|
|
1131
1103
|
}
|
|
1132
1104
|
};
|
|
1133
1105
|
}
|
|
@@ -1139,8 +1111,7 @@ let ApiLogsComponent = class ApiLogsComponent {
|
|
|
1139
1111
|
}
|
|
1140
1112
|
};
|
|
1141
1113
|
ApiLogsComponent.ctorParameters = () => [
|
|
1142
|
-
{ type: MatDialog }
|
|
1143
|
-
{ type: SystemService }
|
|
1114
|
+
{ type: MatDialog }
|
|
1144
1115
|
];
|
|
1145
1116
|
__decorate([
|
|
1146
1117
|
ViewChild(FsListComponent, { static: true }),
|
|
@@ -1156,8 +1127,7 @@ ApiLogsComponent = __decorate([
|
|
|
1156
1127
|
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",
|
|
1157
1128
|
styles: [""]
|
|
1158
1129
|
}),
|
|
1159
|
-
__metadata("design:paramtypes", [MatDialog
|
|
1160
|
-
SystemService])
|
|
1130
|
+
__metadata("design:paramtypes", [MatDialog])
|
|
1161
1131
|
], ApiLogsComponent);
|
|
1162
1132
|
|
|
1163
1133
|
let InfoComponent = class InfoComponent {
|
|
@@ -1259,9 +1229,6 @@ FsSystemModule = FsSystemModule_1 = __decorate([
|
|
|
1259
1229
|
CronComponent,
|
|
1260
1230
|
CronLogComponent,
|
|
1261
1231
|
],
|
|
1262
|
-
providers: [
|
|
1263
|
-
SystemService
|
|
1264
|
-
],
|
|
1265
1232
|
})
|
|
1266
1233
|
], FsSystemModule);
|
|
1267
1234
|
|
|
@@ -1269,5 +1236,5 @@ FsSystemModule = FsSystemModule_1 = __decorate([
|
|
|
1269
1236
|
* Generated bundle index. Do not edit.
|
|
1270
1237
|
*/
|
|
1271
1238
|
|
|
1272
|
-
export { ApiLogState, ApiLogStates, CronState, CronStates, FS_SYSTEM_CONFIG, FsSystemModule, ProcessState, ProcessStates, DashboardComponent as ɵa,
|
|
1239
|
+
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 };
|
|
1273
1240
|
//# sourceMappingURL=firestitch-system.js.map
|