@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,58 +1,58 @@
1
- import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
2
- import { MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
3
- import { ExplainComponent } from '../explain';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@angular/material/dialog";
6
- import * as i2 from "@firestitch/dialog";
7
- import * as i3 from "@firestitch/label";
8
- import * as i4 from "@angular/material/tabs";
9
- import * as i5 from "@firestitch/clipboard";
10
- import * as i6 from "@angular/material/button";
11
- import * as i7 from "@firestitch/popover";
12
- import * as i8 from "@angular/common";
13
- import * as i9 from "@firestitch/form";
14
- import * as i10 from "@firestitch/common";
15
- export class QueryLogComponent {
16
- constructor(_data, _dialog) {
17
- this._data = _data;
18
- this._dialog = _dialog;
19
- this.accessTypes = {
20
- 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.',
21
- system: 'The table is empty or has one row.',
22
- 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',
23
- 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)',
24
- 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.',
25
- fulltext: 'Operation (JOIN) is using the table’s fulltext index',
26
- 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.',
27
- 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.',
28
- 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)',
29
- unique_subquery: '',
30
- ALL: 'MySQL scans the entire table to satisfy the query',
31
- };
32
- this.queryLog = _data.queryLog;
33
- }
34
- openExplain() {
35
- this._dialog.open(ExplainComponent, {
36
- data: { explain: this.explain },
37
- });
38
- }
39
- get explain() {
40
- return this.queryLog.explain;
41
- }
42
- get queryBlock() {
43
- return this.explain?.queryBlock;
44
- }
45
- get orderingOperation() {
46
- return this.queryBlock?.orderingOperation;
47
- }
48
- }
49
- 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 });
50
- 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: i4.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i4.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { type: i5.FsClipboardButtonComponent, selector: "fs-clipboard-button", inputs: ["content", "tooltip"] }, { type: i6.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: i9.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 });
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: QueryLogComponent, decorators: [{
52
- type: Component,
53
- 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"] }]
54
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
55
- type: Inject,
56
- args: [MAT_DIALOG_DATA]
57
- }] }, { type: i1.MatDialog }]; } });
58
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjo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lciAqbmdGb3I9XCJsZXQgaXRlbSBvZiBxdWVyeUJsb2NrLm5lc3RlZExvb3A7IGxldCBpbmRleCA9IGluZGV4XCI+XG4gICAgICAgICAgIDx0cj5cbiAgICAgICAgICAgICA8dGQ+XG4gICAgICAgICAgICAgICB7e2l0ZW0udGFibGUudGFibGVOYW1lfX1cbiAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgIDx0ZD5cbiAgICAgICAgICAgICAgIDxmcy1wb3BvdmVyIFt0ZW1wbGF0ZV09XCJhY2Nlc3NUeXBlUG9wb3ZlclwiIFtkYXRhXT1cIml0ZW0udGFibGUuYWNjZXNzVHlwZVwiPlxuICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImFjY2Vzcy10eXBlXCIgW25nQ2xhc3NdPVwiaXRlbS50YWJsZS5hY2Nlc3NUeXBlXCI+e3tpdGVtLnRhYmxlLmFjY2Vzc1R5cGV9fTwvc3Bhbj5cbiAgICAgICAgICAgICAgIDwvZnMtcG9wb3Zlcj4gICAgICAgICAgICBcbiAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgIDx0ZD5cbiAgICAgICAgICAgICAgIDxmcy1wb3BvdmVyICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgIFt0ZW1wbGF0ZV09XCJrZXlzUG9wb3ZlclwiXG4gICAgICAgICAgICAgICAgICAgW21heFdpZHRoXT1cIm51bGxcIlxuICAgICAgICAgICAgICAgICAgIFtkYXRhXT1cInsgcG9zc2libGVLZXlzOiBpdGVtLnRhYmxlLnBvc3NpYmxlS2V5cywga2V5OiBpdGVtLnRhYmxlLmtleSB9XCI+XG4gICAgICAgICAgICAgICAgIHt7aXRlbS50YWJsZS5rZXl9fVxuICAgICAgICAgICAgICAgPC9mcy1wb3BvdmVyPlxuICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgPHRkPlxuICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImZzLWRlbGltaXRcIj5cbiAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdGb3I9XCJsZXQgcmVmIG9mIGl0ZW0udGFibGUucmVmXCI+XG4gICAgICAgICAgICAgICAgICAgPHNwYW4+e3tyZWZ9fTwvc3Bhbj5cbiAgICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgIDx0ZD5cbiAgICAgICAgICAgICAgIHt7aXRlbS50YWJsZS5yb3dzRXhhbWluZWRQZXJTY2FufX1cbiAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgIDx0ZD5cbiAgICAgICAgICAgICAgIHt7aXRlbS50YWJsZS5maWx0ZXJlZH19XG4gICAgICAgICAgICAgPC90ZD5cbiAgICAgICAgICAgICA8dGQ+XG4gICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZnMtZGVsaW1pdFwiPlxuICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiaXRlbS50YWJsZS5pbmRleENvbmRpdGlvblwiPlxuICAgICAgICAgICAgICAgICAgIDxzcGFuPlxuICAgICAgICAgICAgICAgICAgICAgPGZzLXBvcG92ZXIgXG4gICAgICAgICAgICAgICAgICAgICAgICAgW3RlbXBsYXRlXT1cInVzaW5nSW5kZXhDb25kaXRpb25cIiBcbiAgICAgICAgICAgICAgICAgICAgICAgICBbbWF4V2lkdGhdPVwibnVsbFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgW2RhdGFdPVwiaXRlbS50YWJsZS5pbmRleENvbmRpdGlvblwiPlxuICAgICAgICAgICAgICAgICAgICAgICBVc2luZyBJbmRleCBDb25kaXRpb25cbiAgICAgICAgICAgICAgICAgICAgIDwvZnMtcG9wb3Zlcj5cbiAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiaXRlbS50YWJsZS5hdHRhY2hlZENvbmRpdGlvblwiPlxuICAgICAgICAgICAgICAgICAgIDxzcGFuPlxuICAgICAgICAgICAgICAgICAgICAgPGZzLXBvcG92ZXIgXG4gICAgICAgICAgICAgICAgICAgICAgICAgW3RlbXBsYXRlXT1cInVzaW5nV2hlcmVcIiBcbiAgICAgICAgICAgICAgICAgICAgICAgICBbbWF4V2lkdGhdPVwibnVsbFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgW2RhdGFdPVwiaXRlbS50YWJsZS5hdHRhY2hlZENvbmRpdGlvblwiPlxuICAgICAgICAgICAgICAgICAgICAgICBVc2luZyBXaGVyZVxuICAgICAgICAgICAgICAgICAgICAgPC9mcy1wb3BvdmVyPlxuICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCJpdGVtLnVzaW5nSW5kZXhcIj5cbiAgICAgICAgICAgICAgICAgICA8c3Bhbj5Vc2luZyBJbmRleDwvc3Bhbj5cbiAgICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+ICAgIFxuICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCJpdGVtLnVzaW5nRmlsZXNvcnRcIj5cbiAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwiY3JpdGljYWxcIj5Vc2luZyBGaWxlIFNvcnQ8L3NwYW4+XG4gICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cIml0ZW0udXNpbmdUZW1wb3JhcnlUYWJsZVwiPlxuICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJjcml0aWNhbFwiPlRlbXBvcmFyeSBUYWJsZTwvc3Bhbj5cbiAgICAgIC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RlbXBsYXRlICNxdWVyeUJsb2NrQ3JpdGljYWwgbGV0LXF1ZXJ5QmxvY2s9XCJxdWVyeUJsb2NrXCI+XG4gIDxkaXYgY2xhc3M9XCJmcy1kZWxpbWl0XCI+XG4gICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cInF1ZXJ5QmxvY2sudXNpbmdGaWxlc29ydFwiPlxuICAgICAgPHNwYW4gY2xhc3M9XCJjcml0aWNhbFwiPlVzaW5nIEZpbGUgU29ydDwvc3Bhbj5cbiAgICA8L25nLWNvbnRhaW5lcj5cbiAgICBcbiAgICA8bmctY29udGFpbmVyICpuZ0lmPVwicXVlcnlCbG9jay51c2luZ1RlbXBvcmFyeVRhYmxlXCI+XG4gICAgICA8c3BhbiBjbGFzcz1cImNyaXRpY2FsXCI+VGVtcG9yYXJ5IFRhYmxlPC9zcGFuPlxuICAgIDwvbmctY29udGFpbmVyPlxuICA8L2Rpdj5cbjwvbmctdGVtcGxhdGU+Il19
1
+ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
2
+ import { MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
3
+ import { ExplainComponent } from '../explain';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/material/dialog";
6
+ import * as i2 from "@angular/common";
7
+ import * as i3 from "@angular/material/tabs";
8
+ import * as i4 from "@angular/material/button";
9
+ import * as i5 from "@firestitch/form";
10
+ import * as i6 from "@firestitch/label";
11
+ import * as i7 from "@firestitch/popover";
12
+ import * as i8 from "@firestitch/dialog";
13
+ import * as i9 from "@firestitch/clipboard";
14
+ import * as i10 from "@firestitch/common";
15
+ export class QueryLogComponent {
16
+ constructor(_data, _dialog) {
17
+ this._data = _data;
18
+ this._dialog = _dialog;
19
+ this.accessTypes = {
20
+ 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.',
21
+ system: 'The table is empty or has one row.',
22
+ 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',
23
+ 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)',
24
+ 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.',
25
+ fulltext: 'Operation (JOIN) is using the table’s fulltext index',
26
+ 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.',
27
+ 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.',
28
+ 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)',
29
+ unique_subquery: '',
30
+ ALL: 'MySQL scans the entire table to satisfy the query',
31
+ };
32
+ this.queryLog = _data.queryLog;
33
+ }
34
+ openExplain() {
35
+ this._dialog.open(ExplainComponent, {
36
+ data: { explain: this.explain },
37
+ });
38
+ }
39
+ get explain() {
40
+ return this.queryLog.explain;
41
+ }
42
+ get queryBlock() {
43
+ return this.explain?.queryBlock;
44
+ }
45
+ get orderingOperation() {
46
+ return this.queryBlock?.orderingOperation;
47
+ }
48
+ }
49
+ 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 });
50
+ 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: i3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i3.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: i5.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i6.FsLabelComponent, selector: "fs-label" }, { kind: "component", type: i6.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i7.FsPopoverComponent, selector: "fs-popover" }, { kind: "component", type: i8.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { kind: "component", type: i9.FsClipboardButtonComponent, selector: "fs-clipboard-button", inputs: ["content", "tooltip"] }, { kind: "pipe", type: i10.FsFormatTruncatePipe, name: "fsFormatTruncate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QueryLogComponent, decorators: [{
52
+ type: Component,
53
+ 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"] }]
54
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
55
+ type: Inject,
56
+ args: [MAT_DIALOG_DATA]
57
+ }] }, { type: i1.MatDialog }]; } });
58
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvbW9kdWxlcy9xdWVyeS1sb2dzL2NvbXBvbmVudHMvcXVlcnktbG9nL3F1ZXJ5LWxvZy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvcXVlcnktbG9ncy9jb21wb25lbnRzL3F1ZXJ5LWxvZy9xdWVyeS1sb2cuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFM0UsT0FBTyxFQUFFLGVBQWUsRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUd0RSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxZQUFZLENBQUM7Ozs7Ozs7Ozs7OztBQVE5QyxNQUFNLE9BQU8saUJBQWlCO0lBaUI1QixZQ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gICAgICAgICA8ZnMtcG9wb3ZlciAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICBbdGVtcGxhdGVdPVwia2V5c1BvcG92ZXJcIlxuICAgICAgICAgICAgICAgICAgIFttYXhXaWR0aF09XCJudWxsXCJcbiAgICAgICAgICAgICAgICAgICBbZGF0YV09XCJ7IHBvc3NpYmxlS2V5czogaXRlbS50YWJsZS5wb3NzaWJsZUtleXMsIGtleTogaXRlbS50YWJsZS5rZXkgfVwiPlxuICAgICAgICAgICAgICAgICB7e2l0ZW0udGFibGUua2V5fX1cbiAgICAgICAgICAgICAgIDwvZnMtcG9wb3Zlcj5cbiAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgIDx0ZD5cbiAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJmcy1kZWxpbWl0XCI+XG4gICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nRm9yPVwibGV0IHJlZiBvZiBpdGVtLnRhYmxlLnJlZlwiPlxuICAgICAgICAgICAgICAgICAgIDxzcGFuPnt7cmVmfX08L3NwYW4+XG4gICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgPC90ZD5cbiAgICAgICAgICAgICA8dGQ+XG4gICAgICAgICAgICAgICB7e2l0ZW0udGFibGUucm93c0V4YW1pbmVkUGVyU2Nhbn19XG4gICAgICAgICAgICAgPC90ZD5cbiAgICAgICAgICAgICA8dGQ+XG4gICAgICAgICAgICAgICB7e2l0ZW0udGFibGUuZmlsdGVyZWR9fVxuICAgICAgICAgICAgIDwvdGQ+XG4gICAgICAgICAgICAgPHRkPlxuICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImZzLWRlbGltaXRcIj5cbiAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cIml0ZW0udGFibGUuaW5kZXhDb25kaXRpb25cIj5cbiAgICAgICAgICAgICAgICAgICA8c3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgIDxmcy1wb3BvdmVyIFxuICAgICAgICAgICAgICAgICAgICAgICAgIFt0ZW1wbGF0ZV09XCJ1c2luZ0luZGV4Q29uZGl0aW9uXCIgXG4gICAgICAgICAgICAgICAgICAgICAgICAgW21heFdpZHRoXT1cIm51bGxcIlxuICAgICAgICAgICAgICAgICAgICAgICAgIFtkYXRhXT1cIml0ZW0udGFibGUuaW5kZXhDb25kaXRpb25cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgVXNpbmcgSW5kZXggQ29uZGl0aW9uXG4gICAgICAgICAgICAgICAgICAgICA8L2ZzLXBvcG92ZXI+XG4gICAgICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cIml0ZW0udGFibGUuYXR0YWNoZWRDb25kaXRpb25cIj5cbiAgICAgICAgICAgICAgICAgICA8c3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgIDxmcy1wb3BvdmVyIFxuICAgICAgICAgICAgICAgICAgICAgICAgIFt0ZW1wbGF0ZV09XCJ1c2luZ1doZXJlXCIgXG4gICAgICAgICAgICAgICAgICAgICAgICAgW21heFdpZHRoXT1cIm51bGxcIlxuICAgICAgICAgICAgICAgICAgICAgICAgIFtkYXRhXT1cIml0ZW0udGFibGUuYXR0YWNoZWRDb25kaXRpb25cIj5cbiAgICAgICAgICAgICAgICAgICAgICAgVXNpbmcgV2hlcmVcbiAgICAgICAgICAgICAgICAgICAgIDwvZnMtcG9wb3Zlcj5cbiAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiaXRlbS51c2luZ0luZGV4XCI+XG4gICAgICAgICAgICAgICAgICAgPHNwYW4+VXNpbmcgSW5kZXg8L3NwYW4+XG4gICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPiAgICBcbiAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiaXRlbS51c2luZ0ZpbGVzb3J0XCI+XG4gICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImNyaXRpY2FsXCI+VXNpbmcgRmlsZSBTb3J0PC9zcGFuPlxuICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCJpdGVtLnVzaW5nVGVtcG9yYXJ5VGFibGVcIj5cbiAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwiY3JpdGljYWxcIj5UZW1wb3JhcnkgVGFibGU8L3NwYW4+XG4gICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICA8L3RkPlxuICAgICAgICAgICAgIDx0ZD4gICAgIFxuICAgICAgICAgICAgICA8ZnMtcG9wb3ZlciBbdGVtcGxhdGVdPVwidGFibGVDb3N0UG9wb3ZlclwiIFtkYXRhXT1cIml0ZW0udGFibGU/LmNvc3RJbmZvXCI+XG4gICAgICAgICAgICAgICAge3tpdGVtLnRhYmxlPy5jb3N0SW5mby5wcmVmaXhDb3N0fX1cbiAgICAgICAgICAgICAgPC9mcy1wb3BvdmVyPlxuICAgICAgICAgICAgICA8bmctdGVtcGxhdGUgI3RhYmxlQ29zdFBvcG92ZXIgbGV0LWRhdGE9XCJkYXRhXCI+XG4gICAgICAgICAgICAgICAgPGRpdj5FdmFsIENvc3Q6IHt7ZGF0YS5ldmFsQ29zdH19PC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdj5SZWFkIENvc3Q6IHt7ZGF0YS5yZWFkQ29zdH19PC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdj5QcmVmaXggQ29zdDoge3tkYXRhLnByZ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pYmxlS2V5fX08L3NwYW4+XG4gICAgPC9uZy1jb250YWluZXI+XG4gIDwvZGl2PlxuPC9uZy10ZW1wbGF0ZT5cblxuPG5nLXRlbXBsYXRlICN1c2luZ1doZXJlIGxldC1kYXRhPVwiZGF0YVwiPlxuICB7e2RhdGF9fVxuPC9uZy10ZW1wbGF0ZT5cblxuPG5nLXRlbXBsYXRlICN1c2luZ0luZGV4Q29uZGl0aW9uIGxldC1kYXRhPVwiZGF0YVwiPlxuICB7e2RhdGF9fVxuPC9uZy10ZW1wbGF0ZT5cblxuPG5nLXRlbXBsYXRlICNhY2Nlc3NUeXBlUG9wb3ZlciBsZXQtZGF0YT1cImRhdGFcIj5cbiAge3thY2Nlc3NUeXBlc1tkYXRhXX19XG48L25nLXRlbXBsYXRlPlxuXG5cbjxuZy10ZW1wbGF0ZSAjcXVlcnlCbG9ja0NyaXRpY2FsIGxldC1xdWVyeUJsb2NrPVwicXVlcnlCbG9ja1wiPlxuICA8ZGl2IGNsYXNzPVwiZnMtZGVsaW1pdFwiPlxuICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCJxdWVyeUJsb2NrLnVzaW5nRmlsZXNvcnRcIj5cbiAgICAgIDxzcGFuIGNsYXNzPVwiY3JpdGljYWxcIj5Vc2luZyBGaWxlIFNvcnQ8L3NwYW4+XG4gICAgPC9uZy1jb250YWluZXI+XG4gICAgXG4gICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cInF1ZXJ5QmxvY2sudXNpbmdUZW1wb3JhcnlUYWJsZVwiPlxuICAgICAgPHNwYW4gY2xhc3M9XCJjcml0aWNhbFwiPlRlbXBvcmFyeSBUYWJsZTwvc3Bhbj5cbiAgICA8L25nLWNvbnRhaW5lcj5cbiAgPC9kaXY+XG48L25nLXRlbXBsYXRlPiJdfQ==
@@ -1,2 +1,2 @@
1
- export * from './query-logs.component';
1
+ export * from './query-logs.component';
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvcXVlcnktbG9ncy9jb21wb25lbnRzL3F1ZXJ5LWxvZ3MvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vcXVlcnktbG9ncy5jb21wb25lbnQnO1xuIl19
@@ -1,84 +1,84 @@
1
- import { ChangeDetectionStrategy, Component, Input, ViewChild } from '@angular/core';
2
- import { MatDialog } from '@angular/material/dialog';
3
- import { ItemType } from '@firestitch/filter';
4
- import { FsListComponent } from '@firestitch/list';
5
- import { map } from 'rxjs/operators';
6
- import { QueryLogComponent } from '..';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "@angular/material/dialog";
9
- import * as i2 from "@firestitch/list";
10
- import * as i3 from "@firestitch/date";
11
- import * as i4 from "@angular/common";
12
- import * as i5 from "@firestitch/common";
13
- export class QueryLogsComponent {
14
- constructor(_dialog) {
15
- this._dialog = _dialog;
16
- }
17
- openQueryLog(queryLog) {
18
- this._dialog.open(QueryLogComponent, {
19
- data: { queryLog },
20
- width: '100%',
21
- });
22
- }
23
- ngOnInit() {
24
- this.listConfig = {
25
- filters: [
26
- {
27
- name: 'keyword',
28
- type: ItemType.Keyword,
29
- label: 'Search',
30
- },
31
- {
32
- name: 'optimized',
33
- type: ItemType.Select,
34
- label: 'Optimization',
35
- values: [
36
- { name: 'Any', value: undefined },
37
- { name: 'Yes', value: 'true' },
38
- { name: 'No', value: 'false' },
39
- ],
40
- },
41
- {
42
- name: 'createDate',
43
- type: ItemType.DateTimeRange,
44
- label: ['From Date', 'To Date'],
45
- },
46
- {
47
- name: 'duration',
48
- type: ItemType.Range,
49
- label: ['Min Duration', 'Max Duration'],
50
- },
51
- ],
52
- actions: [
53
- {
54
- label: 'Purge',
55
- primary: false,
56
- click: () => {
57
- this.purgeQueryLogs()
58
- .subscribe(() => {
59
- this.list.reload();
60
- });
61
- },
62
- },
63
- ],
64
- fetch: (query) => {
65
- return this.loadQueryLogs(query)
66
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
67
- },
68
- };
69
- }
70
- }
71
- QueryLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: QueryLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
72
- 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.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i3.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fsFormatTruncate": i5.FsFormatTruncatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: QueryLogsComponent, decorators: [{
74
- type: Component,
75
- 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"] }]
76
- }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
77
- type: ViewChild,
78
- args: [FsListComponent]
79
- }], loadQueryLogs: [{
80
- type: Input
81
- }], purgeQueryLogs: [{
82
- type: Input
83
- }] } });
84
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktbG9ncy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvcXVlcnktbG9ncy9jb21wb25lbnRzL3F1ZXJ5LWxvZ3MvcXVlcnktbG9ncy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvcXVlcnktbG9ncy9jb21wb25lbnRzL3F1ZXJ5LWxvZ3MvcXVlcnktbG9ncy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBVSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFN0YsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRXJELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUM5QyxPQUFPLEVBQUUsZUFBZSxFQUFnQixNQUFNLGtCQUFrQixDQUFDO0FBR2pFLE9BQU8sRUFBRSxHQUFHLEVBQUUs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mRlZmluZWQgfSxcclxuICAgICAgICAgICAgeyBuYW1lOiAnWWVzJywgdmFsdWU6ICd0cnVlJyB9LFxyXG4gICAgICAgICAgICB7IG5hbWU6ICdObycsIHZhbHVlOiAnZmFsc2UnIH0sXHJcbiAgICAgICAgICBdLFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgbmFtZTogJ2NyZWF0ZURhdGUnLFxyXG4gICAgICAgICAgdHlwZTogSXRlbVR5cGUuRGF0ZVRpbWVSYW5nZSxcclxuICAgICAgICAgIGxhYmVsOiBbJ0Zyb20gRGF0ZScsICdUbyBEYXRlJ10sXHJcbiAgICAgICAgfSxcclxuICAgICAgICB7XHJcbiAgICAgICAgICBuYW1lOiAnZHVyYXRpb24nLFxyXG4gICAgICAgICAgdHlwZTogSXRlbVR5cGUuUmFuZ2UsXHJcbiAgICAgICAgICBsYWJlbDogWydNaW4gRHVyYXRpb24nLCAnTWF4IER1cmF0aW9uJ10sXHJcbiAgICAgICAgfSxcclxuICAgICAgXSxcclxuICAgICAgYWN0aW9uczogW1xyXG4gICAgICAgIHtcclxuICAgICAgICAgIGxhYmVsOiAnUHVyZ2UnLFxyXG4gICAgICAgICAgcHJpbWFyeTogZmFsc2UsXHJcbiAgICAgICAgICBjbGljazogKCkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnB1cmdlUXVlcnlMb2dzKClcclxuICAgICAgICAgICAgICAuc3Vic2NyaWJlKCgpID0+IHtcclxuICAgICAgICAgICAgICAgIHRoaXMubGlzdC5yZWxvYWQoKTtcclxuICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgIH0sXHJcbiAgICAgICAgfSxcclxuICAgICAgXSxcclxuICAgICAgZmV0Y2g6IChxdWVyeSkgPT4ge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmxvYWRRdWVyeUxvZ3MocXVlcnkpXHJcbiAgICAgICAgICAucGlwZShcclxuICAgICAgICAgICAgbWFwKChyZXNwb25zZSkgPT4gKH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XG4gIDwvZnMtbGlzdC1jb2x1bW4+XG4gIDxmcy1saXN0LWNvbHVtbiB0aXRsZT1cIlF1ZXJ5XCI+XG4gICAgPG5nLXRlbXBsYXRlIGZzLWxpc3QtY2VsbCBsZXQtcm93PVwicm93XCI+XG4gICAgICA8YSAoY2xpY2spPVwib3BlblF1ZXJ5TG9nKHJvdylcIj57eyByb3cucXVlcnkgfCBmc0Zvcm1hdFRydW5jYXRlOiA1MDAgfX08L2E+XG4gICAgPC9uZy10ZW1wbGF0ZT5cbiAgPC9mcy1saXN0LWNvbHVtbj5cbiAgPGZzLWxpc3QtY29sdW1uIHRpdGxlPVwiQ3JlYXRlZFwiIG5hbWU9XCJxdWVyeV9sb2dfaWRcIiBbc29ydGFibGVdPVwidHJ1ZVwiIFtkaXJlY3Rpb25dPVwiJ2Rlc2MnXCIgW3NvcnRhYmxlRGVmYXVsdF09XCJ0cnVlXCI+XG4gICAgPG5nLXRlbXBsYXRlIGZzLWxpc3QtY2VsbCBsZXQtcm93PVwicm93XCI+XG4gICAgICA8ZnMtZGF0ZS1hZ28gW2RhdGVdPVwicm93LmNyZWF0ZURhdGVcIj48L2ZzLWRhdGUtYWdvPlxuICAgIDwvbmctdGVtcGxhdGU+XG4gIDwvZnMtbGlzdC1jb2x1bW4+XG48L2ZzLWxpc3Q+Il19
1
+ import { ChangeDetectionStrategy, Component, Input, ViewChild } from '@angular/core';
2
+ import { MatDialog } from '@angular/material/dialog';
3
+ import { ItemType } from '@firestitch/filter';
4
+ import { FsListComponent } from '@firestitch/list';
5
+ import { map } from 'rxjs/operators';
6
+ import { QueryLogComponent } from '..';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "@angular/material/dialog";
9
+ import * as i2 from "@angular/common";
10
+ import * as i3 from "@firestitch/date";
11
+ import * as i4 from "@firestitch/list";
12
+ import * as i5 from "@firestitch/common";
13
+ export class QueryLogsComponent {
14
+ constructor(_dialog) {
15
+ this._dialog = _dialog;
16
+ }
17
+ openQueryLog(queryLog) {
18
+ this._dialog.open(QueryLogComponent, {
19
+ data: { queryLog },
20
+ width: '100%',
21
+ });
22
+ }
23
+ ngOnInit() {
24
+ this.listConfig = {
25
+ filters: [
26
+ {
27
+ name: 'keyword',
28
+ type: ItemType.Keyword,
29
+ label: 'Search',
30
+ },
31
+ {
32
+ name: 'optimized',
33
+ type: ItemType.Select,
34
+ label: 'Optimization',
35
+ values: [
36
+ { name: 'Any', value: undefined },
37
+ { name: 'Yes', value: 'true' },
38
+ { name: 'No', value: 'false' },
39
+ ],
40
+ },
41
+ {
42
+ name: 'createDate',
43
+ type: ItemType.DateTimeRange,
44
+ label: ['From Date', 'To Date'],
45
+ },
46
+ {
47
+ name: 'duration',
48
+ type: ItemType.Range,
49
+ label: ['Min Duration', 'Max Duration'],
50
+ },
51
+ ],
52
+ actions: [
53
+ {
54
+ label: 'Purge',
55
+ primary: false,
56
+ click: () => {
57
+ this.purgeQueryLogs()
58
+ .subscribe(() => {
59
+ this.list.reload();
60
+ });
61
+ },
62
+ },
63
+ ],
64
+ fetch: (query) => {
65
+ return this.loadQueryLogs(query)
66
+ .pipe(map((response) => ({ data: response.data, paging: response.paging })));
67
+ },
68
+ };
69
+ }
70
+ }
71
+ QueryLogsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QueryLogsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
72
+ 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: i3.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { kind: "component", type: i4.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i4.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { kind: "directive", type: i4.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "pipe", type: i5.FsFormatTruncatePipe, name: "fsFormatTruncate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QueryLogsComponent, decorators: [{
74
+ type: Component,
75
+ 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"] }]
76
+ }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { list: [{
77
+ type: ViewChild,
78
+ args: [FsListComponent]
79
+ }], loadQueryLogs: [{
80
+ type: Input
81
+ }], purgeQueryLogs: [{
82
+ type: Input
83
+ }] } });
84
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktbG9ncy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvcXVlcnktbG9ncy9jb21wb25lbnRzL3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ICAgICBmaWx0ZXJzOiBbXG4gICAgICAgIHtcbiAgICAgICAgICBuYW1lOiAna2V5d29yZCcsXG4gICAgICAgICAgdHlwZTogSXRlbVR5cGUuS2V5d29yZCxcbiAgICAgICAgICBsYWJlbDogJ1NlYXJjaCcsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBuYW1lOiAnb3B0aW1pemVkJyxcbiAgICAgICAgICB0eXBlOiBJdGVtVHlwZS5TZWxlY3QsXG4gICAgICAgICAgbGFiZWw6ICdPcHRpbWl6YXRpb24nLFxuICAgICAgICAgIHZhbHVlczogW1xuICAgICAgICAgICAgeyBuYW1lOiAnQW55JywgdmFsdWU6IHVuZGVmaW5lZCB9LFxuICAgICAgICAgICAgeyBuYW1lOiAnWWVzJywgdmFsdWU6ICd0cnVlJyB9LFxuICAgICAgICAgICAgeyBuYW1lOiAnTm8nLCB2YWx1ZTogJ2ZhbHNlJyB9LFxuICAgICAgICAgIF0sXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBuYW1lOiAnY3JlYXRlRGF0ZScsXG4gICAgICAgICAgdHlwZTogSXRlbVR5cGUuRGF0ZVRpbWVSYW5nZSxcbiAgICAgICAgICBsYWJlbDogWydGcm9tIERhdGUnLCAnVG8gRGF0ZSddLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgbmFtZTogJ2R1cmF0aW9uJyxcbiAgICAgICAgICB0eXBlOiBJdGVtVHlwZS5SYW5nZSxcbiAgICAgICAgICBsYWJlbDogWydNaW4gRHVyYXRpb24nLCAnTWF4IER1cmF0aW9uJ10sXG4gICAgICAgIH0sXG4gICAgICBdLFxuICAgICAgYWN0aW9uczogW1xuICAgICAgICB7XG4gICAgICAgICAgbGFiZWw6ICdQdXJnZScsXG4gICAgICAgICAgcHJpbWFyeTogZmFsc2UsXG4gICAgICAgICAgY2xpY2s6ICgpID0+IHtcbiAgICAgICAgICAgIHRoaXMucHVyZ2VRdWVyeUxvZ3Mo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