Skip to content

CB-2867 support dataset in UI#1436

Merged
alexander-skoblikov merged 33 commits intodevelfrom
CB-2867-support-dataset-in-ui
Feb 8, 2023
Merged

CB-2867 support dataset in UI#1436
alexander-skoblikov merged 33 commits intodevelfrom
CB-2867-support-dataset-in-ui

Conversation

@alexander-skoblikov
Copy link
Copy Markdown
Collaborator

No description provided.

@alexander-skoblikov alexander-skoblikov changed the title Cb 2867 support dataset in UI CB-2867 support dataset in UI Jan 27, 2023
alexander-skoblikov and others added 26 commits January 27, 2023 15:40
onValuePresentationChange,
}, ['setPresentation', 'setValuePresentation', 'switchValuePresentation', 'closeValuePresentation']);

const needRefresh = getComputed(() => (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please cast dataModel to a boolean !!dataModel so needRefresh will return boolean, not boolean | undefined


const nodes = navNodeInfoResource
.get(resourceKeyList(children))
.filter<NavNode>((node => node !== undefined) as (node: NavNode | undefined) => node is NavNode)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use utility function filterUndefined?

const scriptName = `${result.name.trim()}.${SCRIPT_EXTENSION}`;
const resourceType = this.projectInfoResource.getResourceType(project, SCRIPTS_TYPE_ID);
if (!resourceType) {
throw new Error('Resource type not found');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include resource type in error message

const isActiveSegmentMode = getComputed(() => data.activeSegmentMode.activeSegmentMode);
const displayedEditors = getComputed(() => sqlEditorModeService.tabsContainer.getDisplayed({ state, data }).length);

useEffect(() => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to move splitting logic to the separate hook

await this.executeQueryAction(
query,
async () => {
if ((this.dataSource?.databaseModels.length ?? 0) > 0) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just !!this.dataSource?.databaseModels.length

const databaseModels = dataSource?.databaseModels;

if (!databaseModels) {
console.error('databaseModels executionContext is not provided');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to throw an error as we return from function in this case

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will remove it

@alexander-skoblikov alexander-skoblikov merged commit 25f859a into devel Feb 8, 2023
@alexander-skoblikov alexander-skoblikov deleted the CB-2867-support-dataset-in-ui branch February 8, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants