@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,1592 +17,1588 @@ 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 * as i1$1 from '@firestitch/message';
60
- import * as i3$3 from '@firestitch/prompt';
60
+ import * as i3$2 from '@firestitch/prompt';
61
61
  import { SelectionActionType } from '@firestitch/selection';
62
- import * as i2$3 from '@firestitch/build';
63
- import * as i9$1 from '@angular/material/core';
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 () { return [{ type: undefined, decorators: [{
77
- type: Inject,
78
- args: [MAT_DIALOG_DATA]
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 () { return [{ type: undefined, decorators: [{
77
+ type: Inject,
78
+ args: [MAT_DIALOG_DATA]
79
79
  }] }]; } });
80
80
 
81
- class QueryLogComponent {
82
- constructor(_data, _dialog) {
83
- this._data = _data;
84
- this._dialog = _dialog;
85
- this.accessTypes = {
86
- 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.',
87
- system: 'The table is empty or has one row.',
88
- 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',
89
- 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)',
90
- 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.',
91
- fulltext: 'Operation (JOIN) is using the table’s fulltext index',
92
- 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.',
93
- 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.',
94
- 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)',
95
- unique_subquery: '',
96
- ALL: 'MySQL scans the entire table to satisfy the query',
97
- };
98
- this.queryLog = _data.queryLog;
99
- }
100
- openExplain() {
101
- this._dialog.open(ExplainComponent, {
102
- data: { explain: this.explain },
103
- });
104
- }
105
- get explain() {
106
- return this.queryLog.explain;
107
- }
108
- get queryBlock() {
109
- return this.explain?.queryBlock;
110
- }
111
- get orderingOperation() {
112
- return this.queryBlock?.orderingOperation;
113
- }
114
- }
115
- 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 });
116
- 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 });
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: QueryLogComponent, decorators: [{
118
- type: Component,
119
- 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"] }]
120
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
121
- type: Inject,
122
- args: [MAT_DIALOG_DATA]
81
+ class QueryLogComponent {
82
+ constructor(_data, _dialog) {
83
+ this._data = _data;
84
+ this._dialog = _dialog;
85
+ this.accessTypes = {
86
+ 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.',
87
+ system: 'The table is empty or has one row.',
88
+ 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',
89
+ 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)',
90
+ 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.',
91
+ fulltext: 'Operation (JOIN) is using the table’s fulltext index',
92
+ 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.',
93
+ 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.',
94
+ 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)',
95
+ unique_subquery: '',
96
+ ALL: 'MySQL scans the entire table to satisfy the query',
97
+ };
98
+ this.queryLog = _data.queryLog;
99
+ }
100
+ openExplain() {
101
+ this._dialog.open(ExplainComponent, {
102
+ data: { explain: this.explain },
103
+ });
104
+ }
105
+ get explain() {
106
+ return this.queryLog.explain;
107
+ }
108
+ get queryBlock() {
109
+ return this.explain?.queryBlock;
110
+ }
111
+ get orderingOperation() {
112
+ return this.queryBlock?.orderingOperation;
113
+ }
114
+ }
115
+ 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 });
116
+ 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 });
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QueryLogComponent, decorators: [{
118
+ type: Component,
119
+ 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"] }]
120
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
121
+ type: Inject,
122
+ args: [MAT_DIALOG_DATA]
123
123
  }] }, { type: i1.MatDialog }]; } });
124
124
 
125
- class QueryLogsComponent {
126
- constructor(_dialog) {
127
- this._dialog = _dialog;
128
- }
129
- openQueryLog(queryLog) {
130
- this._dialog.open(QueryLogComponent, {
131
- data: { queryLog },
132
- width: '100%',
133
- });
134
- }
135
- ngOnInit() {
136
- this.listConfig = {
137
- filters: [
138
- {
139
- name: 'keyword',
140
- type: ItemType.Keyword,
141
- label: 'Search',
142
- },
143
- {
144
- name: 'optimized',
145
- type: ItemType.Select,
146
- label: 'Optimization',
147
- values: [
148
- { name: 'Any', value: undefined },
149
- { name: 'Yes', value: 'true' },
150
- { name: 'No', value: 'false' },
151
- ],
152
- },
153
- {
154
- name: 'createDate',
155
- type: ItemType.DateTimeRange,
156
- label: ['From Date', 'To Date'],
157
- },
158
- {
159
- name: 'duration',
160
- type: ItemType.Range,
161
- label: ['Min Duration', 'Max Duration'],
162
- },
163
- ],
164
- actions: [
165
- {
166
- label: 'Purge',
167
- primary: false,
168
- click: () => {
169
- this.purgeQueryLogs()
170
- .subscribe(() => {
171
- this.list.reload();
172
- });
173
- },
174
- },
175
- ],
176
- fetch: (query) => {
177
- return this.loadQueryLogs(query)
178
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
179
- },
180
- };
181
- }
182
- }
183
- QueryLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: QueryLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
184
- 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 });
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: QueryLogsComponent, decorators: [{
186
- type: Component,
187
- 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"] }]
188
- }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
189
- type: ViewChild,
190
- args: [FsListComponent]
191
- }], loadQueryLogs: [{
192
- type: Input
193
- }], purgeQueryLogs: [{
194
- type: Input
125
+ class QueryLogsComponent {
126
+ constructor(_dialog) {
127
+ this._dialog = _dialog;
128
+ }
129
+ openQueryLog(queryLog) {
130
+ this._dialog.open(QueryLogComponent, {
131
+ data: { queryLog },
132
+ width: '100%',
133
+ });
134
+ }
135
+ ngOnInit() {
136
+ this.listConfig = {
137
+ filters: [
138
+ {
139
+ name: 'keyword',
140
+ type: ItemType.Keyword,
141
+ label: 'Search',
142
+ },
143
+ {
144
+ name: 'optimized',
145
+ type: ItemType.Select,
146
+ label: 'Optimization',
147
+ values: [
148
+ { name: 'Any', value: undefined },
149
+ { name: 'Yes', value: 'true' },
150
+ { name: 'No', value: 'false' },
151
+ ],
152
+ },
153
+ {
154
+ name: 'createDate',
155
+ type: ItemType.DateTimeRange,
156
+ label: ['From Date', 'To Date'],
157
+ },
158
+ {
159
+ name: 'duration',
160
+ type: ItemType.Range,
161
+ label: ['Min Duration', 'Max Duration'],
162
+ },
163
+ ],
164
+ actions: [
165
+ {
166
+ label: 'Purge',
167
+ primary: false,
168
+ click: () => {
169
+ this.purgeQueryLogs()
170
+ .subscribe(() => {
171
+ this.list.reload();
172
+ });
173
+ },
174
+ },
175
+ ],
176
+ fetch: (query) => {
177
+ return this.loadQueryLogs(query)
178
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
179
+ },
180
+ };
181
+ }
182
+ }
183
+ QueryLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QueryLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
184
+ 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 });
185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QueryLogsComponent, decorators: [{
186
+ type: Component,
187
+ 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"] }]
188
+ }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
189
+ type: ViewChild,
190
+ args: [FsListComponent]
191
+ }], loadQueryLogs: [{
192
+ type: Input
193
+ }], purgeQueryLogs: [{
194
+ type: Input
195
195
  }] } });
196
196
 
197
- class FsSystemQueryLogsModule {
198
- }
199
- FsSystemQueryLogsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemQueryLogsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
200
- FsSystemQueryLogsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemQueryLogsModule, declarations: [QueryLogsComponent,
201
- QueryLogComponent,
202
- ExplainComponent], imports: [CommonModule,
203
- RouterModule,
204
- CommonModule,
205
- FormsModule,
206
- MatTabsModule,
207
- MatButtonModule,
208
- MatDialogModule,
209
- FsFormModule,
210
- FsLabelModule,
211
- FsPopoverModule,
212
- FsCommonModule,
213
- FsDateModule,
214
- FsDialogModule,
215
- FsListModule,
216
- FsClipboardModule], exports: [QueryLogsComponent] });
217
- FsSystemQueryLogsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemQueryLogsModule, imports: [[
218
- CommonModule,
219
- RouterModule,
220
- CommonModule,
221
- FormsModule,
222
- MatTabsModule,
223
- MatButtonModule,
224
- MatDialogModule,
225
- FsFormModule,
226
- FsLabelModule,
227
- FsPopoverModule,
228
- FsCommonModule,
229
- FsDateModule,
230
- FsDialogModule,
231
- FsListModule,
232
- FsClipboardModule,
233
- ]] });
234
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemQueryLogsModule, decorators: [{
235
- type: NgModule,
236
- args: [{
237
- imports: [
238
- CommonModule,
239
- RouterModule,
240
- CommonModule,
241
- FormsModule,
242
- MatTabsModule,
243
- MatButtonModule,
244
- MatDialogModule,
245
- FsFormModule,
246
- FsLabelModule,
247
- FsPopoverModule,
248
- FsCommonModule,
249
- FsDateModule,
250
- FsDialogModule,
251
- FsListModule,
252
- FsClipboardModule,
253
- ],
254
- declarations: [
255
- QueryLogsComponent,
256
- QueryLogComponent,
257
- ExplainComponent,
258
- ],
259
- exports: [
260
- QueryLogsComponent,
261
- ],
262
- }]
197
+ class FsSystemQueryLogsModule {
198
+ }
199
+ FsSystemQueryLogsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemQueryLogsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
200
+ FsSystemQueryLogsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: FsSystemQueryLogsModule, declarations: [QueryLogsComponent,
201
+ QueryLogComponent,
202
+ ExplainComponent], imports: [CommonModule,
203
+ RouterModule,
204
+ CommonModule,
205
+ FormsModule,
206
+ MatTabsModule,
207
+ MatButtonModule,
208
+ MatDialogModule,
209
+ FsFormModule,
210
+ FsLabelModule,
211
+ FsPopoverModule,
212
+ FsCommonModule,
213
+ FsDateModule,
214
+ FsDialogModule,
215
+ FsListModule,
216
+ FsClipboardModule], exports: [QueryLogsComponent] });
217
+ FsSystemQueryLogsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemQueryLogsModule, imports: [CommonModule,
218
+ RouterModule,
219
+ CommonModule,
220
+ FormsModule,
221
+ MatTabsModule,
222
+ MatButtonModule,
223
+ MatDialogModule,
224
+ FsFormModule,
225
+ FsLabelModule,
226
+ FsPopoverModule,
227
+ FsCommonModule,
228
+ FsDateModule,
229
+ FsDialogModule,
230
+ FsListModule,
231
+ FsClipboardModule] });
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemQueryLogsModule, decorators: [{
233
+ type: NgModule,
234
+ args: [{
235
+ imports: [
236
+ CommonModule,
237
+ RouterModule,
238
+ CommonModule,
239
+ FormsModule,
240
+ MatTabsModule,
241
+ MatButtonModule,
242
+ MatDialogModule,
243
+ FsFormModule,
244
+ FsLabelModule,
245
+ FsPopoverModule,
246
+ FsCommonModule,
247
+ FsDateModule,
248
+ FsDialogModule,
249
+ FsListModule,
250
+ FsClipboardModule,
251
+ ],
252
+ declarations: [
253
+ QueryLogsComponent,
254
+ QueryLogComponent,
255
+ ExplainComponent,
256
+ ],
257
+ exports: [
258
+ QueryLogsComponent,
259
+ ],
260
+ }]
263
261
  }] });
264
262
 
265
- var CronState;
266
- (function (CronState) {
267
- CronState["Running"] = "running";
268
- CronState["Idle"] = "idle";
269
- CronState["Failed"] = "failed";
270
- CronState["Queued"] = "queued";
271
- CronState["Disabled"] = "disabled";
272
- CronState["Enabled"] = "enabled";
273
- CronState["Killing"] = "killing";
263
+ var CronState;
264
+ (function (CronState) {
265
+ CronState["Running"] = "running";
266
+ CronState["Idle"] = "idle";
267
+ CronState["Failed"] = "failed";
268
+ CronState["Queued"] = "queued";
269
+ CronState["Disabled"] = "disabled";
270
+ CronState["Enabled"] = "enabled";
271
+ CronState["Killing"] = "killing";
274
272
  })(CronState || (CronState = {}));
275
273
 
276
- var SettingInterfaceType;
277
- (function (SettingInterfaceType) {
278
- SettingInterfaceType["RadioButton"] = "R";
279
- SettingInterfaceType["InputBox"] = "I";
280
- SettingInterfaceType["Textarea"] = "T";
281
- SettingInterfaceType["Select"] = "D";
282
- SettingInterfaceType["SelectMultiple"] = "W";
283
- SettingInterfaceType["Date"] = "A";
284
- SettingInterfaceType["File"] = "F";
285
- SettingInterfaceType["Static"] = "S";
286
- SettingInterfaceType["Password"] = "P";
287
- SettingInterfaceType["Time"] = "M";
288
- SettingInterfaceType["None"] = "N";
289
- SettingInterfaceType["Color"] = "C";
274
+ var SettingInterfaceType;
275
+ (function (SettingInterfaceType) {
276
+ SettingInterfaceType["RadioButton"] = "R";
277
+ SettingInterfaceType["InputBox"] = "I";
278
+ SettingInterfaceType["Textarea"] = "T";
279
+ SettingInterfaceType["Select"] = "D";
280
+ SettingInterfaceType["SelectMultiple"] = "W";
281
+ SettingInterfaceType["Date"] = "A";
282
+ SettingInterfaceType["File"] = "F";
283
+ SettingInterfaceType["Static"] = "S";
284
+ SettingInterfaceType["Password"] = "P";
285
+ SettingInterfaceType["Time"] = "M";
286
+ SettingInterfaceType["None"] = "N";
287
+ SettingInterfaceType["Color"] = "C";
290
288
  })(SettingInterfaceType || (SettingInterfaceType = {}));
291
289
 
292
- var ApiLogState;
293
- (function (ApiLogState) {
294
- ApiLogState["Success"] = "success";
295
- ApiLogState["Failed"] = "failed";
296
- ApiLogState["Deleted"] = "deleted";
290
+ var ApiLogState;
291
+ (function (ApiLogState) {
292
+ ApiLogState["Success"] = "success";
293
+ ApiLogState["Failed"] = "failed";
294
+ ApiLogState["Deleted"] = "deleted";
297
295
  })(ApiLogState || (ApiLogState = {}));
298
296
 
299
- var ProcessState;
300
- (function (ProcessState) {
301
- ProcessState["Queued"] = "Q";
302
- ProcessState["Running"] = "R";
303
- ProcessState["Completed"] = "C";
304
- ProcessState["Killed"] = "K";
305
- ProcessState["Deleted"] = "D";
306
- ProcessState["Failed"] = "F";
297
+ var ProcessState;
298
+ (function (ProcessState) {
299
+ ProcessState["Queued"] = "Q";
300
+ ProcessState["Running"] = "R";
301
+ ProcessState["Completed"] = "C";
302
+ ProcessState["Killed"] = "K";
303
+ ProcessState["Deleted"] = "D";
304
+ ProcessState["Failed"] = "F";
307
305
  })(ProcessState || (ProcessState = {}));
308
306
 
309
- var CronLogState;
310
- (function (CronLogState) {
311
- CronLogState["Message"] = "message";
312
- CronLogState["Disabled"] = "disabled";
313
- CronLogState["Enabled"] = "enabled";
314
- CronLogState["Started"] = "started";
315
- CronLogState["Running"] = "running";
316
- CronLogState["Completed"] = "completed";
317
- CronLogState["Failed"] = "failed";
318
- CronLogState["Killed"] = "killed";
319
- CronLogState["Queued"] = "queued";
320
- CronLogState["Reset"] = "reset";
321
- CronLogState["Stagnant"] = "stagnant";
322
- CronLogState["LongRunning"] = "long_running";
307
+ var CronLogState;
308
+ (function (CronLogState) {
309
+ CronLogState["Message"] = "message";
310
+ CronLogState["Disabled"] = "disabled";
311
+ CronLogState["Enabled"] = "enabled";
312
+ CronLogState["Started"] = "started";
313
+ CronLogState["Running"] = "running";
314
+ CronLogState["Completed"] = "completed";
315
+ CronLogState["Failed"] = "failed";
316
+ CronLogState["Killed"] = "killed";
317
+ CronLogState["Queued"] = "queued";
318
+ CronLogState["Reset"] = "reset";
319
+ CronLogState["Stagnant"] = "stagnant";
320
+ CronLogState["LongRunning"] = "long_running";
323
321
  })(CronLogState || (CronLogState = {}));
324
322
 
325
- const ApiLogStates = [
326
- { name: 'Success', value: ApiLogState.Success },
327
- { name: 'Failed', value: ApiLogState.Failed },
328
- { name: 'Deleted', value: ApiLogState.Deleted }
323
+ const ApiLogStates = [
324
+ { name: 'Success', value: ApiLogState.Success },
325
+ { name: 'Failed', value: ApiLogState.Failed },
326
+ { name: 'Deleted', value: ApiLogState.Deleted }
329
327
  ];
330
328
 
331
- const CronLogStates = [
332
- { name: 'Message', value: CronLogState.Message, color: '#29B7FF' },
333
- { name: 'Disabled', value: CronLogState.Disabled, color: '#29B7FF' },
334
- { name: 'Reset', value: CronLogState.Reset, color: '#29B7FF' },
335
- { name: 'Enabled', value: CronLogState.Enabled, color: '#29B7FF' },
336
- { name: 'Queued', value: CronLogState.Queued, color: '#29B7FF' },
337
- { name: 'Started', value: CronLogState.Started, color: '#D17333' },
338
- { name: 'Running', value: CronLogState.Running, color: '#34BD43' },
339
- { name: 'Completed', value: CronLogState.Completed, color: '#34BD43' },
340
- { name: 'Failed', value: CronLogState.Failed, color: '#FA7567' },
341
- { name: 'Killed', value: CronLogState.Killed, color: '#FA7567' },
342
- { name: 'Stagnant', value: CronLogState.Stagnant, color: '#FA7567' },
343
- { name: 'Long Running', value: CronLogState.LongRunning, color: '#FA7567' },
329
+ const CronLogStates = [
330
+ { name: 'Message', value: CronLogState.Message, color: '#29B7FF' },
331
+ { name: 'Disabled', value: CronLogState.Disabled, color: '#29B7FF' },
332
+ { name: 'Reset', value: CronLogState.Reset, color: '#29B7FF' },
333
+ { name: 'Enabled', value: CronLogState.Enabled, color: '#29B7FF' },
334
+ { name: 'Queued', value: CronLogState.Queued, color: '#29B7FF' },
335
+ { name: 'Started', value: CronLogState.Started, color: '#D17333' },
336
+ { name: 'Running', value: CronLogState.Running, color: '#34BD43' },
337
+ { name: 'Completed', value: CronLogState.Completed, color: '#34BD43' },
338
+ { name: 'Failed', value: CronLogState.Failed, color: '#FA7567' },
339
+ { name: 'Killed', value: CronLogState.Killed, color: '#FA7567' },
340
+ { name: 'Stagnant', value: CronLogState.Stagnant, color: '#FA7567' },
341
+ { name: 'Long Running', value: CronLogState.LongRunning, color: '#FA7567' },
344
342
  ];
345
343
 
346
- const CronProcessStates = [
347
- { name: 'Running', value: 'running' },
348
- { name: 'Stopped', value: 'stopped' },
344
+ const CronProcessStates = [
345
+ { name: 'Running', value: 'running' },
346
+ { name: 'Stopped', value: 'stopped' },
349
347
  ];
350
348
 
351
- const CronStates = [
352
- { name: 'Running', value: CronState.Running },
353
- { name: 'Idle', value: CronState.Idle },
354
- { name: 'Failed', value: CronState.Failed },
355
- { name: 'Queued', value: CronState.Queued },
356
- { name: 'Disabled', value: CronState.Disabled },
357
- { name: 'Killing', value: CronState.Killing },
358
- { name: 'Enabled', value: CronState.Enabled },
349
+ const CronStates = [
350
+ { name: 'Running', value: CronState.Running },
351
+ { name: 'Idle', value: CronState.Idle },
352
+ { name: 'Failed', value: CronState.Failed },
353
+ { name: 'Queued', value: CronState.Queued },
354
+ { name: 'Disabled', value: CronState.Disabled },
355
+ { name: 'Killing', value: CronState.Killing },
356
+ { name: 'Enabled', value: CronState.Enabled },
359
357
  ];
360
358
 
361
- const ProcessProcessStates = [
362
- { name: 'Missing', value: 'missing' },
363
- { name: 'Running', value: 'running' },
364
- { name: 'Stopped', value: 'stopped' },
359
+ const ProcessProcessStates = [
360
+ { name: 'Missing', value: 'missing' },
361
+ { name: 'Running', value: 'running' },
362
+ { name: 'Stopped', value: 'stopped' },
365
363
  ];
366
364
 
367
- const ProcessStates = [
368
- { name: 'Queued', value: ProcessState.Queued },
369
- { name: 'Running', value: ProcessState.Running },
370
- { name: 'Completed', value: ProcessState.Completed },
371
- { name: 'Killed', value: ProcessState.Killed },
372
- { name: 'Failed', value: ProcessState.Failed },
373
- { name: 'Deleted', value: ProcessState.Deleted }
365
+ const ProcessStates = [
366
+ { name: 'Queued', value: ProcessState.Queued },
367
+ { name: 'Running', value: ProcessState.Running },
368
+ { name: 'Completed', value: ProcessState.Completed },
369
+ { name: 'Killed', value: ProcessState.Killed },
370
+ { name: 'Failed', value: ProcessState.Failed },
371
+ { name: 'Deleted', value: ProcessState.Deleted }
374
372
  ];
375
373
 
376
- const SettingInterfaceTypes = [
377
- { name: 'RadioButton', value: SettingInterfaceType.RadioButton },
378
- { name: 'InputBox', value: SettingInterfaceType.InputBox },
379
- { name: 'Textarea', value: SettingInterfaceType.Textarea },
380
- { name: 'DropDown', value: SettingInterfaceType.Select },
381
- { name: 'File', value: SettingInterfaceType.File },
382
- { name: 'Static', value: SettingInterfaceType.Static },
383
- { name: 'Password', value: SettingInterfaceType.Password },
384
- { name: 'Color', value: SettingInterfaceType.Color }
374
+ const SettingInterfaceTypes = [
375
+ { name: 'RadioButton', value: SettingInterfaceType.RadioButton },
376
+ { name: 'InputBox', value: SettingInterfaceType.InputBox },
377
+ { name: 'Textarea', value: SettingInterfaceType.Textarea },
378
+ { name: 'DropDown', value: SettingInterfaceType.Select },
379
+ { name: 'File', value: SettingInterfaceType.File },
380
+ { name: 'Static', value: SettingInterfaceType.Static },
381
+ { name: 'Password', value: SettingInterfaceType.Password },
382
+ { name: 'Color', value: SettingInterfaceType.Color }
385
383
  ];
386
384
 
387
- function indexNameValue(arry) {
388
- const obj = {};
389
- arry.forEach(item => {
390
- obj[item.value] = item.name;
391
- });
392
- return obj;
385
+ function indexNameValue(arry) {
386
+ const obj = {};
387
+ arry.forEach(item => {
388
+ obj[item.value] = item.name;
389
+ });
390
+ return obj;
393
391
  }
394
392
 
395
- class ApiLogComponent {
396
- constructor(_dialogRef, data) {
397
- this._dialogRef = _dialogRef;
398
- this.data = data;
399
- }
400
- ngOnInit() {
401
- this.apiLogStates = indexNameValue(ApiLogStates);
402
- if (this.data.apiLog) {
403
- this.apiLog = this.data.apiLog;
404
- }
405
- }
406
- }
407
- 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 });
408
- 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 } });
409
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiLogComponent, decorators: [{
410
- type: Component,
411
- 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: [""] }]
412
- }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
413
- type: Inject,
414
- args: [MAT_DIALOG_DATA]
393
+ class ApiLogComponent {
394
+ constructor(_dialogRef, data) {
395
+ this._dialogRef = _dialogRef;
396
+ this.data = data;
397
+ }
398
+ ngOnInit() {
399
+ this.apiLogStates = indexNameValue(ApiLogStates);
400
+ if (this.data.apiLog) {
401
+ this.apiLog = this.data.apiLog;
402
+ }
403
+ }
404
+ }
405
+ 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 });
406
+ 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" }] });
407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiLogComponent, decorators: [{
408
+ type: Component,
409
+ 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" }]
410
+ }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
411
+ type: Inject,
412
+ args: [MAT_DIALOG_DATA]
415
413
  }] }]; } });
416
414
 
417
- class ApiLogsComponent {
418
- constructor(_dialog) {
419
- this._dialog = _dialog;
420
- this.config = null;
421
- this.apiLogStates = indexNameValue(ApiLogStates);
422
- }
423
- ngOnInit() {
424
- this._configList();
425
- }
426
- _configList() {
427
- this.config = {
428
- filters: [
429
- {
430
- type: ItemType.Keyword,
431
- name: 'keyword',
432
- label: 'Search',
433
- },
434
- {
435
- type: ItemType.Select,
436
- name: 'state',
437
- label: 'Status',
438
- values: ApiLogStates,
439
- },
440
- {
441
- name: 'createDate',
442
- type: ItemType.DateRange,
443
- label: ['From Date', 'To Date'],
444
- },
445
- ],
446
- fetch: (query) => {
447
- Object.assign(query, {});
448
- return this.loadApiLogs(query)
449
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
450
- },
451
- };
452
- }
453
- open(apiLog) {
454
- this._dialog.open(ApiLogComponent, {
455
- data: { apiLog },
456
- width: '85%',
457
- });
458
- }
459
- }
460
- ApiLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
461
- 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 } });
462
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ApiLogsComponent, decorators: [{
463
- type: Component,
464
- 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"] }]
465
- }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
466
- type: ViewChild,
467
- args: [FsListComponent, { static: true }]
468
- }], loadApiLogs: [{
469
- type: Input
415
+ class ApiLogsComponent {
416
+ constructor(_dialog) {
417
+ this._dialog = _dialog;
418
+ this.config = null;
419
+ this.apiLogStates = indexNameValue(ApiLogStates);
420
+ }
421
+ ngOnInit() {
422
+ this._configList();
423
+ }
424
+ _configList() {
425
+ this.config = {
426
+ filters: [
427
+ {
428
+ type: ItemType.Keyword,
429
+ name: 'keyword',
430
+ label: 'Search',
431
+ },
432
+ {
433
+ type: ItemType.Select,
434
+ name: 'state',
435
+ label: 'Status',
436
+ values: ApiLogStates,
437
+ },
438
+ {
439
+ name: 'createDate',
440
+ type: ItemType.DateRange,
441
+ label: ['From Date', 'To Date'],
442
+ },
443
+ ],
444
+ fetch: (query) => {
445
+ Object.assign(query, {});
446
+ return this.loadApiLogs(query)
447
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
448
+ },
449
+ };
450
+ }
451
+ open(apiLog) {
452
+ this._dialog.open(ApiLogComponent, {
453
+ data: { apiLog },
454
+ width: '85%',
455
+ });
456
+ }
457
+ }
458
+ ApiLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
459
+ 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" }] });
460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiLogsComponent, decorators: [{
461
+ type: Component,
462
+ 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"] }]
463
+ }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
464
+ type: ViewChild,
465
+ args: [FsListComponent, { static: true }]
466
+ }], loadApiLogs: [{
467
+ type: Input
470
468
  }] } });
471
469
 
472
- class CronLogComponent {
473
- constructor(_data) {
474
- this._data = _data;
475
- this.CronLogStates = indexNameValue(CronLogStates);
476
- this.CronLogStateColors = {};
477
- }
478
- ngOnInit() {
479
- this.cronLog = this._data.cronLog;
480
- this.CronLogStateColors = CronLogStates
481
- .reduce((accum, cronLogState) => {
482
- accum[cronLogState.value] = cronLogState.color;
483
- return accum;
484
- }, {});
485
- }
486
- }
487
- 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 });
488
- 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"] }] });
489
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronLogComponent, decorators: [{
490
- type: Component,
491
- 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"] }]
492
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
493
- type: Inject,
494
- args: [MAT_DIALOG_DATA]
470
+ class CronLogComponent {
471
+ constructor(_data) {
472
+ this._data = _data;
473
+ this.CronLogStates = indexNameValue(CronLogStates);
474
+ this.CronLogStateColors = {};
475
+ }
476
+ ngOnInit() {
477
+ this.cronLog = this._data.cronLog;
478
+ this.CronLogStateColors = CronLogStates
479
+ .reduce((accum, cronLogState) => {
480
+ accum[cronLogState.value] = cronLogState.color;
481
+ return accum;
482
+ }, {});
483
+ }
484
+ }
485
+ 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 });
486
+ 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"] }] });
487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronLogComponent, decorators: [{
488
+ type: Component,
489
+ 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"] }]
490
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
491
+ type: Inject,
492
+ args: [MAT_DIALOG_DATA]
495
493
  }] }]; } });
496
494
 
497
- class CronComponent {
498
- constructor(_data, _dialog, _cdRef) {
499
- this._data = _data;
500
- this._dialog = _dialog;
501
- this._cdRef = _cdRef;
502
- this.tabIndex = 0;
503
- this.CronStates = indexNameValue(CronStates);
504
- this.CronProcessStates = indexNameValue(CronProcessStates);
505
- this.CronLogStates = indexNameValue(CronLogStates);
506
- this.CronLogStateColors = {};
507
- }
508
- ngOnInit() {
509
- this.load();
510
- this.CronLogStateColors = CronLogStates
511
- .reduce((accum, cronLogState) => {
512
- accum[cronLogState.value] = cronLogState.color;
513
- return accum;
514
- }, {});
515
- }
516
- cronLogOpen(cronLog) {
517
- this._dialog.open(CronLogComponent, {
518
- data: {
519
- cronLog,
520
- },
521
- width: '85%',
522
- });
523
- }
524
- cronActionClick(cronAction) {
525
- cronAction.action(this.cron)
526
- .subscribe(() => {
527
- this.load();
528
- });
529
- }
530
- selectedIndexChange(index) {
531
- this.tabIndex = index;
532
- }
533
- load() {
534
- this._data.loadCron(this._data.cron)
535
- .subscribe((cron) => {
536
- this.cron = {
537
- ...this._data.cron,
538
- ...cron,
539
- };
540
- if (this._data.loadCronLogs) {
541
- this.config = {
542
- filters: [
543
- {
544
- type: ItemType.Select,
545
- name: 'state',
546
- label: 'Status',
547
- values: [
548
- { name: 'All', value: null },
549
- ...CronLogStates,
550
- ],
551
- },
552
- {
553
- type: ItemType.DateRange,
554
- name: 'date',
555
- label: ['From Date', 'To Date'],
556
- },
557
- ],
558
- fetch: (query) => {
559
- query = {
560
- ...query,
561
- cronId: this.cron.id,
562
- };
563
- return this._data.loadCronLogs(query);
564
- },
565
- };
566
- }
567
- this.cronActions = this._data.cronActions
568
- .filter((cronLogAction) => {
569
- return cronLogAction.show(this.cron);
570
- });
571
- this._cdRef.markForCheck();
572
- });
573
- }
574
- }
575
- 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 });
576
- 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 });
577
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronComponent, decorators: [{
578
- type: Component,
579
- 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"] }]
580
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
581
- type: Inject,
582
- args: [MAT_DIALOG_DATA]
495
+ class CronComponent {
496
+ constructor(_data, _dialog, _cdRef) {
497
+ this._data = _data;
498
+ this._dialog = _dialog;
499
+ this._cdRef = _cdRef;
500
+ this.tabIndex = 0;
501
+ this.CronStates = indexNameValue(CronStates);
502
+ this.CronProcessStates = indexNameValue(CronProcessStates);
503
+ this.CronLogStates = indexNameValue(CronLogStates);
504
+ this.CronLogStateColors = {};
505
+ }
506
+ ngOnInit() {
507
+ this.load();
508
+ this.CronLogStateColors = CronLogStates
509
+ .reduce((accum, cronLogState) => {
510
+ accum[cronLogState.value] = cronLogState.color;
511
+ return accum;
512
+ }, {});
513
+ }
514
+ cronLogOpen(cronLog) {
515
+ this._dialog.open(CronLogComponent, {
516
+ data: {
517
+ cronLog,
518
+ },
519
+ width: '85%',
520
+ });
521
+ }
522
+ cronActionClick(cronAction) {
523
+ cronAction.action(this.cron)
524
+ .subscribe(() => {
525
+ this.load();
526
+ });
527
+ }
528
+ selectedIndexChange(index) {
529
+ this.tabIndex = index;
530
+ }
531
+ load() {
532
+ this._data.loadCron(this._data.cron)
533
+ .subscribe((cron) => {
534
+ this.cron = {
535
+ ...this._data.cron,
536
+ ...cron,
537
+ };
538
+ if (this._data.loadCronLogs) {
539
+ this.config = {
540
+ filters: [
541
+ {
542
+ type: ItemType.Select,
543
+ name: 'state',
544
+ label: 'Status',
545
+ values: [
546
+ { name: 'All', value: null },
547
+ ...CronLogStates,
548
+ ],
549
+ },
550
+ {
551
+ type: ItemType.DateRange,
552
+ name: 'date',
553
+ label: ['From Date', 'To Date'],
554
+ },
555
+ ],
556
+ fetch: (query) => {
557
+ query = {
558
+ ...query,
559
+ cronId: this.cron.id,
560
+ };
561
+ return this._data.loadCronLogs(query);
562
+ },
563
+ };
564
+ }
565
+ this.cronActions = this._data.cronActions
566
+ .filter((cronLogAction) => {
567
+ return cronLogAction.show(this.cron);
568
+ });
569
+ this._cdRef.markForCheck();
570
+ });
571
+ }
572
+ }
573
+ 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 });
574
+ 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 });
575
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronComponent, decorators: [{
576
+ type: Component,
577
+ 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"] }]
578
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
579
+ type: Inject,
580
+ args: [MAT_DIALOG_DATA]
583
581
  }] }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }]; } });
584
582
 
585
- class CronNextRunComponent {
586
- constructor(_cdRef) {
587
- this._cdRef = _cdRef;
588
- this._destroy$ = new Subject();
589
- }
590
- ngOnInit() {
591
- this.update();
592
- }
593
- calculateDuration() {
594
- const now = new Date();
595
- const nextMinutes = this._getNextMinutes(now);
596
- const nextHours = this._getNextHours(now);
597
- const nextDays = this._getNextDays(now);
598
- if (this.cron.cronSetting.minutes.length ||
599
- this.cron.cronSetting.hours.length ||
600
- this.cron.cronSetting.days.length) {
601
- let next = new Date();
602
- next = addMinutes(next, nextMinutes);
603
- next = addHours(next, nextHours);
604
- next = addDays(next, nextDays);
605
- next = subSeconds(next, next.getSeconds());
606
- this.duration = differenceInSeconds(next, now);
607
- }
608
- else {
609
- this.duration = 60 - now.getSeconds();
610
- }
611
- }
612
- update() {
613
- this.calculateDuration();
614
- timer(0, 1000)
615
- .pipe(tap(() => {
616
- this.duration -= 1;
617
- if (this.duration % 60 === 0 || this.duration < (60 * 5)) {
618
- this._cdRef.markForCheck();
619
- }
620
- if (this.duration <= 0) {
621
- this.calculateDuration();
622
- this._cdRef.markForCheck();
623
- }
624
- }), takeUntil(this._destroy$))
625
- .subscribe();
626
- }
627
- ngOnDestroy() {
628
- this._destroy$.next();
629
- this._destroy$.complete();
630
- }
631
- _getNextMinutes(now) {
632
- const minutes = this.cron.cronSetting.minutes;
633
- if (minutes.length) {
634
- for (let i = minutes.length - 1; i >= 0; i--) {
635
- if (now.getUTCMinutes() >= minutes[i]) {
636
- return (minutes[i + 1] ? minutes[i + 1] - now.getUTCMinutes() : (60 - now.getUTCMinutes() + minutes[i]));
637
- }
638
- }
639
- return minutes[0] - now.getMinutes();
640
- }
641
- return 0;
642
- }
643
- _getNextHours(now) {
644
- const hours = this.cron.cronSetting.hours;
645
- if (hours.length) {
646
- for (let i = hours.length - 1; i >= 0; i--) {
647
- if (now.getUTCHours() >= hours[i]) {
648
- return (hours[i + 1] ? hours[i + 1] - now.getUTCHours() : (24 - now.getUTCHours() + hours[i]));
649
- }
650
- }
651
- return hours[0] - now.getUTCHours();
652
- }
653
- return 0;
654
- }
655
- _getNextDays(now) {
656
- const days = this.cron.cronSetting.days;
657
- if (days.length) {
658
- for (let i = days.length - 1; i >= 0; i--) {
659
- if (now.getDate() >= days[i]) {
660
- return (days[i + 1] ? days[i + 1] : getDaysInMonth(now)) - now.getDate();
661
- }
662
- }
663
- return days[0] - getDaysInMonth(now);
664
- }
665
- return 0;
666
- }
667
- }
668
- CronNextRunComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronNextRunComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
669
- 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 });
670
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronNextRunComponent, decorators: [{
671
- type: Component,
672
- 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: [""] }]
673
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { cron: [{
674
- type: Input
583
+ class CronNextRunComponent {
584
+ constructor(_cdRef) {
585
+ this._cdRef = _cdRef;
586
+ this._destroy$ = new Subject();
587
+ }
588
+ ngOnInit() {
589
+ this.update();
590
+ }
591
+ calculateDuration() {
592
+ const now = new Date();
593
+ const nextMinutes = this._getNextMinutes(now);
594
+ const nextHours = this._getNextHours(now);
595
+ const nextDays = this._getNextDays(now);
596
+ if (this.cron.cronSetting.minutes.length ||
597
+ this.cron.cronSetting.hours.length ||
598
+ this.cron.cronSetting.days.length) {
599
+ let next = new Date();
600
+ next = addMinutes(next, nextMinutes);
601
+ next = addHours(next, nextHours);
602
+ next = addDays(next, nextDays);
603
+ next = subSeconds(next, next.getSeconds());
604
+ this.duration = differenceInSeconds(next, now);
605
+ }
606
+ else {
607
+ this.duration = 60 - now.getSeconds();
608
+ }
609
+ }
610
+ update() {
611
+ this.calculateDuration();
612
+ timer(0, 1000)
613
+ .pipe(tap(() => {
614
+ this.duration -= 1;
615
+ if (this.duration % 60 === 0 || this.duration < (60 * 5)) {
616
+ this._cdRef.markForCheck();
617
+ }
618
+ if (this.duration <= 0) {
619
+ this.calculateDuration();
620
+ this._cdRef.markForCheck();
621
+ }
622
+ }), takeUntil(this._destroy$))
623
+ .subscribe();
624
+ }
625
+ ngOnDestroy() {
626
+ this._destroy$.next();
627
+ this._destroy$.complete();
628
+ }
629
+ _getNextMinutes(now) {
630
+ const minutes = this.cron.cronSetting.minutes;
631
+ if (minutes.length) {
632
+ for (let i = minutes.length - 1; i >= 0; i--) {
633
+ if (now.getUTCMinutes() >= minutes[i]) {
634
+ return (minutes[i + 1] ? minutes[i + 1] - now.getUTCMinutes() : (60 - now.getUTCMinutes() + minutes[i]));
635
+ }
636
+ }
637
+ return minutes[0] - now.getMinutes();
638
+ }
639
+ return 0;
640
+ }
641
+ _getNextHours(now) {
642
+ const hours = this.cron.cronSetting.hours;
643
+ if (hours.length) {
644
+ for (let i = hours.length - 1; i >= 0; i--) {
645
+ if (now.getUTCHours() >= hours[i]) {
646
+ return (hours[i + 1] ? hours[i + 1] - now.getUTCHours() : (24 - now.getUTCHours() + hours[i]));
647
+ }
648
+ }
649
+ return hours[0] - now.getUTCHours();
650
+ }
651
+ return 0;
652
+ }
653
+ _getNextDays(now) {
654
+ const days = this.cron.cronSetting.days;
655
+ if (days.length) {
656
+ for (let i = days.length - 1; i >= 0; i--) {
657
+ if (now.getDate() >= days[i]) {
658
+ return (days[i + 1] ? days[i + 1] : getDaysInMonth(now)) - now.getDate();
659
+ }
660
+ }
661
+ return days[0] - getDaysInMonth(now);
662
+ }
663
+ return 0;
664
+ }
665
+ }
666
+ CronNextRunComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronNextRunComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
667
+ 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 });
668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronNextRunComponent, decorators: [{
669
+ type: Component,
670
+ 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" }]
671
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { cron: [{
672
+ type: Input
675
673
  }] } });
676
674
 
677
- class CronsComponent {
678
- constructor(_message, _dialog, _prompt) {
679
- this._message = _message;
680
- this._dialog = _dialog;
681
- this._prompt = _prompt;
682
- this.config = null;
683
- this.CronStates = indexNameValue(CronStates);
684
- this.CronProcessStates = indexNameValue(CronProcessStates);
685
- this.CronState = CronState;
686
- this._destroy$ = new Subject();
687
- }
688
- ngOnInit() {
689
- this._configList();
690
- }
691
- open(cron) {
692
- this._dialog.open(CronComponent, {
693
- data: {
694
- cron,
695
- loadCronLogs: this.loadCronLogs,
696
- loadCron: this.loadCron,
697
- cronActions: this.getCronActions(),
698
- },
699
- width: '85%',
700
- });
701
- }
702
- getCronActions() {
703
- return [
704
- {
705
- action: (data) => {
706
- return this.queue(data)
707
- .pipe(tap(() => {
708
- this._message.success('Queued cron');
709
- this.list.reload();
710
- }));
711
- },
712
- label: 'Queue',
713
- show: (cron) => {
714
- return cron.state === CronState.Idle || cron.state === CronState.Failed;
715
- },
716
- },
717
- {
718
- action: (data) => {
719
- return this.run(data)
720
- .pipe(tap(() => {
721
- this._message.success('Cron ran');
722
- this.list.reload();
723
- }));
724
- },
725
- label: 'Run',
726
- show: (cron) => {
727
- return cron.state === CronState.Idle || cron.state === CronState.Failed;
728
- },
729
- },
730
- {
731
- action: (data) => {
732
- return this.enable(data)
733
- .pipe(tap(() => {
734
- this._message.success('Enabled cron');
735
- this.list.reload();
736
- }));
737
- },
738
- label: 'Enable',
739
- show: (cron) => {
740
- return cron.state === CronState.Disabled;
741
- },
742
- },
743
- {
744
- action: (data) => {
745
- return this.disable(data)
746
- .pipe(tap(() => {
747
- this._message.success('Disabled cron');
748
- this.list.reload();
749
- }));
750
- },
751
- label: 'Disable',
752
- show: (cron) => {
753
- return cron.state === CronState.Idle || cron.state === CronState.Failed;
754
- },
755
- },
756
- {
757
- action: (data) => {
758
- return this._prompt.confirm({
759
- title: 'Confirm',
760
- template: 'Are you sure you would like to kill the cron?',
761
- })
762
- .pipe(switchMap(() => {
763
- return this.kill(data);
764
- }), tap(() => {
765
- this._message.success('Killed cron');
766
- this.list.reload();
767
- }), takeUntil(this._destroy$));
768
- },
769
- label: 'Kill',
770
- show: (cron) => {
771
- return cron.state === CronState.Running;
772
- },
773
- },
774
- {
775
- action: (data) => {
776
- return this._prompt.confirm({
777
- title: 'Confirm',
778
- template: 'Are you sure you would like to reset the cron?',
779
- })
780
- .pipe(switchMap(() => {
781
- return this.enable(data);
782
- }), tap(() => {
783
- this._message.success('Reset cron');
784
- this.list.reload();
785
- }), takeUntil(this._destroy$));
786
- },
787
- label: 'Reset',
788
- show: (cron) => {
789
- return cron.state === CronState.Killing || cron.state === CronState.Running || cron.state === CronState.Failed || cron.state === CronState.Queued;
790
- },
791
- },
792
- ];
793
- }
794
- ngOnDestroy() {
795
- this._destroy$.next();
796
- this._destroy$.complete();
797
- }
798
- _configList() {
799
- this.config = {
800
- paging: false,
801
- filters: [
802
- {
803
- type: ItemType.Keyword,
804
- name: 'keyword',
805
- label: 'Search',
806
- },
807
- ],
808
- rowActions: this.getCronActions()
809
- .map((rowAction) => {
810
- return {
811
- ...rowAction,
812
- click: (cron) => {
813
- rowAction.action(cron)
814
- .subscribe();
815
- },
816
- };
817
- }),
818
- fetch: (query) => {
819
- query = {
820
- ...query,
821
- timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
822
- };
823
- return this.loadCrons(query)
824
- .pipe(map((crons) => ({
825
- data: crons
826
- .map((cron) => {
827
- return {
828
- ...cron,
829
- runningDuration: differenceInSeconds(parse(cron.createDate), new Date()),
830
- };
831
- }),
832
- })));
833
- },
834
- };
835
- if (this.bulk) {
836
- this.config.selection = {
837
- selectAll: false,
838
- actions: [
839
- {
840
- type: SelectionActionType.Action,
841
- name: 'disable',
842
- label: 'Disable',
843
- },
844
- {
845
- type: SelectionActionType.Action,
846
- name: 'enable',
847
- label: 'Enable',
848
- },
849
- ],
850
- actionSelected: (action) => {
851
- return this.bulk(action.action.name, action.selected)
852
- .pipe(tap(() => {
853
- this.list.reload();
854
- this._message.success('Applied Changes');
855
- }));
856
- },
857
- };
858
- }
859
- }
860
- }
861
- 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 });
862
- 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 } });
863
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronsComponent, decorators: [{
864
- type: Component,
865
- 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: [""] }]
866
- }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i1.MatDialog }, { type: i3$3.FsPrompt }]; }, propDecorators: { list: [{
867
- type: ViewChild,
868
- args: [FsListComponent, { static: true }]
869
- }], enable: [{
870
- type: Input
871
- }], disable: [{
872
- type: Input
873
- }], kill: [{
874
- type: Input
875
- }], queue: [{
876
- type: Input
877
- }], run: [{
878
- type: Input
879
- }], loadCrons: [{
880
- type: Input
881
- }], loadCron: [{
882
- type: Input
883
- }], loadCronLogs: [{
884
- type: Input
885
- }], bulk: [{
886
- type: Input
675
+ class CronsComponent {
676
+ constructor(_message, _dialog, _prompt) {
677
+ this._message = _message;
678
+ this._dialog = _dialog;
679
+ this._prompt = _prompt;
680
+ this.config = null;
681
+ this.CronStates = indexNameValue(CronStates);
682
+ this.CronProcessStates = indexNameValue(CronProcessStates);
683
+ this.CronState = CronState;
684
+ this._destroy$ = new Subject();
685
+ }
686
+ ngOnInit() {
687
+ this._configList();
688
+ }
689
+ open(cron) {
690
+ this._dialog.open(CronComponent, {
691
+ data: {
692
+ cron,
693
+ loadCronLogs: this.loadCronLogs,
694
+ loadCron: this.loadCron,
695
+ cronActions: this.getCronActions(),
696
+ },
697
+ width: '85%',
698
+ });
699
+ }
700
+ getCronActions() {
701
+ return [
702
+ {
703
+ action: (data) => {
704
+ return this.queue(data)
705
+ .pipe(tap(() => {
706
+ this._message.success('Queued cron');
707
+ this.list.reload();
708
+ }));
709
+ },
710
+ label: 'Queue',
711
+ show: (cron) => {
712
+ return cron.state === CronState.Idle || cron.state === CronState.Failed;
713
+ },
714
+ },
715
+ {
716
+ action: (data) => {
717
+ return this.run(data)
718
+ .pipe(tap(() => {
719
+ this._message.success('Cron ran');
720
+ this.list.reload();
721
+ }));
722
+ },
723
+ label: 'Run',
724
+ show: (cron) => {
725
+ return cron.state === CronState.Idle || cron.state === CronState.Failed;
726
+ },
727
+ },
728
+ {
729
+ action: (data) => {
730
+ return this.enable(data)
731
+ .pipe(tap(() => {
732
+ this._message.success('Enabled cron');
733
+ this.list.reload();
734
+ }));
735
+ },
736
+ label: 'Enable',
737
+ show: (cron) => {
738
+ return cron.state === CronState.Disabled;
739
+ },
740
+ },
741
+ {
742
+ action: (data) => {
743
+ return this.disable(data)
744
+ .pipe(tap(() => {
745
+ this._message.success('Disabled cron');
746
+ this.list.reload();
747
+ }));
748
+ },
749
+ label: 'Disable',
750
+ show: (cron) => {
751
+ return cron.state === CronState.Idle || cron.state === CronState.Failed;
752
+ },
753
+ },
754
+ {
755
+ action: (data) => {
756
+ return this._prompt.confirm({
757
+ title: 'Confirm',
758
+ template: 'Are you sure you would like to kill the cron?',
759
+ })
760
+ .pipe(switchMap(() => {
761
+ return this.kill(data);
762
+ }), tap(() => {
763
+ this._message.success('Killed cron');
764
+ this.list.reload();
765
+ }), takeUntil(this._destroy$));
766
+ },
767
+ label: 'Kill',
768
+ show: (cron) => {
769
+ return cron.state === CronState.Running;
770
+ },
771
+ },
772
+ {
773
+ action: (data) => {
774
+ return this._prompt.confirm({
775
+ title: 'Confirm',
776
+ template: 'Are you sure you would like to reset the cron?',
777
+ })
778
+ .pipe(switchMap(() => {
779
+ return this.enable(data);
780
+ }), tap(() => {
781
+ this._message.success('Reset cron');
782
+ this.list.reload();
783
+ }), takeUntil(this._destroy$));
784
+ },
785
+ label: 'Reset',
786
+ show: (cron) => {
787
+ return cron.state === CronState.Killing || cron.state === CronState.Running || cron.state === CronState.Failed || cron.state === CronState.Queued;
788
+ },
789
+ },
790
+ ];
791
+ }
792
+ ngOnDestroy() {
793
+ this._destroy$.next();
794
+ this._destroy$.complete();
795
+ }
796
+ _configList() {
797
+ this.config = {
798
+ paging: false,
799
+ filters: [
800
+ {
801
+ type: ItemType.Keyword,
802
+ name: 'keyword',
803
+ label: 'Search',
804
+ },
805
+ ],
806
+ rowActions: this.getCronActions()
807
+ .map((rowAction) => {
808
+ return {
809
+ ...rowAction,
810
+ click: (cron) => {
811
+ rowAction.action(cron)
812
+ .subscribe();
813
+ },
814
+ };
815
+ }),
816
+ fetch: (query) => {
817
+ query = {
818
+ ...query,
819
+ timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
820
+ };
821
+ return this.loadCrons(query)
822
+ .pipe(map((crons) => ({
823
+ data: crons
824
+ .map((cron) => {
825
+ return {
826
+ ...cron,
827
+ runningDuration: differenceInSeconds(parse(cron.createDate), new Date()),
828
+ };
829
+ }),
830
+ })));
831
+ },
832
+ };
833
+ if (this.bulk) {
834
+ this.config.selection = {
835
+ selectAll: false,
836
+ actions: [
837
+ {
838
+ type: SelectionActionType.Action,
839
+ name: 'disable',
840
+ label: 'Disable',
841
+ },
842
+ {
843
+ type: SelectionActionType.Action,
844
+ name: 'enable',
845
+ label: 'Enable',
846
+ },
847
+ ],
848
+ actionSelected: (action) => {
849
+ return this.bulk(action.action.name, action.selected)
850
+ .pipe(tap(() => {
851
+ this.list.reload();
852
+ this._message.success('Applied Changes');
853
+ }));
854
+ },
855
+ };
856
+ }
857
+ }
858
+ }
859
+ 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 });
860
+ 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" }] });
861
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CronsComponent, decorators: [{
862
+ type: Component,
863
+ 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" }]
864
+ }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i1.MatDialog }, { type: i3$2.FsPrompt }]; }, propDecorators: { list: [{
865
+ type: ViewChild,
866
+ args: [FsListComponent, { static: true }]
867
+ }], enable: [{
868
+ type: Input
869
+ }], disable: [{
870
+ type: Input
871
+ }], kill: [{
872
+ type: Input
873
+ }], queue: [{
874
+ type: Input
875
+ }], run: [{
876
+ type: Input
877
+ }], loadCrons: [{
878
+ type: Input
879
+ }], loadCron: [{
880
+ type: Input
881
+ }], loadCronLogs: [{
882
+ type: Input
883
+ }], bulk: [{
884
+ type: Input
887
885
  }] } });
888
886
 
889
- class DashboardComponent {
890
- constructor(_message, _cdRef, _buildService) {
891
- this._message = _message;
892
- this._cdRef = _cdRef;
893
- this._buildService = _buildService;
894
- this.buttonActions = [];
895
- this.menuActions = [];
896
- this._destroy$ = new Subject();
897
- this.actions = [];
898
- }
899
- ngOnInit() {
900
- this._load();
901
- this.buttonActions = this.actions.filter(item => { return !item.menu; });
902
- this.menuActions = this.actions.filter(item => { return item.menu; });
903
- this.build = this._buildService.build;
904
- this._buildService.build$
905
- .pipe(takeUntil(this._destroy$))
906
- .subscribe((build) => {
907
- this.build = build;
908
- this._cdRef.markForCheck();
909
- });
910
- }
911
- _load() {
912
- this.load()
913
- .subscribe((dashboard) => {
914
- this.dashboard = dashboard;
915
- this.dashboard.cronRanAttention = !dashboard.cronRan ||
916
- differenceInMinutes(new Date(), new Date(dashboard.cronRan)) > 15;
917
- this._cdRef.markForCheck();
918
- });
919
- }
920
- ngOnDestroy() {
921
- this._destroy$.next();
922
- this._destroy$.complete();
923
- }
924
- actionClick(action) {
925
- action.click();
926
- }
927
- initClick() {
928
- this.init()
929
- .subscribe(() => {
930
- this._message.success('Successfully initialized the system');
931
- });
932
- }
933
- upgradeClick() {
934
- this.upgrade()
935
- .subscribe(() => {
936
- this._load();
937
- this._message.success('Successfully upgraded the system');
938
- });
939
- }
940
- }
941
- 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 });
942
- 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 });
943
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DashboardComponent, decorators: [{
944
- type: Component,
945
- 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"] }]
946
- }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i0.ChangeDetectorRef }, { type: i2$3.FsBuildService }]; }, propDecorators: { init: [{
947
- type: Input
948
- }], upgrade: [{
949
- type: Input
950
- }], load: [{
951
- type: Input
952
- }], actions: [{
953
- type: Input
887
+ class DashboardComponent {
888
+ constructor(_message, _cdRef, _buildService) {
889
+ this._message = _message;
890
+ this._cdRef = _cdRef;
891
+ this._buildService = _buildService;
892
+ this.buttonActions = [];
893
+ this.menuActions = [];
894
+ this._destroy$ = new Subject();
895
+ this.actions = [];
896
+ }
897
+ ngOnInit() {
898
+ this._load();
899
+ this.buttonActions = this.actions.filter(item => { return !item.menu; });
900
+ this.menuActions = this.actions.filter(item => { return item.menu; });
901
+ this.build = this._buildService.build;
902
+ this._buildService.build$
903
+ .pipe(takeUntil(this._destroy$))
904
+ .subscribe((build) => {
905
+ this.build = build;
906
+ this._cdRef.markForCheck();
907
+ });
908
+ }
909
+ _load() {
910
+ this.load()
911
+ .subscribe((dashboard) => {
912
+ this.dashboard = dashboard;
913
+ this.dashboard.cronRanAttention = !dashboard.cronRan ||
914
+ differenceInMinutes(new Date(), new Date(dashboard.cronRan)) > 15;
915
+ this._cdRef.markForCheck();
916
+ });
917
+ }
918
+ ngOnDestroy() {
919
+ this._destroy$.next();
920
+ this._destroy$.complete();
921
+ }
922
+ actionClick(action) {
923
+ action.click();
924
+ }
925
+ initClick() {
926
+ this.init()
927
+ .subscribe(() => {
928
+ this._message.success('Successfully initialized the system');
929
+ });
930
+ }
931
+ upgradeClick() {
932
+ this.upgrade()
933
+ .subscribe(() => {
934
+ this._load();
935
+ this._message.success('Successfully upgraded the system');
936
+ });
937
+ }
938
+ }
939
+ 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 });
940
+ 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 });
941
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashboardComponent, decorators: [{
942
+ type: Component,
943
+ 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"] }]
944
+ }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i0.ChangeDetectorRef }, { type: i2$2.FsBuildService }]; }, propDecorators: { init: [{
945
+ type: Input
946
+ }], upgrade: [{
947
+ type: Input
948
+ }], load: [{
949
+ type: Input
950
+ }], actions: [{
951
+ type: Input
954
952
  }] } });
955
953
 
956
- class InfoComponent {
957
- ngAfterViewInit() {
958
- this._load();
959
- }
960
- _load() {
961
- this.load()
962
- .subscribe((info) => {
963
- info += '<style>body { background: transparent; }</style>';
964
- const doc = this.iframe.nativeElement.contentDocument || this.iframe.nativeElement.contentWindow;
965
- doc.open();
966
- doc.write(info);
967
- doc.close();
968
- const scrollHeight = (this.iframe.nativeElement.contentWindow.document.documentElement.scrollHeight + 100);
969
- this.iframe.nativeElement.style.height = `${scrollHeight}px`;
970
- });
971
- }
972
- }
973
- InfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
974
- 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 });
975
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: InfoComponent, decorators: [{
976
- type: Component,
977
- args: [{ selector: 'fs-system-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<iframe #iframe></iframe>\r\n", styles: ["iframe{width:100%;border:0}\n"] }]
978
- }], propDecorators: { iframe: [{
979
- type: ViewChild,
980
- args: ['iframe']
981
- }], load: [{
982
- type: Input
954
+ class InfoComponent {
955
+ ngAfterViewInit() {
956
+ this._load();
957
+ }
958
+ _load() {
959
+ this.load()
960
+ .subscribe((info) => {
961
+ info += '<style>body { background: transparent; }</style>';
962
+ const doc = this.iframe.nativeElement.contentDocument || this.iframe.nativeElement.contentWindow;
963
+ doc.open();
964
+ doc.write(info);
965
+ doc.close();
966
+ const scrollHeight = (this.iframe.nativeElement.contentWindow.document.documentElement.scrollHeight + 100);
967
+ this.iframe.nativeElement.style.height = `${scrollHeight}px`;
968
+ });
969
+ }
970
+ }
971
+ InfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
972
+ 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 });
973
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InfoComponent, decorators: [{
974
+ type: Component,
975
+ args: [{ selector: 'fs-system-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<iframe #iframe></iframe>\n", styles: ["iframe{width:100%;border:0}\n"] }]
976
+ }], propDecorators: { iframe: [{
977
+ type: ViewChild,
978
+ args: ['iframe']
979
+ }], load: [{
980
+ type: Input
983
981
  }] } });
984
982
 
985
- class ProcessComponent {
986
- constructor(data, _message, _cdRef, _prompt) {
987
- this.data = data;
988
- this._message = _message;
989
- this._cdRef = _cdRef;
990
- this._prompt = _prompt;
991
- this.ProcessStates = indexNameValue(ProcessStates);
992
- this.ProcessProcessStates = indexNameValue(ProcessProcessStates);
993
- this.ProcessState = ProcessState;
994
- this._destroy$ = new Subject();
995
- }
996
- ngOnInit() {
997
- if (this.data.loadProcess) {
998
- this.load$()
999
- .subscribe(() => {
1000
- this.runningRefresh();
1001
- });
1002
- }
1003
- else {
1004
- this.process = this.data.process;
1005
- }
1006
- }
1007
- load$() {
1008
- return this.data
1009
- .loadProcess(this.data.process)
1010
- .pipe(tap((process) => {
1011
- this.process = process;
1012
- this._cdRef.markForCheck();
1013
- }));
1014
- }
1015
- runningRefresh() {
1016
- timer(0, 2000)
1017
- .pipe(takeWhile(() => this.process.state === ProcessState.Running), switchMap(() => this.load$()), takeUntil(this._destroy$))
1018
- .subscribe();
1019
- }
1020
- kill() {
1021
- this._prompt.confirm({
1022
- title: 'Kill process',
1023
- template: 'Are you sure you would like to kill the process?',
1024
- })
1025
- .pipe(switchMap(() => this.data.kill(this.data.process)), switchMap(() => this.load$()))
1026
- .subscribe(() => {
1027
- this._message.success('Killed process');
1028
- });
1029
- }
1030
- run() {
1031
- this._message.success('Running process');
1032
- this.data.run(this.data.process)
1033
- .pipe(switchMap(() => this.load$()))
1034
- .subscribe(() => {
1035
- this.runningRefresh();
1036
- });
1037
- }
1038
- queue() {
1039
- this._message.success('Running process');
1040
- this.data.queue(this.data.process)
1041
- .pipe(switchMap(() => this.load$()))
1042
- .subscribe();
1043
- }
1044
- download() {
1045
- this.data.download(this.data.process);
1046
- }
1047
- ngOnDestroy() {
1048
- this._destroy$.next();
1049
- this._destroy$.complete();
1050
- }
1051
- }
1052
- 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 });
1053
- 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 });
1054
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ProcessComponent, decorators: [{
1055
- type: Component,
1056
- 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"] }]
1057
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1058
- type: Inject,
1059
- args: [MAT_DIALOG_DATA]
1060
- }] }, { type: i1$1.FsMessage }, { type: i0.ChangeDetectorRef }, { type: i3$3.FsPrompt }]; } });
983
+ class ProcessComponent {
984
+ constructor(data, _message, _cdRef, _prompt) {
985
+ this.data = data;
986
+ this._message = _message;
987
+ this._cdRef = _cdRef;
988
+ this._prompt = _prompt;
989
+ this.ProcessStates = indexNameValue(ProcessStates);
990
+ this.ProcessProcessStates = indexNameValue(ProcessProcessStates);
991
+ this.ProcessState = ProcessState;
992
+ this._destroy$ = new Subject();
993
+ }
994
+ ngOnInit() {
995
+ if (this.data.loadProcess) {
996
+ this.load$()
997
+ .subscribe(() => {
998
+ this.runningRefresh();
999
+ });
1000
+ }
1001
+ else {
1002
+ this.process = this.data.process;
1003
+ }
1004
+ }
1005
+ load$() {
1006
+ return this.data
1007
+ .loadProcess(this.data.process)
1008
+ .pipe(tap((process) => {
1009
+ this.process = process;
1010
+ this._cdRef.markForCheck();
1011
+ }));
1012
+ }
1013
+ runningRefresh() {
1014
+ timer(0, 2000)
1015
+ .pipe(takeWhile(() => this.process.state === ProcessState.Running), switchMap(() => this.load$()), takeUntil(this._destroy$))
1016
+ .subscribe();
1017
+ }
1018
+ kill() {
1019
+ this._prompt.confirm({
1020
+ title: 'Kill process',
1021
+ template: 'Are you sure you would like to kill the process?',
1022
+ })
1023
+ .pipe(switchMap(() => this.data.kill(this.data.process)), switchMap(() => this.load$()))
1024
+ .subscribe(() => {
1025
+ this._message.success('Killed process');
1026
+ });
1027
+ }
1028
+ run() {
1029
+ this._message.success('Running process');
1030
+ this.data.run(this.data.process)
1031
+ .pipe(switchMap(() => this.load$()))
1032
+ .subscribe(() => {
1033
+ this.runningRefresh();
1034
+ });
1035
+ }
1036
+ queue() {
1037
+ this._message.success('Running process');
1038
+ this.data.queue(this.data.process)
1039
+ .pipe(switchMap(() => this.load$()))
1040
+ .subscribe();
1041
+ }
1042
+ download() {
1043
+ this.data.download(this.data.process);
1044
+ }
1045
+ ngOnDestroy() {
1046
+ this._destroy$.next();
1047
+ this._destroy$.complete();
1048
+ }
1049
+ }
1050
+ 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 });
1051
+ 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 });
1052
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ProcessComponent, decorators: [{
1053
+ type: Component,
1054
+ 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"] }]
1055
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1056
+ type: Inject,
1057
+ args: [MAT_DIALOG_DATA]
1058
+ }] }, { type: i1$1.FsMessage }, { type: i0.ChangeDetectorRef }, { type: i3$2.FsPrompt }]; } });
1061
1059
 
1062
- class ProcessesComponent {
1063
- constructor(_dialog, _message) {
1064
- this._dialog = _dialog;
1065
- this._message = _message;
1066
- this.actions = [];
1067
- this.config = null;
1068
- this.ProcessStates = indexNameValue(ProcessStates);
1069
- this.ProcessState = ProcessState;
1070
- this._destroy$ = new Subject();
1071
- }
1072
- ngOnInit() {
1073
- this._configList();
1074
- }
1075
- reload() {
1076
- this.list.reload();
1077
- }
1078
- open(process) {
1079
- this._dialog.open(ProcessComponent, {
1080
- data: {
1081
- process,
1082
- download: this.download,
1083
- run: this.run,
1084
- loadProcess: this.loadProcess,
1085
- queue: this.queue,
1086
- kill: this.kill,
1087
- },
1088
- width: '85%',
1089
- })
1090
- .afterClosed()
1091
- .pipe(takeUntil(this._destroy$))
1092
- .subscribe(() => {
1093
- this.reload();
1094
- });
1095
- }
1096
- ngOnDestroy() {
1097
- this._destroy$.next();
1098
- this._destroy$.complete();
1099
- }
1100
- _configList() {
1101
- this.config = {
1102
- actions: [],
1103
- rowActions: [],
1104
- filters: [
1105
- {
1106
- type: ItemType.Keyword,
1107
- name: 'keyword',
1108
- label: 'Search',
1109
- },
1110
- {
1111
- type: ItemType.Select,
1112
- name: 'state',
1113
- label: 'Status',
1114
- values: ProcessStates,
1115
- },
1116
- ],
1117
- fetch: (query) => {
1118
- return this.loadProcesses(query)
1119
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1120
- },
1121
- };
1122
- if (this.run) {
1123
- this.config.rowActions
1124
- .push({
1125
- label: 'Run',
1126
- show: (process) => {
1127
- return process.state !== ProcessState.Running;
1128
- },
1129
- click: (data) => {
1130
- this._message.info('Running process...');
1131
- this.run(data)
1132
- .subscribe(() => {
1133
- this.reload();
1134
- this._message.success('Succesfully ran process');
1135
- });
1136
- setTimeout(() => {
1137
- this.reload();
1138
- }, 500);
1139
- },
1140
- });
1141
- }
1142
- if (this.kill) {
1143
- this.config.rowActions.push({
1144
- label: 'Kill',
1145
- show: (data) => {
1146
- return !!data.pid;
1147
- },
1148
- click: (data) => {
1149
- this._message.info('Killing process...');
1150
- this.kill(data)
1151
- .subscribe(() => {
1152
- this.reload();
1153
- this._message.success('Succesfully killed process');
1154
- });
1155
- setTimeout(() => {
1156
- this.reload();
1157
- }, 500);
1158
- },
1159
- });
1160
- }
1161
- if (this.delete) {
1162
- this.config.rowActions.push({
1163
- label: 'Delete',
1164
- click: (data) => {
1165
- this.delete(data)
1166
- .subscribe(() => {
1167
- this.reload();
1168
- this._message.success('Deleted process');
1169
- });
1170
- },
1171
- });
1172
- }
1173
- this.actions.forEach((action) => {
1174
- this.config.actions.push({
1175
- primary: false,
1176
- label: action.label,
1177
- menu: action.menu,
1178
- click: (data) => {
1179
- if (action.click) {
1180
- action.click(data);
1181
- }
1182
- if (action.component) {
1183
- this._dialog.open(action.component, {
1184
- width: '800px',
1185
- })
1186
- .afterClosed()
1187
- .pipe(takeUntil(this._destroy$))
1188
- .subscribe(() => {
1189
- this.reload();
1190
- });
1191
- }
1192
- },
1193
- });
1194
- });
1195
- }
1196
- }
1197
- 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 });
1198
- 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 });
1199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ProcessesComponent, decorators: [{
1200
- type: Component,
1201
- 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: [""] }]
1202
- }], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i1$1.FsMessage }]; }, propDecorators: { list: [{
1203
- type: ViewChild,
1204
- args: [FsListComponent]
1205
- }], loadProcesses: [{
1206
- type: Input
1207
- }], loadProcess: [{
1208
- type: Input
1209
- }], run: [{
1210
- type: Input
1211
- }], kill: [{
1212
- type: Input
1213
- }], delete: [{
1214
- type: Input
1215
- }], download: [{
1216
- type: Input
1217
- }], queue: [{
1218
- type: Input
1219
- }], actions: [{
1220
- type: Input
1060
+ class ProcessesComponent {
1061
+ constructor(_dialog, _message) {
1062
+ this._dialog = _dialog;
1063
+ this._message = _message;
1064
+ this.actions = [];
1065
+ this.config = null;
1066
+ this.ProcessStates = indexNameValue(ProcessStates);
1067
+ this.ProcessState = ProcessState;
1068
+ this._destroy$ = new Subject();
1069
+ }
1070
+ ngOnInit() {
1071
+ this._configList();
1072
+ }
1073
+ reload() {
1074
+ this.list.reload();
1075
+ }
1076
+ open(process) {
1077
+ this._dialog.open(ProcessComponent, {
1078
+ data: {
1079
+ process,
1080
+ download: this.download,
1081
+ run: this.run,
1082
+ loadProcess: this.loadProcess,
1083
+ queue: this.queue,
1084
+ kill: this.kill,
1085
+ },
1086
+ width: '85%',
1087
+ })
1088
+ .afterClosed()
1089
+ .pipe(takeUntil(this._destroy$))
1090
+ .subscribe(() => {
1091
+ this.reload();
1092
+ });
1093
+ }
1094
+ ngOnDestroy() {
1095
+ this._destroy$.next();
1096
+ this._destroy$.complete();
1097
+ }
1098
+ _configList() {
1099
+ this.config = {
1100
+ actions: [],
1101
+ rowActions: [],
1102
+ filters: [
1103
+ {
1104
+ type: ItemType.Keyword,
1105
+ name: 'keyword',
1106
+ label: 'Search',
1107
+ },
1108
+ {
1109
+ type: ItemType.Select,
1110
+ name: 'state',
1111
+ label: 'Status',
1112
+ values: ProcessStates,
1113
+ },
1114
+ ],
1115
+ fetch: (query) => {
1116
+ return this.loadProcesses(query)
1117
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1118
+ },
1119
+ };
1120
+ if (this.run) {
1121
+ this.config.rowActions
1122
+ .push({
1123
+ label: 'Run',
1124
+ show: (process) => {
1125
+ return process.state !== ProcessState.Running;
1126
+ },
1127
+ click: (data) => {
1128
+ this._message.info('Running process...');
1129
+ this.run(data)
1130
+ .subscribe(() => {
1131
+ this.reload();
1132
+ this._message.success('Succesfully ran process');
1133
+ });
1134
+ setTimeout(() => {
1135
+ this.reload();
1136
+ }, 500);
1137
+ },
1138
+ });
1139
+ }
1140
+ if (this.kill) {
1141
+ this.config.rowActions.push({
1142
+ label: 'Kill',
1143
+ show: (data) => {
1144
+ return !!data.pid;
1145
+ },
1146
+ click: (data) => {
1147
+ this._message.info('Killing process...');
1148
+ this.kill(data)
1149
+ .subscribe(() => {
1150
+ this.reload();
1151
+ this._message.success('Succesfully killed process');
1152
+ });
1153
+ setTimeout(() => {
1154
+ this.reload();
1155
+ }, 500);
1156
+ },
1157
+ });
1158
+ }
1159
+ if (this.delete) {
1160
+ this.config.rowActions.push({
1161
+ label: 'Delete',
1162
+ click: (data) => {
1163
+ this.delete(data)
1164
+ .subscribe(() => {
1165
+ this.reload();
1166
+ this._message.success('Deleted process');
1167
+ });
1168
+ },
1169
+ });
1170
+ }
1171
+ this.actions.forEach((action) => {
1172
+ this.config.actions.push({
1173
+ primary: false,
1174
+ label: action.label,
1175
+ menu: action.menu,
1176
+ click: (data) => {
1177
+ if (action.click) {
1178
+ action.click(data);
1179
+ }
1180
+ if (action.component) {
1181
+ this._dialog.open(action.component, {
1182
+ width: '800px',
1183
+ })
1184
+ .afterClosed()
1185
+ .pipe(takeUntil(this._destroy$))
1186
+ .subscribe(() => {
1187
+ this.reload();
1188
+ });
1189
+ }
1190
+ },
1191
+ });
1192
+ });
1193
+ }
1194
+ }
1195
+ 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 });
1196
+ 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 });
1197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ProcessesComponent, decorators: [{
1198
+ type: Component,
1199
+ 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" }]
1200
+ }], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i1$1.FsMessage }]; }, propDecorators: { list: [{
1201
+ type: ViewChild,
1202
+ args: [FsListComponent]
1203
+ }], loadProcesses: [{
1204
+ type: Input
1205
+ }], loadProcess: [{
1206
+ type: Input
1207
+ }], run: [{
1208
+ type: Input
1209
+ }], kill: [{
1210
+ type: Input
1211
+ }], delete: [{
1212
+ type: Input
1213
+ }], download: [{
1214
+ type: Input
1215
+ }], queue: [{
1216
+ type: Input
1217
+ }], actions: [{
1218
+ type: Input
1221
1219
  }] } });
1222
1220
 
1223
- class ServerLogComponent {
1224
- constructor(data) {
1225
- this.data = data;
1226
- }
1227
- ngOnInit() {
1228
- if (this.data.log) {
1229
- this.log = this.data.log;
1230
- try {
1231
- this.log.backtrace = JSON.parse(this.log.backtrace);
1232
- }
1233
- catch (e) { }
1234
- try {
1235
- this.log.server = JSON.parse(this.log.server);
1236
- }
1237
- catch (e) { }
1238
- }
1239
- }
1240
- }
1241
- 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 });
1242
- 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 } });
1243
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ServerLogComponent, decorators: [{
1244
- type: Component,
1245
- 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: [""] }]
1246
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1247
- type: Inject,
1248
- args: [MAT_DIALOG_DATA]
1221
+ class ServerLogComponent {
1222
+ constructor(data) {
1223
+ this.data = data;
1224
+ }
1225
+ ngOnInit() {
1226
+ if (this.data.log) {
1227
+ this.log = this.data.log;
1228
+ try {
1229
+ this.log.backtrace = JSON.parse(this.log.backtrace);
1230
+ }
1231
+ catch (e) { }
1232
+ try {
1233
+ this.log.server = JSON.parse(this.log.server);
1234
+ }
1235
+ catch (e) { }
1236
+ }
1237
+ }
1238
+ }
1239
+ 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 });
1240
+ 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" }] });
1241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ServerLogComponent, decorators: [{
1242
+ type: Component,
1243
+ 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" }]
1244
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1245
+ type: Inject,
1246
+ args: [MAT_DIALOG_DATA]
1249
1247
  }] }]; } });
1250
1248
 
1251
- class ServerLogsComponent {
1252
- constructor(_dialog) {
1253
- this._dialog = _dialog;
1254
- this.config = null;
1255
- this.logTypes = [];
1256
- }
1257
- ngOnInit() {
1258
- this._configList();
1259
- }
1260
- _configList() {
1261
- this.config = {
1262
- filters: [
1263
- {
1264
- type: ItemType.Keyword,
1265
- name: 'keyword',
1266
- label: 'Search'
1267
- }
1268
- ],
1269
- fetch: query => {
1270
- return this.loadLogs(query)
1271
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1272
- }
1273
- };
1274
- }
1275
- open(log) {
1276
- this._dialog.open(ServerLogComponent, {
1277
- data: { log: log },
1278
- width: '85%'
1279
- });
1280
- }
1281
- }
1282
- ServerLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ServerLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1283
- 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"] }] });
1284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ServerLogsComponent, decorators: [{
1285
- type: Component,
1286
- 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: [""] }]
1287
- }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
1288
- type: ViewChild,
1289
- args: ['list', { static: true }]
1290
- }], loadLogs: [{
1291
- type: Input
1249
+ class ServerLogsComponent {
1250
+ constructor(_dialog) {
1251
+ this._dialog = _dialog;
1252
+ this.config = null;
1253
+ this.logTypes = [];
1254
+ }
1255
+ ngOnInit() {
1256
+ this._configList();
1257
+ }
1258
+ _configList() {
1259
+ this.config = {
1260
+ filters: [
1261
+ {
1262
+ type: ItemType.Keyword,
1263
+ name: 'keyword',
1264
+ label: 'Search'
1265
+ }
1266
+ ],
1267
+ fetch: query => {
1268
+ return this.loadLogs(query)
1269
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1270
+ }
1271
+ };
1272
+ }
1273
+ open(log) {
1274
+ this._dialog.open(ServerLogComponent, {
1275
+ data: { log: log },
1276
+ width: '85%'
1277
+ });
1278
+ }
1279
+ }
1280
+ ServerLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ServerLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1281
+ 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"] }] });
1282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ServerLogsComponent, decorators: [{
1283
+ type: Component,
1284
+ 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" }]
1285
+ }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
1286
+ type: ViewChild,
1287
+ args: ['list', { static: true }]
1288
+ }], loadLogs: [{
1289
+ type: Input
1292
1290
  }] } });
1293
1291
 
1294
- class KeyNameValuePipe {
1295
- transform(values) {
1296
- return Object.keys(values).map((key) => {
1297
- return { value: key, name: values[key] };
1298
- });
1299
- }
1300
- }
1301
- KeyNameValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyNameValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1302
- KeyNameValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyNameValuePipe, name: "keyNameValue" });
1303
- KeyNameValuePipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyNameValuePipe });
1304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyNameValuePipe, decorators: [{
1305
- type: Pipe,
1306
- args: [{
1307
- name: 'keyNameValue',
1308
- }]
1309
- }, {
1310
- type: Injectable
1292
+ class KeyNameValuePipe {
1293
+ transform(values) {
1294
+ return Object.keys(values).map((key) => {
1295
+ return { value: key, name: values[key] };
1296
+ });
1297
+ }
1298
+ }
1299
+ KeyNameValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KeyNameValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1300
+ KeyNameValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: KeyNameValuePipe, name: "keyNameValue" });
1301
+ KeyNameValuePipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KeyNameValuePipe });
1302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KeyNameValuePipe, decorators: [{
1303
+ type: Pipe,
1304
+ args: [{
1305
+ name: 'keyNameValue',
1306
+ }]
1307
+ }, {
1308
+ type: Injectable
1311
1309
  }] });
1312
1310
 
1313
- class SettingsComponent {
1314
- constructor(_message, _clipboard, _prompt, _cdRef) {
1315
- this._message = _message;
1316
- this._clipboard = _clipboard;
1317
- this._prompt = _prompt;
1318
- this._cdRef = _cdRef;
1319
- this.fileRemove = new EventEmitter();
1320
- this.fileSelect = new EventEmitter();
1321
- this.groupedSettings = [];
1322
- this.groups = [];
1323
- this.SettingInterfaceType = SettingInterfaceType;
1324
- }
1325
- ngOnInit() {
1326
- this.loadSettings({
1327
- visible: true,
1328
- })
1329
- .subscribe((settings) => {
1330
- settings = settings
1331
- .filter((setting) => {
1332
- return setting.interfaceType !== SettingInterfaceType.None;
1333
- })
1334
- .map((setting) => {
1335
- switch (setting.interfaceType) {
1336
- case SettingInterfaceType.Date:
1337
- case SettingInterfaceType.Time:
1338
- return {
1339
- ...setting,
1340
- value: parse(setting.value),
1341
- };
1342
- case SettingInterfaceType.SelectMultiple:
1343
- return {
1344
- ...setting,
1345
- value: Array.isArray(setting.value) ? setting.value : [],
1346
- };
1347
- }
1348
- return setting;
1349
- });
1350
- this.groupedSettings = settings.reduce((accum, item) => {
1351
- if (accum[item.group] === undefined) {
1352
- accum[item.group] = [];
1353
- }
1354
- accum[item.group].push(item);
1355
- return accum;
1356
- }, {});
1357
- this.groups = Object.keys(this.groupedSettings);
1358
- this._cdRef.markForCheck();
1359
- });
1360
- }
1361
- export(event, settings) {
1362
- event.stopPropagation();
1363
- const data = settings.map((setting) => {
1364
- return {
1365
- name: setting.name,
1366
- value: setting.value,
1367
- group: setting.group,
1368
- };
1369
- });
1370
- this._clipboard.copy(JSON.stringify(data));
1371
- this._message.success('Copied to clipboard');
1372
- }
1373
- import(event, group) {
1374
- event.stopPropagation();
1375
- this._prompt.input({
1376
- label: 'JSON Import',
1377
- title: 'Import Settings',
1378
- commitLabel: 'Import',
1379
- required: true,
1380
- }).subscribe((value) => {
1381
- if (value) {
1382
- try {
1383
- const settings = this.groupedSettings[group];
1384
- const data = JSON.parse(value);
1385
- data.forEach((item) => {
1386
- const setting = settings.find((s) => {
1387
- return item.name === s.name;
1388
- });
1389
- if (setting) {
1390
- Object.assign(setting, item);
1391
- }
1392
- });
1393
- this._cdRef.markForCheck();
1394
- }
1395
- catch (e) {
1396
- this._message.error(e);
1397
- }
1398
- }
1399
- });
1400
- }
1401
- saveGroup(group) {
1402
- const settings = this.groupedSettings[group];
1403
- const values = settings.reduce((result, value) => {
1404
- return (result[value.name] = value.value, result);
1405
- }, {});
1406
- this.save(group, values)
1407
- .subscribe(() => {
1408
- this._message.success('Changes Saved');
1409
- });
1410
- }
1411
- }
1412
- 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 });
1413
- 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 });
1414
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SettingsComponent, decorators: [{
1415
- type: Component,
1416
- 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"] }]
1417
- }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i2$1.FsClipboard }, { type: i3$3.FsPrompt }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { loadSettings: [{
1418
- type: Input
1419
- }], save: [{
1420
- type: Input
1421
- }], fileRemove: [{
1422
- type: Output
1423
- }], fileSelect: [{
1424
- type: Output
1311
+ class SettingsComponent {
1312
+ constructor(_message, _clipboard, _prompt, _cdRef) {
1313
+ this._message = _message;
1314
+ this._clipboard = _clipboard;
1315
+ this._prompt = _prompt;
1316
+ this._cdRef = _cdRef;
1317
+ this.fileRemove = new EventEmitter();
1318
+ this.fileSelect = new EventEmitter();
1319
+ this.groupedSettings = [];
1320
+ this.groups = [];
1321
+ this.SettingInterfaceType = SettingInterfaceType;
1322
+ }
1323
+ ngOnInit() {
1324
+ this.loadSettings({
1325
+ visible: true,
1326
+ })
1327
+ .subscribe((settings) => {
1328
+ settings = settings
1329
+ .filter((setting) => {
1330
+ return setting.interfaceType !== SettingInterfaceType.None;
1331
+ })
1332
+ .map((setting) => {
1333
+ switch (setting.interfaceType) {
1334
+ case SettingInterfaceType.Date:
1335
+ case SettingInterfaceType.Time:
1336
+ return {
1337
+ ...setting,
1338
+ value: parse(setting.value),
1339
+ };
1340
+ case SettingInterfaceType.SelectMultiple:
1341
+ return {
1342
+ ...setting,
1343
+ value: Array.isArray(setting.value) ? setting.value : [],
1344
+ };
1345
+ }
1346
+ return setting;
1347
+ });
1348
+ this.groupedSettings = settings.reduce((accum, item) => {
1349
+ if (accum[item.group] === undefined) {
1350
+ accum[item.group] = [];
1351
+ }
1352
+ accum[item.group].push(item);
1353
+ return accum;
1354
+ }, {});
1355
+ this.groups = Object.keys(this.groupedSettings);
1356
+ this._cdRef.markForCheck();
1357
+ });
1358
+ }
1359
+ export(event, settings) {
1360
+ event.stopPropagation();
1361
+ const data = settings.map((setting) => {
1362
+ return {
1363
+ name: setting.name,
1364
+ value: setting.value,
1365
+ group: setting.group,
1366
+ };
1367
+ });
1368
+ this._clipboard.copy(JSON.stringify(data));
1369
+ this._message.success('Copied to clipboard');
1370
+ }
1371
+ import(event, group) {
1372
+ event.stopPropagation();
1373
+ this._prompt.input({
1374
+ label: 'JSON Import',
1375
+ title: 'Import Settings',
1376
+ commitLabel: 'Import',
1377
+ required: true,
1378
+ }).subscribe((value) => {
1379
+ if (value) {
1380
+ try {
1381
+ const settings = this.groupedSettings[group];
1382
+ const data = JSON.parse(value);
1383
+ data.forEach((item) => {
1384
+ const setting = settings.find((s) => {
1385
+ return item.name === s.name;
1386
+ });
1387
+ if (setting) {
1388
+ Object.assign(setting, item);
1389
+ }
1390
+ });
1391
+ this._cdRef.markForCheck();
1392
+ }
1393
+ catch (e) {
1394
+ this._message.error(e);
1395
+ }
1396
+ }
1397
+ });
1398
+ }
1399
+ saveGroup(group) {
1400
+ const settings = this.groupedSettings[group];
1401
+ const values = settings.reduce((result, value) => {
1402
+ return (result[value.name] = value.value, result);
1403
+ }, {});
1404
+ this.save(group, values)
1405
+ .subscribe(() => {
1406
+ this._message.success('Changes Saved');
1407
+ });
1408
+ }
1409
+ }
1410
+ 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 });
1411
+ 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 });
1412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SettingsComponent, decorators: [{
1413
+ type: Component,
1414
+ 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"] }]
1415
+ }], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i2$1.FsClipboard }, { type: i3$2.FsPrompt }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { loadSettings: [{
1416
+ type: Input
1417
+ }], save: [{
1418
+ type: Input
1419
+ }], fileRemove: [{
1420
+ type: Output
1421
+ }], fileSelect: [{
1422
+ type: Output
1425
1423
  }] } });
1426
1424
 
1427
- class UpgradeLogsComponent {
1428
- constructor() {
1429
- this.config = null;
1430
- this.logTypes = [];
1431
- }
1432
- ngOnInit() {
1433
- this._configList();
1434
- }
1435
- _configList() {
1436
- this.config = {
1437
- paging: false,
1438
- filters: [
1439
- {
1440
- type: ItemType.Keyword,
1441
- name: 'keyword',
1442
- label: 'Search'
1443
- }
1444
- ],
1445
- fetch: query => {
1446
- return this.loadUpgradeLogs(query)
1447
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1448
- }
1449
- };
1450
- }
1451
- }
1452
- UpgradeLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UpgradeLogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1453
- 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"] }] });
1454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UpgradeLogsComponent, decorators: [{
1455
- type: Component,
1456
- 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: [""] }]
1457
- }], propDecorators: { list: [{
1458
- type: ViewChild,
1459
- args: [FsListComponent, { static: true }]
1460
- }], loadUpgradeLogs: [{
1461
- type: Input
1425
+ class UpgradeLogsComponent {
1426
+ constructor() {
1427
+ this.config = null;
1428
+ this.logTypes = [];
1429
+ }
1430
+ ngOnInit() {
1431
+ this._configList();
1432
+ }
1433
+ _configList() {
1434
+ this.config = {
1435
+ paging: false,
1436
+ filters: [
1437
+ {
1438
+ type: ItemType.Keyword,
1439
+ name: 'keyword',
1440
+ label: 'Search'
1441
+ }
1442
+ ],
1443
+ fetch: query => {
1444
+ return this.loadUpgradeLogs(query)
1445
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1446
+ }
1447
+ };
1448
+ }
1449
+ }
1450
+ UpgradeLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UpgradeLogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1451
+ 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"] }] });
1452
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UpgradeLogsComponent, decorators: [{
1453
+ type: Component,
1454
+ 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" }]
1455
+ }], propDecorators: { list: [{
1456
+ type: ViewChild,
1457
+ args: [FsListComponent, { static: true }]
1458
+ }], loadUpgradeLogs: [{
1459
+ type: Input
1462
1460
  }] } });
1463
1461
 
1464
1462
  const FS_SYSTEM_CONFIG = new InjectionToken('fs-system-config');
1465
1463
 
1466
- class FsSystemModule {
1467
- static forRoot(config) {
1468
- return {
1469
- ngModule: FsSystemModule,
1470
- providers: [
1471
- { provide: FS_SYSTEM_CONFIG, useValue: config || {} },
1472
- ],
1473
- };
1474
- }
1475
- }
1476
- FsSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1477
- FsSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemModule, declarations: [DashboardComponent,
1478
- CronNextRunComponent,
1479
- CronsComponent,
1480
- SettingsComponent,
1481
- KeyNameValuePipe,
1482
- ProcessesComponent,
1483
- ServerLogComponent,
1484
- ServerLogsComponent,
1485
- UpgradeLogsComponent,
1486
- ApiLogsComponent,
1487
- ApiLogComponent,
1488
- InfoComponent,
1489
- ProcessComponent,
1490
- CronComponent,
1491
- CronLogComponent], imports: [CommonModule,
1492
- FormsModule,
1493
- MatButtonModule,
1494
- MatExpansionModule,
1495
- MatTooltipModule,
1496
- MatIconModule,
1497
- MatFormFieldModule,
1498
- MatInputModule,
1499
- MatSelectModule,
1500
- MatDialogModule,
1501
- MatProgressSpinnerModule,
1502
- MatTabsModule,
1503
- FsDateModule,
1504
- FsSkeletonModule,
1505
- FsListModule,
1506
- FsFileModule,
1507
- FsFileManagerModule,
1508
- FsLabelModule,
1509
- FsDialogModule,
1510
- FsDatePickerModule,
1511
- FsMenuModule,
1512
- FsPopoverModule,
1513
- FsColorPickerModule], exports: [DashboardComponent,
1514
- CronsComponent,
1515
- SettingsComponent,
1516
- ProcessesComponent,
1517
- ServerLogsComponent,
1518
- UpgradeLogsComponent,
1519
- ApiLogsComponent,
1520
- InfoComponent] });
1521
- FsSystemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemModule, imports: [[
1522
- CommonModule,
1523
- FormsModule,
1524
- MatButtonModule,
1525
- MatExpansionModule,
1526
- MatTooltipModule,
1527
- MatIconModule,
1528
- MatFormFieldModule,
1529
- MatInputModule,
1530
- MatSelectModule,
1531
- MatDialogModule,
1532
- MatProgressSpinnerModule,
1533
- MatTabsModule,
1534
- FsDateModule,
1535
- FsSkeletonModule,
1536
- FsListModule,
1537
- FsFileModule,
1538
- FsFileManagerModule,
1539
- FsLabelModule,
1540
- FsDialogModule,
1541
- FsDatePickerModule,
1542
- FsMenuModule,
1543
- FsPopoverModule,
1544
- FsColorPickerModule,
1545
- ]] });
1546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemModule, decorators: [{
1547
- type: NgModule,
1548
- args: [{
1549
- imports: [
1550
- CommonModule,
1551
- FormsModule,
1552
- MatButtonModule,
1553
- MatExpansionModule,
1554
- MatTooltipModule,
1555
- MatIconModule,
1556
- MatFormFieldModule,
1557
- MatInputModule,
1558
- MatSelectModule,
1559
- MatDialogModule,
1560
- MatProgressSpinnerModule,
1561
- MatTabsModule,
1562
- FsDateModule,
1563
- FsSkeletonModule,
1564
- FsListModule,
1565
- FsFileModule,
1566
- FsFileManagerModule,
1567
- FsLabelModule,
1568
- FsDialogModule,
1569
- FsDatePickerModule,
1570
- FsMenuModule,
1571
- FsPopoverModule,
1572
- FsColorPickerModule,
1573
- ],
1574
- exports: [
1575
- DashboardComponent,
1576
- CronsComponent,
1577
- SettingsComponent,
1578
- ProcessesComponent,
1579
- ServerLogsComponent,
1580
- UpgradeLogsComponent,
1581
- ApiLogsComponent,
1582
- InfoComponent,
1583
- ],
1584
- declarations: [
1585
- DashboardComponent,
1586
- CronNextRunComponent,
1587
- CronsComponent,
1588
- SettingsComponent,
1589
- KeyNameValuePipe,
1590
- ProcessesComponent,
1591
- ServerLogComponent,
1592
- ServerLogsComponent,
1593
- UpgradeLogsComponent,
1594
- ApiLogsComponent,
1595
- ApiLogComponent,
1596
- InfoComponent,
1597
- ProcessComponent,
1598
- CronComponent,
1599
- CronLogComponent,
1600
- ],
1601
- }]
1464
+ class FsSystemModule {
1465
+ static forRoot(config) {
1466
+ return {
1467
+ ngModule: FsSystemModule,
1468
+ providers: [
1469
+ { provide: FS_SYSTEM_CONFIG, useValue: config || {} },
1470
+ ],
1471
+ };
1472
+ }
1473
+ }
1474
+ FsSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1475
+ FsSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: FsSystemModule, declarations: [DashboardComponent,
1476
+ CronNextRunComponent,
1477
+ CronsComponent,
1478
+ SettingsComponent,
1479
+ KeyNameValuePipe,
1480
+ ProcessesComponent,
1481
+ ServerLogComponent,
1482
+ ServerLogsComponent,
1483
+ UpgradeLogsComponent,
1484
+ ApiLogsComponent,
1485
+ ApiLogComponent,
1486
+ InfoComponent,
1487
+ ProcessComponent,
1488
+ CronComponent,
1489
+ CronLogComponent], imports: [CommonModule,
1490
+ FormsModule,
1491
+ MatButtonModule,
1492
+ MatExpansionModule,
1493
+ MatTooltipModule,
1494
+ MatIconModule,
1495
+ MatFormFieldModule,
1496
+ MatInputModule,
1497
+ MatSelectModule,
1498
+ MatDialogModule,
1499
+ MatProgressSpinnerModule,
1500
+ MatTabsModule,
1501
+ FsDateModule,
1502
+ FsSkeletonModule,
1503
+ FsListModule,
1504
+ FsFileModule,
1505
+ FsFileManagerModule,
1506
+ FsLabelModule,
1507
+ FsDialogModule,
1508
+ FsDatePickerModule,
1509
+ FsMenuModule,
1510
+ FsPopoverModule,
1511
+ FsColorPickerModule], exports: [DashboardComponent,
1512
+ CronsComponent,
1513
+ SettingsComponent,
1514
+ ProcessesComponent,
1515
+ ServerLogsComponent,
1516
+ UpgradeLogsComponent,
1517
+ ApiLogsComponent,
1518
+ InfoComponent] });
1519
+ FsSystemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemModule, imports: [CommonModule,
1520
+ FormsModule,
1521
+ MatButtonModule,
1522
+ MatExpansionModule,
1523
+ MatTooltipModule,
1524
+ MatIconModule,
1525
+ MatFormFieldModule,
1526
+ MatInputModule,
1527
+ MatSelectModule,
1528
+ MatDialogModule,
1529
+ MatProgressSpinnerModule,
1530
+ MatTabsModule,
1531
+ FsDateModule,
1532
+ FsSkeletonModule,
1533
+ FsListModule,
1534
+ FsFileModule,
1535
+ FsFileManagerModule,
1536
+ FsLabelModule,
1537
+ FsDialogModule,
1538
+ FsDatePickerModule,
1539
+ FsMenuModule,
1540
+ FsPopoverModule,
1541
+ FsColorPickerModule] });
1542
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FsSystemModule, decorators: [{
1543
+ type: NgModule,
1544
+ args: [{
1545
+ imports: [
1546
+ CommonModule,
1547
+ FormsModule,
1548
+ MatButtonModule,
1549
+ MatExpansionModule,
1550
+ MatTooltipModule,
1551
+ MatIconModule,
1552
+ MatFormFieldModule,
1553
+ MatInputModule,
1554
+ MatSelectModule,
1555
+ MatDialogModule,
1556
+ MatProgressSpinnerModule,
1557
+ MatTabsModule,
1558
+ FsDateModule,
1559
+ FsSkeletonModule,
1560
+ FsListModule,
1561
+ FsFileModule,
1562
+ FsFileManagerModule,
1563
+ FsLabelModule,
1564
+ FsDialogModule,
1565
+ FsDatePickerModule,
1566
+ FsMenuModule,
1567
+ FsPopoverModule,
1568
+ FsColorPickerModule,
1569
+ ],
1570
+ exports: [
1571
+ DashboardComponent,
1572
+ CronsComponent,
1573
+ SettingsComponent,
1574
+ ProcessesComponent,
1575
+ ServerLogsComponent,
1576
+ UpgradeLogsComponent,
1577
+ ApiLogsComponent,
1578
+ InfoComponent,
1579
+ ],
1580
+ declarations: [
1581
+ DashboardComponent,
1582
+ CronNextRunComponent,
1583
+ CronsComponent,
1584
+ SettingsComponent,
1585
+ KeyNameValuePipe,
1586
+ ProcessesComponent,
1587
+ ServerLogComponent,
1588
+ ServerLogsComponent,
1589
+ UpgradeLogsComponent,
1590
+ ApiLogsComponent,
1591
+ ApiLogComponent,
1592
+ InfoComponent,
1593
+ ProcessComponent,
1594
+ CronComponent,
1595
+ CronLogComponent,
1596
+ ],
1597
+ }]
1602
1598
  }] });
1603
1599
 
1604
- /**
1605
- * Generated bundle index. Do not edit.
1600
+ /**
1601
+ * Generated bundle index. Do not edit.
1606
1602
  */
1607
1603
 
1608
1604
  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 };