@firestitch/system 9.1.8 → 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 +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 +2 -1
- package/app/interfaces/system-config.d.ts +0 -1
- package/bundles/firestitch-system.umd.js +48 -113
- 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 +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 +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 +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 +35 -97
- package/fesm2015/firestitch-system.js.map +1 -1
- package/fesm5/firestitch-system.js +34 -99
- 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, __assign, __spread } 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,55 +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
|
var FS_SYSTEM_CONFIG = new InjectionToken('fs-system-config');
|
|
38
36
|
|
|
39
|
-
var snakecaseKeys = _snakecaseKeys;
|
|
40
|
-
var camelcaseKeys = _camelcaseKeys;
|
|
41
|
-
var SystemService = /** @class */ (function () {
|
|
42
|
-
function SystemService(_config) {
|
|
43
|
-
this._config = _config;
|
|
44
|
-
}
|
|
45
|
-
SystemService.prototype.input = function (data) {
|
|
46
|
-
var _this = this;
|
|
47
|
-
if (isArray(data)) {
|
|
48
|
-
return data.map(function (item) {
|
|
49
|
-
return _this._config.case === 'snake' ? camelcaseKeys(item, { deep: true }) : item;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
return this._config.case === 'snake' ? camelcaseKeys(data, { deep: true }) : data;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
SystemService.prototype.output = function (data) {
|
|
57
|
-
var _this = this;
|
|
58
|
-
if (isArray(data)) {
|
|
59
|
-
return data.map(function (item) {
|
|
60
|
-
return _this._config.case === 'snake' ? snakecaseKeys(item, { deep: true }) : item;
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
return this._config.case === 'snake' ? snakecaseKeys(data, { deep: true }) : data;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
SystemService.ctorParameters = function () { return [
|
|
68
|
-
{ type: undefined, decorators: [{ type: Inject, args: [FS_SYSTEM_CONFIG,] }] }
|
|
69
|
-
]; };
|
|
70
|
-
SystemService = __decorate([
|
|
71
|
-
Injectable(),
|
|
72
|
-
__param(0, Inject(FS_SYSTEM_CONFIG)),
|
|
73
|
-
__metadata("design:paramtypes", [Object])
|
|
74
|
-
], SystemService);
|
|
75
|
-
return SystemService;
|
|
76
|
-
}());
|
|
77
|
-
|
|
78
37
|
var DashboardComponent = /** @class */ (function () {
|
|
79
|
-
function DashboardComponent(_message, _cdRef,
|
|
38
|
+
function DashboardComponent(_message, _cdRef, _buildService) {
|
|
80
39
|
this._message = _message;
|
|
81
40
|
this._cdRef = _cdRef;
|
|
82
|
-
this._systemService = _systemService;
|
|
83
41
|
this._buildService = _buildService;
|
|
84
42
|
this.buttonActions = [];
|
|
85
43
|
this.menuActions = [];
|
|
@@ -103,7 +61,7 @@ var DashboardComponent = /** @class */ (function () {
|
|
|
103
61
|
var _this = this;
|
|
104
62
|
this.load()
|
|
105
63
|
.subscribe(function (dashboard) {
|
|
106
|
-
_this.dashboard =
|
|
64
|
+
_this.dashboard = dashboard;
|
|
107
65
|
_this.dashboard.cronRanAttention = !dashboard.cronRan ||
|
|
108
66
|
differenceInMinutes(new Date(), new Date(dashboard.cronRan)) > 15;
|
|
109
67
|
_this._cdRef.markForCheck();
|
|
@@ -134,7 +92,6 @@ var DashboardComponent = /** @class */ (function () {
|
|
|
134
92
|
DashboardComponent.ctorParameters = function () { return [
|
|
135
93
|
{ type: FsMessage },
|
|
136
94
|
{ type: ChangeDetectorRef },
|
|
137
|
-
{ type: SystemService },
|
|
138
95
|
{ type: FsBuildService }
|
|
139
96
|
]; };
|
|
140
97
|
__decorate([
|
|
@@ -162,7 +119,6 @@ var DashboardComponent = /** @class */ (function () {
|
|
|
162
119
|
}),
|
|
163
120
|
__metadata("design:paramtypes", [FsMessage,
|
|
164
121
|
ChangeDetectorRef,
|
|
165
|
-
SystemService,
|
|
166
122
|
FsBuildService])
|
|
167
123
|
], DashboardComponent);
|
|
168
124
|
return DashboardComponent;
|
|
@@ -190,7 +146,8 @@ var SettingInterfaceType;
|
|
|
190
146
|
SettingInterfaceType["RadioButton"] = "R";
|
|
191
147
|
SettingInterfaceType["InputBox"] = "I";
|
|
192
148
|
SettingInterfaceType["Textarea"] = "T";
|
|
193
|
-
SettingInterfaceType["
|
|
149
|
+
SettingInterfaceType["Select"] = "D";
|
|
150
|
+
SettingInterfaceType["SelectMultiple"] = "W";
|
|
194
151
|
SettingInterfaceType["Date"] = "A";
|
|
195
152
|
SettingInterfaceType["File"] = "F";
|
|
196
153
|
SettingInterfaceType["Static"] = "S";
|
|
@@ -385,9 +342,8 @@ var CronComponent = /** @class */ (function () {
|
|
|
385
342
|
}());
|
|
386
343
|
|
|
387
344
|
var CronsComponent = /** @class */ (function () {
|
|
388
|
-
function CronsComponent(_message,
|
|
345
|
+
function CronsComponent(_message, _dialog) {
|
|
389
346
|
this._message = _message;
|
|
390
|
-
this._systemService = _systemService;
|
|
391
347
|
this._dialog = _dialog;
|
|
392
348
|
this.config = null;
|
|
393
349
|
this.cronStates = indexNameValue(CronStates);
|
|
@@ -416,7 +372,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
416
372
|
fetch: function (query) {
|
|
417
373
|
query.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
418
374
|
return _this.loadCrons(query)
|
|
419
|
-
.pipe(map(function (response) { return ({ data:
|
|
375
|
+
.pipe(map(function (response) { return ({ data: response }); }));
|
|
420
376
|
},
|
|
421
377
|
};
|
|
422
378
|
if (this.bulk) {
|
|
@@ -460,7 +416,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
460
416
|
return [
|
|
461
417
|
{
|
|
462
418
|
action: function (data) {
|
|
463
|
-
return _this.queue(
|
|
419
|
+
return _this.queue(data)
|
|
464
420
|
.pipe(tap(function () {
|
|
465
421
|
_this._message.success('Queued cron');
|
|
466
422
|
_this.list.reload();
|
|
@@ -473,7 +429,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
473
429
|
},
|
|
474
430
|
{
|
|
475
431
|
action: function (data) {
|
|
476
|
-
return _this.run(
|
|
432
|
+
return _this.run(data)
|
|
477
433
|
.pipe(tap(function () {
|
|
478
434
|
_this._message.success('Cron ran');
|
|
479
435
|
_this.list.reload();
|
|
@@ -486,7 +442,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
486
442
|
},
|
|
487
443
|
{
|
|
488
444
|
action: function (data) {
|
|
489
|
-
return _this.enable(
|
|
445
|
+
return _this.enable(data)
|
|
490
446
|
.pipe(tap(function () {
|
|
491
447
|
_this._message.success('Enabled cron');
|
|
492
448
|
_this.list.reload();
|
|
@@ -499,7 +455,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
499
455
|
},
|
|
500
456
|
{
|
|
501
457
|
action: function (data) {
|
|
502
|
-
return _this.disable(
|
|
458
|
+
return _this.disable(data)
|
|
503
459
|
.pipe(tap(function () {
|
|
504
460
|
_this._message.success('Disabled cron');
|
|
505
461
|
_this.list.reload();
|
|
@@ -512,7 +468,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
512
468
|
},
|
|
513
469
|
{
|
|
514
470
|
action: function (data) {
|
|
515
|
-
return _this.kill(
|
|
471
|
+
return _this.kill(data)
|
|
516
472
|
.pipe(tap(function () {
|
|
517
473
|
_this._message.success('Killed cron');
|
|
518
474
|
_this.list.reload();
|
|
@@ -527,7 +483,6 @@ var CronsComponent = /** @class */ (function () {
|
|
|
527
483
|
};
|
|
528
484
|
CronsComponent.ctorParameters = function () { return [
|
|
529
485
|
{ type: FsMessage },
|
|
530
|
-
{ type: SystemService },
|
|
531
486
|
{ type: MatDialog }
|
|
532
487
|
]; };
|
|
533
488
|
__decorate([
|
|
@@ -577,16 +532,14 @@ var CronsComponent = /** @class */ (function () {
|
|
|
577
532
|
styles: [""]
|
|
578
533
|
}),
|
|
579
534
|
__metadata("design:paramtypes", [FsMessage,
|
|
580
|
-
SystemService,
|
|
581
535
|
MatDialog])
|
|
582
536
|
], CronsComponent);
|
|
583
537
|
return CronsComponent;
|
|
584
538
|
}());
|
|
585
539
|
|
|
586
540
|
var SettingsComponent = /** @class */ (function () {
|
|
587
|
-
function SettingsComponent(_message,
|
|
541
|
+
function SettingsComponent(_message, _clipboardService, _prompt, _cdRef) {
|
|
588
542
|
this._message = _message;
|
|
589
|
-
this._systemService = _systemService;
|
|
590
543
|
this._clipboardService = _clipboardService;
|
|
591
544
|
this._prompt = _prompt;
|
|
592
545
|
this._cdRef = _cdRef;
|
|
@@ -600,12 +553,13 @@ var SettingsComponent = /** @class */ (function () {
|
|
|
600
553
|
var _this = this;
|
|
601
554
|
this.loadSettings()
|
|
602
555
|
.subscribe(function (settings) {
|
|
603
|
-
settings = _this._systemService.input(settings);
|
|
604
556
|
settings = settings.map(function (setting) {
|
|
605
557
|
switch (setting.interfaceType) {
|
|
606
558
|
case SettingInterfaceType.Date:
|
|
607
559
|
case SettingInterfaceType.Time:
|
|
608
560
|
setting.value = parse(setting.value);
|
|
561
|
+
case SettingInterfaceType.SelectMultiple:
|
|
562
|
+
setting.value = Array.isArray(setting.value) ? setting.value : [];
|
|
609
563
|
break;
|
|
610
564
|
}
|
|
611
565
|
return setting;
|
|
@@ -671,7 +625,6 @@ var SettingsComponent = /** @class */ (function () {
|
|
|
671
625
|
};
|
|
672
626
|
SettingsComponent.ctorParameters = function () { return [
|
|
673
627
|
{ type: FsMessage },
|
|
674
|
-
{ type: SystemService },
|
|
675
628
|
{ type: ClipboardService },
|
|
676
629
|
{ type: FsPrompt },
|
|
677
630
|
{ type: ChangeDetectorRef }
|
|
@@ -695,12 +648,11 @@ var SettingsComponent = /** @class */ (function () {
|
|
|
695
648
|
SettingsComponent = __decorate([
|
|
696
649
|
Component({
|
|
697
650
|
selector: 'fs-system-settings',
|
|
698
|
-
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]=\"'
|
|
651
|
+
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",
|
|
699
652
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
700
653
|
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}"]
|
|
701
654
|
}),
|
|
702
655
|
__metadata("design:paramtypes", [FsMessage,
|
|
703
|
-
SystemService,
|
|
704
656
|
ClipboardService,
|
|
705
657
|
FsPrompt,
|
|
706
658
|
ChangeDetectorRef])
|
|
@@ -827,8 +779,7 @@ var ProcessComponent = /** @class */ (function () {
|
|
|
827
779
|
}());
|
|
828
780
|
|
|
829
781
|
var ProcessesComponent = /** @class */ (function () {
|
|
830
|
-
function ProcessesComponent(
|
|
831
|
-
this._systemService = _systemService;
|
|
782
|
+
function ProcessesComponent(_dialog, _message) {
|
|
832
783
|
this._dialog = _dialog;
|
|
833
784
|
this._message = _message;
|
|
834
785
|
this.actions = [];
|
|
@@ -860,7 +811,7 @@ var ProcessesComponent = /** @class */ (function () {
|
|
|
860
811
|
],
|
|
861
812
|
fetch: function (query) {
|
|
862
813
|
return _this.loadProcesses(query)
|
|
863
|
-
.pipe(map(function (response) { return ({ data:
|
|
814
|
+
.pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
|
|
864
815
|
}
|
|
865
816
|
};
|
|
866
817
|
if (this.run) {
|
|
@@ -947,7 +898,6 @@ var ProcessesComponent = /** @class */ (function () {
|
|
|
947
898
|
this._destroy$.complete();
|
|
948
899
|
};
|
|
949
900
|
ProcessesComponent.ctorParameters = function () { return [
|
|
950
|
-
{ type: SystemService },
|
|
951
901
|
{ type: MatDialog },
|
|
952
902
|
{ type: FsMessage }
|
|
953
903
|
]; };
|
|
@@ -989,8 +939,7 @@ var ProcessesComponent = /** @class */ (function () {
|
|
|
989
939
|
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",
|
|
990
940
|
styles: [""]
|
|
991
941
|
}),
|
|
992
|
-
__metadata("design:paramtypes", [
|
|
993
|
-
MatDialog,
|
|
942
|
+
__metadata("design:paramtypes", [MatDialog,
|
|
994
943
|
FsMessage])
|
|
995
944
|
], ProcessesComponent);
|
|
996
945
|
return ProcessesComponent;
|
|
@@ -1028,9 +977,8 @@ var ServerLogComponent = /** @class */ (function () {
|
|
|
1028
977
|
}());
|
|
1029
978
|
|
|
1030
979
|
var ServerLogsComponent = /** @class */ (function () {
|
|
1031
|
-
function ServerLogsComponent(_dialog
|
|
980
|
+
function ServerLogsComponent(_dialog) {
|
|
1032
981
|
this._dialog = _dialog;
|
|
1033
|
-
this._systemService = _systemService;
|
|
1034
982
|
this.config = null;
|
|
1035
983
|
this.logTypes = [];
|
|
1036
984
|
}
|
|
@@ -1049,19 +997,18 @@ var ServerLogsComponent = /** @class */ (function () {
|
|
|
1049
997
|
],
|
|
1050
998
|
fetch: function (query) {
|
|
1051
999
|
return _this.loadLogs(query)
|
|
1052
|
-
.pipe(map(function (response) { return ({ data:
|
|
1000
|
+
.pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
|
|
1053
1001
|
}
|
|
1054
1002
|
};
|
|
1055
1003
|
};
|
|
1056
1004
|
ServerLogsComponent.prototype.open = function (log) {
|
|
1057
|
-
|
|
1005
|
+
this._dialog.open(ServerLogComponent, {
|
|
1058
1006
|
data: { log: log },
|
|
1059
1007
|
width: '85%'
|
|
1060
1008
|
});
|
|
1061
1009
|
};
|
|
1062
1010
|
ServerLogsComponent.ctorParameters = function () { return [
|
|
1063
|
-
{ type: MatDialog }
|
|
1064
|
-
{ type: SystemService }
|
|
1011
|
+
{ type: MatDialog }
|
|
1065
1012
|
]; };
|
|
1066
1013
|
__decorate([
|
|
1067
1014
|
ViewChild('list', { static: true }),
|
|
@@ -1077,15 +1024,13 @@ var ServerLogsComponent = /** @class */ (function () {
|
|
|
1077
1024
|
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",
|
|
1078
1025
|
styles: [""]
|
|
1079
1026
|
}),
|
|
1080
|
-
__metadata("design:paramtypes", [MatDialog
|
|
1081
|
-
SystemService])
|
|
1027
|
+
__metadata("design:paramtypes", [MatDialog])
|
|
1082
1028
|
], ServerLogsComponent);
|
|
1083
1029
|
return ServerLogsComponent;
|
|
1084
1030
|
}());
|
|
1085
1031
|
|
|
1086
1032
|
var UpgradeLogsComponent = /** @class */ (function () {
|
|
1087
|
-
function UpgradeLogsComponent(
|
|
1088
|
-
this._systemService = _systemService;
|
|
1033
|
+
function UpgradeLogsComponent() {
|
|
1089
1034
|
this.config = null;
|
|
1090
1035
|
this.logTypes = [];
|
|
1091
1036
|
}
|
|
@@ -1105,13 +1050,10 @@ var UpgradeLogsComponent = /** @class */ (function () {
|
|
|
1105
1050
|
],
|
|
1106
1051
|
fetch: function (query) {
|
|
1107
1052
|
return _this.loadUpgradeLogs(query)
|
|
1108
|
-
.pipe(map(function (response) { return ({ data:
|
|
1053
|
+
.pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
|
|
1109
1054
|
}
|
|
1110
1055
|
};
|
|
1111
1056
|
};
|
|
1112
|
-
UpgradeLogsComponent.ctorParameters = function () { return [
|
|
1113
|
-
{ type: SystemService }
|
|
1114
|
-
]; };
|
|
1115
1057
|
__decorate([
|
|
1116
1058
|
ViewChild(FsListComponent, { static: true }),
|
|
1117
1059
|
__metadata("design:type", FsListComponent)
|
|
@@ -1125,8 +1067,7 @@ var UpgradeLogsComponent = /** @class */ (function () {
|
|
|
1125
1067
|
selector: 'fs-system-upgrade-logs',
|
|
1126
1068
|
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",
|
|
1127
1069
|
styles: [""]
|
|
1128
|
-
})
|
|
1129
|
-
__metadata("design:paramtypes", [SystemService])
|
|
1070
|
+
})
|
|
1130
1071
|
], UpgradeLogsComponent);
|
|
1131
1072
|
return UpgradeLogsComponent;
|
|
1132
1073
|
}());
|
|
@@ -1158,9 +1099,8 @@ var ApiLogComponent = /** @class */ (function () {
|
|
|
1158
1099
|
}());
|
|
1159
1100
|
|
|
1160
1101
|
var ApiLogsComponent = /** @class */ (function () {
|
|
1161
|
-
function ApiLogsComponent(_dialog
|
|
1102
|
+
function ApiLogsComponent(_dialog) {
|
|
1162
1103
|
this._dialog = _dialog;
|
|
1163
|
-
this._systemService = _systemService;
|
|
1164
1104
|
this.config = null;
|
|
1165
1105
|
this.apiLogStates = indexNameValue(ApiLogStates);
|
|
1166
1106
|
}
|
|
@@ -1191,7 +1131,7 @@ var ApiLogsComponent = /** @class */ (function () {
|
|
|
1191
1131
|
fetch: function (query) {
|
|
1192
1132
|
Object.assign(query, {});
|
|
1193
1133
|
return _this.loadApiLogs(query)
|
|
1194
|
-
.pipe(map(function (response) { return ({ data:
|
|
1134
|
+
.pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
|
|
1195
1135
|
}
|
|
1196
1136
|
};
|
|
1197
1137
|
};
|
|
@@ -1202,8 +1142,7 @@ var ApiLogsComponent = /** @class */ (function () {
|
|
|
1202
1142
|
});
|
|
1203
1143
|
};
|
|
1204
1144
|
ApiLogsComponent.ctorParameters = function () { return [
|
|
1205
|
-
{ type: MatDialog }
|
|
1206
|
-
{ type: SystemService }
|
|
1145
|
+
{ type: MatDialog }
|
|
1207
1146
|
]; };
|
|
1208
1147
|
__decorate([
|
|
1209
1148
|
ViewChild(FsListComponent, { static: true }),
|
|
@@ -1219,8 +1158,7 @@ var ApiLogsComponent = /** @class */ (function () {
|
|
|
1219
1158
|
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",
|
|
1220
1159
|
styles: [""]
|
|
1221
1160
|
}),
|
|
1222
|
-
__metadata("design:paramtypes", [MatDialog
|
|
1223
|
-
SystemService])
|
|
1161
|
+
__metadata("design:paramtypes", [MatDialog])
|
|
1224
1162
|
], ApiLogsComponent);
|
|
1225
1163
|
return ApiLogsComponent;
|
|
1226
1164
|
}());
|
|
@@ -1330,9 +1268,6 @@ var FsSystemModule = /** @class */ (function () {
|
|
|
1330
1268
|
CronComponent,
|
|
1331
1269
|
CronLogComponent,
|
|
1332
1270
|
],
|
|
1333
|
-
providers: [
|
|
1334
|
-
SystemService
|
|
1335
|
-
],
|
|
1336
1271
|
})
|
|
1337
1272
|
], FsSystemModule);
|
|
1338
1273
|
return FsSystemModule;
|
|
@@ -1342,5 +1277,5 @@ var FsSystemModule = /** @class */ (function () {
|
|
|
1342
1277
|
* Generated bundle index. Do not edit.
|
|
1343
1278
|
*/
|
|
1344
1279
|
|
|
1345
|
-
export { ApiLogState, ApiLogStates, CronState, CronStates, FS_SYSTEM_CONFIG, FsSystemModule, ProcessState, ProcessStates, DashboardComponent as ɵa,
|
|
1280
|
+
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 };
|
|
1346
1281
|
//# sourceMappingURL=firestitch-system.js.map
|