@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.
Files changed (50) hide show
  1. package/app/components/api-logs/api-logs.component.d.ts +1 -3
  2. package/app/components/crons/crons.component.d.ts +2 -3
  3. package/app/components/dashboard/dashboard.component.d.ts +1 -3
  4. package/app/components/processes/processes.component.d.ts +1 -3
  5. package/app/components/server-logs/server-logs.component.d.ts +1 -3
  6. package/app/components/settings/settings.component.d.ts +1 -3
  7. package/app/components/upgrade-logs/upgrade-logs.component.d.ts +0 -3
  8. package/app/enums/setting-interface-type.enum.d.ts +2 -1
  9. package/app/interfaces/system-config.d.ts +0 -1
  10. package/bundles/firestitch-system.umd.js +77 -114
  11. package/bundles/firestitch-system.umd.js.map +1 -1
  12. package/bundles/firestitch-system.umd.min.js +2 -2
  13. package/bundles/firestitch-system.umd.min.js.map +1 -1
  14. package/esm2015/app/components/api-logs/api-logs.component.js +5 -9
  15. package/esm2015/app/components/crons/crons.component.js +38 -13
  16. package/esm2015/app/components/dashboard/dashboard.component.js +3 -7
  17. package/esm2015/app/components/processes/processes.component.js +4 -8
  18. package/esm2015/app/components/server-logs/server-logs.component.js +6 -10
  19. package/esm2015/app/components/settings/settings.component.js +5 -8
  20. package/esm2015/app/components/upgrade-logs/upgrade-logs.component.js +4 -10
  21. package/esm2015/app/enums/setting-interface-type.enum.js +3 -2
  22. package/esm2015/app/fs-system.module.js +1 -5
  23. package/esm2015/app/interfaces/system-config.js +1 -1
  24. package/esm2015/app/pipes/key-name-value.pipe.js +2 -2
  25. package/esm2015/firestitch-system.js +15 -17
  26. package/esm5/app/components/api-logs/api-logs.component.js +5 -9
  27. package/esm5/app/components/crons/crons.component.js +38 -13
  28. package/esm5/app/components/dashboard/dashboard.component.js +3 -7
  29. package/esm5/app/components/processes/processes.component.js +4 -8
  30. package/esm5/app/components/server-logs/server-logs.component.js +6 -10
  31. package/esm5/app/components/settings/settings.component.js +5 -8
  32. package/esm5/app/components/upgrade-logs/upgrade-logs.component.js +4 -10
  33. package/esm5/app/enums/setting-interface-type.enum.js +3 -2
  34. package/esm5/app/fs-system.module.js +1 -5
  35. package/esm5/app/interfaces/system-config.js +1 -1
  36. package/esm5/app/pipes/key-name-value.pipe.js +1 -1
  37. package/esm5/firestitch-system.js +15 -17
  38. package/fesm2015/firestitch-system.js +65 -98
  39. package/fesm2015/firestitch-system.js.map +1 -1
  40. package/fesm5/firestitch-system.js +64 -100
  41. package/fesm5/firestitch-system.js.map +1 -1
  42. package/firestitch-system.d.ts +14 -17
  43. package/firestitch-system.metadata.json +1 -1
  44. package/package.json +1 -1
  45. package/app/services/index.d.ts +0 -1
  46. package/app/services/system.service.d.ts +0 -7
  47. package/esm2015/app/services/index.js +0 -2
  48. package/esm2015/app/services/system.service.js +0 -43
  49. package/esm5/app/services/index.js +0 -2
  50. package/esm5/app/services/system.service.js +0 -46
@@ -1,8 +1,5 @@
1
- import { __decorate, __param, __metadata, __assign, __spread } from 'tslib';
2
- import { InjectionToken, Inject, Injectable, ChangeDetectorRef, Input, Component, ChangeDetectionStrategy, ViewChild, EventEmitter, Output, Pipe, ElementRef, NgModule } from '@angular/core';
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';
@@ -29,56 +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
  var FS_SYSTEM_CONFIG = new InjectionToken('fs-system-config');
37
36
 
38
- var snakecaseKeys = _snakecaseKeys;
39
- var camelcaseKeys = _camelcaseKeys;
40
- var SystemService = /** @class */ (function () {
41
- function SystemService(_config) {
42
- this._config = _config;
43
- }
44
- SystemService.prototype.input = function (data) {
45
- var _this = this;
46
- if (isArray(data)) {
47
- return data.map(function (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
- SystemService.prototype.output = function (data) {
56
- var _this = this;
57
- if (isArray(data)) {
58
- return data.map(function (item) {
59
- return _this._config.case === 'snake' ? snakecaseKeys(item, { deep: true }) : item;
60
- });
61
- }
62
- else {
63
- return this._config.case === 'snake' ? snakecaseKeys(data, { deep: true }) : data;
64
- }
65
- };
66
- SystemService.ctorParameters = function () { return [
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
- return SystemService;
75
- }());
76
-
77
37
  var DashboardComponent = /** @class */ (function () {
78
- function DashboardComponent(_message, _cdRef, _systemService, _buildService) {
38
+ function DashboardComponent(_message, _cdRef, _buildService) {
79
39
  this._message = _message;
80
40
  this._cdRef = _cdRef;
81
- this._systemService = _systemService;
82
41
  this._buildService = _buildService;
83
42
  this.buttonActions = [];
84
43
  this.menuActions = [];
@@ -102,7 +61,7 @@ var DashboardComponent = /** @class */ (function () {
102
61
  var _this = this;
103
62
  this.load()
104
63
  .subscribe(function (dashboard) {
105
- _this.dashboard = _this._systemService.input(dashboard);
64
+ _this.dashboard = dashboard;
106
65
  _this.dashboard.cronRanAttention = !dashboard.cronRan ||
107
66
  differenceInMinutes(new Date(), new Date(dashboard.cronRan)) > 15;
108
67
  _this._cdRef.markForCheck();
@@ -133,7 +92,6 @@ var DashboardComponent = /** @class */ (function () {
133
92
  DashboardComponent.ctorParameters = function () { return [
134
93
  { type: FsMessage },
135
94
  { type: ChangeDetectorRef },
136
- { type: SystemService },
137
95
  { type: FsBuildService }
138
96
  ]; };
139
97
  __decorate([
@@ -161,7 +119,6 @@ var DashboardComponent = /** @class */ (function () {
161
119
  }),
162
120
  __metadata("design:paramtypes", [FsMessage,
163
121
  ChangeDetectorRef,
164
- SystemService,
165
122
  FsBuildService])
166
123
  ], DashboardComponent);
167
124
  return DashboardComponent;
@@ -189,7 +146,8 @@ var SettingInterfaceType;
189
146
  SettingInterfaceType["RadioButton"] = "R";
190
147
  SettingInterfaceType["InputBox"] = "I";
191
148
  SettingInterfaceType["Textarea"] = "T";
192
- SettingInterfaceType["DropDown"] = "D";
149
+ SettingInterfaceType["Select"] = "D";
150
+ SettingInterfaceType["SelectMultiple"] = "W";
193
151
  SettingInterfaceType["Date"] = "A";
194
152
  SettingInterfaceType["File"] = "F";
195
153
  SettingInterfaceType["Static"] = "S";
@@ -384,9 +342,8 @@ var CronComponent = /** @class */ (function () {
384
342
  }());
385
343
 
386
344
  var CronsComponent = /** @class */ (function () {
387
- function CronsComponent(_message, _systemService, _dialog) {
345
+ function CronsComponent(_message, _dialog) {
388
346
  this._message = _message;
389
- this._systemService = _systemService;
390
347
  this._dialog = _dialog;
391
348
  this.config = null;
392
349
  this.cronStates = indexNameValue(CronStates);
@@ -415,9 +372,33 @@ var CronsComponent = /** @class */ (function () {
415
372
  fetch: function (query) {
416
373
  query.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
417
374
  return _this.loadCrons(query)
418
- .pipe(map(function (response) { return ({ data: _this._systemService.input(response) }); }));
419
- }
375
+ .pipe(map(function (response) { return ({ data: response }); }));
376
+ },
420
377
  };
378
+ if (this.bulk) {
379
+ this.config.selection = {
380
+ selectAll: false,
381
+ actions: [
382
+ {
383
+ type: SelectionActionType.Action,
384
+ name: 'disable',
385
+ label: 'Disable'
386
+ },
387
+ {
388
+ type: SelectionActionType.Action,
389
+ name: 'enable',
390
+ label: 'Enable'
391
+ },
392
+ ],
393
+ actionSelected: function (action) {
394
+ return _this.bulk(action.action.name, action.selected)
395
+ .pipe(tap(function () {
396
+ _this.list.reload();
397
+ _this._message.success('Applied Changes');
398
+ }));
399
+ },
400
+ };
401
+ }
421
402
  };
422
403
  CronsComponent.prototype.open = function (cron) {
423
404
  this._dialog.open(CronComponent, {
@@ -435,7 +416,7 @@ var CronsComponent = /** @class */ (function () {
435
416
  return [
436
417
  {
437
418
  action: function (data) {
438
- return _this.queue(_this._systemService.output(data))
419
+ return _this.queue(data)
439
420
  .pipe(tap(function () {
440
421
  _this._message.success('Queued cron');
441
422
  _this.list.reload();
@@ -448,7 +429,7 @@ var CronsComponent = /** @class */ (function () {
448
429
  },
449
430
  {
450
431
  action: function (data) {
451
- return _this.run(_this._systemService.output(data))
432
+ return _this.run(data)
452
433
  .pipe(tap(function () {
453
434
  _this._message.success('Cron ran');
454
435
  _this.list.reload();
@@ -461,7 +442,7 @@ var CronsComponent = /** @class */ (function () {
461
442
  },
462
443
  {
463
444
  action: function (data) {
464
- return _this.enable(_this._systemService.output(data))
445
+ return _this.enable(data)
465
446
  .pipe(tap(function () {
466
447
  _this._message.success('Enabled cron');
467
448
  _this.list.reload();
@@ -474,7 +455,7 @@ var CronsComponent = /** @class */ (function () {
474
455
  },
475
456
  {
476
457
  action: function (data) {
477
- return _this.disable(_this._systemService.output(data))
458
+ return _this.disable(data)
478
459
  .pipe(tap(function () {
479
460
  _this._message.success('Disabled cron');
480
461
  _this.list.reload();
@@ -487,7 +468,7 @@ var CronsComponent = /** @class */ (function () {
487
468
  },
488
469
  {
489
470
  action: function (data) {
490
- return _this.kill(_this._systemService.output(data))
471
+ return _this.kill(data)
491
472
  .pipe(tap(function () {
492
473
  _this._message.success('Killed cron');
493
474
  _this.list.reload();
@@ -502,7 +483,6 @@ var CronsComponent = /** @class */ (function () {
502
483
  };
503
484
  CronsComponent.ctorParameters = function () { return [
504
485
  { type: FsMessage },
505
- { type: SystemService },
506
486
  { type: MatDialog }
507
487
  ]; };
508
488
  __decorate([
@@ -541,6 +521,10 @@ var CronsComponent = /** @class */ (function () {
541
521
  Input(),
542
522
  __metadata("design:type", Function)
543
523
  ], CronsComponent.prototype, "loadCronLogs", void 0);
524
+ __decorate([
525
+ Input(),
526
+ __metadata("design:type", Function)
527
+ ], CronsComponent.prototype, "bulk", void 0);
544
528
  CronsComponent = __decorate([
545
529
  Component({
546
530
  selector: 'fs-system-crons',
@@ -548,16 +532,14 @@ var CronsComponent = /** @class */ (function () {
548
532
  styles: [""]
549
533
  }),
550
534
  __metadata("design:paramtypes", [FsMessage,
551
- SystemService,
552
535
  MatDialog])
553
536
  ], CronsComponent);
554
537
  return CronsComponent;
555
538
  }());
556
539
 
557
540
  var SettingsComponent = /** @class */ (function () {
558
- function SettingsComponent(_message, _systemService, _clipboardService, _prompt, _cdRef) {
541
+ function SettingsComponent(_message, _clipboardService, _prompt, _cdRef) {
559
542
  this._message = _message;
560
- this._systemService = _systemService;
561
543
  this._clipboardService = _clipboardService;
562
544
  this._prompt = _prompt;
563
545
  this._cdRef = _cdRef;
@@ -571,12 +553,13 @@ var SettingsComponent = /** @class */ (function () {
571
553
  var _this = this;
572
554
  this.loadSettings()
573
555
  .subscribe(function (settings) {
574
- settings = _this._systemService.input(settings);
575
556
  settings = settings.map(function (setting) {
576
557
  switch (setting.interfaceType) {
577
558
  case SettingInterfaceType.Date:
578
559
  case SettingInterfaceType.Time:
579
560
  setting.value = parse(setting.value);
561
+ case SettingInterfaceType.SelectMultiple:
562
+ setting.value = Array.isArray(setting.value) ? setting.value : [];
580
563
  break;
581
564
  }
582
565
  return setting;
@@ -642,7 +625,6 @@ var SettingsComponent = /** @class */ (function () {
642
625
  };
643
626
  SettingsComponent.ctorParameters = function () { return [
644
627
  { type: FsMessage },
645
- { type: SystemService },
646
628
  { type: ClipboardService },
647
629
  { type: FsPrompt },
648
630
  { type: ChangeDetectorRef }
@@ -666,12 +648,11 @@ var SettingsComponent = /** @class */ (function () {
666
648
  SettingsComponent = __decorate([
667
649
  Component({
668
650
  selector: 'fs-system-settings',
669
- 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.DropDown\">\r\n <mat-select\r\n [placeholder]=\"setting.label\"\r\n [(ngModel)]=\"setting.value\"\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",
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",
670
652
  changeDetection: ChangeDetectionStrategy.OnPush,
671
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}"]
672
654
  }),
673
655
  __metadata("design:paramtypes", [FsMessage,
674
- SystemService,
675
656
  ClipboardService,
676
657
  FsPrompt,
677
658
  ChangeDetectorRef])
@@ -798,8 +779,7 @@ var ProcessComponent = /** @class */ (function () {
798
779
  }());
799
780
 
800
781
  var ProcessesComponent = /** @class */ (function () {
801
- function ProcessesComponent(_systemService, _dialog, _message) {
802
- this._systemService = _systemService;
782
+ function ProcessesComponent(_dialog, _message) {
803
783
  this._dialog = _dialog;
804
784
  this._message = _message;
805
785
  this.actions = [];
@@ -831,7 +811,7 @@ var ProcessesComponent = /** @class */ (function () {
831
811
  ],
832
812
  fetch: function (query) {
833
813
  return _this.loadProcesses(query)
834
- .pipe(map(function (response) { return ({ data: _this._systemService.input(response.data), paging: response.paging }); }));
814
+ .pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
835
815
  }
836
816
  };
837
817
  if (this.run) {
@@ -918,7 +898,6 @@ var ProcessesComponent = /** @class */ (function () {
918
898
  this._destroy$.complete();
919
899
  };
920
900
  ProcessesComponent.ctorParameters = function () { return [
921
- { type: SystemService },
922
901
  { type: MatDialog },
923
902
  { type: FsMessage }
924
903
  ]; };
@@ -960,8 +939,7 @@ var ProcessesComponent = /** @class */ (function () {
960
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",
961
940
  styles: [""]
962
941
  }),
963
- __metadata("design:paramtypes", [SystemService,
964
- MatDialog,
942
+ __metadata("design:paramtypes", [MatDialog,
965
943
  FsMessage])
966
944
  ], ProcessesComponent);
967
945
  return ProcessesComponent;
@@ -999,9 +977,8 @@ var ServerLogComponent = /** @class */ (function () {
999
977
  }());
1000
978
 
1001
979
  var ServerLogsComponent = /** @class */ (function () {
1002
- function ServerLogsComponent(_dialog, _systemService) {
980
+ function ServerLogsComponent(_dialog) {
1003
981
  this._dialog = _dialog;
1004
- this._systemService = _systemService;
1005
982
  this.config = null;
1006
983
  this.logTypes = [];
1007
984
  }
@@ -1020,19 +997,18 @@ var ServerLogsComponent = /** @class */ (function () {
1020
997
  ],
1021
998
  fetch: function (query) {
1022
999
  return _this.loadLogs(query)
1023
- .pipe(map(function (response) { return ({ data: _this._systemService.input(response.data), paging: response.paging }); }));
1000
+ .pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
1024
1001
  }
1025
1002
  };
1026
1003
  };
1027
1004
  ServerLogsComponent.prototype.open = function (log) {
1028
- var dialogRef = this._dialog.open(ServerLogComponent, {
1005
+ this._dialog.open(ServerLogComponent, {
1029
1006
  data: { log: log },
1030
1007
  width: '85%'
1031
1008
  });
1032
1009
  };
1033
1010
  ServerLogsComponent.ctorParameters = function () { return [
1034
- { type: MatDialog },
1035
- { type: SystemService }
1011
+ { type: MatDialog }
1036
1012
  ]; };
1037
1013
  __decorate([
1038
1014
  ViewChild('list', { static: true }),
@@ -1048,15 +1024,13 @@ var ServerLogsComponent = /** @class */ (function () {
1048
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",
1049
1025
  styles: [""]
1050
1026
  }),
1051
- __metadata("design:paramtypes", [MatDialog,
1052
- SystemService])
1027
+ __metadata("design:paramtypes", [MatDialog])
1053
1028
  ], ServerLogsComponent);
1054
1029
  return ServerLogsComponent;
1055
1030
  }());
1056
1031
 
1057
1032
  var UpgradeLogsComponent = /** @class */ (function () {
1058
- function UpgradeLogsComponent(_systemService) {
1059
- this._systemService = _systemService;
1033
+ function UpgradeLogsComponent() {
1060
1034
  this.config = null;
1061
1035
  this.logTypes = [];
1062
1036
  }
@@ -1076,13 +1050,10 @@ var UpgradeLogsComponent = /** @class */ (function () {
1076
1050
  ],
1077
1051
  fetch: function (query) {
1078
1052
  return _this.loadUpgradeLogs(query)
1079
- .pipe(map(function (response) { return ({ data: _this._systemService.input(response.data), paging: response.paging }); }));
1053
+ .pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
1080
1054
  }
1081
1055
  };
1082
1056
  };
1083
- UpgradeLogsComponent.ctorParameters = function () { return [
1084
- { type: SystemService }
1085
- ]; };
1086
1057
  __decorate([
1087
1058
  ViewChild(FsListComponent, { static: true }),
1088
1059
  __metadata("design:type", FsListComponent)
@@ -1096,8 +1067,7 @@ var UpgradeLogsComponent = /** @class */ (function () {
1096
1067
  selector: 'fs-system-upgrade-logs',
1097
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",
1098
1069
  styles: [""]
1099
- }),
1100
- __metadata("design:paramtypes", [SystemService])
1070
+ })
1101
1071
  ], UpgradeLogsComponent);
1102
1072
  return UpgradeLogsComponent;
1103
1073
  }());
@@ -1129,9 +1099,8 @@ var ApiLogComponent = /** @class */ (function () {
1129
1099
  }());
1130
1100
 
1131
1101
  var ApiLogsComponent = /** @class */ (function () {
1132
- function ApiLogsComponent(_dialog, _systemService) {
1102
+ function ApiLogsComponent(_dialog) {
1133
1103
  this._dialog = _dialog;
1134
- this._systemService = _systemService;
1135
1104
  this.config = null;
1136
1105
  this.apiLogStates = indexNameValue(ApiLogStates);
1137
1106
  }
@@ -1162,7 +1131,7 @@ var ApiLogsComponent = /** @class */ (function () {
1162
1131
  fetch: function (query) {
1163
1132
  Object.assign(query, {});
1164
1133
  return _this.loadApiLogs(query)
1165
- .pipe(map(function (response) { return ({ data: _this._systemService.input(response.data), paging: response.paging }); }));
1134
+ .pipe(map(function (response) { return ({ data: response.data, paging: response.paging }); }));
1166
1135
  }
1167
1136
  };
1168
1137
  };
@@ -1173,8 +1142,7 @@ var ApiLogsComponent = /** @class */ (function () {
1173
1142
  });
1174
1143
  };
1175
1144
  ApiLogsComponent.ctorParameters = function () { return [
1176
- { type: MatDialog },
1177
- { type: SystemService }
1145
+ { type: MatDialog }
1178
1146
  ]; };
1179
1147
  __decorate([
1180
1148
  ViewChild(FsListComponent, { static: true }),
@@ -1190,8 +1158,7 @@ var ApiLogsComponent = /** @class */ (function () {
1190
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",
1191
1159
  styles: [""]
1192
1160
  }),
1193
- __metadata("design:paramtypes", [MatDialog,
1194
- SystemService])
1161
+ __metadata("design:paramtypes", [MatDialog])
1195
1162
  ], ApiLogsComponent);
1196
1163
  return ApiLogsComponent;
1197
1164
  }());
@@ -1301,9 +1268,6 @@ var FsSystemModule = /** @class */ (function () {
1301
1268
  CronComponent,
1302
1269
  CronLogComponent,
1303
1270
  ],
1304
- providers: [
1305
- SystemService
1306
- ],
1307
1271
  })
1308
1272
  ], FsSystemModule);
1309
1273
  return FsSystemModule;
@@ -1313,5 +1277,5 @@ var FsSystemModule = /** @class */ (function () {
1313
1277
  * Generated bundle index. Do not edit.
1314
1278
  */
1315
1279
 
1316
- export { ApiLogState, ApiLogStates, CronState, CronStates, FS_SYSTEM_CONFIG, FsSystemModule, ProcessState, ProcessStates, DashboardComponent as ɵa, SystemService as ɵb, CronsComponent as ɵd, SystemService as ɵe, SettingsComponent as ɵf, FileManagerComponent as ɵg, ProcessesComponent as ɵh, ServerLogsComponent as ɵi, UpgradeLogsComponent as ɵj, ApiLogsComponent as ɵk, InfoComponent as ɵl, KeyNameValuePipe as ɵm, ServerLogComponent as ɵn, ApiLogComponent as ɵo, ProcessComponent as ɵp, CronComponent as ɵq, CronLogComponent as ɵr };
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 };
1317
1281
  //# sourceMappingURL=firestitch-system.js.map