@finos/legend-query-builder 4.0.13 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +3 -2
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/QueryUsageViewer.d.ts +22 -0
- package/lib/components/QueryUsageViewer.d.ts.map +1 -0
- package/lib/components/QueryUsageViewer.js +33 -0
- package/lib/components/QueryUsageViewer.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +2 -2
- package/lib/stores/QueryBuilderResultState.d.ts +2 -0
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +6 -0
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +10 -0
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/QueryBuilderResultPanel.tsx +13 -0
- package/src/components/QueryUsageViewer.tsx +111 -0
- package/src/stores/QueryBuilderResultState.ts +7 -1
- package/src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts +12 -0
- package/tsconfig.json +1 -0
package/lib/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-query-builder",
|
3
|
-
"version": "4.0
|
3
|
+
"version": "4.1.0",
|
4
4
|
"description": "Legend query builder core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -53,7 +53,7 @@
|
|
53
53
|
"@types/react": "18.2.13",
|
54
54
|
"@types/react-dom": "18.2.6",
|
55
55
|
"chart.js": "4.3.0",
|
56
|
-
"mathjs": "11.8.
|
56
|
+
"mathjs": "11.8.2",
|
57
57
|
"mobx": "6.9.0",
|
58
58
|
"mobx-react-lite": "3.4.3",
|
59
59
|
"monaco-editor": "0.39.0",
|
@@ -44,6 +44,7 @@ export declare class QueryBuilderResultState {
|
|
44
44
|
executionDuration?: number | undefined;
|
45
45
|
latestRunHashCode?: string | undefined;
|
46
46
|
queryRunPromise: Promise<ExecutionResult> | undefined;
|
47
|
+
isQueryUsageViewerOpened: boolean;
|
47
48
|
selectedCells: QueryBuilderTDSResultCellData[];
|
48
49
|
mousedOverCell: QueryBuilderTDSResultCellData | null;
|
49
50
|
isSelectingCells: boolean;
|
@@ -60,6 +61,7 @@ export declare class QueryBuilderResultState {
|
|
60
61
|
findColumnFromCoordinates: (colIndex: number) => string | number | boolean | null | undefined;
|
61
62
|
findRowFromRowIndex: (rowIndex: number) => (string | number | boolean | null)[];
|
62
63
|
findResultValueFromCoordinates: (resultCoordinate: [number, number]) => string | number | boolean | null | undefined;
|
64
|
+
setIsQueryUsageViewerOpened(val: boolean): void;
|
63
65
|
get checkForStaleResults(): boolean;
|
64
66
|
buildExecutionRawLambda(executionOptions?: LambdaFunctionBuilderOption): RawLambda;
|
65
67
|
exportData(format: string): GeneratorFn<void>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderResultState.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilderResultState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,WAAW,EAIhB,KAAK,WAAW,EAEhB,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,8BAA8B,EAOpC,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAGpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAE5E,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,m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G,IAAI,CAEpD;IAEF,eAAe,QAAS,MAAM,KAAG,IAAI,CAEnC;IAEF,WAAW,QAAS,6BAA6B,KAAG,IAAI,CAEtD;IAEF,gBAAgB,QAAS,6BAA6B,EAAE,KAAG,IAAI,CAE7D;IAEF,gBAAgB,QAAS,6BAA6B,GAAG,IAAI,KAAG,IAAI,CAElE;IAEF,kBAAkB,YACP,QAAQ,eAAe,CAAC,GAAG,SAAS,KAC5C,IAAI,CAEL;IAEF,yBAAyB,aACb,MAAM,KACf,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAQ7C;IAEF,mBAAmB,aACP,MAAM,KACf,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,EAAE,CAQrC;IAEF,8BAA8B,qBACV,CAAC,MAAM,EAAE,MAAM,CAAC,KACjC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAY7C;IAEF,2BAA2B,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAI/C,IAAI,oBAAoB,IAAI,OAAO,CAKlC;IAED,uBAAuB,CACrB,gBAAgB,CAAC,EAAE,2BAA2B,GAC7C,SAAS;IA2BX,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC;IAoD7C,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC;IA2E7B,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC;IAiBhC,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC;CA2FjD"}
|
@@ -35,6 +35,7 @@ export class QueryBuilderResultState {
|
|
35
35
|
executionDuration;
|
36
36
|
latestRunHashCode;
|
37
37
|
queryRunPromise = undefined;
|
38
|
+
isQueryUsageViewerOpened = false;
|
38
39
|
selectedCells;
|
39
40
|
mousedOverCell = null;
|
40
41
|
isSelectingCells;
|
@@ -51,6 +52,7 @@ export class QueryBuilderResultState {
|
|
51
52
|
isRunningQuery: observable,
|
52
53
|
isSelectingCells: observable,
|
53
54
|
setIsSelectingCells: action,
|
55
|
+
isQueryUsageViewerOpened: observable,
|
54
56
|
setIsRunningQuery: action,
|
55
57
|
setExecutionResult: action,
|
56
58
|
setExecutionDuration: action,
|
@@ -59,6 +61,7 @@ export class QueryBuilderResultState {
|
|
59
61
|
setSelectedCells: action,
|
60
62
|
setMouseOverCell: action,
|
61
63
|
setQueryRunPromise: action,
|
64
|
+
setIsQueryUsageViewerOpened: action,
|
62
65
|
exportData: flow,
|
63
66
|
runQuery: flow,
|
64
67
|
cancelQuery: flow,
|
@@ -119,6 +122,9 @@ export class QueryBuilderResultState {
|
|
119
122
|
}
|
120
123
|
return this.executionResult.result.rows[rowIndex]?.values[colIndex];
|
121
124
|
};
|
125
|
+
setIsQueryUsageViewerOpened(val) {
|
126
|
+
this.isQueryUsageViewerOpened = val;
|
127
|
+
}
|
122
128
|
get checkForStaleResults() {
|
123
129
|
if (this.latestRunHashCode !== this.queryBuilderState.hashCode) {
|
124
130
|
return true;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderResultState.js","sourceRoot":"","sources":["../../src/stores/QueryBuilderResultState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAEL,iBAAiB,EACjB,QAAQ,EACR,oBAAoB,EAEpB,wBAAwB,EACxB,WAAW,EACX,SAAS,EACT,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAKL,mBAAmB,EACnB,kBAAkB,EAClB,gCAAgC,EAChC,oBAAoB,EACpB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2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BAAkB,CACtE,OAAO,EACP,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,KAAK,CAC/C,CAAC;gBACJ,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;aACvC;YAAC,MAAM;gBACN,aAAa;aACd;YACD,SAAS,CAAC,MAAM,CAAC,mBAAmB,CAAC,6BAA6B,CAAC,CAAC;YAEpE,SAAS;YACT,MAAM,CAAC,OAAO;gBACZ,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,qBAAqB,CACvE,SAAS,EACT,MAAM,CAAC,OAAO,CACf,CAAC;YACJ,IAAI,KAAK,EAAE;gBACT,2BAA2B,CAAC,oCAAoC,CAC9D,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,gBAAgB,EACxD,MAAM,CACP,CAAC;aACH;iBAAM;gBACL,2BAA2B,CAAC,yCAAyC,CACnE,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,gBAAgB,EACxD,MAAM,CACP,CAAC;aACH;SACF;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,UAAU,CAAC,KAAK,CACtD,QAAQ,CAAC,MAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,EACtD,KAAK,CACN,CAAC;YACF,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,CACrE,KAAK,CACN,CAAC;SACH;gBAAS;YACR,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;SAC/B;IACH,CAAC;CACF"}
|
@@ -26,6 +26,12 @@ export type LoadQueryFilterOption = {
|
|
26
26
|
export type DatasetEntitlementAccessReportActionConfiguration = {
|
27
27
|
renderer: (info: DatasetAccessInfo, dataAccessState: DataAccessState) => React.ReactNode;
|
28
28
|
};
|
29
|
+
export type QueryExportUsageConfiguration = {
|
30
|
+
key: string;
|
31
|
+
title: string;
|
32
|
+
icon?: React.ReactNode | undefined;
|
33
|
+
renderer(): React.ReactNode;
|
34
|
+
};
|
29
35
|
export interface QueryBuilder_LegendApplicationPlugin_Extension extends LegendApplicationPlugin {
|
30
36
|
/**
|
31
37
|
* Get the list of filter options for query loader.
|
@@ -35,5 +41,9 @@ export interface QueryBuilder_LegendApplicationPlugin_Extension extends LegendAp
|
|
35
41
|
* Get the list of dataset entitlement access report action configurations.
|
36
42
|
*/
|
37
43
|
getExtraDatasetEntitlementAccessNotGrantedReportActionConfigurations?(): DatasetEntitlementAccessReportActionConfiguration[];
|
44
|
+
/**
|
45
|
+
* Get the list of query usage configurations
|
46
|
+
*/
|
47
|
+
getExtraQueryUsageConfigurations?(): QueryExportUsageConfiguration[];
|
38
48
|
}
|
39
49
|
//# sourceMappingURL=QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilder_LegendApplicationPlugin_Extension.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,MAAM,GAAG,SAAS,CAAC;IACpE,cAAc,EAAE,CACd,mBAAmB,EAAE,wBAAwB,EAC7C,iBAAiB,EAAE,iBAAiB,KACjC,wBAAwB,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,iDAAiD,GAAG;IAC9D,QAAQ,EAAE,CACR,IAAI,EAAE,iBAAiB,EACvB,eAAe,EAAE,eAAe,KAC7B,KAAK,CAAC,SAAS,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,8CACf,SAAQ,uBAAuB;IAC/B;;OAEG;IACH,8BAA8B,CAAC,IAAI,qBAAqB,EAAE,CAAC;IAE3D;;OAEG;IACH,oEAAoE,CAAC,IAAI,iDAAiD,EAAE,CAAC;
|
1
|
+
{"version":3,"file":"QueryBuilder_LegendApplicationPlugin_Extension.d.ts","sourceRoot":"","sources":["../../src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,MAAM,GAAG,SAAS,CAAC;IACpE,cAAc,EAAE,CACd,mBAAmB,EAAE,wBAAwB,EAC7C,iBAAiB,EAAE,iBAAiB,KACjC,wBAAwB,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,iDAAiD,GAAG;IAC9D,QAAQ,EAAE,CACR,IAAI,EAAE,iBAAiB,EACvB,eAAe,EAAE,eAAe,KAC7B,KAAK,CAAC,SAAS,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACnC,QAAQ,IAAI,KAAK,CAAC,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,WAAW,8CACf,SAAQ,uBAAuB;IAC/B;;OAEG;IACH,8BAA8B,CAAC,IAAI,qBAAqB,EAAE,CAAC;IAE3D;;OAEG;IACH,oEAAoE,CAAC,IAAI,iDAAiD,EAAE,CAAC;IAE7H;;OAEG;IACH,gCAAgC,CAAC,IAAI,6BAA6B,EAAE,CAAC;CACtE"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-query-builder",
|
3
|
-
"version": "4.0
|
3
|
+
"version": "4.1.0",
|
4
4
|
"description": "Legend query builder core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"@finos/legend-application": "15.0.24",
|
46
46
|
"@finos/legend-art": "7.0.24",
|
47
47
|
"@finos/legend-graph": "30.0.9",
|
48
|
-
"@finos/legend-lego": "1.1.
|
48
|
+
"@finos/legend-lego": "1.1.1",
|
49
49
|
"@finos/legend-server-depot": "6.0.16",
|
50
50
|
"@finos/legend-shared": "10.0.15",
|
51
51
|
"@finos/legend-storage": "3.0.65",
|
@@ -53,7 +53,7 @@
|
|
53
53
|
"@types/react": "18.2.13",
|
54
54
|
"@types/react-dom": "18.2.6",
|
55
55
|
"chart.js": "4.3.0",
|
56
|
-
"mathjs": "11.8.
|
56
|
+
"mathjs": "11.8.2",
|
57
57
|
"mobx": "6.9.0",
|
58
58
|
"mobx-react-lite": "3.4.3",
|
59
59
|
"monaco-editor": "0.39.0",
|
@@ -112,6 +112,7 @@ import {
|
|
112
112
|
QueryBuilderPostFilterOperator_IsEmpty,
|
113
113
|
QueryBuilderPostFilterOperator_IsNotEmpty,
|
114
114
|
} from '../stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js';
|
115
|
+
import { QueryUsageViewer } from './QueryUsageViewer.js';
|
115
116
|
|
116
117
|
export const tryToFormatSql = (sql: string): string => {
|
117
118
|
try {
|
@@ -1044,6 +1045,15 @@ export const QueryBuilderResultPanel = observer(
|
|
1044
1045
|
{format}
|
1045
1046
|
</MenuContentItem>
|
1046
1047
|
))}
|
1048
|
+
<MenuContentItem
|
1049
|
+
className="query-builder__result__export__dropdown__menu__item"
|
1050
|
+
onClick={(): void =>
|
1051
|
+
resultState.setIsQueryUsageViewerOpened(true)
|
1052
|
+
}
|
1053
|
+
disabled={queryBuilderState.changeDetectionState.hasChanged}
|
1054
|
+
>
|
1055
|
+
View Query Usage...
|
1056
|
+
</MenuContentItem>
|
1047
1057
|
</MenuContent>
|
1048
1058
|
}
|
1049
1059
|
menuProps={{
|
@@ -1059,6 +1069,9 @@ export const QueryBuilderResultPanel = observer(
|
|
1059
1069
|
<CaretDownIcon />
|
1060
1070
|
</div>
|
1061
1071
|
</DropdownMenu>
|
1072
|
+
{resultState.isQueryUsageViewerOpened && (
|
1073
|
+
<QueryUsageViewer resultState={resultState} />
|
1074
|
+
)}
|
1062
1075
|
</div>
|
1063
1076
|
</div>
|
1064
1077
|
<PanelContent>
|
@@ -0,0 +1,111 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import { observer } from 'mobx-react-lite';
|
18
|
+
import {
|
19
|
+
Dialog,
|
20
|
+
Modal,
|
21
|
+
ModalHeader,
|
22
|
+
ModalBody,
|
23
|
+
PanelDivider,
|
24
|
+
ModalFooter,
|
25
|
+
ModalFooterButton,
|
26
|
+
BlankPanelContent,
|
27
|
+
clsx,
|
28
|
+
} from '@finos/legend-art';
|
29
|
+
import { useApplicationStore } from '@finos/legend-application';
|
30
|
+
import type { QueryBuilder_LegendApplicationPlugin_Extension } from '../stores/QueryBuilder_LegendApplicationPlugin_Extension.js';
|
31
|
+
import { useState } from 'react';
|
32
|
+
import type { QueryBuilderResultState } from '../stores/QueryBuilderResultState.js';
|
33
|
+
|
34
|
+
export const QueryUsageViewer = observer(
|
35
|
+
(props: { resultState: QueryBuilderResultState }) => {
|
36
|
+
const { resultState } = props;
|
37
|
+
const applicationStore = useApplicationStore();
|
38
|
+
|
39
|
+
const extraQueryUsageOptions = applicationStore.pluginManager
|
40
|
+
.getApplicationPlugins()
|
41
|
+
.flatMap(
|
42
|
+
(plugin) =>
|
43
|
+
(
|
44
|
+
plugin as QueryBuilder_LegendApplicationPlugin_Extension
|
45
|
+
).getExtraQueryUsageConfigurations?.() ?? [],
|
46
|
+
);
|
47
|
+
const [selectedTab, setSelectedTab] = useState<string | undefined>(
|
48
|
+
extraQueryUsageOptions[0]?.title,
|
49
|
+
);
|
50
|
+
const currentTabExtensionConfig = extraQueryUsageOptions.find(
|
51
|
+
(option) => option.title === selectedTab,
|
52
|
+
);
|
53
|
+
|
54
|
+
return (
|
55
|
+
<Dialog
|
56
|
+
open={resultState.isQueryUsageViewerOpened}
|
57
|
+
onClose={() => resultState.setIsQueryUsageViewerOpened(false)}
|
58
|
+
>
|
59
|
+
<Modal className="query-builder__usage-viewer__modal" darkMode={true}>
|
60
|
+
<ModalHeader title="Query Usage" />
|
61
|
+
<ModalBody className="query-builder__usage-viewer__body">
|
62
|
+
<>
|
63
|
+
{extraQueryUsageOptions.length === 0 ? (
|
64
|
+
<BlankPanelContent>
|
65
|
+
Query usage is not available
|
66
|
+
</BlankPanelContent>
|
67
|
+
) : (
|
68
|
+
<>
|
69
|
+
<div className="query-builder__usage-viewer__tab__header">
|
70
|
+
<div className="query-builder__usage-viewer__tabs">
|
71
|
+
{extraQueryUsageOptions.map((config) => (
|
72
|
+
<button
|
73
|
+
key={config.key}
|
74
|
+
className={clsx('query-builder__usage-viewer__tab', {
|
75
|
+
'query-builder__usage-viewer__tab--active':
|
76
|
+
selectedTab === config.key,
|
77
|
+
})}
|
78
|
+
tabIndex={-1}
|
79
|
+
onClick={() => setSelectedTab(config.key)}
|
80
|
+
>
|
81
|
+
{config.icon !== undefined && (
|
82
|
+
<div className="query-builder__usage-viewer__tab__icon">
|
83
|
+
{config.icon}
|
84
|
+
</div>
|
85
|
+
)}
|
86
|
+
<div className="query-builder__usage-viewer__tab__label">
|
87
|
+
{config.title}
|
88
|
+
</div>
|
89
|
+
</button>
|
90
|
+
))}
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
<div className="query-builder__usage-viewer__content">
|
94
|
+
{currentTabExtensionConfig?.renderer()}
|
95
|
+
</div>
|
96
|
+
</>
|
97
|
+
)}
|
98
|
+
<PanelDivider />
|
99
|
+
</>
|
100
|
+
</ModalBody>
|
101
|
+
<ModalFooter>
|
102
|
+
<ModalFooterButton
|
103
|
+
onClick={() => resultState.setIsQueryUsageViewerOpened(false)}
|
104
|
+
text="Close"
|
105
|
+
/>
|
106
|
+
</ModalFooter>
|
107
|
+
</Modal>
|
108
|
+
</Dialog>
|
109
|
+
);
|
110
|
+
},
|
111
|
+
);
|
@@ -81,6 +81,7 @@ export class QueryBuilderResultState {
|
|
81
81
|
executionDuration?: number | undefined;
|
82
82
|
latestRunHashCode?: string | undefined;
|
83
83
|
queryRunPromise: Promise<ExecutionResult> | undefined = undefined;
|
84
|
+
isQueryUsageViewerOpened = false;
|
84
85
|
|
85
86
|
selectedCells: QueryBuilderTDSResultCellData[];
|
86
87
|
mousedOverCell: QueryBuilderTDSResultCellData | null = null;
|
@@ -99,6 +100,7 @@ export class QueryBuilderResultState {
|
|
99
100
|
isRunningQuery: observable,
|
100
101
|
isSelectingCells: observable,
|
101
102
|
setIsSelectingCells: action,
|
103
|
+
isQueryUsageViewerOpened: observable,
|
102
104
|
setIsRunningQuery: action,
|
103
105
|
setExecutionResult: action,
|
104
106
|
setExecutionDuration: action,
|
@@ -107,7 +109,7 @@ export class QueryBuilderResultState {
|
|
107
109
|
setSelectedCells: action,
|
108
110
|
setMouseOverCell: action,
|
109
111
|
setQueryRunPromise: action,
|
110
|
-
|
112
|
+
setIsQueryUsageViewerOpened: action,
|
111
113
|
exportData: flow,
|
112
114
|
runQuery: flow,
|
113
115
|
cancelQuery: flow,
|
@@ -201,6 +203,10 @@ export class QueryBuilderResultState {
|
|
201
203
|
return this.executionResult.result.rows[rowIndex]?.values[colIndex];
|
202
204
|
};
|
203
205
|
|
206
|
+
setIsQueryUsageViewerOpened(val: boolean): void {
|
207
|
+
this.isQueryUsageViewerOpened = val;
|
208
|
+
}
|
209
|
+
|
204
210
|
get checkForStaleResults(): boolean {
|
205
211
|
if (this.latestRunHashCode !== this.queryBuilderState.hashCode) {
|
206
212
|
return true;
|
@@ -38,6 +38,13 @@ export type DatasetEntitlementAccessReportActionConfiguration = {
|
|
38
38
|
) => React.ReactNode;
|
39
39
|
};
|
40
40
|
|
41
|
+
export type QueryExportUsageConfiguration = {
|
42
|
+
key: string;
|
43
|
+
title: string;
|
44
|
+
icon?: React.ReactNode | undefined;
|
45
|
+
renderer(): React.ReactNode;
|
46
|
+
};
|
47
|
+
|
41
48
|
export interface QueryBuilder_LegendApplicationPlugin_Extension
|
42
49
|
extends LegendApplicationPlugin {
|
43
50
|
/**
|
@@ -49,4 +56,9 @@ export interface QueryBuilder_LegendApplicationPlugin_Extension
|
|
49
56
|
* Get the list of dataset entitlement access report action configurations.
|
50
57
|
*/
|
51
58
|
getExtraDatasetEntitlementAccessNotGrantedReportActionConfigurations?(): DatasetEntitlementAccessReportActionConfiguration[];
|
59
|
+
|
60
|
+
/**
|
61
|
+
* Get the list of query usage configurations
|
62
|
+
*/
|
63
|
+
getExtraQueryUsageConfigurations?(): QueryExportUsageConfiguration[];
|
52
64
|
}
|
package/tsconfig.json
CHANGED
@@ -218,6 +218,7 @@
|
|
218
218
|
"./src/components/QueryBuilderTextEditor.tsx",
|
219
219
|
"./src/components/QueryBuilderUnsupportedQueryEditor.tsx",
|
220
220
|
"./src/components/QueryLoader.tsx",
|
221
|
+
"./src/components/QueryUsageViewer.tsx",
|
221
222
|
"./src/components/ServiceQuerySetupUtils.tsx",
|
222
223
|
"./src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx",
|
223
224
|
"./src/components/data-access/DataAccessOverview.tsx",
|