Skip to content

Commit 816211e

Browse files
fix notebook tables view
1 parent 566caa8 commit 816211e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/commands/executionCommand.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,15 @@ async function executeServiceGateway(
356356
dsExecutionType: DataSourceTypes,
357357
body: any,
358358
udaName: string,
359+
isNotebook?: boolean,
359360
): Promise<any> {
361+
const isTableView = isNotebook ? true : ext.isResultsTabVisible;
360362
const res = await selectedConnection.getDataQuery(
361363
dsExecutionType,
362364
body,
363365
udaName,
364366
);
365-
return convertDSDataResponse(res);
367+
return convertDSDataResponse(res, isTableView);
366368
}
367369

368370
async function resolveVariable(
@@ -718,6 +720,7 @@ export async function executeDataQuery(
718720
const query = getQuery(datasourceFile, type);
719721
const dsExecutionType = getDSExecutionType(datasourceFile);
720722
const udaName = datasourceFile?.dataSource?.uda?.name ?? "";
723+
const isNotebook = isExecutionNotebook(type);
721724

722725
if (!validateDataQueryInputs(query)) {
723726
return;
@@ -752,6 +755,7 @@ export async function executeDataQuery(
752755
dsExecutionType,
753756
body,
754757
udaName,
758+
isNotebook,
755759
);
756760
}
757761

src/utils/execution.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,14 @@ export function defineNotepadExecutionType(
361361
}
362362

363363
/* c8 ignore next */
364-
export function convertDSDataResponse(dataQueryCall: any) {
364+
export function convertDSDataResponse(
365+
dataQueryCall: any,
366+
isTableView?: boolean,
367+
): any {
365368
if (dataQueryCall?.error) {
366369
return parseError(dataQueryCall.error);
367370
} else if (dataQueryCall?.arrayBuffer) {
368-
const results = handleWSResults(dataQueryCall.arrayBuffer);
371+
const results = handleWSResults(dataQueryCall.arrayBuffer, isTableView);
369372
return handleScratchpadTableRes(results);
370373
} else {
371374
return { error: "Data Query failed" };

0 commit comments

Comments
 (0)