@firestitch/system 13.0.13 → 14.0.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 (127) hide show
  1. package/app/modules/query-logs/components/explain/explain.component.d.ts +8 -8
  2. package/app/modules/query-logs/components/explain/index.d.ts +1 -1
  3. package/app/modules/query-logs/components/index.d.ts +3 -3
  4. package/app/modules/query-logs/components/query-log/index.d.ts +1 -1
  5. package/app/modules/query-logs/components/query-log/query-log.component.d.ts +27 -27
  6. package/app/modules/query-logs/components/query-logs/index.d.ts +1 -1
  7. package/app/modules/query-logs/components/query-logs/query-logs.component.d.ts +20 -20
  8. package/app/modules/query-logs/query-logs.module.d.ts +23 -23
  9. package/app/modules/system/components/api-log/api-log.component.d.ts +13 -13
  10. package/app/modules/system/components/api-log/index.d.ts +1 -1
  11. package/app/modules/system/components/api-logs/api-logs.component.d.ts +21 -21
  12. package/app/modules/system/components/api-logs/index.d.ts +1 -1
  13. package/app/modules/system/components/cron/cron.component.d.ts +25 -25
  14. package/app/modules/system/components/cron/index.d.ts +1 -1
  15. package/app/modules/system/components/cron-log/cron-log.component.d.ts +12 -12
  16. package/app/modules/system/components/cron-log/index.d.ts +1 -1
  17. package/app/modules/system/components/cron-next-run/cron-next-run.component.d.ts +18 -18
  18. package/app/modules/system/components/cron-next-run/index.d.ts +1 -1
  19. package/app/modules/system/components/crons/crons.component.d.ts +43 -43
  20. package/app/modules/system/components/crons/index.d.ts +1 -1
  21. package/app/modules/system/components/dashboard/dashboard.component.d.ts +28 -28
  22. package/app/modules/system/components/dashboard/index.d.ts +1 -1
  23. package/app/modules/system/components/info/index.d.ts +1 -1
  24. package/app/modules/system/components/info/info.component.d.ts +11 -11
  25. package/app/modules/system/components/process/index.d.ts +1 -1
  26. package/app/modules/system/components/process/process.component.d.ts +45 -45
  27. package/app/modules/system/components/processes/index.d.ts +1 -1
  28. package/app/modules/system/components/processes/processes.component.d.ts +36 -36
  29. package/app/modules/system/components/server-log/index.d.ts +1 -1
  30. package/app/modules/system/components/server-log/server-log.component.d.ts +10 -10
  31. package/app/modules/system/components/server-logs/index.d.ts +1 -1
  32. package/app/modules/system/components/server-logs/server-logs.component.d.ts +21 -21
  33. package/app/modules/system/components/settings/index.d.ts +1 -1
  34. package/app/modules/system/components/settings/settings.component.d.ts +30 -30
  35. package/app/modules/system/components/upgrade-logs/index.d.ts +1 -1
  36. package/app/modules/system/components/upgrade-logs/upgrade-logs.component.d.ts +17 -17
  37. package/app/modules/system/consts/api-log-states.const.d.ts +5 -5
  38. package/app/modules/system/consts/cron-log-states.const.d.ts +6 -6
  39. package/app/modules/system/consts/cron-process-states.const.d.ts +4 -4
  40. package/app/modules/system/consts/cron-states.const.d.ts +5 -5
  41. package/app/modules/system/consts/index.d.ts +7 -7
  42. package/app/modules/system/consts/process-process-states.const.d.ts +4 -4
  43. package/app/modules/system/consts/process-states.const.d.ts +5 -5
  44. package/app/modules/system/consts/setting-interface-types.const.d.ts +5 -5
  45. package/app/modules/system/enums/api-log-state.enum.d.ts +5 -5
  46. package/app/modules/system/enums/cron-log-state.enum.d.ts +14 -14
  47. package/app/modules/system/enums/cron-state.enum.d.ts +9 -9
  48. package/app/modules/system/enums/index.d.ts +5 -5
  49. package/app/modules/system/enums/process-state.enum.d.ts +8 -8
  50. package/app/modules/system/enums/setting-interface-type.enum.d.ts +14 -14
  51. package/app/modules/system/fs-system.module.d.ts +47 -47
  52. package/app/modules/system/helpers/index-name-value.d.ts +1 -1
  53. package/app/modules/system/injectors/system-config.injector.d.ts +2 -2
  54. package/app/modules/system/interfaces/dashboard-action.d.ts +5 -5
  55. package/app/modules/system/interfaces/index.d.ts +4 -4
  56. package/app/modules/system/interfaces/process-action.d.ts +6 -6
  57. package/app/modules/system/interfaces/process.d.ts +26 -26
  58. package/app/modules/system/interfaces/system-config.d.ts +2 -2
  59. package/app/modules/system/pipes/key-name-value.pipe.d.ts +8 -8
  60. package/esm2020/app/modules/query-logs/components/explain/explain.component.mjs +23 -23
  61. package/esm2020/app/modules/query-logs/components/explain/index.mjs +1 -1
  62. package/esm2020/app/modules/query-logs/components/index.mjs +4 -4
  63. package/esm2020/app/modules/query-logs/components/query-log/index.mjs +1 -1
  64. package/esm2020/app/modules/query-logs/components/query-log/query-log.component.mjs +58 -58
  65. package/esm2020/app/modules/query-logs/components/query-logs/index.mjs +1 -1
  66. package/esm2020/app/modules/query-logs/components/query-logs/query-logs.component.mjs +84 -84
  67. package/esm2020/app/modules/query-logs/query-logs.module.mjs +83 -85
  68. package/esm2020/app/modules/system/components/api-log/api-log.component.mjs +34 -34
  69. package/esm2020/app/modules/system/components/api-log/index.mjs +2 -2
  70. package/esm2020/app/modules/system/components/api-logs/api-logs.component.mjs +69 -69
  71. package/esm2020/app/modules/system/components/api-logs/index.mjs +2 -2
  72. package/esm2020/app/modules/system/components/cron/cron.component.mjs +105 -105
  73. package/esm2020/app/modules/system/components/cron/index.mjs +2 -2
  74. package/esm2020/app/modules/system/components/cron-log/cron-log.component.mjs +37 -37
  75. package/esm2020/app/modules/system/components/cron-log/index.mjs +2 -2
  76. package/esm2020/app/modules/system/components/cron-next-run/cron-next-run.component.mjs +98 -98
  77. package/esm2020/app/modules/system/components/cron-next-run/index.mjs +1 -1
  78. package/esm2020/app/modules/system/components/crons/crons.component.mjs +235 -235
  79. package/esm2020/app/modules/system/components/crons/index.mjs +2 -2
  80. package/esm2020/app/modules/system/components/dashboard/dashboard.component.mjs +84 -84
  81. package/esm2020/app/modules/system/components/dashboard/index.mjs +2 -2
  82. package/esm2020/app/modules/system/components/info/index.mjs +2 -2
  83. package/esm2020/app/modules/system/components/info/info.component.mjs +31 -31
  84. package/esm2020/app/modules/system/components/process/index.mjs +2 -2
  85. package/esm2020/app/modules/system/components/process/process.component.mjs +98 -98
  86. package/esm2020/app/modules/system/components/processes/index.mjs +2 -2
  87. package/esm2020/app/modules/system/components/processes/processes.component.mjs +177 -177
  88. package/esm2020/app/modules/system/components/server-log/index.mjs +2 -2
  89. package/esm2020/app/modules/system/components/server-log/server-log.component.mjs +38 -38
  90. package/esm2020/app/modules/system/components/server-logs/index.mjs +2 -2
  91. package/esm2020/app/modules/system/components/server-logs/server-logs.component.mjs +53 -53
  92. package/esm2020/app/modules/system/components/settings/index.mjs +2 -2
  93. package/esm2020/app/modules/system/components/settings/settings.component.mjs +138 -138
  94. package/esm2020/app/modules/system/components/upgrade-logs/index.mjs +2 -2
  95. package/esm2020/app/modules/system/components/upgrade-logs/upgrade-logs.component.mjs +44 -44
  96. package/esm2020/app/modules/system/consts/api-log-states.const.mjs +7 -7
  97. package/esm2020/app/modules/system/consts/cron-log-states.const.mjs +15 -15
  98. package/esm2020/app/modules/system/consts/cron-process-states.const.mjs +4 -4
  99. package/esm2020/app/modules/system/consts/cron-states.const.mjs +10 -10
  100. package/esm2020/app/modules/system/consts/index.mjs +7 -7
  101. package/esm2020/app/modules/system/consts/process-process-states.const.mjs +5 -5
  102. package/esm2020/app/modules/system/consts/process-states.const.mjs +10 -10
  103. package/esm2020/app/modules/system/consts/setting-interface-types.const.mjs +12 -12
  104. package/esm2020/app/modules/system/enums/api-log-state.enum.mjs +7 -7
  105. package/esm2020/app/modules/system/enums/cron-log-state.enum.mjs +15 -15
  106. package/esm2020/app/modules/system/enums/cron-state.enum.mjs +11 -11
  107. package/esm2020/app/modules/system/enums/index.mjs +6 -6
  108. package/esm2020/app/modules/system/enums/process-state.enum.mjs +10 -10
  109. package/esm2020/app/modules/system/enums/setting-interface-type.enum.mjs +16 -16
  110. package/esm2020/app/modules/system/fs-system.module.mjs +177 -179
  111. package/esm2020/app/modules/system/helpers/index-name-value.mjs +8 -8
  112. package/esm2020/app/modules/system/injectors/system-config.injector.mjs +3 -3
  113. package/esm2020/app/modules/system/interfaces/dashboard-action.mjs +2 -2
  114. package/esm2020/app/modules/system/interfaces/index.mjs +4 -4
  115. package/esm2020/app/modules/system/interfaces/process-action.mjs +2 -2
  116. package/esm2020/app/modules/system/interfaces/process.mjs +1 -1
  117. package/esm2020/app/modules/system/interfaces/system-config.mjs +2 -2
  118. package/esm2020/app/modules/system/pipes/key-name-value.pipe.mjs +21 -21
  119. package/esm2020/firestitch-system.mjs +4 -4
  120. package/esm2020/public_api.mjs +20 -20
  121. package/fesm2015/firestitch-system.mjs +1486 -1490
  122. package/fesm2015/firestitch-system.mjs.map +1 -1
  123. package/fesm2020/firestitch-system.mjs +1492 -1496
  124. package/fesm2020/firestitch-system.mjs.map +1 -1
  125. package/{firestitch-system.d.ts → index.d.ts} +5 -5
  126. package/package.json +3 -3
  127. package/public_api.d.ts +21 -21
@@ -1,15 +1,15 @@
1
- import * as i8 from '@angular/common';
1
+ import * as i2 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Component, ChangeDetectionStrategy, Inject, ViewChild, Input, NgModule, Pipe, Injectable, EventEmitter, Output, InjectionToken } from '@angular/core';
5
- import * as i16 from '@angular/forms';
5
+ import * as i5$2 from '@angular/forms';
6
6
  import { FormsModule } from '@angular/forms';
7
7
  import { RouterModule } from '@angular/router';
8
8
  import * as i4 from '@angular/material/button';
9
9
  import { MatButtonModule } from '@angular/material/button';
10
10
  import * as i1 from '@angular/material/dialog';
11
11
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
12
- import * as i3$1 from '@angular/material/tabs';
12
+ import * as i4$1 from '@angular/material/tabs';
13
13
  import { MatTabsModule } from '@angular/material/tabs';
14
14
  import * as i2$1 from '@firestitch/clipboard';
15
15
  import { FsClipboardModule } from '@firestitch/clipboard';
@@ -17,1587 +17,1583 @@ import * as i10 from '@firestitch/common';
17
17
  import { FsCommonModule } from '@firestitch/common';
18
18
  import * as i4$2 from '@firestitch/date';
19
19
  import { FsDateModule, parse } from '@firestitch/date';
20
- import * as i2 from '@firestitch/dialog';
20
+ import * as i9 from '@firestitch/dialog';
21
21
  import { FsDialogModule } from '@firestitch/dialog';
22
- import * as i4$1 from '@firestitch/form';
22
+ import * as i3 from '@firestitch/form';
23
23
  import { FsFormModule } from '@firestitch/form';
24
- import * as i3 from '@firestitch/label';
24
+ import * as i8 from '@firestitch/label';
25
25
  import { FsLabelModule } from '@firestitch/label';
26
- import * as i2$2 from '@firestitch/list';
26
+ import * as i5 from '@firestitch/list';
27
27
  import { FsListComponent, FsListModule } from '@firestitch/list';
28
28
  import * as i7 from '@firestitch/popover';
29
29
  import { FsPopoverModule } from '@firestitch/popover';
30
30
  import { ItemType } from '@firestitch/filter';
31
31
  import { map, tap, takeUntil, switchMap, takeWhile } from 'rxjs/operators';
32
- import * as i4$3 from '@angular/material/expansion';
32
+ import * as i7$2 from '@angular/material/expansion';
33
33
  import { MatExpansionModule } from '@angular/material/expansion';
34
- import * as i7$1 from '@angular/material/form-field';
34
+ import * as i10$1 from '@angular/material/form-field';
35
35
  import { MatFormFieldModule } from '@angular/material/form-field';
36
- import * as i3$2 from '@angular/material/icon';
36
+ import * as i3$1 from '@angular/material/icon';
37
37
  import { MatIconModule } from '@angular/material/icon';
38
- import * as i15 from '@angular/material/input';
38
+ import * as i11 from '@angular/material/input';
39
39
  import { MatInputModule } from '@angular/material/input';
40
- import * as i5$1 from '@angular/material/progress-spinner';
40
+ import * as i6 from '@angular/material/progress-spinner';
41
41
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
42
- import * as i8$1 from '@angular/material/select';
42
+ import * as i12 from '@angular/material/select';
43
43
  import { MatSelectModule } from '@angular/material/select';
44
- import * as i9 from '@angular/material/tooltip';
44
+ import * as i5$1 from '@angular/material/tooltip';
45
45
  import { MatTooltipModule } from '@angular/material/tooltip';
46
- import * as i11 from '@firestitch/colorpicker';
46
+ import * as i16 from '@firestitch/colorpicker';
47
47
  import { FsColorPickerModule } from '@firestitch/colorpicker';
48
- import * as i10$1 from '@firestitch/datepicker';
48
+ import * as i15 from '@firestitch/datepicker';
49
49
  import { FsDatePickerModule } from '@firestitch/datepicker';
50
- import * as i12 from '@firestitch/file';
50
+ import * as i14 from '@firestitch/file';
51
51
  import { FsFileModule } from '@firestitch/file';
52
52
  import { FsFileManagerModule } from '@firestitch/file-manager';
53
- import * as i6 from '@firestitch/menu';
53
+ import * as i9$1 from '@firestitch/menu';
54
54
  import { FsMenuModule } from '@firestitch/menu';
55
- import * as i5 from '@firestitch/skeleton';
55
+ import * as i7$1 from '@firestitch/skeleton';
56
56
  import { FsSkeletonModule } from '@firestitch/skeleton';
57
57
  import { Subject, timer } from 'rxjs';
58
58
  import { addMinutes, addHours, addDays, subSeconds, differenceInSeconds, getDaysInMonth, differenceInMinutes } from 'date-fns';
59
59
  import { SelectionActionType } from '@firestitch/selection';
60
60
  import * as i1$1 from '@firestitch/message';
61
- import * as i3$3 from '@firestitch/prompt';
62
- import * as i2$3 from '@firestitch/build';
63
- import * as i9$1 from '@angular/material/core';
61
+ import * as i3$2 from '@firestitch/prompt';
62
+ import * as i2$2 from '@firestitch/build';
63
+ import * as i13 from '@angular/material/core';
64
64
 
65
- class ExplainComponent {
66
- constructor(_data) {
67
- this._data = _data;
68
- this.explain = _data.explain;
69
- }
70
- }
71
- ExplainComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ExplainComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
72
- ExplainComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ExplainComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>Explain</h1>\n <mat-dialog-content>\n <div class=\"explain-popover\">{{explain | json}}</div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".explain-popover{white-space:pre}\n"], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i4$1.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "json": i8.JsonPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ExplainComponent, decorators: [{
74
- type: Component,
75
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>Explain</h1>\n <mat-dialog-content>\n <div class=\"explain-popover\">{{explain | json}}</div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".explain-popover{white-space:pre}\n"] }]
76
- }], ctorParameters: function () {
77
- return [{ type: undefined, decorators: [{
78
- type: Inject,
79
- args: [MAT_DIALOG_DATA]
80
- }] }];
65
+ class ExplainComponent {
66
+ constructor(_data) {
67
+ this._data = _data;
68
+ this.explain = _data.explain;
69
+ }
70
+ }
71
+ ExplainComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ExplainComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
72
+ ExplainComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ExplainComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>Explain</h1>\n <mat-dialog-content>\n <div class=\"explain-popover\">{{explain | json}}</div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".explain-popover{white-space:pre}\n"], dependencies: [{ kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i3.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { kind: "pipe", type: i2.JsonPipe, name: "json" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ExplainComponent, decorators: [{
74
+ type: Component,
75
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>Explain</h1>\n <mat-dialog-content>\n <div class=\"explain-popover\">{{explain | json}}</div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".explain-popover{white-space:pre}\n"] }]
76
+ }], ctorParameters: function () {
77
+ return [{ type: undefined, decorators: [{
78
+ type: Inject,
79
+ args: [MAT_DIALOG_DATA]
80
+ }] }];
81
81
  } });
82
82
 
83
- class QueryLogComponent {
84
- constructor(_data, _dialog) {
85
- this._data = _data;
86
- this._dialog = _dialog;
87
- this.accessTypes = {
88
- NULL: 'This access method means MySQL can resolve the query during the optimization phase and will not even access the table or index during the execution stage.',
89
- system: 'The table is empty or has one row.',
90
- const: 'The value of the column can be treated as a constant (there is one row matching the query). Note: Primary Key Lookup, Unique Index Lookup',
91
- eq_ref: 'The index is clustered and is being used by the operation (either the index is a PRIMARY KEY or UNIQUE INDEX with all key columns defined as NOT NULL)',
92
- ref: 'The indexed column was accessed using an equality operator Note: The ref_or_null access type is a variation on ref. It means MySQL must do a second lookup to find NULL entries after doing the initial lookup.',
93
- fulltext: 'Operation (JOIN) is using the table’s fulltext index',
94
- index: 'The entire index is scanned to find a match for the query. Note: The main advantage is that this avoids sorting. The biggest disadvantage is the cost of reading an entire table in index order. This usually means accessing the rows in random order, which is very expensive.',
95
- index_merge: 'This join type indicates that the Index Merge optimization is used. In this case, the key column in the output row contains a list of indexes used. It indicates a query can make limited use of multiple indexes on a single table.',
96
- range: 'This type replaces eq_ref for some IN subqueries of the following form: value IN (SELECT primary_key FROM single_table WHERE some_expr)',
97
- unique_subquery: '',
98
- ALL: 'MySQL scans the entire table to satisfy the query',
99
- };
100
- this.queryLog = _data.queryLog;
101
- }
102
- openExplain() {
103
- this._dialog.open(ExplainComponent, {
104
- data: { explain: this.explain },
105
- });
106
- }
107
- get explain() {
108
- return this.queryLog.explain;
109
- }
110
- get queryBlock() {
111
- var _a;
112
- return (_a = this.explain) === null || _a === void 0 ? void 0 : _a.queryBlock;
113
- }
114
- get orderingOperation() {
115
- var _a;
116
- return (_a = this.queryBlock) === null || _a === void 0 ? void 0 : _a.orderingOperation;
117
- }
118
- }
119
- QueryLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: QueryLogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
120
- QueryLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: QueryLogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>Query Log</h1>\n <mat-dialog-content>\n <div class=\"fs-row.gap-large\">\n <fs-label-field>\n <fs-label>Duration</fs-label>\n {{queryLog.duration}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Optimized</fs-label>\n {{queryLog.optimized ? 'Yes' : 'No'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Query Cost</fs-label>\n {{queryLog.queryCost}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Raw Explain</fs-label>\n <a (click)=\"openExplain()\">View</a>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>URL</fs-label>\n {{queryLog.path | fsFormatTruncate: 50}}\n </fs-label-field>\n </div>\n\n <mat-tab-group>\n <mat-tab label=\"Query\">\n <fs-clipboard-button\n [content]=\"queryLog.prettyQuery\">\n </fs-clipboard-button>\n <div [innerHTML]=\"queryLog.prettyQuery\" class=\"query\"></div>\n </mat-tab>\n \n <mat-tab label=\"Explain\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock, selectId: queryBlock.selectId, costInfo: queryBlock.costInfo }\"></ng-container>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n\n<ng-template #nestedLoop let-queryBlock=\"queryBlock\" let-selectId=\"selectId\" let-costInfo=\"costInfo\">\n <ng-container *ngIf=\"selectId\">\n <h1>Select {{selectId}}</h1>\n </ng-container>\n \n <div class=\"fs-row.gap-large\">\n <ng-container *ngIf=\"costInfo?.queryCost\">\n <fs-label-field>\n <fs-label>Query Cost</fs-label>\n {{costInfo.queryCost}}\n </fs-label-field>\n </ng-container>\n <ng-container *ngIf=\"queryBlock.orderingOperation\">\n <fs-label-field>\n <fs-label>Ordering Operation</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.orderingOperation }\"></ng-container>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.groupingOperation\">\n <fs-label-field>\n <fs-label>Grouping Operation</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.groupingOperation }\"></ng-container>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.duplicatesRemoval\">\n <fs-label-field>\n <fs-label>Duplicates Removal</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.duplicatesRemoval }\"></ng-container>\n </fs-label-field>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"queryBlock.orderingOperation\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.orderingOperation }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.groupingOperation\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.groupingOperation }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.duplicatesRemoval\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.duplicatesRemoval }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.table\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: { nestedLoop: [ queryBlock ]} }\"></ng-container>\n \n <ng-container *ngIf=\"queryBlock.table.attachedSubqueries\"> \n <fs-label>Attached Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.table.attachedSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container> \n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock, selectId: subquery.queryBlock.selectId, costInfo: subquery.queryBlock.costInfo }\"></ng-container>\n </ng-container>\n </ng-container> \n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.nestedLoop\">\n <table class=\"fs-list-table style-line\">\n <thead>\n <tr>\n <th>Table</th>\n <th>Type</th>\n <th>Keys</th>\n <th>Ref</th>\n <th>Rows</th>\n <th>Filtered</th>\n <th>Extra</th>\n <th>Cost</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of queryBlock.nestedLoop; let index = index\">\n <tr>\n <td>\n {{item.table.tableName}}\n </td>\n <td>\n <fs-popover [template]=\"accessTypePopover\" [data]=\"item.table.accessType\">\n <span class=\"access-type\" [ngClass]=\"item.table.accessType\">{{item.table.accessType}}</span>\n </fs-popover> \n </td>\n <td>\n <fs-popover \n [template]=\"keysPopover\"\n [maxWidth]=\"null\"\n [data]=\"{ possibleKeys: item.table.possibleKeys, key: item.table.key }\">\n {{item.table.key}}\n </fs-popover>\n </td>\n <td>\n <div class=\"fs-delimit\">\n <ng-container *ngFor=\"let ref of item.table.ref\">\n <span>{{ref}}</span>\n </ng-container>\n </div>\n </td>\n <td>\n {{item.table.rowsExaminedPerScan}}\n </td>\n <td>\n {{item.table.filtered}}\n </td>\n <td>\n <div class=\"fs-delimit\">\n <ng-container *ngIf=\"item.table.indexCondition\">\n <span>\n <fs-popover \n [template]=\"usingIndexCondition\" \n [maxWidth]=\"null\"\n [data]=\"item.table.indexCondition\">\n Using Index Condition\n </fs-popover>\n </span>\n </ng-container>\n <ng-container *ngIf=\"item.table.attachedCondition\">\n <span>\n <fs-popover \n [template]=\"usingWhere\" \n [maxWidth]=\"null\"\n [data]=\"item.table.attachedCondition\">\n Using Where\n </fs-popover>\n </span>\n </ng-container>\n <ng-container *ngIf=\"item.usingIndex\">\n <span>Using Index</span>\n </ng-container> \n <ng-container *ngIf=\"item.usingFilesort\">\n <span class=\"critical\">Using File Sort</span>\n </ng-container>\n \n <ng-container *ngIf=\"item.usingTemporaryTable\">\n <span class=\"critical\">Temporary Table</span>\n </ng-container>\n </div>\n </td>\n <td> \n <fs-popover [template]=\"tableCostPopover\" [data]=\"item.table?.costInfo\">\n {{item.table?.costInfo.prefixCost}}\n </fs-popover>\n <ng-template #tableCostPopover let-data=\"data\">\n <div>Eval Cost: {{data.evalCost}}</div>\n <div>Read Cost: {{data.readCost}}</div>\n <div>Prefix Cost: {{data.prefixCost}}</div>\n <div>Data Read Per Join: {{data.dataReadPerJoin}}</div>\n </ng-template>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <br>\n </ng-container> \n \n <ng-container *ngIf=\"queryBlock.selectListSubqueries\">\n <br>\n <fs-label>Select List Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.selectListSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container> \n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock, selectId: subquery.queryBlock.selectId, costInfo: subquery.queryBlock.costInfo }\"></ng-container>\n </ng-container>\n </ng-container>\n<!-- \n <ng-container *ngIf=\"queryBlock.queryBlockattachedSubqueries\">\n <br>\n <fs-label>Attached Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.attachedSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container>\n </ng-container>\n </ng-container> -->\n</ng-template>\n\n<ng-template #keysPopover let-data=\"data\">\n <div class=\"fs-delimit\">\n <ng-container *ngFor=\"let possibleKey of data.possibleKeys\">\n <span [ngClass]=\"{ 'query-log-used-key': possibleKey === data.key }\">{{possibleKey}}</span>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #usingWhere let-data=\"data\">\n {{data}}\n</ng-template>\n\n<ng-template #usingIndexCondition let-data=\"data\">\n {{data}}\n</ng-template>\n\n<ng-template #accessTypePopover let-data=\"data\">\n {{accessTypes[data]}}\n</ng-template>\n\n\n<ng-template #queryBlockCritical let-queryBlock=\"queryBlock\">\n <div class=\"fs-delimit\">\n <ng-container *ngIf=\"queryBlock.usingFilesort\">\n <span class=\"critical\">Using File Sort</span>\n </ng-container>\n \n <ng-container *ngIf=\"queryBlock.usingTemporaryTable\">\n <span class=\"critical\">Temporary Table</span>\n </ng-container>\n </div>\n</ng-template>", styles: ["::ng-deep .query-log-used-key{font-weight:700}::ng-deep .explain-popover{white-space:pre}.critical{color:red}fs-clipboard-button{float:right}.query{white-space:break-spaces}.access-type{color:green}.access-type.fulltext,.access-type.index,.access-type.range{color:orange}.access-type.ALL{color:red}\n"], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i3$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { type: i2$1.FsClipboardButtonComponent, selector: "fs-clipboard-button", inputs: ["content", "tooltip"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i7.FsPopoverComponent, selector: "fs-popover" }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i4$1.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fsFormatTruncate": i10.FsFormatTruncatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: QueryLogComponent, decorators: [{
122
- type: Component,
123
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>Query Log</h1>\n <mat-dialog-content>\n <div class=\"fs-row.gap-large\">\n <fs-label-field>\n <fs-label>Duration</fs-label>\n {{queryLog.duration}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Optimized</fs-label>\n {{queryLog.optimized ? 'Yes' : 'No'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Query Cost</fs-label>\n {{queryLog.queryCost}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Raw Explain</fs-label>\n <a (click)=\"openExplain()\">View</a>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>URL</fs-label>\n {{queryLog.path | fsFormatTruncate: 50}}\n </fs-label-field>\n </div>\n\n <mat-tab-group>\n <mat-tab label=\"Query\">\n <fs-clipboard-button\n [content]=\"queryLog.prettyQuery\">\n </fs-clipboard-button>\n <div [innerHTML]=\"queryLog.prettyQuery\" class=\"query\"></div>\n </mat-tab>\n \n <mat-tab label=\"Explain\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock, selectId: queryBlock.selectId, costInfo: queryBlock.costInfo }\"></ng-container>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n\n<ng-template #nestedLoop let-queryBlock=\"queryBlock\" let-selectId=\"selectId\" let-costInfo=\"costInfo\">\n <ng-container *ngIf=\"selectId\">\n <h1>Select {{selectId}}</h1>\n </ng-container>\n \n <div class=\"fs-row.gap-large\">\n <ng-container *ngIf=\"costInfo?.queryCost\">\n <fs-label-field>\n <fs-label>Query Cost</fs-label>\n {{costInfo.queryCost}}\n </fs-label-field>\n </ng-container>\n <ng-container *ngIf=\"queryBlock.orderingOperation\">\n <fs-label-field>\n <fs-label>Ordering Operation</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.orderingOperation }\"></ng-container>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.groupingOperation\">\n <fs-label-field>\n <fs-label>Grouping Operation</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.groupingOperation }\"></ng-container>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.duplicatesRemoval\">\n <fs-label-field>\n <fs-label>Duplicates Removal</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.duplicatesRemoval }\"></ng-container>\n </fs-label-field>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"queryBlock.orderingOperation\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.orderingOperation }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.groupingOperation\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.groupingOperation }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.duplicatesRemoval\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.duplicatesRemoval }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.table\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: { nestedLoop: [ queryBlock ]} }\"></ng-container>\n \n <ng-container *ngIf=\"queryBlock.table.attachedSubqueries\"> \n <fs-label>Attached Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.table.attachedSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container> \n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock, selectId: subquery.queryBlock.selectId, costInfo: subquery.queryBlock.costInfo }\"></ng-container>\n </ng-container>\n </ng-container> \n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.nestedLoop\">\n <table class=\"fs-list-table style-line\">\n <thead>\n <tr>\n <th>Table</th>\n <th>Type</th>\n <th>Keys</th>\n <th>Ref</th>\n <th>Rows</th>\n <th>Filtered</th>\n <th>Extra</th>\n <th>Cost</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of queryBlock.nestedLoop; let index = index\">\n <tr>\n <td>\n {{item.table.tableName}}\n </td>\n <td>\n <fs-popover [template]=\"accessTypePopover\" [data]=\"item.table.accessType\">\n <span class=\"access-type\" [ngClass]=\"item.table.accessType\">{{item.table.accessType}}</span>\n </fs-popover> \n </td>\n <td>\n <fs-popover \n [template]=\"keysPopover\"\n [maxWidth]=\"null\"\n [data]=\"{ possibleKeys: item.table.possibleKeys, key: item.table.key }\">\n {{item.table.key}}\n </fs-popover>\n </td>\n <td>\n <div class=\"fs-delimit\">\n <ng-container *ngFor=\"let ref of item.table.ref\">\n <span>{{ref}}</span>\n </ng-container>\n </div>\n </td>\n <td>\n {{item.table.rowsExaminedPerScan}}\n </td>\n <td>\n {{item.table.filtered}}\n </td>\n <td>\n <div class=\"fs-delimit\">\n <ng-container *ngIf=\"item.table.indexCondition\">\n <span>\n <fs-popover \n [template]=\"usingIndexCondition\" \n [maxWidth]=\"null\"\n [data]=\"item.table.indexCondition\">\n Using Index Condition\n </fs-popover>\n </span>\n </ng-container>\n <ng-container *ngIf=\"item.table.attachedCondition\">\n <span>\n <fs-popover \n [template]=\"usingWhere\" \n [maxWidth]=\"null\"\n [data]=\"item.table.attachedCondition\">\n Using Where\n </fs-popover>\n </span>\n </ng-container>\n <ng-container *ngIf=\"item.usingIndex\">\n <span>Using Index</span>\n </ng-container> \n <ng-container *ngIf=\"item.usingFilesort\">\n <span class=\"critical\">Using File Sort</span>\n </ng-container>\n \n <ng-container *ngIf=\"item.usingTemporaryTable\">\n <span class=\"critical\">Temporary Table</span>\n </ng-container>\n </div>\n </td>\n <td> \n <fs-popover [template]=\"tableCostPopover\" [data]=\"item.table?.costInfo\">\n {{item.table?.costInfo.prefixCost}}\n </fs-popover>\n <ng-template #tableCostPopover let-data=\"data\">\n <div>Eval Cost: {{data.evalCost}}</div>\n <div>Read Cost: {{data.readCost}}</div>\n <div>Prefix Cost: {{data.prefixCost}}</div>\n <div>Data Read Per Join: {{data.dataReadPerJoin}}</div>\n </ng-template>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <br>\n </ng-container> \n \n <ng-container *ngIf=\"queryBlock.selectListSubqueries\">\n <br>\n <fs-label>Select List Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.selectListSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container> \n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock, selectId: subquery.queryBlock.selectId, costInfo: subquery.queryBlock.costInfo }\"></ng-container>\n </ng-container>\n </ng-container>\n<!-- \n <ng-container *ngIf=\"queryBlock.queryBlockattachedSubqueries\">\n <br>\n <fs-label>Attached Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.attachedSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container>\n </ng-container>\n </ng-container> -->\n</ng-template>\n\n<ng-template #keysPopover let-data=\"data\">\n <div class=\"fs-delimit\">\n <ng-container *ngFor=\"let possibleKey of data.possibleKeys\">\n <span [ngClass]=\"{ 'query-log-used-key': possibleKey === data.key }\">{{possibleKey}}</span>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #usingWhere let-data=\"data\">\n {{data}}\n</ng-template>\n\n<ng-template #usingIndexCondition let-data=\"data\">\n {{data}}\n</ng-template>\n\n<ng-template #accessTypePopover let-data=\"data\">\n {{accessTypes[data]}}\n</ng-template>\n\n\n<ng-template #queryBlockCritical let-queryBlock=\"queryBlock\">\n <div class=\"fs-delimit\">\n <ng-container *ngIf=\"queryBlock.usingFilesort\">\n <span class=\"critical\">Using File Sort</span>\n </ng-container>\n \n <ng-container *ngIf=\"queryBlock.usingTemporaryTable\">\n <span class=\"critical\">Temporary Table</span>\n </ng-container>\n </div>\n</ng-template>", styles: ["::ng-deep .query-log-used-key{font-weight:700}::ng-deep .explain-popover{white-space:pre}.critical{color:red}fs-clipboard-button{float:right}.query{white-space:break-spaces}.access-type{color:green}.access-type.fulltext,.access-type.index,.access-type.range{color:orange}.access-type.ALL{color:red}\n"] }]
124
- }], ctorParameters: function () {
125
- return [{ type: undefined, decorators: [{
126
- type: Inject,
127
- args: [MAT_DIALOG_DATA]
128
- }] }, { type: i1.MatDialog }];
83
+ class QueryLogComponent {
84
+ constructor(_data, _dialog) {
85
+ this._data = _data;
86
+ this._dialog = _dialog;
87
+ this.accessTypes = {
88
+ NULL: 'This access method means MySQL can resolve the query during the optimization phase and will not even access the table or index during the execution stage.',
89
+ system: 'The table is empty or has one row.',
90
+ const: 'The value of the column can be treated as a constant (there is one row matching the query). Note: Primary Key Lookup, Unique Index Lookup',
91
+ eq_ref: 'The index is clustered and is being used by the operation (either the index is a PRIMARY KEY or UNIQUE INDEX with all key columns defined as NOT NULL)',
92
+ ref: 'The indexed column was accessed using an equality operator Note: The ref_or_null access type is a variation on ref. It means MySQL must do a second lookup to find NULL entries after doing the initial lookup.',
93
+ fulltext: 'Operation (JOIN) is using the table’s fulltext index',
94
+ index: 'The entire index is scanned to find a match for the query. Note: The main advantage is that this avoids sorting. The biggest disadvantage is the cost of reading an entire table in index order. This usually means accessing the rows in random order, which is very expensive.',
95
+ index_merge: 'This join type indicates that the Index Merge optimization is used. In this case, the key column in the output row contains a list of indexes used. It indicates a query can make limited use of multiple indexes on a single table.',
96
+ range: 'This type replaces eq_ref for some IN subqueries of the following form: value IN (SELECT primary_key FROM single_table WHERE some_expr)',
97
+ unique_subquery: '',
98
+ ALL: 'MySQL scans the entire table to satisfy the query',
99
+ };
100
+ this.queryLog = _data.queryLog;
101
+ }
102
+ openExplain() {
103
+ this._dialog.open(ExplainComponent, {
104
+ data: { explain: this.explain },
105
+ });
106
+ }
107
+ get explain() {
108
+ return this.queryLog.explain;
109
+ }
110
+ get queryBlock() {
111
+ var _a;
112
+ return (_a = this.explain) === null || _a === void 0 ? void 0 : _a.queryBlock;
113
+ }
114
+ get orderingOperation() {
115
+ var _a;
116
+ return (_a = this.queryBlock) === null || _a === void 0 ? void 0 : _a.orderingOperation;
117
+ }
118
+ }
119
+ QueryLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QueryLogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
120
+ QueryLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: QueryLogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title>Query Log</h1>\n <mat-dialog-content>\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <fs-label-field>\n <fs-label>Duration</fs-label>\n {{queryLog.duration}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Optimized</fs-label>\n {{queryLog.optimized ? 'Yes' : 'No'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Query Cost</fs-label>\n {{queryLog.queryCost}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Raw Explain</fs-label>\n <a (click)=\"openExplain()\">View</a>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>URL</fs-label>\n {{queryLog.path | fsFormatTruncate: 50}}\n </fs-label-field>\n </div>\n\n <mat-tab-group>\n <mat-tab label=\"Query\">\n <fs-clipboard-button\n [content]=\"queryLog.prettyQuery\">\n </fs-clipboard-button>\n <div [innerHTML]=\"queryLog.prettyQuery\" class=\"query\"></div>\n </mat-tab>\n \n <mat-tab label=\"Explain\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock, selectId: queryBlock.selectId, costInfo: queryBlock.costInfo }\"></ng-container>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n\n<ng-template #nestedLoop let-queryBlock=\"queryBlock\" let-selectId=\"selectId\" let-costInfo=\"costInfo\">\n <ng-container *ngIf=\"selectId\">\n <h1>Select {{selectId}}</h1>\n </ng-container>\n \n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <ng-container *ngIf=\"costInfo?.queryCost\">\n <fs-label-field>\n <fs-label>Query Cost</fs-label>\n {{costInfo.queryCost}}\n </fs-label-field>\n </ng-container>\n <ng-container *ngIf=\"queryBlock.orderingOperation\">\n <fs-label-field>\n <fs-label>Ordering Operation</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.orderingOperation }\"></ng-container>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.groupingOperation\">\n <fs-label-field>\n <fs-label>Grouping Operation</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.groupingOperation }\"></ng-container>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.duplicatesRemoval\">\n <fs-label-field>\n <fs-label>Duplicates Removal</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.duplicatesRemoval }\"></ng-container>\n </fs-label-field>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"queryBlock.orderingOperation\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.orderingOperation }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.groupingOperation\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.groupingOperation }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.duplicatesRemoval\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.duplicatesRemoval }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.table\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: { nestedLoop: [ queryBlock ]} }\"></ng-container>\n \n <ng-container *ngIf=\"queryBlock.table.attachedSubqueries\"> \n <fs-label>Attached Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.table.attachedSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container> \n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock, selectId: subquery.queryBlock.selectId, costInfo: subquery.queryBlock.costInfo }\"></ng-container>\n </ng-container>\n </ng-container> \n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.nestedLoop\">\n <table class=\"fs-list-table style-line\">\n <thead>\n <tr>\n <th>Table</th>\n <th>Type</th>\n <th>Keys</th>\n <th>Ref</th>\n <th>Rows</th>\n <th>Filtered</th>\n <th>Extra</th>\n <th>Cost</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of queryBlock.nestedLoop; let index = index\">\n <tr>\n <td>\n {{item.table.tableName}}\n </td>\n <td>\n <fs-popover [template]=\"accessTypePopover\" [data]=\"item.table.accessType\">\n <span class=\"access-type\" [ngClass]=\"item.table.accessType\">{{item.table.accessType}}</span>\n </fs-popover> \n </td>\n <td>\n <fs-popover \n [template]=\"keysPopover\"\n [maxWidth]=\"null\"\n [data]=\"{ possibleKeys: item.table.possibleKeys, key: item.table.key }\">\n {{item.table.key}}\n </fs-popover>\n </td>\n <td>\n <div class=\"fs-delimit\">\n <ng-container *ngFor=\"let ref of item.table.ref\">\n <span>{{ref}}</span>\n </ng-container>\n </div>\n </td>\n <td>\n {{item.table.rowsExaminedPerScan}}\n </td>\n <td>\n {{item.table.filtered}}\n </td>\n <td>\n <div class=\"fs-delimit\">\n <ng-container *ngIf=\"item.table.indexCondition\">\n <span>\n <fs-popover \n [template]=\"usingIndexCondition\" \n [maxWidth]=\"null\"\n [data]=\"item.table.indexCondition\">\n Using Index Condition\n </fs-popover>\n </span>\n </ng-container>\n <ng-container *ngIf=\"item.table.attachedCondition\">\n <span>\n <fs-popover \n [template]=\"usingWhere\" \n [maxWidth]=\"null\"\n [data]=\"item.table.attachedCondition\">\n Using Where\n </fs-popover>\n </span>\n </ng-container>\n <ng-container *ngIf=\"item.usingIndex\">\n <span>Using Index</span>\n </ng-container> \n <ng-container *ngIf=\"item.usingFilesort\">\n <span class=\"critical\">Using File Sort</span>\n </ng-container>\n \n <ng-container *ngIf=\"item.usingTemporaryTable\">\n <span class=\"critical\">Temporary Table</span>\n </ng-container>\n </div>\n </td>\n <td> \n <fs-popover [template]=\"tableCostPopover\" [data]=\"item.table?.costInfo\">\n {{item.table?.costInfo.prefixCost}}\n </fs-popover>\n <ng-template #tableCostPopover let-data=\"data\">\n <div>Eval Cost: {{data.evalCost}}</div>\n <div>Read Cost: {{data.readCost}}</div>\n <div>Prefix Cost: {{data.prefixCost}}</div>\n <div>Data Read Per Join: {{data.dataReadPerJoin}}</div>\n </ng-template>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <br>\n </ng-container> \n \n <ng-container *ngIf=\"queryBlock.selectListSubqueries\">\n <br>\n <fs-label>Select List Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.selectListSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container> \n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock, selectId: subquery.queryBlock.selectId, costInfo: subquery.queryBlock.costInfo }\"></ng-container>\n </ng-container>\n </ng-container>\n<!-- \n <ng-container *ngIf=\"queryBlock.queryBlockattachedSubqueries\">\n <br>\n <fs-label>Attached Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.attachedSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container>\n </ng-container>\n </ng-container> -->\n</ng-template>\n\n<ng-template #keysPopover let-data=\"data\">\n <div class=\"fs-delimit\">\n <ng-container *ngFor=\"let possibleKey of data.possibleKeys\">\n <span [ngClass]=\"{ 'query-log-used-key': possibleKey === data.key }\">{{possibleKey}}</span>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #usingWhere let-data=\"data\">\n {{data}}\n</ng-template>\n\n<ng-template #usingIndexCondition let-data=\"data\">\n {{data}}\n</ng-template>\n\n<ng-template #accessTypePopover let-data=\"data\">\n {{accessTypes[data]}}\n</ng-template>\n\n\n<ng-template #queryBlockCritical let-queryBlock=\"queryBlock\">\n <div class=\"fs-delimit\">\n <ng-container *ngIf=\"queryBlock.usingFilesort\">\n <span class=\"critical\">Using File Sort</span>\n </ng-container>\n \n <ng-container *ngIf=\"queryBlock.usingTemporaryTable\">\n <span class=\"critical\">Temporary Table</span>\n </ng-container>\n </div>\n</ng-template>", styles: ["::ng-deep .query-log-used-key{font-weight:700}::ng-deep .explain-popover{white-space:pre}.critical{color:red}fs-clipboard-button{float:right}.query{white-space:break-spaces}.access-type{color:green}.access-type.fulltext,.access-type.index,.access-type.range{color:orange}.access-type.ALL{color:red}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i4$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i3.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i8.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i8.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i7.FsPopoverComponent, selector: "fs-popover" }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { kind: "component", type: i2$1.FsClipboardButtonComponent, selector: "fs-clipboard-button", inputs: ["content", "tooltip"] }, { kind: "pipe", type: i10.FsFormatTruncatePipe, name: "fsFormatTruncate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QueryLogComponent, decorators: [{
122
+ type: Component,
123
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog>\n <h1 mat-dialog-title>Query Log</h1>\n <mat-dialog-content>\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <fs-label-field>\n <fs-label>Duration</fs-label>\n {{queryLog.duration}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Optimized</fs-label>\n {{queryLog.optimized ? 'Yes' : 'No'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Query Cost</fs-label>\n {{queryLog.queryCost}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Raw Explain</fs-label>\n <a (click)=\"openExplain()\">View</a>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>URL</fs-label>\n {{queryLog.path | fsFormatTruncate: 50}}\n </fs-label-field>\n </div>\n\n <mat-tab-group>\n <mat-tab label=\"Query\">\n <fs-clipboard-button\n [content]=\"queryLog.prettyQuery\">\n </fs-clipboard-button>\n <div [innerHTML]=\"queryLog.prettyQuery\" class=\"query\"></div>\n </mat-tab>\n \n <mat-tab label=\"Explain\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock, selectId: queryBlock.selectId, costInfo: queryBlock.costInfo }\"></ng-container>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n\n<ng-template #nestedLoop let-queryBlock=\"queryBlock\" let-selectId=\"selectId\" let-costInfo=\"costInfo\">\n <ng-container *ngIf=\"selectId\">\n <h1>Select {{selectId}}</h1>\n </ng-container>\n \n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <ng-container *ngIf=\"costInfo?.queryCost\">\n <fs-label-field>\n <fs-label>Query Cost</fs-label>\n {{costInfo.queryCost}}\n </fs-label-field>\n </ng-container>\n <ng-container *ngIf=\"queryBlock.orderingOperation\">\n <fs-label-field>\n <fs-label>Ordering Operation</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.orderingOperation }\"></ng-container>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.groupingOperation\">\n <fs-label-field>\n <fs-label>Grouping Operation</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.groupingOperation }\"></ng-container>\n </fs-label-field>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.duplicatesRemoval\">\n <fs-label-field>\n <fs-label>Duplicates Removal</fs-label>\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.duplicatesRemoval }\"></ng-container>\n </fs-label-field>\n </ng-container>\n </div>\n\n <ng-container *ngIf=\"queryBlock.orderingOperation\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.orderingOperation }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.groupingOperation\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.groupingOperation }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.duplicatesRemoval\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: queryBlock.duplicatesRemoval }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.table\">\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: { nestedLoop: [ queryBlock ]} }\"></ng-container>\n \n <ng-container *ngIf=\"queryBlock.table.attachedSubqueries\"> \n <fs-label>Attached Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.table.attachedSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container> \n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock, selectId: subquery.queryBlock.selectId, costInfo: subquery.queryBlock.costInfo }\"></ng-container>\n </ng-container>\n </ng-container> \n </ng-container>\n\n <ng-container *ngIf=\"queryBlock.nestedLoop\">\n <table class=\"fs-list-table style-line\">\n <thead>\n <tr>\n <th>Table</th>\n <th>Type</th>\n <th>Keys</th>\n <th>Ref</th>\n <th>Rows</th>\n <th>Filtered</th>\n <th>Extra</th>\n <th>Cost</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let item of queryBlock.nestedLoop; let index = index\">\n <tr>\n <td>\n {{item.table.tableName}}\n </td>\n <td>\n <fs-popover [template]=\"accessTypePopover\" [data]=\"item.table.accessType\">\n <span class=\"access-type\" [ngClass]=\"item.table.accessType\">{{item.table.accessType}}</span>\n </fs-popover> \n </td>\n <td>\n <fs-popover \n [template]=\"keysPopover\"\n [maxWidth]=\"null\"\n [data]=\"{ possibleKeys: item.table.possibleKeys, key: item.table.key }\">\n {{item.table.key}}\n </fs-popover>\n </td>\n <td>\n <div class=\"fs-delimit\">\n <ng-container *ngFor=\"let ref of item.table.ref\">\n <span>{{ref}}</span>\n </ng-container>\n </div>\n </td>\n <td>\n {{item.table.rowsExaminedPerScan}}\n </td>\n <td>\n {{item.table.filtered}}\n </td>\n <td>\n <div class=\"fs-delimit\">\n <ng-container *ngIf=\"item.table.indexCondition\">\n <span>\n <fs-popover \n [template]=\"usingIndexCondition\" \n [maxWidth]=\"null\"\n [data]=\"item.table.indexCondition\">\n Using Index Condition\n </fs-popover>\n </span>\n </ng-container>\n <ng-container *ngIf=\"item.table.attachedCondition\">\n <span>\n <fs-popover \n [template]=\"usingWhere\" \n [maxWidth]=\"null\"\n [data]=\"item.table.attachedCondition\">\n Using Where\n </fs-popover>\n </span>\n </ng-container>\n <ng-container *ngIf=\"item.usingIndex\">\n <span>Using Index</span>\n </ng-container> \n <ng-container *ngIf=\"item.usingFilesort\">\n <span class=\"critical\">Using File Sort</span>\n </ng-container>\n \n <ng-container *ngIf=\"item.usingTemporaryTable\">\n <span class=\"critical\">Temporary Table</span>\n </ng-container>\n </div>\n </td>\n <td> \n <fs-popover [template]=\"tableCostPopover\" [data]=\"item.table?.costInfo\">\n {{item.table?.costInfo.prefixCost}}\n </fs-popover>\n <ng-template #tableCostPopover let-data=\"data\">\n <div>Eval Cost: {{data.evalCost}}</div>\n <div>Read Cost: {{data.readCost}}</div>\n <div>Prefix Cost: {{data.prefixCost}}</div>\n <div>Data Read Per Join: {{data.dataReadPerJoin}}</div>\n </ng-template>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <br>\n </ng-container> \n \n <ng-container *ngIf=\"queryBlock.selectListSubqueries\">\n <br>\n <fs-label>Select List Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.selectListSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container> \n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock, selectId: subquery.queryBlock.selectId, costInfo: subquery.queryBlock.costInfo }\"></ng-container>\n </ng-container>\n </ng-container>\n<!-- \n <ng-container *ngIf=\"queryBlock.queryBlockattachedSubqueries\">\n <br>\n <fs-label>Attached Subqueries</fs-label>\n <ng-container *ngFor=\"let subquery of queryBlock.attachedSubqueries\">\n <ng-container [ngTemplateOutlet]=\"queryBlockCritical\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"nestedLoop\" [ngTemplateOutletContext]=\"{ queryBlock: subquery.queryBlock }\"></ng-container>\n </ng-container>\n </ng-container> -->\n</ng-template>\n\n<ng-template #keysPopover let-data=\"data\">\n <div class=\"fs-delimit\">\n <ng-container *ngFor=\"let possibleKey of data.possibleKeys\">\n <span [ngClass]=\"{ 'query-log-used-key': possibleKey === data.key }\">{{possibleKey}}</span>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #usingWhere let-data=\"data\">\n {{data}}\n</ng-template>\n\n<ng-template #usingIndexCondition let-data=\"data\">\n {{data}}\n</ng-template>\n\n<ng-template #accessTypePopover let-data=\"data\">\n {{accessTypes[data]}}\n</ng-template>\n\n\n<ng-template #queryBlockCritical let-queryBlock=\"queryBlock\">\n <div class=\"fs-delimit\">\n <ng-container *ngIf=\"queryBlock.usingFilesort\">\n <span class=\"critical\">Using File Sort</span>\n </ng-container>\n \n <ng-container *ngIf=\"queryBlock.usingTemporaryTable\">\n <span class=\"critical\">Temporary Table</span>\n </ng-container>\n </div>\n</ng-template>", styles: ["::ng-deep .query-log-used-key{font-weight:700}::ng-deep .explain-popover{white-space:pre}.critical{color:red}fs-clipboard-button{float:right}.query{white-space:break-spaces}.access-type{color:green}.access-type.fulltext,.access-type.index,.access-type.range{color:orange}.access-type.ALL{color:red}\n"] }]
124
+ }], ctorParameters: function () {
125
+ return [{ type: undefined, decorators: [{
126
+ type: Inject,
127
+ args: [MAT_DIALOG_DATA]
128
+ }] }, { type: i1.MatDialog }];
129
129
  } });
130
130
 
131
- class QueryLogsComponent {
132
- constructor(_dialog) {
133
- this._dialog = _dialog;
134
- }
135
- openQueryLog(queryLog) {
136
- this._dialog.open(QueryLogComponent, {
137
- data: { queryLog },
138
- width: '100%',
139
- });
140
- }
141
- ngOnInit() {
142
- this.listConfig = {
143
- filters: [
144
- {
145
- name: 'keyword',
146
- type: ItemType.Keyword,
147
- label: 'Search',
148
- },
149
- {
150
- name: 'optimized',
151
- type: ItemType.Select,
152
- label: 'Optimization',
153
- values: [
154
- { name: 'Any', value: undefined },
155
- { name: 'Yes', value: 'true' },
156
- { name: 'No', value: 'false' },
157
- ],
158
- },
159
- {
160
- name: 'createDate',
161
- type: ItemType.DateTimeRange,
162
- label: ['From Date', 'To Date'],
163
- },
164
- {
165
- name: 'duration',
166
- type: ItemType.Range,
167
- label: ['Min Duration', 'Max Duration'],
168
- },
169
- ],
170
- actions: [
171
- {
172
- label: 'Purge',
173
- primary: false,
174
- click: () => {
175
- this.purgeQueryLogs()
176
- .subscribe(() => {
177
- this.list.reload();
178
- });
179
- },
180
- },
181
- ],
182
- fetch: (query) => {
183
- return this.loadQueryLogs(query)
184
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
185
- },
186
- };
187
- }
188
- }
189
- QueryLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: QueryLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
190
- QueryLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: QueryLogsComponent, selector: "fs-system-query-logs", inputs: { loadQueryLogs: "loadQueryLogs", purgeQueryLogs: "purgeQueryLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column title=\"Optimized\" name=\"optimized\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <span [ngClass]=\"{ optimized: row.optimized, 'not-optimized': !row.optimized }\">\n {{row.optimized ? 'Yes' : 'No'}}\n </span>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Duration\" name=\"duration\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.duration}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Cost\" name=\"query_cost\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.queryCost}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Query\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openQueryLog(row)\">{{ row.query | fsFormatTruncate: 500 }}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Created\" name=\"query_log_id\" [sortable]=\"true\" [direction]=\"'desc'\" [sortableDefault]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .optimized{color:green}:host ::ng-deep .not-optimized{color:red}\n"], components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fsFormatTruncate": i10.FsFormatTruncatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: QueryLogsComponent, decorators: [{
192
- type: Component,
193
- args: [{ selector: 'fs-system-query-logs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column title=\"Optimized\" name=\"optimized\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <span [ngClass]=\"{ optimized: row.optimized, 'not-optimized': !row.optimized }\">\n {{row.optimized ? 'Yes' : 'No'}}\n </span>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Duration\" name=\"duration\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.duration}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Cost\" name=\"query_cost\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.queryCost}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Query\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openQueryLog(row)\">{{ row.query | fsFormatTruncate: 500 }}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Created\" name=\"query_log_id\" [sortable]=\"true\" [direction]=\"'desc'\" [sortableDefault]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .optimized{color:green}:host ::ng-deep .not-optimized{color:red}\n"] }]
194
- }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
195
- type: ViewChild,
196
- args: [FsListComponent]
197
- }], loadQueryLogs: [{
198
- type: Input
199
- }], purgeQueryLogs: [{
200
- type: Input
131
+ class QueryLogsComponent {
132
+ constructor(_dialog) {
133
+ this._dialog = _dialog;
134
+ }
135
+ openQueryLog(queryLog) {
136
+ this._dialog.open(QueryLogComponent, {
137
+ data: { queryLog },
138
+ width: '100%',
139
+ });
140
+ }
141
+ ngOnInit() {
142
+ this.listConfig = {
143
+ filters: [
144
+ {
145
+ name: 'keyword',
146
+ type: ItemType.Keyword,
147
+ label: 'Search',
148
+ },
149
+ {
150
+ name: 'optimized',
151
+ type: ItemType.Select,
152
+ label: 'Optimization',
153
+ values: [
154
+ { name: 'Any', value: undefined },
155
+ { name: 'Yes', value: 'true' },
156
+ { name: 'No', value: 'false' },
157
+ ],
158
+ },
159
+ {
160
+ name: 'createDate',
161
+ type: ItemType.DateTimeRange,
162
+ label: ['From Date', 'To Date'],
163
+ },
164
+ {
165
+ name: 'duration',
166
+ type: ItemType.Range,
167
+ label: ['Min Duration', 'Max Duration'],
168
+ },
169
+ ],
170
+ actions: [
171
+ {
172
+ label: 'Purge',
173
+ primary: false,
174
+ click: () => {
175
+ this.purgeQueryLogs()
176
+ .subscribe(() => {
177
+ this.list.reload();
178
+ });
179
+ },
180
+ },
181
+ ],
182
+ fetch: (query) => {
183
+ return this.loadQueryLogs(query)
184
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
185
+ },
186
+ };
187
+ }
188
+ }
189
+ QueryLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QueryLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
190
+ QueryLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: QueryLogsComponent, selector: "fs-system-query-logs", inputs: { loadQueryLogs: "loadQueryLogs", purgeQueryLogs: "purgeQueryLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column title=\"Optimized\" name=\"optimized\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <span [ngClass]=\"{ optimized: row.optimized, 'not-optimized': !row.optimized }\">\n {{row.optimized ? 'Yes' : 'No'}}\n </span>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Duration\" name=\"duration\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.duration}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Cost\" name=\"query_cost\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.queryCost}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Query\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openQueryLog(row)\">{{ row.query | fsFormatTruncate: 500 }}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Created\" name=\"query_log_id\" [sortable]=\"true\" [direction]=\"'desc'\" [sortableDefault]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .optimized{color:green}:host ::ng-deep .not-optimized{color:red}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { kind: "component", type: i5.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i5.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { kind: "directive", type: i5.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "pipe", type: i10.FsFormatTruncatePipe, name: "fsFormatTruncate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QueryLogsComponent, decorators: [{
192
+ type: Component,
193
+ args: [{ selector: 'fs-system-query-logs', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column title=\"Optimized\" name=\"optimized\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <span [ngClass]=\"{ optimized: row.optimized, 'not-optimized': !row.optimized }\">\n {{row.optimized ? 'Yes' : 'No'}}\n </span>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Duration\" name=\"duration\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.duration}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Cost\" name=\"query_cost\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.queryCost}}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Query\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openQueryLog(row)\">{{ row.query | fsFormatTruncate: 500 }}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Created\" name=\"query_log_id\" [sortable]=\"true\" [direction]=\"'desc'\" [sortableDefault]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .optimized{color:green}:host ::ng-deep .not-optimized{color:red}\n"] }]
194
+ }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
195
+ type: ViewChild,
196
+ args: [FsListComponent]
197
+ }], loadQueryLogs: [{
198
+ type: Input
199
+ }], purgeQueryLogs: [{
200
+ type: Input
201
201
  }] } });
202
202
 
203
- class FsSystemQueryLogsModule {
204
- }
205
- FsSystemQueryLogsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemQueryLogsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
206
- FsSystemQueryLogsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemQueryLogsModule, declarations: [QueryLogsComponent,
207
- QueryLogComponent,
208
- ExplainComponent], imports: [CommonModule,
209
- RouterModule,
210
- CommonModule,
211
- FormsModule,
212
- MatTabsModule,
213
- MatButtonModule,
214
- MatDialogModule,
215
- FsFormModule,
216
- FsLabelModule,
217
- FsPopoverModule,
218
- FsCommonModule,
219
- FsDateModule,
220
- FsDialogModule,
221
- FsListModule,
222
- FsClipboardModule], exports: [QueryLogsComponent] });
223
- FsSystemQueryLogsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemQueryLogsModule, imports: [[
224
- CommonModule,
225
- RouterModule,
226
- CommonModule,
227
- FormsModule,
228
- MatTabsModule,
229
- MatButtonModule,
230
- MatDialogModule,
231
- FsFormModule,
232
- FsLabelModule,
233
- FsPopoverModule,
234
- FsCommonModule,
235
- FsDateModule,
236
- FsDialogModule,
237
- FsListModule,
238
- FsClipboardModule,
239
- ]] });
240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemQueryLogsModule, decorators: [{
241
- type: NgModule,
242
- args: [{
243
- imports: [
244
- CommonModule,
245
- RouterModule,
246
- CommonModule,
247
- FormsModule,
248
- MatTabsModule,
249
- MatButtonModule,
250
- MatDialogModule,
251
- FsFormModule,
252
- FsLabelModule,
253
- FsPopoverModule,
254
- FsCommonModule,
255
- FsDateModule,
256
- FsDialogModule,
257
- FsListModule,
258
- FsClipboardModule,
259
- ],
260
- declarations: [
261
- QueryLogsComponent,
262
- QueryLogComponent,
263
- ExplainComponent,
264
- ],
265
- exports: [
266
- QueryLogsComponent,
267
- ],
268
- }]
203
+ class FsSystemQueryLogsModule {
204
+ }
205
+ FsSystemQueryLogsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemQueryLogsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
206
+ FsSystemQueryLogsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: FsSystemQueryLogsModule, declarations: [QueryLogsComponent,
207
+ QueryLogComponent,
208
+ ExplainComponent], imports: [CommonModule,
209
+ RouterModule,
210
+ CommonModule,
211
+ FormsModule,
212
+ MatTabsModule,
213
+ MatButtonModule,
214
+ MatDialogModule,
215
+ FsFormModule,
216
+ FsLabelModule,
217
+ FsPopoverModule,
218
+ FsCommonModule,
219
+ FsDateModule,
220
+ FsDialogModule,
221
+ FsListModule,
222
+ FsClipboardModule], exports: [QueryLogsComponent] });
223
+ FsSystemQueryLogsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemQueryLogsModule, imports: [CommonModule,
224
+ RouterModule,
225
+ CommonModule,
226
+ FormsModule,
227
+ MatTabsModule,
228
+ MatButtonModule,
229
+ MatDialogModule,
230
+ FsFormModule,
231
+ FsLabelModule,
232
+ FsPopoverModule,
233
+ FsCommonModule,
234
+ FsDateModule,
235
+ FsDialogModule,
236
+ FsListModule,
237
+ FsClipboardModule] });
238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemQueryLogsModule, decorators: [{
239
+ type: NgModule,
240
+ args: [{
241
+ imports: [
242
+ CommonModule,
243
+ RouterModule,
244
+ CommonModule,
245
+ FormsModule,
246
+ MatTabsModule,
247
+ MatButtonModule,
248
+ MatDialogModule,
249
+ FsFormModule,
250
+ FsLabelModule,
251
+ FsPopoverModule,
252
+ FsCommonModule,
253
+ FsDateModule,
254
+ FsDialogModule,
255
+ FsListModule,
256
+ FsClipboardModule,
257
+ ],
258
+ declarations: [
259
+ QueryLogsComponent,
260
+ QueryLogComponent,
261
+ ExplainComponent,
262
+ ],
263
+ exports: [
264
+ QueryLogsComponent,
265
+ ],
266
+ }]
269
267
  }] });
270
268
 
271
- var CronState;
272
- (function (CronState) {
273
- CronState["Running"] = "running";
274
- CronState["Idle"] = "idle";
275
- CronState["Failed"] = "failed";
276
- CronState["Queued"] = "queued";
277
- CronState["Disabled"] = "disabled";
278
- CronState["Enabled"] = "enabled";
279
- CronState["Killing"] = "killing";
269
+ var CronState;
270
+ (function (CronState) {
271
+ CronState["Running"] = "running";
272
+ CronState["Idle"] = "idle";
273
+ CronState["Failed"] = "failed";
274
+ CronState["Queued"] = "queued";
275
+ CronState["Disabled"] = "disabled";
276
+ CronState["Enabled"] = "enabled";
277
+ CronState["Killing"] = "killing";
280
278
  })(CronState || (CronState = {}));
281
279
 
282
- var SettingInterfaceType;
283
- (function (SettingInterfaceType) {
284
- SettingInterfaceType["RadioButton"] = "R";
285
- SettingInterfaceType["InputBox"] = "I";
286
- SettingInterfaceType["Textarea"] = "T";
287
- SettingInterfaceType["Select"] = "D";
288
- SettingInterfaceType["SelectMultiple"] = "W";
289
- SettingInterfaceType["Date"] = "A";
290
- SettingInterfaceType["File"] = "F";
291
- SettingInterfaceType["Static"] = "S";
292
- SettingInterfaceType["Password"] = "P";
293
- SettingInterfaceType["Time"] = "M";
294
- SettingInterfaceType["None"] = "N";
295
- SettingInterfaceType["Color"] = "C";
280
+ var SettingInterfaceType;
281
+ (function (SettingInterfaceType) {
282
+ SettingInterfaceType["RadioButton"] = "R";
283
+ SettingInterfaceType["InputBox"] = "I";
284
+ SettingInterfaceType["Textarea"] = "T";
285
+ SettingInterfaceType["Select"] = "D";
286
+ SettingInterfaceType["SelectMultiple"] = "W";
287
+ SettingInterfaceType["Date"] = "A";
288
+ SettingInterfaceType["File"] = "F";
289
+ SettingInterfaceType["Static"] = "S";
290
+ SettingInterfaceType["Password"] = "P";
291
+ SettingInterfaceType["Time"] = "M";
292
+ SettingInterfaceType["None"] = "N";
293
+ SettingInterfaceType["Color"] = "C";
296
294
  })(SettingInterfaceType || (SettingInterfaceType = {}));
297
295
 
298
- var ApiLogState;
299
- (function (ApiLogState) {
300
- ApiLogState["Success"] = "success";
301
- ApiLogState["Failed"] = "failed";
302
- ApiLogState["Deleted"] = "deleted";
296
+ var ApiLogState;
297
+ (function (ApiLogState) {
298
+ ApiLogState["Success"] = "success";
299
+ ApiLogState["Failed"] = "failed";
300
+ ApiLogState["Deleted"] = "deleted";
303
301
  })(ApiLogState || (ApiLogState = {}));
304
302
 
305
- var ProcessState;
306
- (function (ProcessState) {
307
- ProcessState["Queued"] = "Q";
308
- ProcessState["Running"] = "R";
309
- ProcessState["Completed"] = "C";
310
- ProcessState["Killed"] = "K";
311
- ProcessState["Deleted"] = "D";
312
- ProcessState["Failed"] = "F";
303
+ var ProcessState;
304
+ (function (ProcessState) {
305
+ ProcessState["Queued"] = "Q";
306
+ ProcessState["Running"] = "R";
307
+ ProcessState["Completed"] = "C";
308
+ ProcessState["Killed"] = "K";
309
+ ProcessState["Deleted"] = "D";
310
+ ProcessState["Failed"] = "F";
313
311
  })(ProcessState || (ProcessState = {}));
314
312
 
315
- var CronLogState;
316
- (function (CronLogState) {
317
- CronLogState["Message"] = "message";
318
- CronLogState["Disabled"] = "disabled";
319
- CronLogState["Enabled"] = "enabled";
320
- CronLogState["Started"] = "started";
321
- CronLogState["Running"] = "running";
322
- CronLogState["Completed"] = "completed";
323
- CronLogState["Failed"] = "failed";
324
- CronLogState["Killed"] = "killed";
325
- CronLogState["Queued"] = "queued";
326
- CronLogState["Reset"] = "reset";
327
- CronLogState["Stagnant"] = "stagnant";
328
- CronLogState["LongRunning"] = "long_running";
313
+ var CronLogState;
314
+ (function (CronLogState) {
315
+ CronLogState["Message"] = "message";
316
+ CronLogState["Disabled"] = "disabled";
317
+ CronLogState["Enabled"] = "enabled";
318
+ CronLogState["Started"] = "started";
319
+ CronLogState["Running"] = "running";
320
+ CronLogState["Completed"] = "completed";
321
+ CronLogState["Failed"] = "failed";
322
+ CronLogState["Killed"] = "killed";
323
+ CronLogState["Queued"] = "queued";
324
+ CronLogState["Reset"] = "reset";
325
+ CronLogState["Stagnant"] = "stagnant";
326
+ CronLogState["LongRunning"] = "long_running";
329
327
  })(CronLogState || (CronLogState = {}));
330
328
 
331
- const ApiLogStates = [
332
- { name: 'Success', value: ApiLogState.Success },
333
- { name: 'Failed', value: ApiLogState.Failed },
334
- { name: 'Deleted', value: ApiLogState.Deleted }
329
+ const ApiLogStates = [
330
+ { name: 'Success', value: ApiLogState.Success },
331
+ { name: 'Failed', value: ApiLogState.Failed },
332
+ { name: 'Deleted', value: ApiLogState.Deleted }
335
333
  ];
336
334
 
337
- const CronLogStates = [
338
- { name: 'Message', value: CronLogState.Message, color: '#29B7FF' },
339
- { name: 'Disabled', value: CronLogState.Disabled, color: '#29B7FF' },
340
- { name: 'Reset', value: CronLogState.Reset, color: '#29B7FF' },
341
- { name: 'Enabled', value: CronLogState.Enabled, color: '#29B7FF' },
342
- { name: 'Queued', value: CronLogState.Queued, color: '#29B7FF' },
343
- { name: 'Started', value: CronLogState.Started, color: '#D17333' },
344
- { name: 'Running', value: CronLogState.Running, color: '#34BD43' },
345
- { name: 'Completed', value: CronLogState.Completed, color: '#34BD43' },
346
- { name: 'Failed', value: CronLogState.Failed, color: '#FA7567' },
347
- { name: 'Killed', value: CronLogState.Killed, color: '#FA7567' },
348
- { name: 'Stagnant', value: CronLogState.Stagnant, color: '#FA7567' },
349
- { name: 'Long Running', value: CronLogState.LongRunning, color: '#FA7567' },
335
+ const CronLogStates = [
336
+ { name: 'Message', value: CronLogState.Message, color: '#29B7FF' },
337
+ { name: 'Disabled', value: CronLogState.Disabled, color: '#29B7FF' },
338
+ { name: 'Reset', value: CronLogState.Reset, color: '#29B7FF' },
339
+ { name: 'Enabled', value: CronLogState.Enabled, color: '#29B7FF' },
340
+ { name: 'Queued', value: CronLogState.Queued, color: '#29B7FF' },
341
+ { name: 'Started', value: CronLogState.Started, color: '#D17333' },
342
+ { name: 'Running', value: CronLogState.Running, color: '#34BD43' },
343
+ { name: 'Completed', value: CronLogState.Completed, color: '#34BD43' },
344
+ { name: 'Failed', value: CronLogState.Failed, color: '#FA7567' },
345
+ { name: 'Killed', value: CronLogState.Killed, color: '#FA7567' },
346
+ { name: 'Stagnant', value: CronLogState.Stagnant, color: '#FA7567' },
347
+ { name: 'Long Running', value: CronLogState.LongRunning, color: '#FA7567' },
350
348
  ];
351
349
 
352
- const CronProcessStates = [
353
- { name: 'Running', value: 'running' },
354
- { name: 'Stopped', value: 'stopped' },
350
+ const CronProcessStates = [
351
+ { name: 'Running', value: 'running' },
352
+ { name: 'Stopped', value: 'stopped' },
355
353
  ];
356
354
 
357
- const CronStates = [
358
- { name: 'Running', value: CronState.Running },
359
- { name: 'Idle', value: CronState.Idle },
360
- { name: 'Failed', value: CronState.Failed },
361
- { name: 'Queued', value: CronState.Queued },
362
- { name: 'Disabled', value: CronState.Disabled },
363
- { name: 'Killing', value: CronState.Killing },
364
- { name: 'Enabled', value: CronState.Enabled },
355
+ const CronStates = [
356
+ { name: 'Running', value: CronState.Running },
357
+ { name: 'Idle', value: CronState.Idle },
358
+ { name: 'Failed', value: CronState.Failed },
359
+ { name: 'Queued', value: CronState.Queued },
360
+ { name: 'Disabled', value: CronState.Disabled },
361
+ { name: 'Killing', value: CronState.Killing },
362
+ { name: 'Enabled', value: CronState.Enabled },
365
363
  ];
366
364
 
367
- const ProcessProcessStates = [
368
- { name: 'Missing', value: 'missing' },
369
- { name: 'Running', value: 'running' },
370
- { name: 'Stopped', value: 'stopped' },
365
+ const ProcessProcessStates = [
366
+ { name: 'Missing', value: 'missing' },
367
+ { name: 'Running', value: 'running' },
368
+ { name: 'Stopped', value: 'stopped' },
371
369
  ];
372
370
 
373
- const ProcessStates = [
374
- { name: 'Queued', value: ProcessState.Queued },
375
- { name: 'Running', value: ProcessState.Running },
376
- { name: 'Completed', value: ProcessState.Completed },
377
- { name: 'Killed', value: ProcessState.Killed },
378
- { name: 'Failed', value: ProcessState.Failed },
379
- { name: 'Deleted', value: ProcessState.Deleted }
371
+ const ProcessStates = [
372
+ { name: 'Queued', value: ProcessState.Queued },
373
+ { name: 'Running', value: ProcessState.Running },
374
+ { name: 'Completed', value: ProcessState.Completed },
375
+ { name: 'Killed', value: ProcessState.Killed },
376
+ { name: 'Failed', value: ProcessState.Failed },
377
+ { name: 'Deleted', value: ProcessState.Deleted }
380
378
  ];
381
379
 
382
- const SettingInterfaceTypes = [
383
- { name: 'RadioButton', value: SettingInterfaceType.RadioButton },
384
- { name: 'InputBox', value: SettingInterfaceType.InputBox },
385
- { name: 'Textarea', value: SettingInterfaceType.Textarea },
386
- { name: 'DropDown', value: SettingInterfaceType.Select },
387
- { name: 'File', value: SettingInterfaceType.File },
388
- { name: 'Static', value: SettingInterfaceType.Static },
389
- { name: 'Password', value: SettingInterfaceType.Password },
390
- { name: 'Color', value: SettingInterfaceType.Color }
380
+ const SettingInterfaceTypes = [
381
+ { name: 'RadioButton', value: SettingInterfaceType.RadioButton },
382
+ { name: 'InputBox', value: SettingInterfaceType.InputBox },
383
+ { name: 'Textarea', value: SettingInterfaceType.Textarea },
384
+ { name: 'DropDown', value: SettingInterfaceType.Select },
385
+ { name: 'File', value: SettingInterfaceType.File },
386
+ { name: 'Static', value: SettingInterfaceType.Static },
387
+ { name: 'Password', value: SettingInterfaceType.Password },
388
+ { name: 'Color', value: SettingInterfaceType.Color }
391
389
  ];
392
390
 
393
- function indexNameValue(arry) {
394
- const obj = {};
395
- arry.forEach(item => {
396
- obj[item.value] = item.name;
397
- });
398
- return obj;
391
+ function indexNameValue(arry) {
392
+ const obj = {};
393
+ arry.forEach(item => {
394
+ obj[item.value] = item.name;
395
+ });
396
+ return obj;
399
397
  }
400
398
 
401
- class ApiLogComponent {
402
- constructor(_dialogRef, data) {
403
- this._dialogRef = _dialogRef;
404
- this.data = data;
405
- }
406
- ngOnInit() {
407
- this.apiLogStates = indexNameValue(ApiLogStates);
408
- if (this.data.apiLog) {
409
- this.apiLog = this.data.apiLog;
410
- }
411
- }
412
- }
413
- ApiLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiLogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
414
- ApiLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ApiLogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"apiLog\">\n\n <div mat-dialog-title>API Log</div>\n\n <mat-dialog-content>\n <div class=\"fs-row.gap-large.wrap\">\n <div>\n <fs-label-field>\n <fs-label>\n Type\n </fs-label>\n {{apiLog.type}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{apiLogStates[apiLog.state]}}\n </fs-label-field>\n\n\n <fs-label-field *ngIf=\"apiLog.code\">\n <fs-label>\n Code\n </fs-label>\n {{apiLog.code}}\n </fs-label-field>\n\n </div>\n <div>\n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{apiLog.createDate|fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n\n\n <fs-label-field *ngIf=\"apiLog.direction\">\n <fs-label>\n Direction\n </fs-label>\n {{apiLog.direction}}\n </fs-label-field>\n\n\n <fs-label-field *ngIf=\"apiLog.length\">\n <fs-label>\n Duration\n </fs-label>\n {{ apiLog.length | fsDateDuration }}\n </fs-label-field>\n </div>\n </div>\n\n <div>\n <fs-label-field *ngIf=\"apiLog.message\">\n <fs-label>\n Message\n </fs-label>\n {{apiLog.message}}\n </fs-label-field>\n </div>\n\n\n <div class=\"fs-row.gap-large.wrap\">\n <div>\n <fs-label-field *ngIf=\"apiLog.method\">\n <fs-label>\n Method\n </fs-label>\n {{apiLog.method}}\n </fs-label-field>\n </div>\n <div>\n <fs-label-field *ngIf=\"apiLog.url\">\n <fs-label>\n URL\n </fs-label>\n {{apiLog.url}}\n </fs-label-field>\n </div>\n </div>\n\n <div>\n <fs-label-field *ngIf=\"apiLog.request\">\n <fs-label>\n Request\n </fs-label>\n <pre>{{apiLog.request|json}}</pre>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.response\">\n <fs-label>\n Response\n </fs-label>\n <pre>{{apiLog.response|json}}</pre>\n </fs-label-field>\n </div>\n </mat-dialog-content>\n\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i4$2.FsDateFormatPipe, "fsDateDuration": i4$2.FsDateDurationPipe, "json": i8.JsonPipe } });
415
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiLogComponent, decorators: [{
416
- type: Component,
417
- args: [{ template: "<fs-dialog *fsSkeleton=\"apiLog\">\n\n <div mat-dialog-title>API Log</div>\n\n <mat-dialog-content>\n <div class=\"fs-row.gap-large.wrap\">\n <div>\n <fs-label-field>\n <fs-label>\n Type\n </fs-label>\n {{apiLog.type}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{apiLogStates[apiLog.state]}}\n </fs-label-field>\n\n\n <fs-label-field *ngIf=\"apiLog.code\">\n <fs-label>\n Code\n </fs-label>\n {{apiLog.code}}\n </fs-label-field>\n\n </div>\n <div>\n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{apiLog.createDate|fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n\n\n <fs-label-field *ngIf=\"apiLog.direction\">\n <fs-label>\n Direction\n </fs-label>\n {{apiLog.direction}}\n </fs-label-field>\n\n\n <fs-label-field *ngIf=\"apiLog.length\">\n <fs-label>\n Duration\n </fs-label>\n {{ apiLog.length | fsDateDuration }}\n </fs-label-field>\n </div>\n </div>\n\n <div>\n <fs-label-field *ngIf=\"apiLog.message\">\n <fs-label>\n Message\n </fs-label>\n {{apiLog.message}}\n </fs-label-field>\n </div>\n\n\n <div class=\"fs-row.gap-large.wrap\">\n <div>\n <fs-label-field *ngIf=\"apiLog.method\">\n <fs-label>\n Method\n </fs-label>\n {{apiLog.method}}\n </fs-label-field>\n </div>\n <div>\n <fs-label-field *ngIf=\"apiLog.url\">\n <fs-label>\n URL\n </fs-label>\n {{apiLog.url}}\n </fs-label-field>\n </div>\n </div>\n\n <div>\n <fs-label-field *ngIf=\"apiLog.request\">\n <fs-label>\n Request\n </fs-label>\n <pre>{{apiLog.request|json}}</pre>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.response\">\n <fs-label>\n Response\n </fs-label>\n <pre>{{apiLog.response|json}}</pre>\n </fs-label-field>\n </div>\n </mat-dialog-content>\n\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""] }]
418
- }], ctorParameters: function () {
419
- return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
420
- type: Inject,
421
- args: [MAT_DIALOG_DATA]
422
- }] }];
399
+ class ApiLogComponent {
400
+ constructor(_dialogRef, data) {
401
+ this._dialogRef = _dialogRef;
402
+ this.data = data;
403
+ }
404
+ ngOnInit() {
405
+ this.apiLogStates = indexNameValue(ApiLogStates);
406
+ if (this.data.apiLog) {
407
+ this.apiLog = this.data.apiLog;
408
+ }
409
+ }
410
+ }
411
+ ApiLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiLogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
412
+ ApiLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ApiLogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"apiLog\">\n\n <div mat-dialog-title>API Log</div>\n\n <mat-dialog-content>\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <fs-label-field>\n <fs-label>\n Type\n </fs-label>\n {{apiLog.type}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{apiLogStates[apiLog.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.code\">\n <fs-label>\n Code\n </fs-label>\n {{apiLog.code}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{apiLog.createDate|fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.direction\">\n <fs-label>\n Direction\n </fs-label>\n {{apiLog.direction}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.length\">\n <fs-label>\n Duration\n </fs-label>\n {{ apiLog.length | fsDateDuration }}\n </fs-label-field>\n\n <ng-container *ngIf=\"apiLog.method\">\n <fs-label-field *ngIf=\"apiLog.method\">\n <fs-label>\n Method\n </fs-label>\n {{apiLog.method}}\n </fs-label-field>\n </ng-container>\n \n <fs-label-field *ngIf=\"apiLog.url\">\n <fs-label>\n URL\n </fs-label>\n {{apiLog.url}}\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"apiLog.message\">\n <fs-label>\n Message\n </fs-label>\n {{apiLog.message}}\n </fs-label-field>\n\n <div>\n <fs-label-field *ngIf=\"apiLog.request\">\n <fs-label>\n Request\n </fs-label>\n <pre>{{apiLog.request|json}}</pre>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.response\">\n <fs-label>\n Response\n </fs-label>\n <pre>{{apiLog.response|json}}</pre>\n </fs-label-field>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i7$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "component", type: i8.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i8.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { kind: "pipe", type: i2.JsonPipe, name: "json" }, { kind: "pipe", type: i4$2.FsDateDurationPipe, name: "fsDateDuration" }, { kind: "pipe", type: i4$2.FsDateFormatPipe, name: "fsDateFormat" }] });
413
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiLogComponent, decorators: [{
414
+ type: Component,
415
+ args: [{ template: "<fs-dialog *fsSkeleton=\"apiLog\">\n\n <div mat-dialog-title>API Log</div>\n\n <mat-dialog-content>\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <fs-label-field>\n <fs-label>\n Type\n </fs-label>\n {{apiLog.type}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{apiLogStates[apiLog.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.code\">\n <fs-label>\n Code\n </fs-label>\n {{apiLog.code}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{apiLog.createDate|fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.direction\">\n <fs-label>\n Direction\n </fs-label>\n {{apiLog.direction}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.length\">\n <fs-label>\n Duration\n </fs-label>\n {{ apiLog.length | fsDateDuration }}\n </fs-label-field>\n\n <ng-container *ngIf=\"apiLog.method\">\n <fs-label-field *ngIf=\"apiLog.method\">\n <fs-label>\n Method\n </fs-label>\n {{apiLog.method}}\n </fs-label-field>\n </ng-container>\n \n <fs-label-field *ngIf=\"apiLog.url\">\n <fs-label>\n URL\n </fs-label>\n {{apiLog.url}}\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"apiLog.message\">\n <fs-label>\n Message\n </fs-label>\n {{apiLog.message}}\n </fs-label-field>\n\n <div>\n <fs-label-field *ngIf=\"apiLog.request\">\n <fs-label>\n Request\n </fs-label>\n <pre>{{apiLog.request|json}}</pre>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"apiLog.response\">\n <fs-label>\n Response\n </fs-label>\n <pre>{{apiLog.response|json}}</pre>\n </fs-label-field>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Done\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n" }]
416
+ }], ctorParameters: function () {
417
+ return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
418
+ type: Inject,
419
+ args: [MAT_DIALOG_DATA]
420
+ }] }];
423
421
  } });
424
422
 
425
- class ApiLogsComponent {
426
- constructor(_dialog) {
427
- this._dialog = _dialog;
428
- this.config = null;
429
- this.apiLogStates = indexNameValue(ApiLogStates);
430
- }
431
- ngOnInit() {
432
- this._configList();
433
- }
434
- _configList() {
435
- this.config = {
436
- filters: [
437
- {
438
- type: ItemType.Keyword,
439
- name: 'keyword',
440
- label: 'Search',
441
- },
442
- {
443
- type: ItemType.Select,
444
- name: 'state',
445
- label: 'Status',
446
- values: ApiLogStates,
447
- },
448
- {
449
- name: 'createDate',
450
- type: ItemType.DateRange,
451
- label: ['From Date', 'To Date'],
452
- },
453
- ],
454
- fetch: (query) => {
455
- Object.assign(query, {});
456
- return this.loadApiLogs(query)
457
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
458
- },
459
- };
460
- }
461
- open(apiLog) {
462
- this._dialog.open(ApiLogComponent, {
463
- data: { apiLog },
464
- width: '85%',
465
- });
466
- }
467
- }
468
- ApiLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
469
- ApiLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ApiLogsComponent, selector: "fs-system-api-logs", inputs: { loadApiLogs: "loadApiLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a href=\"javascript:;\" (click)=\"open(row)\">\n {{row.type || 'Unknown'}}\n <mat-icon class=\"direction\" *ngIf=\"row.direction=='outgoing'\">arrow_upward</mat-icon>\n <mat-icon class=\"direction\" *ngIf=\"row.direction=='incoming'\">arrow_downward</mat-icon>\n </a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{apiLogStates[row.state]}}\n <span *ngIf=\"row.code\" class=\"code\" [ngClass]=\"{'success': row.code==200,'error': row.code!=200 }\">[{{row.code}}]</span>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Date</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div><small *ngIf=\"row.length\">Duration: {{ row.length | fsDateDuration }}</small></div>\n </ng-template>\n </fs-list-column>\n </fs-list>\n", styles: [".code.success{color:green}.code.error{color:red}.direction{font-size:14px;height:14px;line-height:14px;width:14px}\n"], components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i3$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fsDateDuration": i4$2.FsDateDurationPipe } });
470
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiLogsComponent, decorators: [{
471
- type: Component,
472
- args: [{ selector: 'fs-system-api-logs', template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a href=\"javascript:;\" (click)=\"open(row)\">\n {{row.type || 'Unknown'}}\n <mat-icon class=\"direction\" *ngIf=\"row.direction=='outgoing'\">arrow_upward</mat-icon>\n <mat-icon class=\"direction\" *ngIf=\"row.direction=='incoming'\">arrow_downward</mat-icon>\n </a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{apiLogStates[row.state]}}\n <span *ngIf=\"row.code\" class=\"code\" [ngClass]=\"{'success': row.code==200,'error': row.code!=200 }\">[{{row.code}}]</span>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Date</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div><small *ngIf=\"row.length\">Duration: {{ row.length | fsDateDuration }}</small></div>\n </ng-template>\n </fs-list-column>\n </fs-list>\n", styles: [".code.success{color:green}.code.error{color:red}.direction{font-size:14px;height:14px;line-height:14px;width:14px}\n"] }]
473
- }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
474
- type: ViewChild,
475
- args: [FsListComponent, { static: true }]
476
- }], loadApiLogs: [{
477
- type: Input
423
+ class ApiLogsComponent {
424
+ constructor(_dialog) {
425
+ this._dialog = _dialog;
426
+ this.config = null;
427
+ this.apiLogStates = indexNameValue(ApiLogStates);
428
+ }
429
+ ngOnInit() {
430
+ this._configList();
431
+ }
432
+ _configList() {
433
+ this.config = {
434
+ filters: [
435
+ {
436
+ type: ItemType.Keyword,
437
+ name: 'keyword',
438
+ label: 'Search',
439
+ },
440
+ {
441
+ type: ItemType.Select,
442
+ name: 'state',
443
+ label: 'Status',
444
+ values: ApiLogStates,
445
+ },
446
+ {
447
+ name: 'createDate',
448
+ type: ItemType.DateRange,
449
+ label: ['From Date', 'To Date'],
450
+ },
451
+ ],
452
+ fetch: (query) => {
453
+ Object.assign(query, {});
454
+ return this.loadApiLogs(query)
455
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
456
+ },
457
+ };
458
+ }
459
+ open(apiLog) {
460
+ this._dialog.open(ApiLogComponent, {
461
+ data: { apiLog },
462
+ width: '85%',
463
+ });
464
+ }
465
+ }
466
+ ApiLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
467
+ ApiLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ApiLogsComponent, selector: "fs-system-api-logs", inputs: { loadApiLogs: "loadApiLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a href=\"javascript:;\" (click)=\"open(row)\">\n {{row.type || 'Unknown'}}\n <mat-icon class=\"direction\" *ngIf=\"row.direction=='outgoing'\">arrow_upward</mat-icon>\n <mat-icon class=\"direction\" *ngIf=\"row.direction=='incoming'\">arrow_downward</mat-icon>\n </a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{apiLogStates[row.state]}}\n <span *ngIf=\"row.code\" class=\"code\" [ngClass]=\"{'success': row.code==200,'error': row.code!=200 }\">[{{row.code}}]</span>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Date</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div><small *ngIf=\"row.length\">Duration: {{ row.length | fsDateDuration }}</small></div>\n </ng-template>\n </fs-list-column>\n </fs-list>\n", styles: [".code.success{color:green}.code.error{color:red}.direction{font-size:14px;height:14px;line-height:14px;width:14px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { kind: "component", type: i5.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i5.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { kind: "directive", type: i5.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: i5.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { kind: "pipe", type: i4$2.FsDateDurationPipe, name: "fsDateDuration" }] });
468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiLogsComponent, decorators: [{
469
+ type: Component,
470
+ args: [{ selector: 'fs-system-api-logs', template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a href=\"javascript:;\" (click)=\"open(row)\">\n {{row.type || 'Unknown'}}\n <mat-icon class=\"direction\" *ngIf=\"row.direction=='outgoing'\">arrow_upward</mat-icon>\n <mat-icon class=\"direction\" *ngIf=\"row.direction=='incoming'\">arrow_downward</mat-icon>\n </a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{apiLogStates[row.state]}}\n <span *ngIf=\"row.code\" class=\"code\" [ngClass]=\"{'success': row.code==200,'error': row.code!=200 }\">[{{row.code}}]</span>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Date</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div><small *ngIf=\"row.length\">Duration: {{ row.length | fsDateDuration }}</small></div>\n </ng-template>\n </fs-list-column>\n </fs-list>\n", styles: [".code.success{color:green}.code.error{color:red}.direction{font-size:14px;height:14px;line-height:14px;width:14px}\n"] }]
471
+ }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
472
+ type: ViewChild,
473
+ args: [FsListComponent, { static: true }]
474
+ }], loadApiLogs: [{
475
+ type: Input
478
476
  }] } });
479
477
 
480
- class CronLogComponent {
481
- constructor(_data) {
482
- this._data = _data;
483
- this.CronLogStates = indexNameValue(CronLogStates);
484
- this.CronLogStateColors = {};
485
- }
486
- ngOnInit() {
487
- this.cronLog = this._data.cronLog;
488
- this.CronLogStateColors = CronLogStates
489
- .reduce((accum, cronLogState) => {
490
- accum[cronLogState.value] = cronLogState.color;
491
- return accum;
492
- }, {});
493
- }
494
- }
495
- CronLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronLogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
496
- CronLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CronLogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"cronLog\">\r\n <div mat-dialog-title>Cron Log</div>\r\n <mat-dialog-content>\r\n <div class=\"row\">\r\n <fs-label-field>\r\n <fs-label>\r\n Status\r\n </fs-label>\r\n <div [ngStyle]=\"{ color: CronLogStateColors[cronLog.state]}\">\r\n {{CronLogStates[cronLog.state] || cronLog.state}}\r\n </div>\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Date\r\n </fs-label>\r\n <fs-date-ago [date]=\"cronLog.createDate\"></fs-date-ago>\r\n </fs-label-field>\r\n </div>\r\n \r\n <fs-label-field *ngIf=\"cronLog.message\">\r\n <fs-label>\r\n Message\r\n </fs-label>\r\n <div class=\"message\">\r\n {{cronLog.message}}\r\n </div>\r\n </fs-label-field>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\r\n </mat-dialog-actions>\r\n</fs-dialog>\r\n", styles: [".message{white-space:pre-line}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}\n"], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] });
497
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronLogComponent, decorators: [{
498
- type: Component,
499
- args: [{ template: "<fs-dialog *fsSkeleton=\"cronLog\">\r\n <div mat-dialog-title>Cron Log</div>\r\n <mat-dialog-content>\r\n <div class=\"row\">\r\n <fs-label-field>\r\n <fs-label>\r\n Status\r\n </fs-label>\r\n <div [ngStyle]=\"{ color: CronLogStateColors[cronLog.state]}\">\r\n {{CronLogStates[cronLog.state] || cronLog.state}}\r\n </div>\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Date\r\n </fs-label>\r\n <fs-date-ago [date]=\"cronLog.createDate\"></fs-date-ago>\r\n </fs-label-field>\r\n </div>\r\n \r\n <fs-label-field *ngIf=\"cronLog.message\">\r\n <fs-label>\r\n Message\r\n </fs-label>\r\n <div class=\"message\">\r\n {{cronLog.message}}\r\n </div>\r\n </fs-label-field>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\r\n </mat-dialog-actions>\r\n</fs-dialog>\r\n", styles: [".message{white-space:pre-line}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}\n"] }]
500
- }], ctorParameters: function () {
501
- return [{ type: undefined, decorators: [{
502
- type: Inject,
503
- args: [MAT_DIALOG_DATA]
504
- }] }];
478
+ class CronLogComponent {
479
+ constructor(_data) {
480
+ this._data = _data;
481
+ this.CronLogStates = indexNameValue(CronLogStates);
482
+ this.CronLogStateColors = {};
483
+ }
484
+ ngOnInit() {
485
+ this.cronLog = this._data.cronLog;
486
+ this.CronLogStateColors = CronLogStates
487
+ .reduce((accum, cronLogState) => {
488
+ accum[cronLogState.value] = cronLogState.color;
489
+ return accum;
490
+ }, {});
491
+ }
492
+ }
493
+ CronLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronLogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
494
+ CronLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CronLogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"cronLog\">\n <div mat-dialog-title>Cron Log</div>\n <mat-dialog-content>\n <div class=\"row\">\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n <div [ngStyle]=\"{ color: CronLogStateColors[cronLog.state]}\">\n {{CronLogStates[cronLog.state] || cronLog.state}}\n </div>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n <fs-date-ago [date]=\"cronLog.createDate\"></fs-date-ago>\n </fs-label-field>\n </div>\n \n <fs-label-field *ngIf=\"cronLog.message\">\n <fs-label>\n Message\n </fs-label>\n <div class=\"message\">\n {{cronLog.message}}\n </div>\n </fs-label-field>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".message{white-space:pre-line}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { kind: "directive", type: i7$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "component", type: i8.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i8.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }] });
495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronLogComponent, decorators: [{
496
+ type: Component,
497
+ args: [{ template: "<fs-dialog *fsSkeleton=\"cronLog\">\n <div mat-dialog-title>Cron Log</div>\n <mat-dialog-content>\n <div class=\"row\">\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n <div [ngStyle]=\"{ color: CronLogStateColors[cronLog.state]}\">\n {{CronLogStates[cronLog.state] || cronLog.state}}\n </div>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n <fs-date-ago [date]=\"cronLog.createDate\"></fs-date-ago>\n </fs-label-field>\n </div>\n \n <fs-label-field *ngIf=\"cronLog.message\">\n <fs-label>\n Message\n </fs-label>\n <div class=\"message\">\n {{cronLog.message}}\n </div>\n </fs-label-field>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".message{white-space:pre-line}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}\n"] }]
498
+ }], ctorParameters: function () {
499
+ return [{ type: undefined, decorators: [{
500
+ type: Inject,
501
+ args: [MAT_DIALOG_DATA]
502
+ }] }];
505
503
  } });
506
504
 
507
- class CronComponent {
508
- constructor(_data, _dialog, _cdRef) {
509
- this._data = _data;
510
- this._dialog = _dialog;
511
- this._cdRef = _cdRef;
512
- this.tabIndex = 0;
513
- this.CronStates = indexNameValue(CronStates);
514
- this.CronProcessStates = indexNameValue(CronProcessStates);
515
- this.CronLogStates = indexNameValue(CronLogStates);
516
- this.CronLogStateColors = {};
517
- }
518
- ngOnInit() {
519
- this.load();
520
- this.CronLogStateColors = CronLogStates
521
- .reduce((accum, cronLogState) => {
522
- accum[cronLogState.value] = cronLogState.color;
523
- return accum;
524
- }, {});
525
- }
526
- cronLogOpen(cronLog) {
527
- this._dialog.open(CronLogComponent, {
528
- data: {
529
- cronLog,
530
- },
531
- width: '85%',
532
- });
533
- }
534
- cronActionClick(cronAction) {
535
- cronAction.action(this.cron)
536
- .subscribe(() => {
537
- this.load();
538
- });
539
- }
540
- selectedIndexChange(index) {
541
- this.tabIndex = index;
542
- }
543
- load() {
544
- this._data.loadCron(this._data.cron)
545
- .subscribe((cron) => {
546
- this.cron = Object.assign(Object.assign({}, this._data.cron), cron);
547
- if (this._data.loadCronLogs) {
548
- this.config = {
549
- filters: [
550
- {
551
- type: ItemType.Select,
552
- name: 'state',
553
- label: 'Status',
554
- values: [
555
- { name: 'All', value: null },
556
- ...CronLogStates,
557
- ],
558
- },
559
- {
560
- type: ItemType.DateRange,
561
- name: 'date',
562
- label: ['From Date', 'To Date'],
563
- },
564
- ],
565
- fetch: (query) => {
566
- query = Object.assign(Object.assign({}, query), { cronId: this.cron.id });
567
- return this._data.loadCronLogs(query);
568
- },
569
- };
570
- }
571
- this.cronActions = this._data.cronActions
572
- .filter((cronLogAction) => {
573
- return cronLogAction.show(this.cron);
574
- });
575
- this._cdRef.markForCheck();
576
- });
577
- }
578
- }
579
- CronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
580
- CronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CronComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"cron\">\n <h1 mat-dialog-title>\n Cron\n <div class=\"small\">{{cron.name}}</div>\n </h1>\n <mat-dialog-content>\n <mat-tab-group (selectedIndexChange)=\"selectedIndexChange($event)\">\n <mat-tab label=\"Overview\">\n <div class=\"row\">\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{CronStates[cron.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"cron.cronSetting\">\n <fs-label>\n Run Frequency\n </fs-label>\n {{cron.cronSetting.summary}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Process ID\n </fs-label>\n {{cron.processId || 'None'}}\n <ng-container *ngIf=\"cron.processId\">\n <div class=\"small\">\n {{CronProcessStates[cron.processState] || 'Unknown'}}\n </div>\n </ng-container>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Last Ran\n </fs-label>\n <ng-container *ngIf=\"cron.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"cron.createDate\"></fs-date-ago>\n <div><small *ngIf=\"cron.duration\">Duration: {{ cron.duration | fsDateDuration }}</small></div>\n </ng-template>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Timeout hours\n </fs-label>\n {{cron.cronSetting?.timeout || 'N/A'}}\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"cron.message\">\n <fs-label>\n Last Message\n </fs-label>\n <div class=\"message\">{{cron.message}}</div>\n </fs-label-field>\n </mat-tab>\n <mat-tab label=\"Logs\" *ngIf=\"config\">\n <ng-template matTabContent>\n <fs-list [config]=\"config\">\n <fs-list-column name=\"state\" title=\"Status\">\n <ng-template fs-list-cell let-row=\"row\">\n <a \n (click)=\"cronLogOpen(row)\"\n [ngStyle]=\"{ color: CronLogStateColors[row.state] }\">\n {{CronLogStates[row.state] || row.state}}\n </a>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Message\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"message\">{{row.message}}</div>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Duration\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration\">\n {{row.duration | fsDateDuration: 'hour-minute-second'}}\n </ng-container>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column name=\"create_date\" title=\"Date\" class=\"col-date\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list> \n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions> \n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Done\n </button>\n <ng-container *ngIf=\"tabIndex === 0\">\n <button \n *ngFor=\"let cronAction of cronActions\"\n mat-button \n (click)=\"cronActionClick(cronAction)\">\n {{cronAction.label}}\n </button> \n </ng-container>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [":host ::ng-deep .col-message .message{white-space:break-spaces;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}:host ::ng-deep .col-date{white-space:nowrap}h1 .small{line-height:normal}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}.message{white-space:pre-line}\n"], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { type: i3$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.MatTabContent, selector: "[matTabContent]" }, { type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "fsDateDuration": i4$2.FsDateDurationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
581
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronComponent, decorators: [{
582
- type: Component,
583
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog *fsSkeleton=\"cron\">\n <h1 mat-dialog-title>\n Cron\n <div class=\"small\">{{cron.name}}</div>\n </h1>\n <mat-dialog-content>\n <mat-tab-group (selectedIndexChange)=\"selectedIndexChange($event)\">\n <mat-tab label=\"Overview\">\n <div class=\"row\">\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{CronStates[cron.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"cron.cronSetting\">\n <fs-label>\n Run Frequency\n </fs-label>\n {{cron.cronSetting.summary}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Process ID\n </fs-label>\n {{cron.processId || 'None'}}\n <ng-container *ngIf=\"cron.processId\">\n <div class=\"small\">\n {{CronProcessStates[cron.processState] || 'Unknown'}}\n </div>\n </ng-container>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Last Ran\n </fs-label>\n <ng-container *ngIf=\"cron.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"cron.createDate\"></fs-date-ago>\n <div><small *ngIf=\"cron.duration\">Duration: {{ cron.duration | fsDateDuration }}</small></div>\n </ng-template>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Timeout hours\n </fs-label>\n {{cron.cronSetting?.timeout || 'N/A'}}\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"cron.message\">\n <fs-label>\n Last Message\n </fs-label>\n <div class=\"message\">{{cron.message}}</div>\n </fs-label-field>\n </mat-tab>\n <mat-tab label=\"Logs\" *ngIf=\"config\">\n <ng-template matTabContent>\n <fs-list [config]=\"config\">\n <fs-list-column name=\"state\" title=\"Status\">\n <ng-template fs-list-cell let-row=\"row\">\n <a \n (click)=\"cronLogOpen(row)\"\n [ngStyle]=\"{ color: CronLogStateColors[row.state] }\">\n {{CronLogStates[row.state] || row.state}}\n </a>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Message\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"message\">{{row.message}}</div>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Duration\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration\">\n {{row.duration | fsDateDuration: 'hour-minute-second'}}\n </ng-container>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column name=\"create_date\" title=\"Date\" class=\"col-date\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list> \n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions> \n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Done\n </button>\n <ng-container *ngIf=\"tabIndex === 0\">\n <button \n *ngFor=\"let cronAction of cronActions\"\n mat-button \n (click)=\"cronActionClick(cronAction)\">\n {{cronAction.label}}\n </button> \n </ng-container>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [":host ::ng-deep .col-message .message{white-space:break-spaces;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}:host ::ng-deep .col-date{white-space:nowrap}h1 .small{line-height:normal}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}.message{white-space:pre-line}\n"] }]
584
- }], ctorParameters: function () {
585
- return [{ type: undefined, decorators: [{
586
- type: Inject,
587
- args: [MAT_DIALOG_DATA]
588
- }] }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }];
505
+ class CronComponent {
506
+ constructor(_data, _dialog, _cdRef) {
507
+ this._data = _data;
508
+ this._dialog = _dialog;
509
+ this._cdRef = _cdRef;
510
+ this.tabIndex = 0;
511
+ this.CronStates = indexNameValue(CronStates);
512
+ this.CronProcessStates = indexNameValue(CronProcessStates);
513
+ this.CronLogStates = indexNameValue(CronLogStates);
514
+ this.CronLogStateColors = {};
515
+ }
516
+ ngOnInit() {
517
+ this.load();
518
+ this.CronLogStateColors = CronLogStates
519
+ .reduce((accum, cronLogState) => {
520
+ accum[cronLogState.value] = cronLogState.color;
521
+ return accum;
522
+ }, {});
523
+ }
524
+ cronLogOpen(cronLog) {
525
+ this._dialog.open(CronLogComponent, {
526
+ data: {
527
+ cronLog,
528
+ },
529
+ width: '85%',
530
+ });
531
+ }
532
+ cronActionClick(cronAction) {
533
+ cronAction.action(this.cron)
534
+ .subscribe(() => {
535
+ this.load();
536
+ });
537
+ }
538
+ selectedIndexChange(index) {
539
+ this.tabIndex = index;
540
+ }
541
+ load() {
542
+ this._data.loadCron(this._data.cron)
543
+ .subscribe((cron) => {
544
+ this.cron = Object.assign(Object.assign({}, this._data.cron), cron);
545
+ if (this._data.loadCronLogs) {
546
+ this.config = {
547
+ filters: [
548
+ {
549
+ type: ItemType.Select,
550
+ name: 'state',
551
+ label: 'Status',
552
+ values: [
553
+ { name: 'All', value: null },
554
+ ...CronLogStates,
555
+ ],
556
+ },
557
+ {
558
+ type: ItemType.DateRange,
559
+ name: 'date',
560
+ label: ['From Date', 'To Date'],
561
+ },
562
+ ],
563
+ fetch: (query) => {
564
+ query = Object.assign(Object.assign({}, query), { cronId: this.cron.id });
565
+ return this._data.loadCronLogs(query);
566
+ },
567
+ };
568
+ }
569
+ this.cronActions = this._data.cronActions
570
+ .filter((cronLogAction) => {
571
+ return cronLogAction.show(this.cron);
572
+ });
573
+ this._cdRef.markForCheck();
574
+ });
575
+ }
576
+ }
577
+ CronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
578
+ CronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CronComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"cron\">\n <h1 mat-dialog-title>\n Cron\n <div class=\"small\">{{cron.name}}</div>\n </h1>\n <mat-dialog-content>\n <mat-tab-group (selectedIndexChange)=\"selectedIndexChange($event)\">\n <mat-tab label=\"Overview\">\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{CronStates[cron.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"cron.cronSetting\">\n <fs-label>\n Run Frequency\n </fs-label>\n {{cron.cronSetting.summary}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Process ID\n </fs-label>\n {{cron.processId || 'None'}}\n <ng-container *ngIf=\"cron.processId\">\n <div class=\"small\">\n {{CronProcessStates[cron.processState] || 'Unknown'}}\n </div>\n </ng-container>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Last Ran\n </fs-label>\n <ng-container *ngIf=\"cron.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"cron.createDate\"></fs-date-ago>\n <div><small *ngIf=\"cron.duration\">Duration: {{ cron.duration | fsDateDuration }}</small></div>\n </ng-template>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Timeout hours\n </fs-label>\n {{cron.cronSetting?.timeout || 'N/A'}}\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"cron.message\">\n <fs-label>\n Last Message\n </fs-label>\n <div class=\"message\">{{cron.message}}</div>\n </fs-label-field>\n </mat-tab>\n <mat-tab label=\"Logs\" *ngIf=\"config\">\n <ng-template matTabContent>\n <fs-list [config]=\"config\">\n <fs-list-column name=\"state\" title=\"Status\">\n <ng-template fs-list-cell let-row=\"row\">\n <a \n (click)=\"cronLogOpen(row)\"\n [ngStyle]=\"{ color: CronLogStateColors[row.state] }\">\n {{CronLogStates[row.state] || row.state}}\n </a>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Message\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"message\">{{row.message}}</div>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Duration\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration\">\n {{row.duration | fsDateDuration: 'hour-minute-second'}}\n </ng-container>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column name=\"create_date\" title=\"Date\" class=\"col-date\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list> \n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions> \n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Done\n </button>\n <ng-container *ngIf=\"tabIndex === 0\">\n <button \n *ngFor=\"let cronAction of cronActions\"\n mat-button \n (click)=\"cronActionClick(cronAction)\">\n {{cronAction.label}}\n </button> \n </ng-container>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [":host ::ng-deep .col-message .message{white-space:break-spaces;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}:host ::ng-deep .col-date{white-space:nowrap}h1 .small{line-height:normal}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}.message{white-space:pre-line}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i4$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "directive", type: i4$1.MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { kind: "directive", type: i7$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "component", type: i5.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i5.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { kind: "directive", type: i5.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "component", type: i8.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i8.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { kind: "pipe", type: i4$2.FsDateDurationPipe, name: "fsDateDuration" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
579
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronComponent, decorators: [{
580
+ type: Component,
581
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog *fsSkeleton=\"cron\">\n <h1 mat-dialog-title>\n Cron\n <div class=\"small\">{{cron.name}}</div>\n </h1>\n <mat-dialog-content>\n <mat-tab-group (selectedIndexChange)=\"selectedIndexChange($event)\">\n <mat-tab label=\"Overview\">\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{CronStates[cron.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"cron.cronSetting\">\n <fs-label>\n Run Frequency\n </fs-label>\n {{cron.cronSetting.summary}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Process ID\n </fs-label>\n {{cron.processId || 'None'}}\n <ng-container *ngIf=\"cron.processId\">\n <div class=\"small\">\n {{CronProcessStates[cron.processState] || 'Unknown'}}\n </div>\n </ng-container>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Last Ran\n </fs-label>\n <ng-container *ngIf=\"cron.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"cron.createDate\"></fs-date-ago>\n <div><small *ngIf=\"cron.duration\">Duration: {{ cron.duration | fsDateDuration }}</small></div>\n </ng-template>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Timeout hours\n </fs-label>\n {{cron.cronSetting?.timeout || 'N/A'}}\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"cron.message\">\n <fs-label>\n Last Message\n </fs-label>\n <div class=\"message\">{{cron.message}}</div>\n </fs-label-field>\n </mat-tab>\n <mat-tab label=\"Logs\" *ngIf=\"config\">\n <ng-template matTabContent>\n <fs-list [config]=\"config\">\n <fs-list-column name=\"state\" title=\"Status\">\n <ng-template fs-list-cell let-row=\"row\">\n <a \n (click)=\"cronLogOpen(row)\"\n [ngStyle]=\"{ color: CronLogStateColors[row.state] }\">\n {{CronLogStates[row.state] || row.state}}\n </a>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Message\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"message\">{{row.message}}</div>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Duration\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration\">\n {{row.duration | fsDateDuration: 'hour-minute-second'}}\n </ng-container>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column name=\"create_date\" title=\"Date\" class=\"col-date\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list> \n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions> \n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Done\n </button>\n <ng-container *ngIf=\"tabIndex === 0\">\n <button \n *ngFor=\"let cronAction of cronActions\"\n mat-button \n (click)=\"cronActionClick(cronAction)\">\n {{cronAction.label}}\n </button> \n </ng-container>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [":host ::ng-deep .col-message .message{white-space:break-spaces;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}:host ::ng-deep .col-date{white-space:nowrap}h1 .small{line-height:normal}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}.message{white-space:pre-line}\n"] }]
582
+ }], ctorParameters: function () {
583
+ return [{ type: undefined, decorators: [{
584
+ type: Inject,
585
+ args: [MAT_DIALOG_DATA]
586
+ }] }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }];
589
587
  } });
590
588
 
591
- class CronNextRunComponent {
592
- constructor(_cdRef) {
593
- this._cdRef = _cdRef;
594
- this._destroy$ = new Subject();
595
- }
596
- ngOnInit() {
597
- this.update();
598
- }
599
- calculateDuration() {
600
- const now = new Date();
601
- const nextMinutes = this._getNextMinutes(now);
602
- const nextHours = this._getNextHours(now);
603
- const nextDays = this._getNextDays(now);
604
- if (this.cron.cronSetting.minutes.length ||
605
- this.cron.cronSetting.hours.length ||
606
- this.cron.cronSetting.days.length) {
607
- let next = new Date();
608
- next = addMinutes(next, nextMinutes);
609
- next = addHours(next, nextHours);
610
- next = addDays(next, nextDays);
611
- next = subSeconds(next, next.getSeconds());
612
- this.duration = differenceInSeconds(next, now);
613
- }
614
- else {
615
- this.duration = 60 - now.getSeconds();
616
- }
617
- }
618
- update() {
619
- this.calculateDuration();
620
- timer(0, 1000)
621
- .pipe(tap(() => {
622
- this.duration -= 1;
623
- if (this.duration % 60 === 0 || this.duration < (60 * 5)) {
624
- this._cdRef.markForCheck();
625
- }
626
- if (this.duration <= 0) {
627
- this.calculateDuration();
628
- this._cdRef.markForCheck();
629
- }
630
- }), takeUntil(this._destroy$))
631
- .subscribe();
632
- }
633
- ngOnDestroy() {
634
- this._destroy$.next();
635
- this._destroy$.complete();
636
- }
637
- _getNextMinutes(now) {
638
- const minutes = this.cron.cronSetting.minutes;
639
- if (minutes.length) {
640
- for (let i = minutes.length - 1; i >= 0; i--) {
641
- if (now.getUTCMinutes() >= minutes[i]) {
642
- return (minutes[i + 1] ? minutes[i + 1] - now.getUTCMinutes() : (60 - now.getUTCMinutes() + minutes[i]));
643
- }
644
- }
645
- return minutes[0] - now.getMinutes();
646
- }
647
- return 0;
648
- }
649
- _getNextHours(now) {
650
- const hours = this.cron.cronSetting.hours;
651
- if (hours.length) {
652
- for (let i = hours.length - 1; i >= 0; i--) {
653
- if (now.getUTCHours() >= hours[i]) {
654
- return (hours[i + 1] ? hours[i + 1] - now.getUTCHours() : (24 - now.getUTCHours() + hours[i]));
655
- }
656
- }
657
- return hours[0] - now.getUTCHours();
658
- }
659
- return 0;
660
- }
661
- _getNextDays(now) {
662
- const days = this.cron.cronSetting.days;
663
- if (days.length) {
664
- for (let i = days.length - 1; i >= 0; i--) {
665
- if (now.getDate() >= days[i]) {
666
- return (days[i + 1] ? days[i + 1] : getDaysInMonth(now)) - now.getDate();
667
- }
668
- }
669
- return days[0] - getDaysInMonth(now);
670
- }
671
- return 0;
672
- }
673
- }
674
- CronNextRunComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronNextRunComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
675
- CronNextRunComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CronNextRunComponent, selector: "app-next-run", inputs: { cron: "cron" }, ngImport: i0, template: "<ng-container *ngIf=\"duration > 60; else seconds\">\n {{duration | fsDateDuration: { hours: true, seconds: true, minutes: true, days: true} }}\n</ng-container>\n\n<ng-template #seconds>\n {{duration}}s\n</ng-template>\n\n", styles: [""], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsDateDuration": i4$2.FsDateDurationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronNextRunComponent, decorators: [{
677
- type: Component,
678
- args: [{ selector: 'app-next-run', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"duration > 60; else seconds\">\n {{duration | fsDateDuration: { hours: true, seconds: true, minutes: true, days: true} }}\n</ng-container>\n\n<ng-template #seconds>\n {{duration}}s\n</ng-template>\n\n", styles: [""] }]
679
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { cron: [{
680
- type: Input
589
+ class CronNextRunComponent {
590
+ constructor(_cdRef) {
591
+ this._cdRef = _cdRef;
592
+ this._destroy$ = new Subject();
593
+ }
594
+ ngOnInit() {
595
+ this.update();
596
+ }
597
+ calculateDuration() {
598
+ const now = new Date();
599
+ const nextMinutes = this._getNextMinutes(now);
600
+ const nextHours = this._getNextHours(now);
601
+ const nextDays = this._getNextDays(now);
602
+ if (this.cron.cronSetting.minutes.length ||
603
+ this.cron.cronSetting.hours.length ||
604
+ this.cron.cronSetting.days.length) {
605
+ let next = new Date();
606
+ next = addMinutes(next, nextMinutes);
607
+ next = addHours(next, nextHours);
608
+ next = addDays(next, nextDays);
609
+ next = subSeconds(next, next.getSeconds());
610
+ this.duration = differenceInSeconds(next, now);
611
+ }
612
+ else {
613
+ this.duration = 60 - now.getSeconds();
614
+ }
615
+ }
616
+ update() {
617
+ this.calculateDuration();
618
+ timer(0, 1000)
619
+ .pipe(tap(() => {
620
+ this.duration -= 1;
621
+ if (this.duration % 60 === 0 || this.duration < (60 * 5)) {
622
+ this._cdRef.markForCheck();
623
+ }
624
+ if (this.duration <= 0) {
625
+ this.calculateDuration();
626
+ this._cdRef.markForCheck();
627
+ }
628
+ }), takeUntil(this._destroy$))
629
+ .subscribe();
630
+ }
631
+ ngOnDestroy() {
632
+ this._destroy$.next();
633
+ this._destroy$.complete();
634
+ }
635
+ _getNextMinutes(now) {
636
+ const minutes = this.cron.cronSetting.minutes;
637
+ if (minutes.length) {
638
+ for (let i = minutes.length - 1; i >= 0; i--) {
639
+ if (now.getUTCMinutes() >= minutes[i]) {
640
+ return (minutes[i + 1] ? minutes[i + 1] - now.getUTCMinutes() : (60 - now.getUTCMinutes() + minutes[i]));
641
+ }
642
+ }
643
+ return minutes[0] - now.getMinutes();
644
+ }
645
+ return 0;
646
+ }
647
+ _getNextHours(now) {
648
+ const hours = this.cron.cronSetting.hours;
649
+ if (hours.length) {
650
+ for (let i = hours.length - 1; i >= 0; i--) {
651
+ if (now.getUTCHours() >= hours[i]) {
652
+ return (hours[i + 1] ? hours[i + 1] - now.getUTCHours() : (24 - now.getUTCHours() + hours[i]));
653
+ }
654
+ }
655
+ return hours[0] - now.getUTCHours();
656
+ }
657
+ return 0;
658
+ }
659
+ _getNextDays(now) {
660
+ const days = this.cron.cronSetting.days;
661
+ if (days.length) {
662
+ for (let i = days.length - 1; i >= 0; i--) {
663
+ if (now.getDate() >= days[i]) {
664
+ return (days[i + 1] ? days[i + 1] : getDaysInMonth(now)) - now.getDate();
665
+ }
666
+ }
667
+ return days[0] - getDaysInMonth(now);
668
+ }
669
+ return 0;
670
+ }
671
+ }
672
+ CronNextRunComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronNextRunComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
673
+ CronNextRunComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CronNextRunComponent, selector: "app-next-run", inputs: { cron: "cron" }, ngImport: i0, template: "<ng-container *ngIf=\"duration > 60; else seconds\">\n {{duration | fsDateDuration: { hours: true, seconds: true, minutes: true, days: true} }}\n</ng-container>\n\n<ng-template #seconds>\n {{duration}}s\n</ng-template>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4$2.FsDateDurationPipe, name: "fsDateDuration" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronNextRunComponent, decorators: [{
675
+ type: Component,
676
+ args: [{ selector: 'app-next-run', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"duration > 60; else seconds\">\n {{duration | fsDateDuration: { hours: true, seconds: true, minutes: true, days: true} }}\n</ng-container>\n\n<ng-template #seconds>\n {{duration}}s\n</ng-template>\n\n" }]
677
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { cron: [{
678
+ type: Input
681
679
  }] } });
682
680
 
683
- class CronsComponent {
684
- constructor(_message, _dialog, _prompt) {
685
- this._message = _message;
686
- this._dialog = _dialog;
687
- this._prompt = _prompt;
688
- this.config = null;
689
- this.CronStates = indexNameValue(CronStates);
690
- this.CronProcessStates = indexNameValue(CronProcessStates);
691
- this.CronState = CronState;
692
- this._destroy$ = new Subject();
693
- }
694
- ngOnInit() {
695
- this._configList();
696
- }
697
- open(cron) {
698
- this._dialog.open(CronComponent, {
699
- data: {
700
- cron,
701
- loadCronLogs: this.loadCronLogs,
702
- loadCron: this.loadCron,
703
- cronActions: this.getCronActions(),
704
- },
705
- width: '85%',
706
- });
707
- }
708
- getCronActions() {
709
- return [
710
- {
711
- action: (data) => {
712
- return this.queue(data)
713
- .pipe(tap(() => {
714
- this._message.success('Queued cron');
715
- this.list.reload();
716
- }));
717
- },
718
- label: 'Queue',
719
- show: (cron) => {
720
- return cron.state === CronState.Idle || cron.state === CronState.Failed;
721
- },
722
- },
723
- {
724
- action: (data) => {
725
- return this.run(data)
726
- .pipe(tap(() => {
727
- this._message.success('Cron ran');
728
- this.list.reload();
729
- }));
730
- },
731
- label: 'Run',
732
- show: (cron) => {
733
- return cron.state === CronState.Idle || cron.state === CronState.Failed;
734
- },
735
- },
736
- {
737
- action: (data) => {
738
- return this.enable(data)
739
- .pipe(tap(() => {
740
- this._message.success('Enabled cron');
741
- this.list.reload();
742
- }));
743
- },
744
- label: 'Enable',
745
- show: (cron) => {
746
- return cron.state === CronState.Disabled;
747
- },
748
- },
749
- {
750
- action: (data) => {
751
- return this.disable(data)
752
- .pipe(tap(() => {
753
- this._message.success('Disabled cron');
754
- this.list.reload();
755
- }));
756
- },
757
- label: 'Disable',
758
- show: (cron) => {
759
- return cron.state === CronState.Idle || cron.state === CronState.Failed;
760
- },
761
- },
762
- {
763
- action: (data) => {
764
- return this._prompt.confirm({
765
- title: 'Confirm',
766
- template: 'Are you sure you would like to kill the cron?',
767
- })
768
- .pipe(switchMap(() => {
769
- return this.kill(data);
770
- }), tap(() => {
771
- this._message.success('Killed cron');
772
- this.list.reload();
773
- }), takeUntil(this._destroy$));
774
- },
775
- label: 'Kill',
776
- show: (cron) => {
777
- return cron.state === CronState.Running;
778
- },
779
- },
780
- {
781
- action: (data) => {
782
- return this._prompt.confirm({
783
- title: 'Confirm',
784
- template: 'Are you sure you would like to reset the cron?',
785
- })
786
- .pipe(switchMap(() => {
787
- return this.enable(data);
788
- }), tap(() => {
789
- this._message.success('Reset cron');
790
- this.list.reload();
791
- }), takeUntil(this._destroy$));
792
- },
793
- label: 'Reset',
794
- show: (cron) => {
795
- return cron.state === CronState.Killing || cron.state === CronState.Running || cron.state === CronState.Failed || cron.state === CronState.Queued;
796
- },
797
- },
798
- ];
799
- }
800
- ngOnDestroy() {
801
- this._destroy$.next();
802
- this._destroy$.complete();
803
- }
804
- _configList() {
805
- this.config = {
806
- paging: false,
807
- filters: [
808
- {
809
- type: ItemType.Keyword,
810
- name: 'keyword',
811
- label: 'Search',
812
- },
813
- ],
814
- rowActions: this.getCronActions()
815
- .map((rowAction) => {
816
- return Object.assign(Object.assign({}, rowAction), { click: (cron) => {
817
- rowAction.action(cron)
818
- .subscribe();
819
- } });
820
- }),
821
- fetch: (query) => {
822
- query = Object.assign(Object.assign({}, query), { timezone: Intl.DateTimeFormat().resolvedOptions().timeZone });
823
- return this.loadCrons(query)
824
- .pipe(map((crons) => ({
825
- data: crons
826
- .map((cron) => {
827
- return Object.assign(Object.assign({}, cron), { runningDuration: differenceInSeconds(parse(cron.createDate), new Date()) });
828
- }),
829
- })));
830
- },
831
- };
832
- if (this.bulk) {
833
- this.config.selection = {
834
- selectAll: false,
835
- actions: [
836
- {
837
- type: SelectionActionType.Action,
838
- name: 'disable',
839
- label: 'Disable',
840
- },
841
- {
842
- type: SelectionActionType.Action,
843
- name: 'enable',
844
- label: 'Enable',
845
- },
846
- ],
847
- actionSelected: (action) => {
848
- return this.bulk(action.action.name, action.selected)
849
- .pipe(tap(() => {
850
- this.list.reload();
851
- this._message.success('Applied Changes');
852
- }));
853
- },
854
- };
855
- }
856
- }
857
- }
858
- CronsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronsComponent, deps: [{ token: i1$1.FsMessage }, { token: i1.MatDialog }, { token: i3$3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
859
- CronsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CronsComponent, selector: "fs-system-crons", inputs: { enable: "enable", disable: "disable", kill: "kill", queue: "queue", run: "run", loadCrons: "loadCrons", loadCron: "loadCron", loadCronLogs: "loadCronLogs", bulk: "bulk" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n <div *ngIf=\"row.cronSetting\">\n <small>{{row.cronSetting.summary}}</small>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column align=\"center\">\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.host || row.processId; else status\">\n <fs-popover \n [maxWidth]=\"null\"\n [template]=\"statusPopover\" \n [indication]=\"true\"\n size=\"small\">\n <ng-container *ngTemplateOutlet=\"status\"></ng-container>\n </fs-popover>\n <ng-template #statusPopover>\n <div *ngIf=\"row.host\">Host: {{row.host}}</div>\n <div *ngIf=\"row.processId\">Process ID: {{row.processId}}</div>\n <div *ngIf=\"row.processState\">Process State: {{CronProcessStates[row.processState]}}</div>\n </ng-template>\n </ng-container>\n <ng-template #status>\n {{CronStates[row.state]}}\n </ng-template>\n <ng-container *ngIf=\"row.state === CronState.Running\">\n <div class=\"small\">\n Duration: {{ row.runningDuration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-container> \n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Last Ran</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div class=\"small\" *ngIf=\"row.duration\">\n Duration: {{ row.duration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Next Run</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.state !== CronState.Disabled\">\n <app-next-run [cron]=\"row\"></app-next-run>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Timeout Hours</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.cronSetting.timeout}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""], components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i7.FsPopoverComponent, selector: "fs-popover" }, { type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: CronNextRunComponent, selector: "app-next-run", inputs: ["cron"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "fsDateDuration": i4$2.FsDateDurationPipe } });
860
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronsComponent, decorators: [{
861
- type: Component,
862
- args: [{ selector: 'fs-system-crons', template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n <div *ngIf=\"row.cronSetting\">\n <small>{{row.cronSetting.summary}}</small>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column align=\"center\">\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.host || row.processId; else status\">\n <fs-popover \n [maxWidth]=\"null\"\n [template]=\"statusPopover\" \n [indication]=\"true\"\n size=\"small\">\n <ng-container *ngTemplateOutlet=\"status\"></ng-container>\n </fs-popover>\n <ng-template #statusPopover>\n <div *ngIf=\"row.host\">Host: {{row.host}}</div>\n <div *ngIf=\"row.processId\">Process ID: {{row.processId}}</div>\n <div *ngIf=\"row.processState\">Process State: {{CronProcessStates[row.processState]}}</div>\n </ng-template>\n </ng-container>\n <ng-template #status>\n {{CronStates[row.state]}}\n </ng-template>\n <ng-container *ngIf=\"row.state === CronState.Running\">\n <div class=\"small\">\n Duration: {{ row.runningDuration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-container> \n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Last Ran</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div class=\"small\" *ngIf=\"row.duration\">\n Duration: {{ row.duration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Next Run</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.state !== CronState.Disabled\">\n <app-next-run [cron]=\"row\"></app-next-run>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Timeout Hours</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.cronSetting.timeout}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""] }]
863
- }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i1.MatDialog }, { type: i3$3.FsPrompt }]; }, propDecorators: { list: [{
864
- type: ViewChild,
865
- args: [FsListComponent, { static: true }]
866
- }], enable: [{
867
- type: Input
868
- }], disable: [{
869
- type: Input
870
- }], kill: [{
871
- type: Input
872
- }], queue: [{
873
- type: Input
874
- }], run: [{
875
- type: Input
876
- }], loadCrons: [{
877
- type: Input
878
- }], loadCron: [{
879
- type: Input
880
- }], loadCronLogs: [{
881
- type: Input
882
- }], bulk: [{
883
- type: Input
681
+ class CronsComponent {
682
+ constructor(_message, _dialog, _prompt) {
683
+ this._message = _message;
684
+ this._dialog = _dialog;
685
+ this._prompt = _prompt;
686
+ this.config = null;
687
+ this.CronStates = indexNameValue(CronStates);
688
+ this.CronProcessStates = indexNameValue(CronProcessStates);
689
+ this.CronState = CronState;
690
+ this._destroy$ = new Subject();
691
+ }
692
+ ngOnInit() {
693
+ this._configList();
694
+ }
695
+ open(cron) {
696
+ this._dialog.open(CronComponent, {
697
+ data: {
698
+ cron,
699
+ loadCronLogs: this.loadCronLogs,
700
+ loadCron: this.loadCron,
701
+ cronActions: this.getCronActions(),
702
+ },
703
+ width: '85%',
704
+ });
705
+ }
706
+ getCronActions() {
707
+ return [
708
+ {
709
+ action: (data) => {
710
+ return this.queue(data)
711
+ .pipe(tap(() => {
712
+ this._message.success('Queued cron');
713
+ this.list.reload();
714
+ }));
715
+ },
716
+ label: 'Queue',
717
+ show: (cron) => {
718
+ return cron.state === CronState.Idle || cron.state === CronState.Failed;
719
+ },
720
+ },
721
+ {
722
+ action: (data) => {
723
+ return this.run(data)
724
+ .pipe(tap(() => {
725
+ this._message.success('Cron ran');
726
+ this.list.reload();
727
+ }));
728
+ },
729
+ label: 'Run',
730
+ show: (cron) => {
731
+ return cron.state === CronState.Idle || cron.state === CronState.Failed;
732
+ },
733
+ },
734
+ {
735
+ action: (data) => {
736
+ return this.enable(data)
737
+ .pipe(tap(() => {
738
+ this._message.success('Enabled cron');
739
+ this.list.reload();
740
+ }));
741
+ },
742
+ label: 'Enable',
743
+ show: (cron) => {
744
+ return cron.state === CronState.Disabled;
745
+ },
746
+ },
747
+ {
748
+ action: (data) => {
749
+ return this.disable(data)
750
+ .pipe(tap(() => {
751
+ this._message.success('Disabled cron');
752
+ this.list.reload();
753
+ }));
754
+ },
755
+ label: 'Disable',
756
+ show: (cron) => {
757
+ return cron.state === CronState.Idle || cron.state === CronState.Failed;
758
+ },
759
+ },
760
+ {
761
+ action: (data) => {
762
+ return this._prompt.confirm({
763
+ title: 'Confirm',
764
+ template: 'Are you sure you would like to kill the cron?',
765
+ })
766
+ .pipe(switchMap(() => {
767
+ return this.kill(data);
768
+ }), tap(() => {
769
+ this._message.success('Killed cron');
770
+ this.list.reload();
771
+ }), takeUntil(this._destroy$));
772
+ },
773
+ label: 'Kill',
774
+ show: (cron) => {
775
+ return cron.state === CronState.Running;
776
+ },
777
+ },
778
+ {
779
+ action: (data) => {
780
+ return this._prompt.confirm({
781
+ title: 'Confirm',
782
+ template: 'Are you sure you would like to reset the cron?',
783
+ })
784
+ .pipe(switchMap(() => {
785
+ return this.enable(data);
786
+ }), tap(() => {
787
+ this._message.success('Reset cron');
788
+ this.list.reload();
789
+ }), takeUntil(this._destroy$));
790
+ },
791
+ label: 'Reset',
792
+ show: (cron) => {
793
+ return cron.state === CronState.Killing || cron.state === CronState.Running || cron.state === CronState.Failed || cron.state === CronState.Queued;
794
+ },
795
+ },
796
+ ];
797
+ }
798
+ ngOnDestroy() {
799
+ this._destroy$.next();
800
+ this._destroy$.complete();
801
+ }
802
+ _configList() {
803
+ this.config = {
804
+ paging: false,
805
+ filters: [
806
+ {
807
+ type: ItemType.Keyword,
808
+ name: 'keyword',
809
+ label: 'Search',
810
+ },
811
+ ],
812
+ rowActions: this.getCronActions()
813
+ .map((rowAction) => {
814
+ return Object.assign(Object.assign({}, rowAction), { click: (cron) => {
815
+ rowAction.action(cron)
816
+ .subscribe();
817
+ } });
818
+ }),
819
+ fetch: (query) => {
820
+ query = Object.assign(Object.assign({}, query), { timezone: Intl.DateTimeFormat().resolvedOptions().timeZone });
821
+ return this.loadCrons(query)
822
+ .pipe(map((crons) => ({
823
+ data: crons
824
+ .map((cron) => {
825
+ return Object.assign(Object.assign({}, cron), { runningDuration: differenceInSeconds(parse(cron.createDate), new Date()) });
826
+ }),
827
+ })));
828
+ },
829
+ };
830
+ if (this.bulk) {
831
+ this.config.selection = {
832
+ selectAll: false,
833
+ actions: [
834
+ {
835
+ type: SelectionActionType.Action,
836
+ name: 'disable',
837
+ label: 'Disable',
838
+ },
839
+ {
840
+ type: SelectionActionType.Action,
841
+ name: 'enable',
842
+ label: 'Enable',
843
+ },
844
+ ],
845
+ actionSelected: (action) => {
846
+ return this.bulk(action.action.name, action.selected)
847
+ .pipe(tap(() => {
848
+ this.list.reload();
849
+ this._message.success('Applied Changes');
850
+ }));
851
+ },
852
+ };
853
+ }
854
+ }
855
+ }
856
+ CronsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronsComponent, deps: [{ token: i1$1.FsMessage }, { token: i1.MatDialog }, { token: i3$2.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
857
+ CronsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CronsComponent, selector: "fs-system-crons", inputs: { enable: "enable", disable: "disable", kill: "kill", queue: "queue", run: "run", loadCrons: "loadCrons", loadCron: "loadCron", loadCronLogs: "loadCronLogs", bulk: "bulk" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n <div *ngIf=\"row.cronSetting\">\n <small>{{row.cronSetting.summary}}</small>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column align=\"center\">\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.host || row.processId; else status\">\n <fs-popover \n [maxWidth]=\"null\"\n [template]=\"statusPopover\" \n [indication]=\"true\"\n size=\"small\">\n <ng-container *ngTemplateOutlet=\"status\"></ng-container>\n </fs-popover>\n <ng-template #statusPopover>\n <div *ngIf=\"row.host\">Host: {{row.host}}</div>\n <div *ngIf=\"row.processId\">Process ID: {{row.processId}}</div>\n <div *ngIf=\"row.processState\">Process State: {{CronProcessStates[row.processState]}}</div>\n </ng-template>\n </ng-container>\n <ng-template #status>\n {{CronStates[row.state]}}\n </ng-template>\n <ng-container *ngIf=\"row.state === CronState.Running\">\n <div class=\"small\">\n Duration: {{ row.runningDuration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-container> \n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Last Ran</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div class=\"small\" *ngIf=\"row.duration\">\n Duration: {{ row.duration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Next Run</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.state !== CronState.Disabled\">\n <app-next-run [cron]=\"row\"></app-next-run>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Timeout Hours</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.cronSetting.timeout}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { kind: "component", type: i5.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i5.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { kind: "directive", type: i5.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: i5.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { kind: "component", type: i7.FsPopoverComponent, selector: "fs-popover" }, { kind: "component", type: CronNextRunComponent, selector: "app-next-run", inputs: ["cron"] }, { kind: "pipe", type: i4$2.FsDateDurationPipe, name: "fsDateDuration" }] });
858
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronsComponent, decorators: [{
859
+ type: Component,
860
+ args: [{ selector: 'fs-system-crons', template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n <div *ngIf=\"row.cronSetting\">\n <small>{{row.cronSetting.summary}}</small>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column align=\"center\">\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.host || row.processId; else status\">\n <fs-popover \n [maxWidth]=\"null\"\n [template]=\"statusPopover\" \n [indication]=\"true\"\n size=\"small\">\n <ng-container *ngTemplateOutlet=\"status\"></ng-container>\n </fs-popover>\n <ng-template #statusPopover>\n <div *ngIf=\"row.host\">Host: {{row.host}}</div>\n <div *ngIf=\"row.processId\">Process ID: {{row.processId}}</div>\n <div *ngIf=\"row.processState\">Process State: {{CronProcessStates[row.processState]}}</div>\n </ng-template>\n </ng-container>\n <ng-template #status>\n {{CronStates[row.state]}}\n </ng-template>\n <ng-container *ngIf=\"row.state === CronState.Running\">\n <div class=\"small\">\n Duration: {{ row.runningDuration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-container> \n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Last Ran</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div class=\"small\" *ngIf=\"row.duration\">\n Duration: {{ row.duration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Next Run</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.state !== CronState.Disabled\">\n <app-next-run [cron]=\"row\"></app-next-run>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Timeout Hours</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.cronSetting.timeout}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n" }]
861
+ }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i1.MatDialog }, { type: i3$2.FsPrompt }]; }, propDecorators: { list: [{
862
+ type: ViewChild,
863
+ args: [FsListComponent, { static: true }]
864
+ }], enable: [{
865
+ type: Input
866
+ }], disable: [{
867
+ type: Input
868
+ }], kill: [{
869
+ type: Input
870
+ }], queue: [{
871
+ type: Input
872
+ }], run: [{
873
+ type: Input
874
+ }], loadCrons: [{
875
+ type: Input
876
+ }], loadCron: [{
877
+ type: Input
878
+ }], loadCronLogs: [{
879
+ type: Input
880
+ }], bulk: [{
881
+ type: Input
884
882
  }] } });
885
883
 
886
- class DashboardComponent {
887
- constructor(_message, _cdRef, _buildService) {
888
- this._message = _message;
889
- this._cdRef = _cdRef;
890
- this._buildService = _buildService;
891
- this.buttonActions = [];
892
- this.menuActions = [];
893
- this._destroy$ = new Subject();
894
- this.actions = [];
895
- }
896
- ngOnInit() {
897
- this._load();
898
- this.buttonActions = this.actions.filter(item => { return !item.menu; });
899
- this.menuActions = this.actions.filter(item => { return item.menu; });
900
- this.build = this._buildService.build;
901
- this._buildService.build$
902
- .pipe(takeUntil(this._destroy$))
903
- .subscribe((build) => {
904
- this.build = build;
905
- this._cdRef.markForCheck();
906
- });
907
- }
908
- _load() {
909
- this.load()
910
- .subscribe((dashboard) => {
911
- this.dashboard = dashboard;
912
- this.dashboard.cronRanAttention = !dashboard.cronRan ||
913
- differenceInMinutes(new Date(), new Date(dashboard.cronRan)) > 15;
914
- this._cdRef.markForCheck();
915
- });
916
- }
917
- ngOnDestroy() {
918
- this._destroy$.next();
919
- this._destroy$.complete();
920
- }
921
- actionClick(action) {
922
- action.click();
923
- }
924
- initClick() {
925
- this.init()
926
- .subscribe(() => {
927
- this._message.success('Successfully initialized the system');
928
- });
929
- }
930
- upgradeClick() {
931
- this.upgrade()
932
- .subscribe(() => {
933
- this._load();
934
- this._message.success('Successfully upgraded the system');
935
- });
936
- }
937
- }
938
- DashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DashboardComponent, deps: [{ token: i1$1.FsMessage }, { token: i0.ChangeDetectorRef }, { token: i2$3.FsBuildService }], target: i0.ɵɵFactoryTarget.Component });
939
- DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: DashboardComponent, selector: "fs-system-dashboard", inputs: { init: "init", upgrade: "upgrade", load: "load", actions: "actions" }, ngImport: i0, template: "<div *fsSkeleton=\"dashboard\">\r\n <div class=\"fs-row.gap-large.wrap.align-start\">\r\n <div>\r\n <h2>Server</h2>\r\n\r\n <fs-label-field>\r\n <fs-label>Date/Time</fs-label>\r\n {{dashboard.serverTime | fsDateFormat: 'date-time'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Timezone</fs-label>\r\n {{dashboard.serverTimezone}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Hostname</fs-label>\r\n {{dashboard.serverHostname}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Directory</fs-label>\r\n {{dashboard.appDirectory}}\r\n </fs-label-field>\r\n </div>\r\n\r\n <div>\r\n <h2>System</h2>\r\n <fs-label-field>\r\n <fs-label>Mode</fs-label>\r\n {{dashboard.appMode}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Notification Recipients</fs-label>\r\n {{dashboard.notifyRecipients.join(', ')}}\r\n </fs-label-field>\r\n </div>\r\n\r\n <div>\r\n <h2>Database</h2>\r\n\r\n <fs-label-field>\r\n <fs-label>Name</fs-label>\r\n {{dashboard.databaseName}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Date/Time</fs-label>\r\n {{dashboard.databaseTime | fsDateFormat: 'date-time'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Timezone</fs-label>\r\n {{dashboard.databaseTimezone}}\r\n </fs-label-field>\r\n </div>\r\n\r\n <div *ngIf=\"build || dashboard.upgrades.length\">\r\n <ng-container *ngIf=\"build\">\r\n <h2>Build</h2>\r\n <fs-label-field>\r\n <fs-label>Version</fs-label>\r\n {{build.version || 'Unknown'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Date</fs-label>\r\n {{ (build.date | fsDateFormat: 'date-time') || 'Unknown' }}\r\n </fs-label-field>\r\n </ng-container>\r\n\r\n <fs-label-field *ngIf=\"dashboard.upgrades.length\">\r\n <fs-label>Pending Upgrades</fs-label>\r\n <span class=\"attention\" [ngClass]=\"{ 'needs-attention': !!dashboard.upgrades.length }\">\r\n {{dashboard.upgrades.length}}\r\n <mat-icon\r\n [matTooltip]=\"dashboard.upgrades.join('\\n')\"\r\n matTooltipClass=\"tooltip-pending-upgrades\"\r\n >\r\n warning\r\n </mat-icon>\r\n </span>\r\n </fs-label-field>\r\n </div>\r\n\r\n <div>\r\n <h2>Cron</h2>\r\n\r\n <fs-label-field>\r\n <fs-label>Last Ran</fs-label>\r\n <span class=\"attention\" [ngClass]=\"{ 'needs-attention': dashboard.cronRanAttention }\">\r\n <span *ngIf=\"!dashboard.cronRan\">Never</span>\r\n <span *ngIf=\"dashboard.cronRan\">{{dashboard.cronRan | fsDateFormat: 'date-time'}}</span>\r\n <mat-icon>warning</mat-icon>\r\n </span>\r\n </fs-label-field>\r\n </div>\r\n </div>\r\n \r\n\r\n <div>\r\n <div class=\"actions\">\r\n <button mat-raised-button (click)=\"upgradeClick()\">Run Upgrades</button>\r\n <button mat-raised-button (click)=\"initClick()\">Init System</button>\r\n <button\r\n *ngFor=\"let action of buttonActions\"\r\n mat-raised-button\r\n (click)=\"actionClick(action)\">\r\n {{action.label}}\r\n </button>\r\n\r\n <ng-container *ngIf=\"menuActions.length\">\r\n <fs-menu buttonClass=\"mat-raised-button menu-button\">\r\n <ng-template\r\n *ngFor=\"let action of menuActions\"\r\n fs-menu-item\r\n (click)=\"actionClick(action)\">\r\n {{action.label}}\r\n </ng-template>\r\n </fs-menu>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host ::ng-deep .menu-button{box-shadow:none}h2{margin-top:0}.actions{display:flex;align-items:center;flex-wrap:wrap}.actions button,.actions fs-menu{margin-bottom:10px;margin-right:5px}table td{padding:3px}.attention{display:flex;align-items:center}.attention mat-icon{display:none;margin-left:2px}.attention.needs-attention{color:#c00}.attention.needs-attention mat-icon{display:inline}::ng-deep .tooltip-pending-upgrades{white-space:pre-line}@media (max-width: 1000px){:host ::ng-deep .menu-button{width:100%;border-radius:4px}}\n"], components: [{ type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i3$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass", "buttonType", "buttonColor"], outputs: ["opened", "closed"] }], directives: [{ type: i5.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }], pipes: { "fsDateFormat": i4$2.FsDateFormatPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
940
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DashboardComponent, decorators: [{
941
- type: Component,
942
- args: [{ selector: 'fs-system-dashboard', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *fsSkeleton=\"dashboard\">\r\n <div class=\"fs-row.gap-large.wrap.align-start\">\r\n <div>\r\n <h2>Server</h2>\r\n\r\n <fs-label-field>\r\n <fs-label>Date/Time</fs-label>\r\n {{dashboard.serverTime | fsDateFormat: 'date-time'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Timezone</fs-label>\r\n {{dashboard.serverTimezone}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Hostname</fs-label>\r\n {{dashboard.serverHostname}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Directory</fs-label>\r\n {{dashboard.appDirectory}}\r\n </fs-label-field>\r\n </div>\r\n\r\n <div>\r\n <h2>System</h2>\r\n <fs-label-field>\r\n <fs-label>Mode</fs-label>\r\n {{dashboard.appMode}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Notification Recipients</fs-label>\r\n {{dashboard.notifyRecipients.join(', ')}}\r\n </fs-label-field>\r\n </div>\r\n\r\n <div>\r\n <h2>Database</h2>\r\n\r\n <fs-label-field>\r\n <fs-label>Name</fs-label>\r\n {{dashboard.databaseName}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Date/Time</fs-label>\r\n {{dashboard.databaseTime | fsDateFormat: 'date-time'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Timezone</fs-label>\r\n {{dashboard.databaseTimezone}}\r\n </fs-label-field>\r\n </div>\r\n\r\n <div *ngIf=\"build || dashboard.upgrades.length\">\r\n <ng-container *ngIf=\"build\">\r\n <h2>Build</h2>\r\n <fs-label-field>\r\n <fs-label>Version</fs-label>\r\n {{build.version || 'Unknown'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>Date</fs-label>\r\n {{ (build.date | fsDateFormat: 'date-time') || 'Unknown' }}\r\n </fs-label-field>\r\n </ng-container>\r\n\r\n <fs-label-field *ngIf=\"dashboard.upgrades.length\">\r\n <fs-label>Pending Upgrades</fs-label>\r\n <span class=\"attention\" [ngClass]=\"{ 'needs-attention': !!dashboard.upgrades.length }\">\r\n {{dashboard.upgrades.length}}\r\n <mat-icon\r\n [matTooltip]=\"dashboard.upgrades.join('\\n')\"\r\n matTooltipClass=\"tooltip-pending-upgrades\"\r\n >\r\n warning\r\n </mat-icon>\r\n </span>\r\n </fs-label-field>\r\n </div>\r\n\r\n <div>\r\n <h2>Cron</h2>\r\n\r\n <fs-label-field>\r\n <fs-label>Last Ran</fs-label>\r\n <span class=\"attention\" [ngClass]=\"{ 'needs-attention': dashboard.cronRanAttention }\">\r\n <span *ngIf=\"!dashboard.cronRan\">Never</span>\r\n <span *ngIf=\"dashboard.cronRan\">{{dashboard.cronRan | fsDateFormat: 'date-time'}}</span>\r\n <mat-icon>warning</mat-icon>\r\n </span>\r\n </fs-label-field>\r\n </div>\r\n </div>\r\n \r\n\r\n <div>\r\n <div class=\"actions\">\r\n <button mat-raised-button (click)=\"upgradeClick()\">Run Upgrades</button>\r\n <button mat-raised-button (click)=\"initClick()\">Init System</button>\r\n <button\r\n *ngFor=\"let action of buttonActions\"\r\n mat-raised-button\r\n (click)=\"actionClick(action)\">\r\n {{action.label}}\r\n </button>\r\n\r\n <ng-container *ngIf=\"menuActions.length\">\r\n <fs-menu buttonClass=\"mat-raised-button menu-button\">\r\n <ng-template\r\n *ngFor=\"let action of menuActions\"\r\n fs-menu-item\r\n (click)=\"actionClick(action)\">\r\n {{action.label}}\r\n </ng-template>\r\n </fs-menu>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host ::ng-deep .menu-button{box-shadow:none}h2{margin-top:0}.actions{display:flex;align-items:center;flex-wrap:wrap}.actions button,.actions fs-menu{margin-bottom:10px;margin-right:5px}table td{padding:3px}.attention{display:flex;align-items:center}.attention mat-icon{display:none;margin-left:2px}.attention.needs-attention{color:#c00}.attention.needs-attention mat-icon{display:inline}::ng-deep .tooltip-pending-upgrades{white-space:pre-line}@media (max-width: 1000px){:host ::ng-deep .menu-button{width:100%;border-radius:4px}}\n"] }]
943
- }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i0.ChangeDetectorRef }, { type: i2$3.FsBuildService }]; }, propDecorators: { init: [{
944
- type: Input
945
- }], upgrade: [{
946
- type: Input
947
- }], load: [{
948
- type: Input
949
- }], actions: [{
950
- type: Input
884
+ class DashboardComponent {
885
+ constructor(_message, _cdRef, _buildService) {
886
+ this._message = _message;
887
+ this._cdRef = _cdRef;
888
+ this._buildService = _buildService;
889
+ this.buttonActions = [];
890
+ this.menuActions = [];
891
+ this._destroy$ = new Subject();
892
+ this.actions = [];
893
+ }
894
+ ngOnInit() {
895
+ this._load();
896
+ this.buttonActions = this.actions.filter(item => { return !item.menu; });
897
+ this.menuActions = this.actions.filter(item => { return item.menu; });
898
+ this.build = this._buildService.build;
899
+ this._buildService.build$
900
+ .pipe(takeUntil(this._destroy$))
901
+ .subscribe((build) => {
902
+ this.build = build;
903
+ this._cdRef.markForCheck();
904
+ });
905
+ }
906
+ _load() {
907
+ this.load()
908
+ .subscribe((dashboard) => {
909
+ this.dashboard = dashboard;
910
+ this.dashboard.cronRanAttention = !dashboard.cronRan ||
911
+ differenceInMinutes(new Date(), new Date(dashboard.cronRan)) > 15;
912
+ this._cdRef.markForCheck();
913
+ });
914
+ }
915
+ ngOnDestroy() {
916
+ this._destroy$.next();
917
+ this._destroy$.complete();
918
+ }
919
+ actionClick(action) {
920
+ action.click();
921
+ }
922
+ initClick() {
923
+ this.init()
924
+ .subscribe(() => {
925
+ this._message.success('Successfully initialized the system');
926
+ });
927
+ }
928
+ upgradeClick() {
929
+ this.upgrade()
930
+ .subscribe(() => {
931
+ this._load();
932
+ this._message.success('Successfully upgraded the system');
933
+ });
934
+ }
935
+ }
936
+ DashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardComponent, deps: [{ token: i1$1.FsMessage }, { token: i0.ChangeDetectorRef }, { token: i2$2.FsBuildService }], target: i0.ɵɵFactoryTarget.Component });
937
+ DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DashboardComponent, selector: "fs-system-dashboard", inputs: { init: "init", upgrade: "upgrade", load: "load", actions: "actions" }, ngImport: i0, template: "<div *fsSkeleton=\"dashboard\">\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <div>\n <h2>Server</h2>\n\n <fs-label-field>\n <fs-label>Date/Time</fs-label>\n {{dashboard.serverTime | fsDateFormat: 'date-time'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Timezone</fs-label>\n {{dashboard.serverTimezone}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Hostname</fs-label>\n {{dashboard.serverHostname}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Directory</fs-label>\n {{dashboard.appDirectory}}\n </fs-label-field>\n </div>\n\n <div>\n <h2>System</h2>\n <fs-label-field>\n <fs-label>Mode</fs-label>\n {{dashboard.appMode}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Notification Recipients</fs-label>\n {{dashboard.notifyRecipients.join(', ')}}\n </fs-label-field>\n </div>\n\n <div>\n <h2>Database</h2>\n\n <fs-label-field>\n <fs-label>Name</fs-label>\n {{dashboard.databaseName}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Date/Time</fs-label>\n {{dashboard.databaseTime | fsDateFormat: 'date-time'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Timezone</fs-label>\n {{dashboard.databaseTimezone}}\n </fs-label-field>\n </div>\n\n <div *ngIf=\"build || dashboard.upgrades.length\">\n <ng-container *ngIf=\"build\">\n <h2>Build</h2>\n <fs-label-field>\n <fs-label>Version</fs-label>\n {{build.version || 'Unknown'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Date</fs-label>\n {{ (build.date | fsDateFormat: 'date-time') || 'Unknown' }}\n </fs-label-field>\n </ng-container>\n\n <fs-label-field *ngIf=\"dashboard.upgrades.length\">\n <fs-label>Pending Upgrades</fs-label>\n <span class=\"attention\" [ngClass]=\"{ 'needs-attention': !!dashboard.upgrades.length }\">\n {{dashboard.upgrades.length}}\n <mat-icon\n [matTooltip]=\"dashboard.upgrades.join('\\n')\"\n matTooltipClass=\"tooltip-pending-upgrades\"\n >\n warning\n </mat-icon>\n </span>\n </fs-label-field>\n </div>\n\n <div>\n <h2>Cron</h2>\n\n <fs-label-field>\n <fs-label>Last Ran</fs-label>\n <span class=\"attention\" [ngClass]=\"{ 'needs-attention': dashboard.cronRanAttention }\">\n <span *ngIf=\"!dashboard.cronRan\">Never</span>\n <span *ngIf=\"dashboard.cronRan\">{{dashboard.cronRan | fsDateFormat: 'date-time'}}</span>\n <mat-icon>warning</mat-icon>\n </span>\n </fs-label-field>\n </div>\n </div>\n \n\n <div>\n <div class=\"actions\">\n <button mat-raised-button (click)=\"upgradeClick()\">Run Upgrades</button>\n <button mat-raised-button (click)=\"initClick()\">Init System</button>\n <button\n *ngFor=\"let action of buttonActions\"\n mat-raised-button\n (click)=\"actionClick(action)\">\n {{action.label}}\n </button>\n\n <ng-container *ngIf=\"menuActions.length\">\n <fs-menu buttonClass=\"mat-raised-button menu-button\">\n <ng-template\n *ngFor=\"let action of menuActions\"\n fs-menu-item\n (click)=\"actionClick(action)\">\n {{action.label}}\n </ng-template>\n </fs-menu>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: [":host ::ng-deep .menu-button{box-shadow:none}h2{margin-top:0}.actions{display:flex;align-items:center;flex-wrap:wrap}.actions button,.actions fs-menu{margin-bottom:10px;margin-right:5px}table td{padding:3px}.attention{display:flex;align-items:center}.attention mat-icon{display:none;margin-left:2px}.attention.needs-attention{color:#c00}.attention.needs-attention mat-icon{display:inline}::ng-deep .tooltip-pending-upgrades{white-space:pre-line}@media (max-width: 1000px){:host ::ng-deep .menu-button{width:100%;border-radius:4px}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "component", type: i8.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i8.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i9$1.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass", "buttonType", "buttonColor"], outputs: ["opened", "closed"] }, { kind: "directive", type: i9$1.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }, { kind: "pipe", type: i4$2.FsDateFormatPipe, name: "fsDateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
938
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardComponent, decorators: [{
939
+ type: Component,
940
+ args: [{ selector: 'fs-system-dashboard', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *fsSkeleton=\"dashboard\">\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <div>\n <h2>Server</h2>\n\n <fs-label-field>\n <fs-label>Date/Time</fs-label>\n {{dashboard.serverTime | fsDateFormat: 'date-time'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Timezone</fs-label>\n {{dashboard.serverTimezone}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Hostname</fs-label>\n {{dashboard.serverHostname}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Directory</fs-label>\n {{dashboard.appDirectory}}\n </fs-label-field>\n </div>\n\n <div>\n <h2>System</h2>\n <fs-label-field>\n <fs-label>Mode</fs-label>\n {{dashboard.appMode}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Notification Recipients</fs-label>\n {{dashboard.notifyRecipients.join(', ')}}\n </fs-label-field>\n </div>\n\n <div>\n <h2>Database</h2>\n\n <fs-label-field>\n <fs-label>Name</fs-label>\n {{dashboard.databaseName}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Date/Time</fs-label>\n {{dashboard.databaseTime | fsDateFormat: 'date-time'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Timezone</fs-label>\n {{dashboard.databaseTimezone}}\n </fs-label-field>\n </div>\n\n <div *ngIf=\"build || dashboard.upgrades.length\">\n <ng-container *ngIf=\"build\">\n <h2>Build</h2>\n <fs-label-field>\n <fs-label>Version</fs-label>\n {{build.version || 'Unknown'}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>Date</fs-label>\n {{ (build.date | fsDateFormat: 'date-time') || 'Unknown' }}\n </fs-label-field>\n </ng-container>\n\n <fs-label-field *ngIf=\"dashboard.upgrades.length\">\n <fs-label>Pending Upgrades</fs-label>\n <span class=\"attention\" [ngClass]=\"{ 'needs-attention': !!dashboard.upgrades.length }\">\n {{dashboard.upgrades.length}}\n <mat-icon\n [matTooltip]=\"dashboard.upgrades.join('\\n')\"\n matTooltipClass=\"tooltip-pending-upgrades\"\n >\n warning\n </mat-icon>\n </span>\n </fs-label-field>\n </div>\n\n <div>\n <h2>Cron</h2>\n\n <fs-label-field>\n <fs-label>Last Ran</fs-label>\n <span class=\"attention\" [ngClass]=\"{ 'needs-attention': dashboard.cronRanAttention }\">\n <span *ngIf=\"!dashboard.cronRan\">Never</span>\n <span *ngIf=\"dashboard.cronRan\">{{dashboard.cronRan | fsDateFormat: 'date-time'}}</span>\n <mat-icon>warning</mat-icon>\n </span>\n </fs-label-field>\n </div>\n </div>\n \n\n <div>\n <div class=\"actions\">\n <button mat-raised-button (click)=\"upgradeClick()\">Run Upgrades</button>\n <button mat-raised-button (click)=\"initClick()\">Init System</button>\n <button\n *ngFor=\"let action of buttonActions\"\n mat-raised-button\n (click)=\"actionClick(action)\">\n {{action.label}}\n </button>\n\n <ng-container *ngIf=\"menuActions.length\">\n <fs-menu buttonClass=\"mat-raised-button menu-button\">\n <ng-template\n *ngFor=\"let action of menuActions\"\n fs-menu-item\n (click)=\"actionClick(action)\">\n {{action.label}}\n </ng-template>\n </fs-menu>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: [":host ::ng-deep .menu-button{box-shadow:none}h2{margin-top:0}.actions{display:flex;align-items:center;flex-wrap:wrap}.actions button,.actions fs-menu{margin-bottom:10px;margin-right:5px}table td{padding:3px}.attention{display:flex;align-items:center}.attention mat-icon{display:none;margin-left:2px}.attention.needs-attention{color:#c00}.attention.needs-attention mat-icon{display:inline}::ng-deep .tooltip-pending-upgrades{white-space:pre-line}@media (max-width: 1000px){:host ::ng-deep .menu-button{width:100%;border-radius:4px}}\n"] }]
941
+ }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i0.ChangeDetectorRef }, { type: i2$2.FsBuildService }]; }, propDecorators: { init: [{
942
+ type: Input
943
+ }], upgrade: [{
944
+ type: Input
945
+ }], load: [{
946
+ type: Input
947
+ }], actions: [{
948
+ type: Input
951
949
  }] } });
952
950
 
953
- class InfoComponent {
954
- ngAfterViewInit() {
955
- this._load();
956
- }
957
- _load() {
958
- this.load()
959
- .subscribe((info) => {
960
- info += '<style>body { background: transparent; }</style>';
961
- const doc = this.iframe.nativeElement.contentDocument || this.iframe.nativeElement.contentWindow;
962
- doc.open();
963
- doc.write(info);
964
- doc.close();
965
- const scrollHeight = (this.iframe.nativeElement.contentWindow.document.documentElement.scrollHeight + 100);
966
- this.iframe.nativeElement.style.height = `${scrollHeight}px`;
967
- });
968
- }
969
- }
970
- InfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
971
- InfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: InfoComponent, selector: "fs-system-info", inputs: { load: "load" }, viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true }], ngImport: i0, template: "<iframe #iframe></iframe>\r\n", styles: ["iframe{width:100%;border:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: InfoComponent, decorators: [{
973
- type: Component,
974
- args: [{ selector: 'fs-system-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<iframe #iframe></iframe>\r\n", styles: ["iframe{width:100%;border:0}\n"] }]
975
- }], propDecorators: { iframe: [{
976
- type: ViewChild,
977
- args: ['iframe']
978
- }], load: [{
979
- type: Input
951
+ class InfoComponent {
952
+ ngAfterViewInit() {
953
+ this._load();
954
+ }
955
+ _load() {
956
+ this.load()
957
+ .subscribe((info) => {
958
+ info += '<style>body { background: transparent; }</style>';
959
+ const doc = this.iframe.nativeElement.contentDocument || this.iframe.nativeElement.contentWindow;
960
+ doc.open();
961
+ doc.write(info);
962
+ doc.close();
963
+ const scrollHeight = (this.iframe.nativeElement.contentWindow.document.documentElement.scrollHeight + 100);
964
+ this.iframe.nativeElement.style.height = `${scrollHeight}px`;
965
+ });
966
+ }
967
+ }
968
+ InfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
969
+ InfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: InfoComponent, selector: "fs-system-info", inputs: { load: "load" }, viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true }], ngImport: i0, template: "<iframe #iframe></iframe>\n", styles: ["iframe{width:100%;border:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
970
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InfoComponent, decorators: [{
971
+ type: Component,
972
+ args: [{ selector: 'fs-system-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<iframe #iframe></iframe>\n", styles: ["iframe{width:100%;border:0}\n"] }]
973
+ }], propDecorators: { iframe: [{
974
+ type: ViewChild,
975
+ args: ['iframe']
976
+ }], load: [{
977
+ type: Input
980
978
  }] } });
981
979
 
982
- class ProcessComponent {
983
- constructor(data, _message, _cdRef, _prompt) {
984
- this.data = data;
985
- this._message = _message;
986
- this._cdRef = _cdRef;
987
- this._prompt = _prompt;
988
- this.ProcessStates = indexNameValue(ProcessStates);
989
- this.ProcessProcessStates = indexNameValue(ProcessProcessStates);
990
- this.ProcessState = ProcessState;
991
- this._destroy$ = new Subject();
992
- }
993
- ngOnInit() {
994
- if (this.data.loadProcess) {
995
- this.load$()
996
- .subscribe(() => {
997
- this.runningRefresh();
998
- });
999
- }
1000
- else {
1001
- this.process = this.data.process;
1002
- }
1003
- }
1004
- load$() {
1005
- return this.data
1006
- .loadProcess(this.data.process)
1007
- .pipe(tap((process) => {
1008
- this.process = process;
1009
- this._cdRef.markForCheck();
1010
- }));
1011
- }
1012
- runningRefresh() {
1013
- timer(0, 2000)
1014
- .pipe(takeWhile(() => this.process.state === ProcessState.Running), switchMap(() => this.load$()), takeUntil(this._destroy$))
1015
- .subscribe();
1016
- }
1017
- kill() {
1018
- this._prompt.confirm({
1019
- title: 'Kill process',
1020
- template: 'Are you sure you would like to kill the process?',
1021
- })
1022
- .pipe(switchMap(() => this.data.kill(this.data.process)), switchMap(() => this.load$()))
1023
- .subscribe(() => {
1024
- this._message.success('Killed process');
1025
- });
1026
- }
1027
- run() {
1028
- this._message.success('Running process');
1029
- this.data.run(this.data.process)
1030
- .pipe(switchMap(() => this.load$()))
1031
- .subscribe(() => {
1032
- this.runningRefresh();
1033
- });
1034
- }
1035
- queue() {
1036
- this._message.success('Running process');
1037
- this.data.queue(this.data.process)
1038
- .pipe(switchMap(() => this.load$()))
1039
- .subscribe();
1040
- }
1041
- download() {
1042
- this.data.download(this.data.process);
1043
- }
1044
- ngOnDestroy() {
1045
- this._destroy$.next();
1046
- this._destroy$.complete();
1047
- }
1048
- }
1049
- ProcessComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ProcessComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.FsMessage }, { token: i0.ChangeDetectorRef }, { token: i3$3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
1050
- ProcessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ProcessComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"process\">\n <div mat-dialog-title>Process</div>\n <mat-dialog-content>\n <div class=\"column\">\n <div class=\"fs-row.gap-large.wrap\">\n <fs-label-field>\n <fs-label>\n Name\n </fs-label>\n {{process.prettyName}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n <div class=\"status\" [ngClass]=\"{ 'running': process.state === ProcessState.Running }\">\n {{ProcessStates[process.state]}} \n <ng-container *ngIf=\"process.state === ProcessState.Running\">\n <mat-progress-spinner [diameter]=\"20\" [mode]=\"'indeterminate'\"></mat-progress-spinner>\n </ng-container>\n </div>\n \n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.notify\">\n <fs-label>\n Notification Email\n </fs-label>\n {{process.notify}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Process ID\n </fs-label>\n {{process.pid || 'None'}}\n <ng-container *ngIf=\"process.pid\">\n <div class=\"small\">\n {{ProcessProcessStates[process.processState] || 'Unknown'}}\n </div>\n </ng-container>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.createDate\">\n <fs-label>\n Create Date\n </fs-label>\n {{ process.createDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.startDate\">\n <fs-label>\n Start Date\n </fs-label>\n {{ process.startDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.endDate\">\n <fs-label>\n Complete Date\n </fs-label>\n {{ process.endDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.duration\">\n <fs-label>\n Duration\n </fs-label>\n {{ process.duration | fsDateDuration: {hours: true, minutes: true, seconds: true} }}\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"process.message\">\n <fs-label>\n Message\n </fs-label>\n {{process.message}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.log\">\n <fs-label>\n Log\n </fs-label>\n <div class=\"log\">\n {{process.log}}\n </div>\n </fs-label-field>\n\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Close\n </button>\n <button\n *ngIf=\"process.state === ProcessState.Running && data.kill\"\n mat-button\n (click)=\"kill()\">\n Kill\n </button>\n <button \n *ngIf=\"process.state !== ProcessState.Running && data.run\" \n mat-button \n (click)=\"run()\">\n Run\n </button>\n <button \n *ngIf=\"(\n process.state !== ProcessState.Running && \n process.state !== ProcessState.Queued\n ) && data.queue\" \n mat-button \n (click)=\"queue()\">\n Queue\n </button>\n <button\n *ngIf=\"process.filename\"\n mat-button\n (click)=\"download()\">\n Download\n </button> \n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".log{white-space:pre-line;font-family:monospace;font-size:95%;line-height:130%}.status{display:flex}.status.running{margin-right:28px}.status.running mat-progress-spinner{position:absolute;right:0}\n"], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i5$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i4$2.FsDateFormatPipe, "fsDateDuration": i4$2.FsDateDurationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1051
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ProcessComponent, decorators: [{
1052
- type: Component,
1053
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog *fsSkeleton=\"process\">\n <div mat-dialog-title>Process</div>\n <mat-dialog-content>\n <div class=\"column\">\n <div class=\"fs-row.gap-large.wrap\">\n <fs-label-field>\n <fs-label>\n Name\n </fs-label>\n {{process.prettyName}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n <div class=\"status\" [ngClass]=\"{ 'running': process.state === ProcessState.Running }\">\n {{ProcessStates[process.state]}} \n <ng-container *ngIf=\"process.state === ProcessState.Running\">\n <mat-progress-spinner [diameter]=\"20\" [mode]=\"'indeterminate'\"></mat-progress-spinner>\n </ng-container>\n </div>\n \n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.notify\">\n <fs-label>\n Notification Email\n </fs-label>\n {{process.notify}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Process ID\n </fs-label>\n {{process.pid || 'None'}}\n <ng-container *ngIf=\"process.pid\">\n <div class=\"small\">\n {{ProcessProcessStates[process.processState] || 'Unknown'}}\n </div>\n </ng-container>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.createDate\">\n <fs-label>\n Create Date\n </fs-label>\n {{ process.createDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.startDate\">\n <fs-label>\n Start Date\n </fs-label>\n {{ process.startDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.endDate\">\n <fs-label>\n Complete Date\n </fs-label>\n {{ process.endDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.duration\">\n <fs-label>\n Duration\n </fs-label>\n {{ process.duration | fsDateDuration: {hours: true, minutes: true, seconds: true} }}\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"process.message\">\n <fs-label>\n Message\n </fs-label>\n {{process.message}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.log\">\n <fs-label>\n Log\n </fs-label>\n <div class=\"log\">\n {{process.log}}\n </div>\n </fs-label-field>\n\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Close\n </button>\n <button\n *ngIf=\"process.state === ProcessState.Running && data.kill\"\n mat-button\n (click)=\"kill()\">\n Kill\n </button>\n <button \n *ngIf=\"process.state !== ProcessState.Running && data.run\" \n mat-button \n (click)=\"run()\">\n Run\n </button>\n <button \n *ngIf=\"(\n process.state !== ProcessState.Running && \n process.state !== ProcessState.Queued\n ) && data.queue\" \n mat-button \n (click)=\"queue()\">\n Queue\n </button>\n <button\n *ngIf=\"process.filename\"\n mat-button\n (click)=\"download()\">\n Download\n </button> \n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".log{white-space:pre-line;font-family:monospace;font-size:95%;line-height:130%}.status{display:flex}.status.running{margin-right:28px}.status.running mat-progress-spinner{position:absolute;right:0}\n"] }]
1054
- }], ctorParameters: function () {
1055
- return [{ type: undefined, decorators: [{
1056
- type: Inject,
1057
- args: [MAT_DIALOG_DATA]
1058
- }] }, { type: i1$1.FsMessage }, { type: i0.ChangeDetectorRef }, { type: i3$3.FsPrompt }];
980
+ class ProcessComponent {
981
+ constructor(data, _message, _cdRef, _prompt) {
982
+ this.data = data;
983
+ this._message = _message;
984
+ this._cdRef = _cdRef;
985
+ this._prompt = _prompt;
986
+ this.ProcessStates = indexNameValue(ProcessStates);
987
+ this.ProcessProcessStates = indexNameValue(ProcessProcessStates);
988
+ this.ProcessState = ProcessState;
989
+ this._destroy$ = new Subject();
990
+ }
991
+ ngOnInit() {
992
+ if (this.data.loadProcess) {
993
+ this.load$()
994
+ .subscribe(() => {
995
+ this.runningRefresh();
996
+ });
997
+ }
998
+ else {
999
+ this.process = this.data.process;
1000
+ }
1001
+ }
1002
+ load$() {
1003
+ return this.data
1004
+ .loadProcess(this.data.process)
1005
+ .pipe(tap((process) => {
1006
+ this.process = process;
1007
+ this._cdRef.markForCheck();
1008
+ }));
1009
+ }
1010
+ runningRefresh() {
1011
+ timer(0, 2000)
1012
+ .pipe(takeWhile(() => this.process.state === ProcessState.Running), switchMap(() => this.load$()), takeUntil(this._destroy$))
1013
+ .subscribe();
1014
+ }
1015
+ kill() {
1016
+ this._prompt.confirm({
1017
+ title: 'Kill process',
1018
+ template: 'Are you sure you would like to kill the process?',
1019
+ })
1020
+ .pipe(switchMap(() => this.data.kill(this.data.process)), switchMap(() => this.load$()))
1021
+ .subscribe(() => {
1022
+ this._message.success('Killed process');
1023
+ });
1024
+ }
1025
+ run() {
1026
+ this._message.success('Running process');
1027
+ this.data.run(this.data.process)
1028
+ .pipe(switchMap(() => this.load$()))
1029
+ .subscribe(() => {
1030
+ this.runningRefresh();
1031
+ });
1032
+ }
1033
+ queue() {
1034
+ this._message.success('Running process');
1035
+ this.data.queue(this.data.process)
1036
+ .pipe(switchMap(() => this.load$()))
1037
+ .subscribe();
1038
+ }
1039
+ download() {
1040
+ this.data.download(this.data.process);
1041
+ }
1042
+ ngOnDestroy() {
1043
+ this._destroy$.next();
1044
+ this._destroy$.complete();
1045
+ }
1046
+ }
1047
+ ProcessComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ProcessComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.FsMessage }, { token: i0.ChangeDetectorRef }, { token: i3$2.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
1048
+ ProcessComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ProcessComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"process\">\n <div mat-dialog-title>Process</div>\n <mat-dialog-content>\n <div class=\"column\">\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <fs-label-field>\n <fs-label>\n Name\n </fs-label>\n {{process.prettyName}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n <div class=\"status\" [ngClass]=\"{ 'running': process.state === ProcessState.Running }\">\n {{ProcessStates[process.state]}} \n <ng-container *ngIf=\"process.state === ProcessState.Running\">\n <mat-progress-spinner [diameter]=\"20\" [mode]=\"'indeterminate'\"></mat-progress-spinner>\n </ng-container>\n </div>\n \n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.notify\">\n <fs-label>\n Notification Email\n </fs-label>\n {{process.notify}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Process ID\n </fs-label>\n {{process.pid || 'None'}}\n <ng-container *ngIf=\"process.pid\">\n <div class=\"small\">\n {{ProcessProcessStates[process.processState] || 'Unknown'}}\n </div>\n </ng-container>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.createDate\">\n <fs-label>\n Create Date\n </fs-label>\n {{ process.createDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.startDate\">\n <fs-label>\n Start Date\n </fs-label>\n {{ process.startDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.endDate\">\n <fs-label>\n Complete Date\n </fs-label>\n {{ process.endDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.duration\">\n <fs-label>\n Duration\n </fs-label>\n {{ process.duration | fsDateDuration: {hours: true, minutes: true, seconds: true} }}\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"process.message\">\n <fs-label>\n Message\n </fs-label>\n {{process.message}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.log\">\n <fs-label>\n Log\n </fs-label>\n <div class=\"log\">\n {{process.log}}\n </div>\n </fs-label-field>\n\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Close\n </button>\n <button\n *ngIf=\"process.state === ProcessState.Running && data.kill\"\n mat-button\n (click)=\"kill()\">\n Kill\n </button>\n <button \n *ngIf=\"process.state !== ProcessState.Running && data.run\" \n mat-button \n (click)=\"run()\">\n Run\n </button>\n <button \n *ngIf=\"(\n process.state !== ProcessState.Running && \n process.state !== ProcessState.Queued\n ) && data.queue\" \n mat-button \n (click)=\"queue()\">\n Queue\n </button>\n <button\n *ngIf=\"process.filename\"\n mat-button\n (click)=\"download()\">\n Download\n </button> \n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".log{white-space:pre-line;font-family:monospace;font-size:95%;line-height:130%}.status{display:flex}.status.running{margin-right:28px}.status.running mat-progress-spinner{position:absolute;right:0}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i6.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i7$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "component", type: i8.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i8.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { kind: "pipe", type: i4$2.FsDateDurationPipe, name: "fsDateDuration" }, { kind: "pipe", type: i4$2.FsDateFormatPipe, name: "fsDateFormat" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1049
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ProcessComponent, decorators: [{
1050
+ type: Component,
1051
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog *fsSkeleton=\"process\">\n <div mat-dialog-title>Process</div>\n <mat-dialog-content>\n <div class=\"column\">\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <fs-label-field>\n <fs-label>\n Name\n </fs-label>\n {{process.prettyName}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n <div class=\"status\" [ngClass]=\"{ 'running': process.state === ProcessState.Running }\">\n {{ProcessStates[process.state]}} \n <ng-container *ngIf=\"process.state === ProcessState.Running\">\n <mat-progress-spinner [diameter]=\"20\" [mode]=\"'indeterminate'\"></mat-progress-spinner>\n </ng-container>\n </div>\n \n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.notify\">\n <fs-label>\n Notification Email\n </fs-label>\n {{process.notify}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Process ID\n </fs-label>\n {{process.pid || 'None'}}\n <ng-container *ngIf=\"process.pid\">\n <div class=\"small\">\n {{ProcessProcessStates[process.processState] || 'Unknown'}}\n </div>\n </ng-container>\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.createDate\">\n <fs-label>\n Create Date\n </fs-label>\n {{ process.createDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.startDate\">\n <fs-label>\n Start Date\n </fs-label>\n {{ process.startDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.endDate\">\n <fs-label>\n Complete Date\n </fs-label>\n {{ process.endDate | fsDateFormat: 'date-time' }}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.duration\">\n <fs-label>\n Duration\n </fs-label>\n {{ process.duration | fsDateDuration: {hours: true, minutes: true, seconds: true} }}\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"process.message\">\n <fs-label>\n Message\n </fs-label>\n {{process.message}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"process.log\">\n <fs-label>\n Log\n </fs-label>\n <div class=\"log\">\n {{process.log}}\n </div>\n </fs-label-field>\n\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Close\n </button>\n <button\n *ngIf=\"process.state === ProcessState.Running && data.kill\"\n mat-button\n (click)=\"kill()\">\n Kill\n </button>\n <button \n *ngIf=\"process.state !== ProcessState.Running && data.run\" \n mat-button \n (click)=\"run()\">\n Run\n </button>\n <button \n *ngIf=\"(\n process.state !== ProcessState.Running && \n process.state !== ProcessState.Queued\n ) && data.queue\" \n mat-button \n (click)=\"queue()\">\n Queue\n </button>\n <button\n *ngIf=\"process.filename\"\n mat-button\n (click)=\"download()\">\n Download\n </button> \n </mat-dialog-actions>\n</fs-dialog>\n", styles: [".log{white-space:pre-line;font-family:monospace;font-size:95%;line-height:130%}.status{display:flex}.status.running{margin-right:28px}.status.running mat-progress-spinner{position:absolute;right:0}\n"] }]
1052
+ }], ctorParameters: function () {
1053
+ return [{ type: undefined, decorators: [{
1054
+ type: Inject,
1055
+ args: [MAT_DIALOG_DATA]
1056
+ }] }, { type: i1$1.FsMessage }, { type: i0.ChangeDetectorRef }, { type: i3$2.FsPrompt }];
1059
1057
  } });
1060
1058
 
1061
- class ProcessesComponent {
1062
- constructor(_dialog, _message) {
1063
- this._dialog = _dialog;
1064
- this._message = _message;
1065
- this.actions = [];
1066
- this.config = null;
1067
- this.ProcessStates = indexNameValue(ProcessStates);
1068
- this.ProcessState = ProcessState;
1069
- this._destroy$ = new Subject();
1070
- }
1071
- ngOnInit() {
1072
- this._configList();
1073
- }
1074
- reload() {
1075
- this.list.reload();
1076
- }
1077
- open(process) {
1078
- this._dialog.open(ProcessComponent, {
1079
- data: {
1080
- process,
1081
- download: this.download,
1082
- run: this.run,
1083
- loadProcess: this.loadProcess,
1084
- queue: this.queue,
1085
- kill: this.kill,
1086
- },
1087
- width: '85%',
1088
- })
1089
- .afterClosed()
1090
- .pipe(takeUntil(this._destroy$))
1091
- .subscribe(() => {
1092
- this.reload();
1093
- });
1094
- }
1095
- ngOnDestroy() {
1096
- this._destroy$.next();
1097
- this._destroy$.complete();
1098
- }
1099
- _configList() {
1100
- this.config = {
1101
- actions: [],
1102
- rowActions: [],
1103
- filters: [
1104
- {
1105
- type: ItemType.Keyword,
1106
- name: 'keyword',
1107
- label: 'Search',
1108
- },
1109
- {
1110
- type: ItemType.Select,
1111
- name: 'state',
1112
- label: 'Status',
1113
- values: ProcessStates,
1114
- },
1115
- ],
1116
- fetch: (query) => {
1117
- return this.loadProcesses(query)
1118
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1119
- },
1120
- };
1121
- if (this.run) {
1122
- this.config.rowActions
1123
- .push({
1124
- label: 'Run',
1125
- show: (process) => {
1126
- return process.state !== ProcessState.Running;
1127
- },
1128
- click: (data) => {
1129
- this._message.info('Running process...');
1130
- this.run(data)
1131
- .subscribe(() => {
1132
- this.reload();
1133
- this._message.success('Succesfully ran process');
1134
- });
1135
- setTimeout(() => {
1136
- this.reload();
1137
- }, 500);
1138
- },
1139
- });
1140
- }
1141
- if (this.kill) {
1142
- this.config.rowActions.push({
1143
- label: 'Kill',
1144
- show: (data) => {
1145
- return !!data.pid;
1146
- },
1147
- click: (data) => {
1148
- this._message.info('Killing process...');
1149
- this.kill(data)
1150
- .subscribe(() => {
1151
- this.reload();
1152
- this._message.success('Succesfully killed process');
1153
- });
1154
- setTimeout(() => {
1155
- this.reload();
1156
- }, 500);
1157
- },
1158
- });
1159
- }
1160
- if (this.delete) {
1161
- this.config.rowActions.push({
1162
- label: 'Delete',
1163
- click: (data) => {
1164
- this.delete(data)
1165
- .subscribe(() => {
1166
- this.reload();
1167
- this._message.success('Deleted process');
1168
- });
1169
- },
1170
- });
1171
- }
1172
- this.actions.forEach((action) => {
1173
- this.config.actions.push({
1174
- primary: false,
1175
- label: action.label,
1176
- menu: action.menu,
1177
- click: (data) => {
1178
- if (action.click) {
1179
- action.click(data);
1180
- }
1181
- if (action.component) {
1182
- this._dialog.open(action.component, {
1183
- width: '800px',
1184
- })
1185
- .afterClosed()
1186
- .pipe(takeUntil(this._destroy$))
1187
- .subscribe(() => {
1188
- this.reload();
1189
- });
1190
- }
1191
- },
1192
- });
1193
- });
1194
- }
1195
- }
1196
- ProcessesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ProcessesComponent, deps: [{ token: i1.MatDialog }, { token: i1$1.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
1197
- ProcessesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ProcessesComponent, selector: "fs-system-processes", inputs: { loadProcesses: "loadProcesses", loadProcess: "loadProcess", run: "run", kill: "kill", delete: "delete", download: "download", queue: "queue", actions: "actions" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.prettyName}}</a>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{ProcessStates[row.state]}}\n <small>\n <div *ngIf=\"row.state===ProcessState.Running && row.percent\">Complete: {{ row.percent }}%</div>\n <div *ngIf=\"row.state===ProcessState.Completed && row.filename\">Download: <a href=\"javascript:;\" (click)=\"download(row)\">{{ row.filename }}</a></div>\n <div *ngIf=\"row.pid\">PID: {{ row.pid }}</div>\n <div *ngIf=\"row.state===ProcessState.Running && row.notify\">Notify: {{ row.notify }}</div>\n </small>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Duration</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.duration | fsDateDuration: {hours: true, minutes: true, seconds: true} }}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Completed</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.endDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""], components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsDateDuration": i4$2.FsDateDurationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ProcessesComponent, decorators: [{
1199
- type: Component,
1200
- args: [{ selector: 'fs-system-processes', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.prettyName}}</a>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{ProcessStates[row.state]}}\n <small>\n <div *ngIf=\"row.state===ProcessState.Running && row.percent\">Complete: {{ row.percent }}%</div>\n <div *ngIf=\"row.state===ProcessState.Completed && row.filename\">Download: <a href=\"javascript:;\" (click)=\"download(row)\">{{ row.filename }}</a></div>\n <div *ngIf=\"row.pid\">PID: {{ row.pid }}</div>\n <div *ngIf=\"row.state===ProcessState.Running && row.notify\">Notify: {{ row.notify }}</div>\n </small>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Duration</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.duration | fsDateDuration: {hours: true, minutes: true, seconds: true} }}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Completed</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.endDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""] }]
1201
- }], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i1$1.FsMessage }]; }, propDecorators: { list: [{
1202
- type: ViewChild,
1203
- args: [FsListComponent]
1204
- }], loadProcesses: [{
1205
- type: Input
1206
- }], loadProcess: [{
1207
- type: Input
1208
- }], run: [{
1209
- type: Input
1210
- }], kill: [{
1211
- type: Input
1212
- }], delete: [{
1213
- type: Input
1214
- }], download: [{
1215
- type: Input
1216
- }], queue: [{
1217
- type: Input
1218
- }], actions: [{
1219
- type: Input
1059
+ class ProcessesComponent {
1060
+ constructor(_dialog, _message) {
1061
+ this._dialog = _dialog;
1062
+ this._message = _message;
1063
+ this.actions = [];
1064
+ this.config = null;
1065
+ this.ProcessStates = indexNameValue(ProcessStates);
1066
+ this.ProcessState = ProcessState;
1067
+ this._destroy$ = new Subject();
1068
+ }
1069
+ ngOnInit() {
1070
+ this._configList();
1071
+ }
1072
+ reload() {
1073
+ this.list.reload();
1074
+ }
1075
+ open(process) {
1076
+ this._dialog.open(ProcessComponent, {
1077
+ data: {
1078
+ process,
1079
+ download: this.download,
1080
+ run: this.run,
1081
+ loadProcess: this.loadProcess,
1082
+ queue: this.queue,
1083
+ kill: this.kill,
1084
+ },
1085
+ width: '85%',
1086
+ })
1087
+ .afterClosed()
1088
+ .pipe(takeUntil(this._destroy$))
1089
+ .subscribe(() => {
1090
+ this.reload();
1091
+ });
1092
+ }
1093
+ ngOnDestroy() {
1094
+ this._destroy$.next();
1095
+ this._destroy$.complete();
1096
+ }
1097
+ _configList() {
1098
+ this.config = {
1099
+ actions: [],
1100
+ rowActions: [],
1101
+ filters: [
1102
+ {
1103
+ type: ItemType.Keyword,
1104
+ name: 'keyword',
1105
+ label: 'Search',
1106
+ },
1107
+ {
1108
+ type: ItemType.Select,
1109
+ name: 'state',
1110
+ label: 'Status',
1111
+ values: ProcessStates,
1112
+ },
1113
+ ],
1114
+ fetch: (query) => {
1115
+ return this.loadProcesses(query)
1116
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1117
+ },
1118
+ };
1119
+ if (this.run) {
1120
+ this.config.rowActions
1121
+ .push({
1122
+ label: 'Run',
1123
+ show: (process) => {
1124
+ return process.state !== ProcessState.Running;
1125
+ },
1126
+ click: (data) => {
1127
+ this._message.info('Running process...');
1128
+ this.run(data)
1129
+ .subscribe(() => {
1130
+ this.reload();
1131
+ this._message.success('Succesfully ran process');
1132
+ });
1133
+ setTimeout(() => {
1134
+ this.reload();
1135
+ }, 500);
1136
+ },
1137
+ });
1138
+ }
1139
+ if (this.kill) {
1140
+ this.config.rowActions.push({
1141
+ label: 'Kill',
1142
+ show: (data) => {
1143
+ return !!data.pid;
1144
+ },
1145
+ click: (data) => {
1146
+ this._message.info('Killing process...');
1147
+ this.kill(data)
1148
+ .subscribe(() => {
1149
+ this.reload();
1150
+ this._message.success('Succesfully killed process');
1151
+ });
1152
+ setTimeout(() => {
1153
+ this.reload();
1154
+ }, 500);
1155
+ },
1156
+ });
1157
+ }
1158
+ if (this.delete) {
1159
+ this.config.rowActions.push({
1160
+ label: 'Delete',
1161
+ click: (data) => {
1162
+ this.delete(data)
1163
+ .subscribe(() => {
1164
+ this.reload();
1165
+ this._message.success('Deleted process');
1166
+ });
1167
+ },
1168
+ });
1169
+ }
1170
+ this.actions.forEach((action) => {
1171
+ this.config.actions.push({
1172
+ primary: false,
1173
+ label: action.label,
1174
+ menu: action.menu,
1175
+ click: (data) => {
1176
+ if (action.click) {
1177
+ action.click(data);
1178
+ }
1179
+ if (action.component) {
1180
+ this._dialog.open(action.component, {
1181
+ width: '800px',
1182
+ })
1183
+ .afterClosed()
1184
+ .pipe(takeUntil(this._destroy$))
1185
+ .subscribe(() => {
1186
+ this.reload();
1187
+ });
1188
+ }
1189
+ },
1190
+ });
1191
+ });
1192
+ }
1193
+ }
1194
+ ProcessesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ProcessesComponent, deps: [{ token: i1.MatDialog }, { token: i1$1.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
1195
+ ProcessesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ProcessesComponent, selector: "fs-system-processes", inputs: { loadProcesses: "loadProcesses", loadProcess: "loadProcess", run: "run", kill: "kill", delete: "delete", download: "download", queue: "queue", actions: "actions" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.prettyName}}</a>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{ProcessStates[row.state]}}\n <small>\n <div *ngIf=\"row.state===ProcessState.Running && row.percent\">Complete: {{ row.percent }}%</div>\n <div *ngIf=\"row.state===ProcessState.Completed && row.filename\">Download: <a href=\"javascript:;\" (click)=\"download(row)\">{{ row.filename }}</a></div>\n <div *ngIf=\"row.pid\">PID: {{ row.pid }}</div>\n <div *ngIf=\"row.state===ProcessState.Running && row.notify\">Notify: {{ row.notify }}</div>\n </small>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Duration</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.duration | fsDateDuration: {hours: true, minutes: true, seconds: true} }}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Completed</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.endDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { kind: "component", type: i5.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i5.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { kind: "directive", type: i5.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: i5.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { kind: "pipe", type: i4$2.FsDateDurationPipe, name: "fsDateDuration" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ProcessesComponent, decorators: [{
1197
+ type: Component,
1198
+ args: [{ selector: 'fs-system-processes', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.prettyName}}</a>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{ProcessStates[row.state]}}\n <small>\n <div *ngIf=\"row.state===ProcessState.Running && row.percent\">Complete: {{ row.percent }}%</div>\n <div *ngIf=\"row.state===ProcessState.Completed && row.filename\">Download: <a href=\"javascript:;\" (click)=\"download(row)\">{{ row.filename }}</a></div>\n <div *ngIf=\"row.pid\">PID: {{ row.pid }}</div>\n <div *ngIf=\"row.state===ProcessState.Running && row.notify\">Notify: {{ row.notify }}</div>\n </small>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Duration</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{ row.duration | fsDateDuration: {hours: true, minutes: true, seconds: true} }}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Completed</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.endDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>\n" }]
1199
+ }], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i1$1.FsMessage }]; }, propDecorators: { list: [{
1200
+ type: ViewChild,
1201
+ args: [FsListComponent]
1202
+ }], loadProcesses: [{
1203
+ type: Input
1204
+ }], loadProcess: [{
1205
+ type: Input
1206
+ }], run: [{
1207
+ type: Input
1208
+ }], kill: [{
1209
+ type: Input
1210
+ }], delete: [{
1211
+ type: Input
1212
+ }], download: [{
1213
+ type: Input
1214
+ }], queue: [{
1215
+ type: Input
1216
+ }], actions: [{
1217
+ type: Input
1220
1218
  }] } });
1221
1219
 
1222
- class ServerLogComponent {
1223
- constructor(data) {
1224
- this.data = data;
1225
- }
1226
- ngOnInit() {
1227
- if (this.data.log) {
1228
- this.log = this.data.log;
1229
- try {
1230
- this.log.backtrace = JSON.parse(this.log.backtrace);
1231
- }
1232
- catch (e) { }
1233
- try {
1234
- this.log.server = JSON.parse(this.log.server);
1235
- }
1236
- catch (e) { }
1237
- }
1238
- }
1239
- }
1240
- ServerLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ServerLogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
1241
- ServerLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ServerLogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"log\">\r\n <div mat-dialog-title>Log</div>\r\n <mat-dialog-content>\r\n <div class=\"fs-column\">\r\n <fs-label-field>\r\n <fs-label>\r\n Error Type\r\n </fs-label>\r\n {{log.type}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Message\r\n </fs-label>\r\n {{log.message}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n URL\r\n </fs-label>\r\n {{log.url}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Date\r\n </fs-label>\r\n {{log.createDate|fsDateFormat: 'full-date-time'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n File\r\n </fs-label>\r\n {{log.file}} @ {{log.line}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Backtrace\r\n </fs-label>\r\n <pre>{{log.backtrace|json}}</pre>\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n $_SERVER\r\n </fs-label>\r\n <pre>{{log.server|json}}</pre>\r\n </fs-label-field>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\r\n </mat-dialog-actions>\r\n</fs-dialog>\r\n", styles: [""], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsDateFormat": i4$2.FsDateFormatPipe, "json": i8.JsonPipe } });
1242
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ServerLogComponent, decorators: [{
1243
- type: Component,
1244
- args: [{ template: "<fs-dialog *fsSkeleton=\"log\">\r\n <div mat-dialog-title>Log</div>\r\n <mat-dialog-content>\r\n <div class=\"fs-column\">\r\n <fs-label-field>\r\n <fs-label>\r\n Error Type\r\n </fs-label>\r\n {{log.type}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Message\r\n </fs-label>\r\n {{log.message}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n URL\r\n </fs-label>\r\n {{log.url}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Date\r\n </fs-label>\r\n {{log.createDate|fsDateFormat: 'full-date-time'}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n File\r\n </fs-label>\r\n {{log.file}} @ {{log.line}}\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n Backtrace\r\n </fs-label>\r\n <pre>{{log.backtrace|json}}</pre>\r\n </fs-label-field>\r\n\r\n <fs-label-field>\r\n <fs-label>\r\n $_SERVER\r\n </fs-label>\r\n <pre>{{log.server|json}}</pre>\r\n </fs-label-field>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\r\n </mat-dialog-actions>\r\n</fs-dialog>\r\n", styles: [""] }]
1245
- }], ctorParameters: function () {
1246
- return [{ type: undefined, decorators: [{
1247
- type: Inject,
1248
- args: [MAT_DIALOG_DATA]
1249
- }] }];
1220
+ class ServerLogComponent {
1221
+ constructor(data) {
1222
+ this.data = data;
1223
+ }
1224
+ ngOnInit() {
1225
+ if (this.data.log) {
1226
+ this.log = this.data.log;
1227
+ try {
1228
+ this.log.backtrace = JSON.parse(this.log.backtrace);
1229
+ }
1230
+ catch (e) { }
1231
+ try {
1232
+ this.log.server = JSON.parse(this.log.server);
1233
+ }
1234
+ catch (e) { }
1235
+ }
1236
+ }
1237
+ }
1238
+ ServerLogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ServerLogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
1239
+ ServerLogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ServerLogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"log\">\n <div mat-dialog-title>Log</div>\n <mat-dialog-content>\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <fs-label-field>\n <fs-label>\n Error Type\n </fs-label>\n {{log.type}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Message\n </fs-label>\n {{log.message}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"log.url\">\n <fs-label>\n URL\n </fs-label>\n {{log.url}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{log.createDate|fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n \n <fs-label-field>\n <fs-label>\n File\n </fs-label>\n {{log.file}} @ {{log.line}}\n </fs-label-field>\n </div>\n <fs-label-field>\n <fs-label>\n $_SERVER\n </fs-label>\n <pre>{{log.server|json}}</pre>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Backtrace\n </fs-label>\n <pre>{{log.backtrace|json}}</pre>\n </fs-label-field>\n\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i7$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "component", type: i8.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i8.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { kind: "pipe", type: i2.JsonPipe, name: "json" }, { kind: "pipe", type: i4$2.FsDateFormatPipe, name: "fsDateFormat" }] });
1240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ServerLogComponent, decorators: [{
1241
+ type: Component,
1242
+ args: [{ template: "<fs-dialog *fsSkeleton=\"log\">\n <div mat-dialog-title>Log</div>\n <mat-dialog-content>\n <div class=\"fs-row.gap-lg.wrap.align-start\">\n <fs-label-field>\n <fs-label>\n Error Type\n </fs-label>\n {{log.type}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Message\n </fs-label>\n {{log.message}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"log.url\">\n <fs-label>\n URL\n </fs-label>\n {{log.url}}\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Date\n </fs-label>\n {{log.createDate|fsDateFormat: 'full-date-time'}}\n </fs-label-field>\n \n <fs-label-field>\n <fs-label>\n File\n </fs-label>\n {{log.file}} @ {{log.line}}\n </fs-label-field>\n </div>\n <fs-label-field>\n <fs-label>\n $_SERVER\n </fs-label>\n <pre>{{log.server|json}}</pre>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Backtrace\n </fs-label>\n <pre>{{log.backtrace|json}}</pre>\n </fs-label-field>\n\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button [mat-dialog-close]=\"true\" color=\"primary\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n" }]
1243
+ }], ctorParameters: function () {
1244
+ return [{ type: undefined, decorators: [{
1245
+ type: Inject,
1246
+ args: [MAT_DIALOG_DATA]
1247
+ }] }];
1250
1248
  } });
1251
1249
 
1252
- class ServerLogsComponent {
1253
- constructor(_dialog) {
1254
- this._dialog = _dialog;
1255
- this.config = null;
1256
- this.logTypes = [];
1257
- }
1258
- ngOnInit() {
1259
- this._configList();
1260
- }
1261
- _configList() {
1262
- this.config = {
1263
- filters: [
1264
- {
1265
- type: ItemType.Keyword,
1266
- name: 'keyword',
1267
- label: 'Search'
1268
- }
1269
- ],
1270
- fetch: query => {
1271
- return this.loadLogs(query)
1272
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1273
- }
1274
- };
1275
- }
1276
- open(log) {
1277
- this._dialog.open(ServerLogComponent, {
1278
- data: { log: log },
1279
- width: '85%'
1280
- });
1281
- }
1282
- }
1283
- ServerLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ServerLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1284
- ServerLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ServerLogsComponent, selector: "fs-system-server-logs", inputs: { loadLogs: "loadLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, static: true }], ngImport: i0, 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", styles: [""], components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
1285
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ServerLogsComponent, decorators: [{
1286
- type: Component,
1287
- args: [{ selector: 'fs-system-server-logs', 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", styles: [""] }]
1288
- }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
1289
- type: ViewChild,
1290
- args: ['list', { static: true }]
1291
- }], loadLogs: [{
1292
- type: Input
1250
+ class ServerLogsComponent {
1251
+ constructor(_dialog) {
1252
+ this._dialog = _dialog;
1253
+ this.config = null;
1254
+ this.logTypes = [];
1255
+ }
1256
+ ngOnInit() {
1257
+ this._configList();
1258
+ }
1259
+ _configList() {
1260
+ this.config = {
1261
+ filters: [
1262
+ {
1263
+ type: ItemType.Keyword,
1264
+ name: 'keyword',
1265
+ label: 'Search'
1266
+ }
1267
+ ],
1268
+ fetch: query => {
1269
+ return this.loadLogs(query)
1270
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1271
+ }
1272
+ };
1273
+ }
1274
+ open(log) {
1275
+ this._dialog.open(ServerLogComponent, {
1276
+ data: { log: log },
1277
+ width: '85%'
1278
+ });
1279
+ }
1280
+ }
1281
+ ServerLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ServerLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1282
+ ServerLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ServerLogsComponent, selector: "fs-system-server-logs", inputs: { loadLogs: "loadLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a href=\"javascript:;\" (click)=\"open(row)\">{{row.message}}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Type</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.type}}\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Date</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list>\n", styles: [""], dependencies: [{ kind: "component", type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { kind: "component", type: i5.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i5.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { kind: "directive", type: i5.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: i5.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }] });
1283
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ServerLogsComponent, decorators: [{
1284
+ type: Component,
1285
+ args: [{ selector: 'fs-system-server-logs', template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a href=\"javascript:;\" (click)=\"open(row)\">{{row.message}}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Type</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.type}}\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Date</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list>\n" }]
1286
+ }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
1287
+ type: ViewChild,
1288
+ args: ['list', { static: true }]
1289
+ }], loadLogs: [{
1290
+ type: Input
1293
1291
  }] } });
1294
1292
 
1295
- class KeyNameValuePipe {
1296
- transform(values) {
1297
- return Object.keys(values).map((key) => {
1298
- return { value: key, name: values[key] };
1299
- });
1300
- }
1301
- }
1302
- KeyNameValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyNameValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1303
- KeyNameValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyNameValuePipe, name: "keyNameValue" });
1304
- KeyNameValuePipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyNameValuePipe });
1305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyNameValuePipe, decorators: [{
1306
- type: Pipe,
1307
- args: [{
1308
- name: 'keyNameValue',
1309
- }]
1310
- }, {
1311
- type: Injectable
1293
+ class KeyNameValuePipe {
1294
+ transform(values) {
1295
+ return Object.keys(values).map((key) => {
1296
+ return { value: key, name: values[key] };
1297
+ });
1298
+ }
1299
+ }
1300
+ KeyNameValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KeyNameValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1301
+ KeyNameValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: KeyNameValuePipe, name: "keyNameValue" });
1302
+ KeyNameValuePipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KeyNameValuePipe });
1303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KeyNameValuePipe, decorators: [{
1304
+ type: Pipe,
1305
+ args: [{
1306
+ name: 'keyNameValue',
1307
+ }]
1308
+ }, {
1309
+ type: Injectable
1312
1310
  }] });
1313
1311
 
1314
- class SettingsComponent {
1315
- constructor(_message, _clipboard, _prompt, _cdRef) {
1316
- this._message = _message;
1317
- this._clipboard = _clipboard;
1318
- this._prompt = _prompt;
1319
- this._cdRef = _cdRef;
1320
- this.fileRemove = new EventEmitter();
1321
- this.fileSelect = new EventEmitter();
1322
- this.groupedSettings = [];
1323
- this.groups = [];
1324
- this.SettingInterfaceType = SettingInterfaceType;
1325
- }
1326
- ngOnInit() {
1327
- this.loadSettings({
1328
- visible: true,
1329
- })
1330
- .subscribe((settings) => {
1331
- settings = settings
1332
- .filter((setting) => {
1333
- return setting.interfaceType !== SettingInterfaceType.None;
1334
- })
1335
- .map((setting) => {
1336
- switch (setting.interfaceType) {
1337
- case SettingInterfaceType.Date:
1338
- case SettingInterfaceType.Time:
1339
- return Object.assign(Object.assign({}, setting), { value: parse(setting.value) });
1340
- case SettingInterfaceType.SelectMultiple:
1341
- return Object.assign(Object.assign({}, setting), { value: Array.isArray(setting.value) ? setting.value : [] });
1342
- }
1343
- return setting;
1344
- });
1345
- this.groupedSettings = settings.reduce((accum, item) => {
1346
- if (accum[item.group] === undefined) {
1347
- accum[item.group] = [];
1348
- }
1349
- accum[item.group].push(item);
1350
- return accum;
1351
- }, {});
1352
- this.groups = Object.keys(this.groupedSettings);
1353
- this._cdRef.markForCheck();
1354
- });
1355
- }
1356
- export(event, settings) {
1357
- event.stopPropagation();
1358
- const data = settings.map((setting) => {
1359
- return {
1360
- name: setting.name,
1361
- value: setting.value,
1362
- group: setting.group,
1363
- };
1364
- });
1365
- this._clipboard.copy(JSON.stringify(data));
1366
- this._message.success('Copied to clipboard');
1367
- }
1368
- import(event, group) {
1369
- event.stopPropagation();
1370
- this._prompt.input({
1371
- label: 'JSON Import',
1372
- title: 'Import Settings',
1373
- commitLabel: 'Import',
1374
- required: true,
1375
- }).subscribe((value) => {
1376
- if (value) {
1377
- try {
1378
- const settings = this.groupedSettings[group];
1379
- const data = JSON.parse(value);
1380
- data.forEach((item) => {
1381
- const setting = settings.find((s) => {
1382
- return item.name === s.name;
1383
- });
1384
- if (setting) {
1385
- Object.assign(setting, item);
1386
- }
1387
- });
1388
- this._cdRef.markForCheck();
1389
- }
1390
- catch (e) {
1391
- this._message.error(e);
1392
- }
1393
- }
1394
- });
1395
- }
1396
- saveGroup(group) {
1397
- const settings = this.groupedSettings[group];
1398
- const values = settings.reduce((result, value) => {
1399
- return (result[value.name] = value.value, result);
1400
- }, {});
1401
- this.save(group, values)
1402
- .subscribe(() => {
1403
- this._message.success('Changes Saved');
1404
- });
1405
- }
1406
- }
1407
- SettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SettingsComponent, deps: [{ token: i1$1.FsMessage }, { token: i2$1.FsClipboard }, { token: i3$3.FsPrompt }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1408
- SettingsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SettingsComponent, selector: "fs-system-settings", inputs: { loadSettings: "loadSettings", save: "save" }, outputs: { fileRemove: "fileRemove", fileSelect: "fileSelect" }, ngImport: i0, 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 \r\n hideToggle \r\n *ngFor=\"let setting of groupedSettings[group]\" \r\n class=\"setting\"\r\n [ngClass]=\"{ 'has-instruction': !! setting.instruction }\">\r\n <mat-form-field \r\n class=\"full-width form-field-multiline-subscript\"\r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.InputBox\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <input\r\n matInput\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 \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Textarea\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <textarea\r\n matInput\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 \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Select || setting.interfaceType===SettingInterfaceType.SelectMultiple\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <mat-select\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 \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Date\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <input\r\n matInput\r\n fsDatePicker\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 \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Color\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <input\r\n matInput\r\n fsColorPicker\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 \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Time\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <input\r\n matInput\r\n fsTimePicker\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 <div fsFileHint>{{setting.instruction}}</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", 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}:host ::ng-deep .setting.has-instruction fs-file-picker fs-label-message{display:block;padding-bottom:1em}\n"], components: [{ type: i4$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i4$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i8$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i9$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i10$1.FsDatePickerComponent, selector: "[fsDatePicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "startOfDay", "view", "format", "minutes", "weekStartsOn"], outputs: ["change"] }, { type: i11.FsColorPickerComponent, selector: "[fsColorPicker]", inputs: ["showClear"] }, { type: i10$1.FsTimePickerComponent, selector: "[fsTimePicker]", inputs: ["view"] }, { type: i12.FsFilePickerComponent, selector: "fs-file-picker", inputs: ["minWidth", "minHeight", "imageWidth", "imageHeight", "imageQuality", "label", "showFilename", "allowDownload", "allowReupload", "multiple", "allowRemove", "url", "file", "accept", "disabled", "previewWidth", "previewHeight"], outputs: ["select", "remove", "download"] }], directives: [{ type: i4$3.MatAccordion, selector: "mat-accordion", inputs: ["multi", "hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i9.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7$1.MatLabel, selector: "mat-label" }, { type: i15.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i16.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i16.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i16.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i12.FsFileLabelDirective, selector: "[fsFileLabel]" }], pipes: { "keyNameValue": KeyNameValuePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1409
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SettingsComponent, decorators: [{
1410
- type: Component,
1411
- args: [{ selector: 'fs-system-settings', changeDetection: ChangeDetectionStrategy.OnPush, 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 \r\n hideToggle \r\n *ngFor=\"let setting of groupedSettings[group]\" \r\n class=\"setting\"\r\n [ngClass]=\"{ 'has-instruction': !! setting.instruction }\">\r\n <mat-form-field \r\n class=\"full-width form-field-multiline-subscript\"\r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.InputBox\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <input\r\n matInput\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 \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Textarea\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <textarea\r\n matInput\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 \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Select || setting.interfaceType===SettingInterfaceType.SelectMultiple\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <mat-select\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 \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Date\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <input\r\n matInput\r\n fsDatePicker\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 \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Color\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <input\r\n matInput\r\n fsColorPicker\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 \r\n class=\"full-width form-field-multiline-subscript\" \r\n *ngIf=\"setting.interfaceType===SettingInterfaceType.Time\">\r\n <mat-label>{{setting.label}}</mat-label>\r\n <input\r\n matInput\r\n fsTimePicker\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 <div fsFileHint>{{setting.instruction}}</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", 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}:host ::ng-deep .setting.has-instruction fs-file-picker fs-label-message{display:block;padding-bottom:1em}\n"] }]
1412
- }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i2$1.FsClipboard }, { type: i3$3.FsPrompt }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { loadSettings: [{
1413
- type: Input
1414
- }], save: [{
1415
- type: Input
1416
- }], fileRemove: [{
1417
- type: Output
1418
- }], fileSelect: [{
1419
- type: Output
1312
+ class SettingsComponent {
1313
+ constructor(_message, _clipboard, _prompt, _cdRef) {
1314
+ this._message = _message;
1315
+ this._clipboard = _clipboard;
1316
+ this._prompt = _prompt;
1317
+ this._cdRef = _cdRef;
1318
+ this.fileRemove = new EventEmitter();
1319
+ this.fileSelect = new EventEmitter();
1320
+ this.groupedSettings = [];
1321
+ this.groups = [];
1322
+ this.SettingInterfaceType = SettingInterfaceType;
1323
+ }
1324
+ ngOnInit() {
1325
+ this.loadSettings({
1326
+ visible: true,
1327
+ })
1328
+ .subscribe((settings) => {
1329
+ settings = settings
1330
+ .filter((setting) => {
1331
+ return setting.interfaceType !== SettingInterfaceType.None;
1332
+ })
1333
+ .map((setting) => {
1334
+ switch (setting.interfaceType) {
1335
+ case SettingInterfaceType.Date:
1336
+ case SettingInterfaceType.Time:
1337
+ return Object.assign(Object.assign({}, setting), { value: parse(setting.value) });
1338
+ case SettingInterfaceType.SelectMultiple:
1339
+ return Object.assign(Object.assign({}, setting), { value: Array.isArray(setting.value) ? setting.value : [] });
1340
+ }
1341
+ return setting;
1342
+ });
1343
+ this.groupedSettings = settings.reduce((accum, item) => {
1344
+ if (accum[item.group] === undefined) {
1345
+ accum[item.group] = [];
1346
+ }
1347
+ accum[item.group].push(item);
1348
+ return accum;
1349
+ }, {});
1350
+ this.groups = Object.keys(this.groupedSettings);
1351
+ this._cdRef.markForCheck();
1352
+ });
1353
+ }
1354
+ export(event, settings) {
1355
+ event.stopPropagation();
1356
+ const data = settings.map((setting) => {
1357
+ return {
1358
+ name: setting.name,
1359
+ value: setting.value,
1360
+ group: setting.group,
1361
+ };
1362
+ });
1363
+ this._clipboard.copy(JSON.stringify(data));
1364
+ this._message.success('Copied to clipboard');
1365
+ }
1366
+ import(event, group) {
1367
+ event.stopPropagation();
1368
+ this._prompt.input({
1369
+ label: 'JSON Import',
1370
+ title: 'Import Settings',
1371
+ commitLabel: 'Import',
1372
+ required: true,
1373
+ }).subscribe((value) => {
1374
+ if (value) {
1375
+ try {
1376
+ const settings = this.groupedSettings[group];
1377
+ const data = JSON.parse(value);
1378
+ data.forEach((item) => {
1379
+ const setting = settings.find((s) => {
1380
+ return item.name === s.name;
1381
+ });
1382
+ if (setting) {
1383
+ Object.assign(setting, item);
1384
+ }
1385
+ });
1386
+ this._cdRef.markForCheck();
1387
+ }
1388
+ catch (e) {
1389
+ this._message.error(e);
1390
+ }
1391
+ }
1392
+ });
1393
+ }
1394
+ saveGroup(group) {
1395
+ const settings = this.groupedSettings[group];
1396
+ const values = settings.reduce((result, value) => {
1397
+ return (result[value.name] = value.value, result);
1398
+ }, {});
1399
+ this.save(group, values)
1400
+ .subscribe(() => {
1401
+ this._message.success('Changes Saved');
1402
+ });
1403
+ }
1404
+ }
1405
+ SettingsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SettingsComponent, deps: [{ token: i1$1.FsMessage }, { token: i2$1.FsClipboard }, { token: i3$2.FsPrompt }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1406
+ SettingsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SettingsComponent, selector: "fs-system-settings", inputs: { loadSettings: "loadSettings", save: "save" }, outputs: { fileRemove: "fileRemove", fileSelect: "fileSelect" }, ngImport: i0, template: "\n<mat-accordion>\n <mat-expansion-panel hideToggle *ngFor=\"let group of groups\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <div class=\"title-row\">\n <div class=\"title\">{{group || 'General'}}</div>\n <div class=\"actions\">\n <button\n type=\"button\"\n [matTooltip]=\"'Export ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"export($event, groupedSettings[group])\">\n <mat-icon>cloud_download</mat-icon>\n </button>\n <button\n type=\"button\"\n [matTooltip]=\"'Import ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"import($event, group)\">\n <mat-icon>cloud_upload</mat-icon>\n </button>\n </div>\n </div>\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div \n hideToggle \n *ngFor=\"let setting of groupedSettings[group]\" \n class=\"setting\"\n [ngClass]=\"{ 'has-instruction': !! setting.instruction }\">\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\"\n *ngIf=\"setting.interfaceType===SettingInterfaceType.InputBox\">\n <mat-label>{{setting.label}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\" \n *ngIf=\"setting.interfaceType===SettingInterfaceType.Textarea\">\n <mat-label>{{setting.label}}</mat-label>\n <textarea\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n </textarea>\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\" \n *ngIf=\"setting.interfaceType===SettingInterfaceType.Select || setting.interfaceType===SettingInterfaceType.SelectMultiple\">\n <mat-label>{{setting.label}}</mat-label>\n <mat-select\n [(ngModel)]=\"setting.value\"\n [multiple]=\"setting.interfaceType===SettingInterfaceType.SelectMultiple\"\n [name]=\"'setting' + setting.id\">\n <mat-option *ngFor=\"let item of setting.values | keyNameValue\" [value]=\"item.value\">\n {{item.name}}\n </mat-option>\n </mat-select>\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\" \n *ngIf=\"setting.interfaceType===SettingInterfaceType.Date\">\n <mat-label>{{setting.label}}</mat-label>\n <input\n matInput\n fsDatePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\" \n *ngIf=\"setting.interfaceType===SettingInterfaceType.Color\">\n <mat-label>{{setting.label}}</mat-label>\n <input\n matInput\n fsColorPicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\" \n *ngIf=\"setting.interfaceType===SettingInterfaceType.Time\">\n <mat-label>{{setting.label}}</mat-label>\n <input\n matInput\n fsTimePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <fs-file-picker\n *ngIf=\"setting.interfaceType===SettingInterfaceType.File\"\n [allowRemove]=\"true\"\n [allowDownload]=\"true\"\n (select)=\"fileSelect.emit({ setting: setting, file: $event.file })\"\n (remove)=\"fileRemove.emit(setting)\"\n [url]=\"setting.value\">\n <div fsFileLabel>{{setting.label}}</div>\n <div fsFileHint>{{setting.instruction}}</div>\n </fs-file-picker>\n </div>\n\n <button mat-raised-button color=\"primary\" type=\"button\" (click)=\"saveGroup(group)\">Save</button>\n\n </mat-expansion-panel>\n\n</mat-accordion>\n", 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}:host ::ng-deep .setting.has-instruction fs-file-picker fs-label-message{display:block;padding-bottom:1em}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i7$2.MatAccordion, selector: "mat-accordion", inputs: ["multi", "hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i7$2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i7$2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i7$2.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i10$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i10$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i13.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i14.FsFilePickerComponent, selector: "fs-file-picker", inputs: ["minWidth", "minHeight", "imageWidth", "imageHeight", "imageQuality", "label", "showFilename", "allowDownload", "allowReupload", "multiple", "allowRemove", "url", "file", "accept", "disabled", "previewWidth", "previewHeight"], outputs: ["select", "remove", "download"] }, { kind: "directive", type: i14.FsFileLabelDirective, selector: "[fsFileLabel]" }, { kind: "component", type: i15.FsDatePickerComponent, selector: "[fsDatePicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "startOfDay", "view", "format", "minutes", "weekStartsOn"], outputs: ["change"] }, { kind: "component", type: i15.FsTimePickerComponent, selector: "[fsTimePicker]", inputs: ["view"] }, { kind: "component", type: i16.FsColorPickerComponent, selector: "[fsColorPicker]", inputs: ["showClear"] }, { kind: "pipe", type: KeyNameValuePipe, name: "keyNameValue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SettingsComponent, decorators: [{
1408
+ type: Component,
1409
+ args: [{ selector: 'fs-system-settings', changeDetection: ChangeDetectionStrategy.OnPush, template: "\n<mat-accordion>\n <mat-expansion-panel hideToggle *ngFor=\"let group of groups\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <div class=\"title-row\">\n <div class=\"title\">{{group || 'General'}}</div>\n <div class=\"actions\">\n <button\n type=\"button\"\n [matTooltip]=\"'Export ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"export($event, groupedSettings[group])\">\n <mat-icon>cloud_download</mat-icon>\n </button>\n <button\n type=\"button\"\n [matTooltip]=\"'Import ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"import($event, group)\">\n <mat-icon>cloud_upload</mat-icon>\n </button>\n </div>\n </div>\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div \n hideToggle \n *ngFor=\"let setting of groupedSettings[group]\" \n class=\"setting\"\n [ngClass]=\"{ 'has-instruction': !! setting.instruction }\">\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\"\n *ngIf=\"setting.interfaceType===SettingInterfaceType.InputBox\">\n <mat-label>{{setting.label}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\" \n *ngIf=\"setting.interfaceType===SettingInterfaceType.Textarea\">\n <mat-label>{{setting.label}}</mat-label>\n <textarea\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n </textarea>\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\" \n *ngIf=\"setting.interfaceType===SettingInterfaceType.Select || setting.interfaceType===SettingInterfaceType.SelectMultiple\">\n <mat-label>{{setting.label}}</mat-label>\n <mat-select\n [(ngModel)]=\"setting.value\"\n [multiple]=\"setting.interfaceType===SettingInterfaceType.SelectMultiple\"\n [name]=\"'setting' + setting.id\">\n <mat-option *ngFor=\"let item of setting.values | keyNameValue\" [value]=\"item.value\">\n {{item.name}}\n </mat-option>\n </mat-select>\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\" \n *ngIf=\"setting.interfaceType===SettingInterfaceType.Date\">\n <mat-label>{{setting.label}}</mat-label>\n <input\n matInput\n fsDatePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\" \n *ngIf=\"setting.interfaceType===SettingInterfaceType.Color\">\n <mat-label>{{setting.label}}</mat-label>\n <input\n matInput\n fsColorPicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <mat-form-field \n class=\"full-width form-field-multiline-subscript\" \n *ngIf=\"setting.interfaceType===SettingInterfaceType.Time\">\n <mat-label>{{setting.label}}</mat-label>\n <input\n matInput\n fsTimePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n <mat-hint>{{setting.instruction}}</mat-hint>\n </mat-form-field>\n\n <fs-file-picker\n *ngIf=\"setting.interfaceType===SettingInterfaceType.File\"\n [allowRemove]=\"true\"\n [allowDownload]=\"true\"\n (select)=\"fileSelect.emit({ setting: setting, file: $event.file })\"\n (remove)=\"fileRemove.emit(setting)\"\n [url]=\"setting.value\">\n <div fsFileLabel>{{setting.label}}</div>\n <div fsFileHint>{{setting.instruction}}</div>\n </fs-file-picker>\n </div>\n\n <button mat-raised-button color=\"primary\" type=\"button\" (click)=\"saveGroup(group)\">Save</button>\n\n </mat-expansion-panel>\n\n</mat-accordion>\n", 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}:host ::ng-deep .setting.has-instruction fs-file-picker fs-label-message{display:block;padding-bottom:1em}\n"] }]
1410
+ }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i2$1.FsClipboard }, { type: i3$2.FsPrompt }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { loadSettings: [{
1411
+ type: Input
1412
+ }], save: [{
1413
+ type: Input
1414
+ }], fileRemove: [{
1415
+ type: Output
1416
+ }], fileSelect: [{
1417
+ type: Output
1420
1418
  }] } });
1421
1419
 
1422
- class UpgradeLogsComponent {
1423
- constructor() {
1424
- this.config = null;
1425
- this.logTypes = [];
1426
- }
1427
- ngOnInit() {
1428
- this._configList();
1429
- }
1430
- _configList() {
1431
- this.config = {
1432
- paging: false,
1433
- filters: [
1434
- {
1435
- type: ItemType.Keyword,
1436
- name: 'keyword',
1437
- label: 'Search'
1438
- }
1439
- ],
1440
- fetch: query => {
1441
- return this.loadUpgradeLogs(query)
1442
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1443
- }
1444
- };
1445
- }
1446
- }
1447
- UpgradeLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UpgradeLogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1448
- UpgradeLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: UpgradeLogsComponent, selector: "fs-system-upgrade-logs", inputs: { loadUpgradeLogs: "loadUpgradeLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, 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", styles: [""], components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
1449
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UpgradeLogsComponent, decorators: [{
1450
- type: Component,
1451
- args: [{ selector: 'fs-system-upgrade-logs', 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", styles: [""] }]
1452
- }], propDecorators: { list: [{
1453
- type: ViewChild,
1454
- args: [FsListComponent, { static: true }]
1455
- }], loadUpgradeLogs: [{
1456
- type: Input
1420
+ class UpgradeLogsComponent {
1421
+ constructor() {
1422
+ this.config = null;
1423
+ this.logTypes = [];
1424
+ }
1425
+ ngOnInit() {
1426
+ this._configList();
1427
+ }
1428
+ _configList() {
1429
+ this.config = {
1430
+ paging: false,
1431
+ filters: [
1432
+ {
1433
+ type: ItemType.Keyword,
1434
+ name: 'keyword',
1435
+ label: 'Search'
1436
+ }
1437
+ ],
1438
+ fetch: query => {
1439
+ return this.loadUpgradeLogs(query)
1440
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1441
+ }
1442
+ };
1443
+ }
1444
+ }
1445
+ UpgradeLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UpgradeLogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1446
+ UpgradeLogsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: UpgradeLogsComponent, selector: "fs-system-upgrade-logs", inputs: { loadUpgradeLogs: "loadUpgradeLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.name}}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Function</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.function}}()\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Date</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""], dependencies: [{ kind: "component", type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { kind: "component", type: i5.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i5.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { kind: "directive", type: i5.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: i5.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }] });
1447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UpgradeLogsComponent, decorators: [{
1448
+ type: Component,
1449
+ args: [{ selector: 'fs-system-upgrade-logs', template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.name}}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Function</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.function}}()\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Date</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>\n" }]
1450
+ }], propDecorators: { list: [{
1451
+ type: ViewChild,
1452
+ args: [FsListComponent, { static: true }]
1453
+ }], loadUpgradeLogs: [{
1454
+ type: Input
1457
1455
  }] } });
1458
1456
 
1459
1457
  const FS_SYSTEM_CONFIG = new InjectionToken('fs-system-config');
1460
1458
 
1461
- class FsSystemModule {
1462
- static forRoot(config) {
1463
- return {
1464
- ngModule: FsSystemModule,
1465
- providers: [
1466
- { provide: FS_SYSTEM_CONFIG, useValue: config || {} },
1467
- ],
1468
- };
1469
- }
1470
- }
1471
- FsSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1472
- FsSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemModule, declarations: [DashboardComponent,
1473
- CronNextRunComponent,
1474
- CronsComponent,
1475
- SettingsComponent,
1476
- KeyNameValuePipe,
1477
- ProcessesComponent,
1478
- ServerLogComponent,
1479
- ServerLogsComponent,
1480
- UpgradeLogsComponent,
1481
- ApiLogsComponent,
1482
- ApiLogComponent,
1483
- InfoComponent,
1484
- ProcessComponent,
1485
- CronComponent,
1486
- CronLogComponent], imports: [CommonModule,
1487
- FormsModule,
1488
- MatButtonModule,
1489
- MatExpansionModule,
1490
- MatTooltipModule,
1491
- MatIconModule,
1492
- MatFormFieldModule,
1493
- MatInputModule,
1494
- MatSelectModule,
1495
- MatDialogModule,
1496
- MatProgressSpinnerModule,
1497
- MatTabsModule,
1498
- FsDateModule,
1499
- FsSkeletonModule,
1500
- FsListModule,
1501
- FsFileModule,
1502
- FsFileManagerModule,
1503
- FsLabelModule,
1504
- FsDialogModule,
1505
- FsDatePickerModule,
1506
- FsMenuModule,
1507
- FsPopoverModule,
1508
- FsColorPickerModule], exports: [DashboardComponent,
1509
- CronsComponent,
1510
- SettingsComponent,
1511
- ProcessesComponent,
1512
- ServerLogsComponent,
1513
- UpgradeLogsComponent,
1514
- ApiLogsComponent,
1515
- InfoComponent] });
1516
- FsSystemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemModule, imports: [[
1517
- CommonModule,
1518
- FormsModule,
1519
- MatButtonModule,
1520
- MatExpansionModule,
1521
- MatTooltipModule,
1522
- MatIconModule,
1523
- MatFormFieldModule,
1524
- MatInputModule,
1525
- MatSelectModule,
1526
- MatDialogModule,
1527
- MatProgressSpinnerModule,
1528
- MatTabsModule,
1529
- FsDateModule,
1530
- FsSkeletonModule,
1531
- FsListModule,
1532
- FsFileModule,
1533
- FsFileManagerModule,
1534
- FsLabelModule,
1535
- FsDialogModule,
1536
- FsDatePickerModule,
1537
- FsMenuModule,
1538
- FsPopoverModule,
1539
- FsColorPickerModule,
1540
- ]] });
1541
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemModule, decorators: [{
1542
- type: NgModule,
1543
- args: [{
1544
- imports: [
1545
- CommonModule,
1546
- FormsModule,
1547
- MatButtonModule,
1548
- MatExpansionModule,
1549
- MatTooltipModule,
1550
- MatIconModule,
1551
- MatFormFieldModule,
1552
- MatInputModule,
1553
- MatSelectModule,
1554
- MatDialogModule,
1555
- MatProgressSpinnerModule,
1556
- MatTabsModule,
1557
- FsDateModule,
1558
- FsSkeletonModule,
1559
- FsListModule,
1560
- FsFileModule,
1561
- FsFileManagerModule,
1562
- FsLabelModule,
1563
- FsDialogModule,
1564
- FsDatePickerModule,
1565
- FsMenuModule,
1566
- FsPopoverModule,
1567
- FsColorPickerModule,
1568
- ],
1569
- exports: [
1570
- DashboardComponent,
1571
- CronsComponent,
1572
- SettingsComponent,
1573
- ProcessesComponent,
1574
- ServerLogsComponent,
1575
- UpgradeLogsComponent,
1576
- ApiLogsComponent,
1577
- InfoComponent,
1578
- ],
1579
- declarations: [
1580
- DashboardComponent,
1581
- CronNextRunComponent,
1582
- CronsComponent,
1583
- SettingsComponent,
1584
- KeyNameValuePipe,
1585
- ProcessesComponent,
1586
- ServerLogComponent,
1587
- ServerLogsComponent,
1588
- UpgradeLogsComponent,
1589
- ApiLogsComponent,
1590
- ApiLogComponent,
1591
- InfoComponent,
1592
- ProcessComponent,
1593
- CronComponent,
1594
- CronLogComponent,
1595
- ],
1596
- }]
1459
+ class FsSystemModule {
1460
+ static forRoot(config) {
1461
+ return {
1462
+ ngModule: FsSystemModule,
1463
+ providers: [
1464
+ { provide: FS_SYSTEM_CONFIG, useValue: config || {} },
1465
+ ],
1466
+ };
1467
+ }
1468
+ }
1469
+ FsSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1470
+ FsSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: FsSystemModule, declarations: [DashboardComponent,
1471
+ CronNextRunComponent,
1472
+ CronsComponent,
1473
+ SettingsComponent,
1474
+ KeyNameValuePipe,
1475
+ ProcessesComponent,
1476
+ ServerLogComponent,
1477
+ ServerLogsComponent,
1478
+ UpgradeLogsComponent,
1479
+ ApiLogsComponent,
1480
+ ApiLogComponent,
1481
+ InfoComponent,
1482
+ ProcessComponent,
1483
+ CronComponent,
1484
+ CronLogComponent], imports: [CommonModule,
1485
+ FormsModule,
1486
+ MatButtonModule,
1487
+ MatExpansionModule,
1488
+ MatTooltipModule,
1489
+ MatIconModule,
1490
+ MatFormFieldModule,
1491
+ MatInputModule,
1492
+ MatSelectModule,
1493
+ MatDialogModule,
1494
+ MatProgressSpinnerModule,
1495
+ MatTabsModule,
1496
+ FsDateModule,
1497
+ FsSkeletonModule,
1498
+ FsListModule,
1499
+ FsFileModule,
1500
+ FsFileManagerModule,
1501
+ FsLabelModule,
1502
+ FsDialogModule,
1503
+ FsDatePickerModule,
1504
+ FsMenuModule,
1505
+ FsPopoverModule,
1506
+ FsColorPickerModule], exports: [DashboardComponent,
1507
+ CronsComponent,
1508
+ SettingsComponent,
1509
+ ProcessesComponent,
1510
+ ServerLogsComponent,
1511
+ UpgradeLogsComponent,
1512
+ ApiLogsComponent,
1513
+ InfoComponent] });
1514
+ FsSystemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemModule, imports: [CommonModule,
1515
+ FormsModule,
1516
+ MatButtonModule,
1517
+ MatExpansionModule,
1518
+ MatTooltipModule,
1519
+ MatIconModule,
1520
+ MatFormFieldModule,
1521
+ MatInputModule,
1522
+ MatSelectModule,
1523
+ MatDialogModule,
1524
+ MatProgressSpinnerModule,
1525
+ MatTabsModule,
1526
+ FsDateModule,
1527
+ FsSkeletonModule,
1528
+ FsListModule,
1529
+ FsFileModule,
1530
+ FsFileManagerModule,
1531
+ FsLabelModule,
1532
+ FsDialogModule,
1533
+ FsDatePickerModule,
1534
+ FsMenuModule,
1535
+ FsPopoverModule,
1536
+ FsColorPickerModule] });
1537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemModule, decorators: [{
1538
+ type: NgModule,
1539
+ args: [{
1540
+ imports: [
1541
+ CommonModule,
1542
+ FormsModule,
1543
+ MatButtonModule,
1544
+ MatExpansionModule,
1545
+ MatTooltipModule,
1546
+ MatIconModule,
1547
+ MatFormFieldModule,
1548
+ MatInputModule,
1549
+ MatSelectModule,
1550
+ MatDialogModule,
1551
+ MatProgressSpinnerModule,
1552
+ MatTabsModule,
1553
+ FsDateModule,
1554
+ FsSkeletonModule,
1555
+ FsListModule,
1556
+ FsFileModule,
1557
+ FsFileManagerModule,
1558
+ FsLabelModule,
1559
+ FsDialogModule,
1560
+ FsDatePickerModule,
1561
+ FsMenuModule,
1562
+ FsPopoverModule,
1563
+ FsColorPickerModule,
1564
+ ],
1565
+ exports: [
1566
+ DashboardComponent,
1567
+ CronsComponent,
1568
+ SettingsComponent,
1569
+ ProcessesComponent,
1570
+ ServerLogsComponent,
1571
+ UpgradeLogsComponent,
1572
+ ApiLogsComponent,
1573
+ InfoComponent,
1574
+ ],
1575
+ declarations: [
1576
+ DashboardComponent,
1577
+ CronNextRunComponent,
1578
+ CronsComponent,
1579
+ SettingsComponent,
1580
+ KeyNameValuePipe,
1581
+ ProcessesComponent,
1582
+ ServerLogComponent,
1583
+ ServerLogsComponent,
1584
+ UpgradeLogsComponent,
1585
+ ApiLogsComponent,
1586
+ ApiLogComponent,
1587
+ InfoComponent,
1588
+ ProcessComponent,
1589
+ CronComponent,
1590
+ CronLogComponent,
1591
+ ],
1592
+ }]
1597
1593
  }] });
1598
1594
 
1599
- /**
1600
- * Generated bundle index. Do not edit.
1595
+ /**
1596
+ * Generated bundle index. Do not edit.
1601
1597
  */
1602
1598
 
1603
1599
  export { ApiLogComponent, ApiLogState, ApiLogStates, ApiLogsComponent, CronComponent, CronLogComponent, CronState, CronStates, CronsComponent, DashboardComponent, FS_SYSTEM_CONFIG, FsSystemModule, FsSystemQueryLogsModule, InfoComponent, KeyNameValuePipe, ProcessComponent, ProcessState, ProcessStates, ProcessesComponent, QueryLogsComponent, ServerLogComponent, ServerLogsComponent, SettingsComponent, UpgradeLogsComponent };