Skip to content

Commit

Permalink
add TEMPORARY__enableExportToCube to queryBuilderConfig (#3571)
Browse files Browse the repository at this point in the history
  • Loading branch information
MauricioUyaguari authored Oct 7, 2024
1 parent 7800906 commit 46c4b28
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .changeset/angry-cherries-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
'@finos/legend-query-builder': patch
---
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
CubesLoadingIndicator,
InfoCircleIcon,
ShareBoxIcon,
CubeIcon,
} from '@finos/legend-art';
import { observer } from 'mobx-react-lite';
import { flowResult } from 'mobx';
Expand All @@ -56,6 +57,7 @@ import {
TDSExecutionResult,
RawExecutionResult,
ExecutionError,
RuntimePointer,
} from '@finos/legend-graph';
import {
ActionAlertActionType,
Expand Down Expand Up @@ -837,27 +839,28 @@ export const QueryBuilderResultPanel = observer(
</MenuContentItemIcon>
<MenuContentItemLabel>Others...</MenuContentItemLabel>
</MenuContentItem>
{/* DISABLE FOR NOW */}
{/* <MenuContentItem
onClick={(): void =>
queryBuilderState.setIsCubeEnabled(true)
}
disabled={
!queryBuilderState.fetchStructureState.implementation
.canBeExportedToCube ||
!(
queryBuilderState.executionContextState
.runtimeValue instanceof RuntimePointer
)
}
>
<MenuContentItemIcon>
<CubeIcon />
</MenuContentItemIcon>
<MenuContentItemLabel>
Data Cube (BETA)
</MenuContentItemLabel>
</MenuContentItem> */}
{queryBuilderState.config?.TEMPORARY__enableExportToCube && (
<MenuContentItem
onClick={(): void =>
queryBuilderState.setIsCubeEnabled(true)
}
disabled={
!queryBuilderState.fetchStructureState.implementation
.canBeExportedToCube ||
!(
queryBuilderState.executionContextState
.runtimeValue instanceof RuntimePointer
)
}
>
<MenuContentItemIcon>
<CubeIcon />
</MenuContentItemIcon>
<MenuContentItemLabel>
Data Cube (BETA)
</MenuContentItemLabel>
</MenuContentItem>
)}
{extraExportMenuContentItems}
</MenuContent>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ import { createModelSchema, optional, primitive } from 'serializr';

export class QueryBuilderConfig {
/**
* This flag is to disable query builder chat feature
* This flag is to enable export to cube
*/
TEMPORARY__enableExportToCube = false;

/**
* This flag is to disable query builder chat features
*/
TEMPORARY__disableQueryBuilderChat = false;

Expand All @@ -41,6 +46,7 @@ export class QueryBuilderConfig {
static readonly serialization = new SerializationFactory(
createModelSchema(QueryBuilderConfig, {
TEMPORARY__disableQueryBuilderChat: optional(primitive()),
TEMPORARY__enableExportToCube: optional(primitive()),
TEMPORARY__enableGridEnterpriseMode: optional(primitive()),
legendAIServiceURL: optional(primitive()),
zipkinTraceBaseURL: optional(primitive()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ export abstract class QueryBuilderState implements CommandRegistrar {

this.workflowState = workflowState;
this.sourceInfo = sourceInfo;
//extra check for only QA currently.
this.isQueryChatOpened =
(!this.config?.TEMPORARY__disableQueryBuilderChat &&
this.applicationStore.settingService.getBooleanValue(
Expand Down

0 comments on commit 46c4b28

Please sign in to comment.