@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, __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,12 +146,14 @@ 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";
|
|
197
154
|
SettingInterfaceType["Password"] = "P";
|
|
198
155
|
SettingInterfaceType["Time"] = "M";
|
|
156
|
+
SettingInterfaceType["None"] = "N";
|
|
199
157
|
})(SettingInterfaceType || (SettingInterfaceType = {}));
|
|
200
158
|
|
|
201
159
|
var ApiLogState;
|
|
@@ -385,9 +343,8 @@ var CronComponent = /** @class */ (function () {
|
|
|
385
343
|
}());
|
|
386
344
|
|
|
387
345
|
var CronsComponent = /** @class */ (function () {
|
|
388
|
-
function CronsComponent(_message,
|
|
346
|
+
function CronsComponent(_message, _dialog) {
|
|
389
347
|
this._message = _message;
|
|
390
|
-
this._systemService = _systemService;
|
|
391
348
|
this._dialog = _dialog;
|
|
392
349
|
this.config = null;
|
|
393
350
|
this.cronStates = indexNameValue(CronStates);
|
|
@@ -416,7 +373,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
416
373
|
fetch: function (query) {
|
|
417
374
|
query.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
418
375
|
return _this.loadCrons(query)
|
|
419
|
-
.pipe(map(function (response) { return ({ data:
|
|
376
|
+
.pipe(map(function (response) { return ({ data: response }); }));
|
|
420
377
|
},
|
|
421
378
|
};
|
|
422
379
|
if (this.bulk) {
|
|
@@ -435,7 +392,11 @@ var CronsComponent = /** @class */ (function () {
|
|
|
435
392
|
},
|
|
436
393
|
],
|
|
437
394
|
actionSelected: function (action) {
|
|
438
|
-
return _this.bulk(action.action.name, action.selected)
|
|
395
|
+
return _this.bulk(action.action.name, action.selected)
|
|
396
|
+
.pipe(tap(function () {
|
|
397
|
+
_this.list.reload();
|
|
398
|
+
_this._message.success('Applied Changes');
|
|
399
|
+
}));
|
|
439
400
|
},
|
|
440
401
|
};
|
|
441
402
|
}
|
|
@@ -456,7 +417,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
456
417
|
return [
|
|
457
418
|
{
|
|
458
419
|
action: function (data) {
|
|
459
|
-
return _this.queue(
|
|
420
|
+
return _this.queue(data)
|
|
460
421
|
.pipe(tap(function () {
|
|
461
422
|
_this._message.success('Queued cron');
|
|
462
423
|
_this.list.reload();
|
|
@@ -469,7 +430,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
469
430
|
},
|
|
470
431
|
{
|
|
471
432
|
action: function (data) {
|
|
472
|
-
return _this.run(
|
|
433
|
+
return _this.run(data)
|
|
473
434
|
.pipe(tap(function () {
|
|
474
435
|
_this._message.success('Cron ran');
|
|
475
436
|
_this.list.reload();
|
|
@@ -482,7 +443,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
482
443
|
},
|
|
483
444
|
{
|
|
484
445
|
action: function (data) {
|
|
485
|
-
return _this.enable(
|
|
446
|
+
return _this.enable(data)
|
|
486
447
|
.pipe(tap(function () {
|
|
487
448
|
_this._message.success('Enabled cron');
|
|
488
449
|
_this.list.reload();
|
|
@@ -495,7 +456,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
495
456
|
},
|
|
496
457
|
{
|
|
497
458
|
action: function (data) {
|
|
498
|
-
return _this.disable(
|
|
459
|
+
return _this.disable(data)
|
|
499
460
|
.pipe(tap(function () {
|
|
500
461
|
_this._message.success('Disabled cron');
|
|
501
462
|
_this.list.reload();
|
|
@@ -508,7 +469,7 @@ var CronsComponent = /** @class */ (function () {
|
|
|
508
469
|
},
|
|
509
470
|
{
|
|
510
471
|
action: function (data) {
|
|
511
|
-
return _this.kill(
|
|
472
|
+
return _this.kill(data)
|
|
512
473
|
.pipe(tap(function () {
|
|
513
474
|
_this._message.success('Killed cron');
|
|
514
475
|
_this.list.reload();
|
|
@@ -523,7 +484,6 @@ var CronsComponent = /** @class */ (function () {
|
|
|
523
484
|
};
|
|
524
485
|
CronsComponent.ctorParameters = function () { return [
|
|
525
486
|
{ type: FsMessage },
|
|
526
|
-
{ type: SystemService },
|
|
527
487
|
{ type: MatDialog }
|
|
528
488
|
]; };
|
|
529
489
|
__decorate([
|
|
@@ -573,16 +533,14 @@ var CronsComponent = /** @class */ (function () {
|
|
|
573
533
|
styles: [""]
|
|
574
534
|
}),
|
|
575
535
|
__metadata("design:paramtypes", [FsMessage,
|
|
576
|
-
SystemService,
|
|
577
536
|
MatDialog])
|
|
578
537
|
], CronsComponent);
|
|
579
538
|
return CronsComponent;
|
|
580
539
|
}());
|
|
581
540
|
|
|
582
541
|
var SettingsComponent = /** @class */ (function () {
|
|
583
|
-
function SettingsComponent(_message,
|
|
542
|
+
function SettingsComponent(_message, _clipboardService, _prompt, _cdRef) {
|
|
584
543
|
this._message = _message;
|
|
585
|
-
this._systemService = _systemService;
|
|
586
544
|
this._clipboardService = _clipboardService;
|
|
587
545
|
this._prompt = _prompt;
|
|
588
546
|
this._cdRef = _cdRef;
|
|
@@ -596,12 +554,17 @@ var SettingsComponent = /** @class */ (function () {
|
|
|
596
554
|
var _this = this;
|
|
597
555
|
this.loadSettings()
|
|
598
556
|
.subscribe(function (settings) {
|
|
599
|
-
settings =
|
|
600
|
-
|
|
557
|
+
settings = settings
|
|
558
|
+
.filter(function (setting) {
|
|
559
|
+
return setting.interfaceType !== SettingInterfaceType.None;
|
|
560
|
+
})
|
|
561
|
+
.map(function (setting) {
|
|
601
562
|
switch (setting.interfaceType) {
|
|
602
563
|
case SettingInterfaceType.Date:
|
|
603
564
|
case SettingInterfaceType.Time:
|
|
604
565
|
setting.value = parse(setting.value);
|
|
566
|
+
case SettingInterfaceType.SelectMultiple:
|
|
567
|
+
setting.value = Array.isArray(setting.value) ? setting.value : [];
|
|
605
568
|
break;
|
|
606
569
|
}
|
|
607
570
|
return setting;
|
|
@@ -667,7 +630,6 @@ var SettingsComponent = /** @class */ (function () {
|
|
|
667
630
|
};
|
|
668
631
|
SettingsComponent.ctorParameters = function () { return [
|
|
669
632
|
{ type: FsMessage },
|
|
670
|
-
{ type: SystemService },
|
|
671
633
|
{ type: ClipboardService },
|
|
672
634
|
{ type: FsPrompt },
|
|
673
635
|
{ type: ChangeDetectorRef }
|
|
@@ -691,12 +653,11 @@ var SettingsComponent = /** @class */ (function () {
|
|
|
691
653
|
SettingsComponent = __decorate([
|
|
692
654
|
Component({
|
|
693
655
|
selector: 'fs-system-settings',
|
|
694
|
-
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]=\"'
|
|
656
|
+
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",
|
|
695
657
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
696
658
|
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}"]
|
|
697
659
|
}),
|
|
698
660
|
__metadata("design:paramtypes", [FsMessage,
|
|
699
|
-
SystemService,
|
|
700
661
|
ClipboardService,
|
|
701
662
|
FsPrompt,
|
|
702
663
|
ChangeDetectorRef])
|
|
@@ -823,8 +784,7 @@ var ProcessComponent = /** @class */ (function () {
|
|
|
823
784
|
}());
|
|
824
785
|
|
|
825
786
|
var ProcessesComponent = /** @class */ (function () {
|
|
826
|
-
function ProcessesComponent(
|
|
827
|
-
this._systemService = _systemService;
|
|
787
|
+
function ProcessesComponent(_dialog, _message) {
|
|
828
788
|
this._dialog = _dialog;
|
|
829
789
|
this._message = _message;
|
|
830
790
|
this.actions = [];
|
|
@@ -856,7 +816,7 @@ var ProcessesComponent = /** @class */ (function () {
|
|
|
856
816
|
],
|
|
857
817
|
fetch: function (query) {
|
|
858
818
|
return _this.loadProcesses(query)
|
|
859
|
-
.pipe(map(function (response) { return ({ data:
|
|
819
|
+
.pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
|
|
860
820
|
}
|
|
861
821
|
};
|
|
862
822
|
if (this.run) {
|
|
@@ -943,7 +903,6 @@ var ProcessesComponent = /** @class */ (function () {
|
|
|
943
903
|
this._destroy$.complete();
|
|
944
904
|
};
|
|
945
905
|
ProcessesComponent.ctorParameters = function () { return [
|
|
946
|
-
{ type: SystemService },
|
|
947
906
|
{ type: MatDialog },
|
|
948
907
|
{ type: FsMessage }
|
|
949
908
|
]; };
|
|
@@ -985,8 +944,7 @@ var ProcessesComponent = /** @class */ (function () {
|
|
|
985
944
|
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",
|
|
986
945
|
styles: [""]
|
|
987
946
|
}),
|
|
988
|
-
__metadata("design:paramtypes", [
|
|
989
|
-
MatDialog,
|
|
947
|
+
__metadata("design:paramtypes", [MatDialog,
|
|
990
948
|
FsMessage])
|
|
991
949
|
], ProcessesComponent);
|
|
992
950
|
return ProcessesComponent;
|
|
@@ -1024,9 +982,8 @@ var ServerLogComponent = /** @class */ (function () {
|
|
|
1024
982
|
}());
|
|
1025
983
|
|
|
1026
984
|
var ServerLogsComponent = /** @class */ (function () {
|
|
1027
|
-
function ServerLogsComponent(_dialog
|
|
985
|
+
function ServerLogsComponent(_dialog) {
|
|
1028
986
|
this._dialog = _dialog;
|
|
1029
|
-
this._systemService = _systemService;
|
|
1030
987
|
this.config = null;
|
|
1031
988
|
this.logTypes = [];
|
|
1032
989
|
}
|
|
@@ -1045,19 +1002,18 @@ var ServerLogsComponent = /** @class */ (function () {
|
|
|
1045
1002
|
],
|
|
1046
1003
|
fetch: function (query) {
|
|
1047
1004
|
return _this.loadLogs(query)
|
|
1048
|
-
.pipe(map(function (response) { return ({ data:
|
|
1005
|
+
.pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
|
|
1049
1006
|
}
|
|
1050
1007
|
};
|
|
1051
1008
|
};
|
|
1052
1009
|
ServerLogsComponent.prototype.open = function (log) {
|
|
1053
|
-
|
|
1010
|
+
this._dialog.open(ServerLogComponent, {
|
|
1054
1011
|
data: { log: log },
|
|
1055
1012
|
width: '85%'
|
|
1056
1013
|
});
|
|
1057
1014
|
};
|
|
1058
1015
|
ServerLogsComponent.ctorParameters = function () { return [
|
|
1059
|
-
{ type: MatDialog }
|
|
1060
|
-
{ type: SystemService }
|
|
1016
|
+
{ type: MatDialog }
|
|
1061
1017
|
]; };
|
|
1062
1018
|
__decorate([
|
|
1063
1019
|
ViewChild('list', { static: true }),
|
|
@@ -1073,15 +1029,13 @@ var ServerLogsComponent = /** @class */ (function () {
|
|
|
1073
1029
|
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",
|
|
1074
1030
|
styles: [""]
|
|
1075
1031
|
}),
|
|
1076
|
-
__metadata("design:paramtypes", [MatDialog
|
|
1077
|
-
SystemService])
|
|
1032
|
+
__metadata("design:paramtypes", [MatDialog])
|
|
1078
1033
|
], ServerLogsComponent);
|
|
1079
1034
|
return ServerLogsComponent;
|
|
1080
1035
|
}());
|
|
1081
1036
|
|
|
1082
1037
|
var UpgradeLogsComponent = /** @class */ (function () {
|
|
1083
|
-
function UpgradeLogsComponent(
|
|
1084
|
-
this._systemService = _systemService;
|
|
1038
|
+
function UpgradeLogsComponent() {
|
|
1085
1039
|
this.config = null;
|
|
1086
1040
|
this.logTypes = [];
|
|
1087
1041
|
}
|
|
@@ -1101,13 +1055,10 @@ var UpgradeLogsComponent = /** @class */ (function () {
|
|
|
1101
1055
|
],
|
|
1102
1056
|
fetch: function (query) {
|
|
1103
1057
|
return _this.loadUpgradeLogs(query)
|
|
1104
|
-
.pipe(map(function (response) { return ({ data:
|
|
1058
|
+
.pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
|
|
1105
1059
|
}
|
|
1106
1060
|
};
|
|
1107
1061
|
};
|
|
1108
|
-
UpgradeLogsComponent.ctorParameters = function () { return [
|
|
1109
|
-
{ type: SystemService }
|
|
1110
|
-
]; };
|
|
1111
1062
|
__decorate([
|
|
1112
1063
|
ViewChild(FsListComponent, { static: true }),
|
|
1113
1064
|
__metadata("design:type", FsListComponent)
|
|
@@ -1121,8 +1072,7 @@ var UpgradeLogsComponent = /** @class */ (function () {
|
|
|
1121
1072
|
selector: 'fs-system-upgrade-logs',
|
|
1122
1073
|
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",
|
|
1123
1074
|
styles: [""]
|
|
1124
|
-
})
|
|
1125
|
-
__metadata("design:paramtypes", [SystemService])
|
|
1075
|
+
})
|
|
1126
1076
|
], UpgradeLogsComponent);
|
|
1127
1077
|
return UpgradeLogsComponent;
|
|
1128
1078
|
}());
|
|
@@ -1154,9 +1104,8 @@ var ApiLogComponent = /** @class */ (function () {
|
|
|
1154
1104
|
}());
|
|
1155
1105
|
|
|
1156
1106
|
var ApiLogsComponent = /** @class */ (function () {
|
|
1157
|
-
function ApiLogsComponent(_dialog
|
|
1107
|
+
function ApiLogsComponent(_dialog) {
|
|
1158
1108
|
this._dialog = _dialog;
|
|
1159
|
-
this._systemService = _systemService;
|
|
1160
1109
|
this.config = null;
|
|
1161
1110
|
this.apiLogStates = indexNameValue(ApiLogStates);
|
|
1162
1111
|
}
|
|
@@ -1187,7 +1136,7 @@ var ApiLogsComponent = /** @class */ (function () {
|
|
|
1187
1136
|
fetch: function (query) {
|
|
1188
1137
|
Object.assign(query, {});
|
|
1189
1138
|
return _this.loadApiLogs(query)
|
|
1190
|
-
.pipe(map(function (response) { return ({ data:
|
|
1139
|
+
.pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
|
|
1191
1140
|
}
|
|
1192
1141
|
};
|
|
1193
1142
|
};
|
|
@@ -1198,8 +1147,7 @@ var ApiLogsComponent = /** @class */ (function () {
|
|
|
1198
1147
|
});
|
|
1199
1148
|
};
|
|
1200
1149
|
ApiLogsComponent.ctorParameters = function () { return [
|
|
1201
|
-
{ type: MatDialog }
|
|
1202
|
-
{ type: SystemService }
|
|
1150
|
+
{ type: MatDialog }
|
|
1203
1151
|
]; };
|
|
1204
1152
|
__decorate([
|
|
1205
1153
|
ViewChild(FsListComponent, { static: true }),
|
|
@@ -1215,8 +1163,7 @@ var ApiLogsComponent = /** @class */ (function () {
|
|
|
1215
1163
|
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",
|
|
1216
1164
|
styles: [""]
|
|
1217
1165
|
}),
|
|
1218
|
-
__metadata("design:paramtypes", [MatDialog
|
|
1219
|
-
SystemService])
|
|
1166
|
+
__metadata("design:paramtypes", [MatDialog])
|
|
1220
1167
|
], ApiLogsComponent);
|
|
1221
1168
|
return ApiLogsComponent;
|
|
1222
1169
|
}());
|
|
@@ -1326,9 +1273,6 @@ var FsSystemModule = /** @class */ (function () {
|
|
|
1326
1273
|
CronComponent,
|
|
1327
1274
|
CronLogComponent,
|
|
1328
1275
|
],
|
|
1329
|
-
providers: [
|
|
1330
|
-
SystemService
|
|
1331
|
-
],
|
|
1332
1276
|
})
|
|
1333
1277
|
], FsSystemModule);
|
|
1334
1278
|
return FsSystemModule;
|
|
@@ -1338,5 +1282,5 @@ var FsSystemModule = /** @class */ (function () {
|
|
|
1338
1282
|
* Generated bundle index. Do not edit.
|
|
1339
1283
|
*/
|
|
1340
1284
|
|
|
1341
|
-
export { ApiLogState, ApiLogStates, CronState, CronStates, FS_SYSTEM_CONFIG, FsSystemModule, ProcessState, ProcessStates, DashboardComponent as ɵa,
|
|
1285
|
+
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 };
|
|
1342
1286
|
//# sourceMappingURL=firestitch-system.js.map
|