Skip to content

Commit 0d1502a

Browse files
committed
fix(azure-data-explorer): keep the Show Operations and Show Table Details cards from painting empty
check:canvas-sentences flagged the Show Operations sentence: it anchored `core` on operationId, which is an advanced-mode optional field, so an untouched card resolved to nothing and painted empty. Show Table Details had the same shape in milder form — table is optional there, since omitting it describes every table, leaving a dangling preposition. Both now lead with literal copy and treat their field as an optional refinement. Also simplifies the primary-table condition to a single `!= null` check.
1 parent 05e1bf5 commit 0d1502a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

apps/sim/app/api/tools/azure_data_explorer/proxy/route.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@ function selectPrimaryTable(
171171
contents: TableOfContents | null
172172
): KustoTable | null {
173173
if (tables.length === 0) return null
174-
if (contents?.primaryOrdinal !== null && contents !== null) {
175-
return tables[contents.primaryOrdinal] ?? tables[0]
176-
}
174+
if (contents?.primaryOrdinal != null) return tables[contents.primaryOrdinal] ?? tables[0]
177175
return tables[0]
178176
}
179177

apps/sim/blocks/blocks/azure_data_explorer.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ export const AzureDataExplorerBlock: BlockConfig<AzureDataExplorerTableResponse>
146146
],
147147
azure_data_explorer_drop_table: [{ text: 'Drop table', field: 'table', core: true }],
148148
azure_data_explorer_show_table_details: [
149-
{ text: 'Read details for', field: 'table', core: true },
149+
'Read table details',
150+
{ text: 'for', field: 'table' },
150151
{ text: 'in', field: 'database' },
151152
],
152153
azure_data_explorer_list_functions: [
@@ -156,7 +157,8 @@ export const AzureDataExplorerBlock: BlockConfig<AzureDataExplorerTableResponse>
156157
{ text: 'List ingestion failures in', field: 'database', core: true },
157158
],
158159
azure_data_explorer_show_operations: [
159-
{ text: 'Check operation', field: 'operationId', core: true },
160+
'Check cluster operations',
161+
{ text: 'for', field: 'operationId' },
160162
],
161163
},
162164
},

0 commit comments

Comments
 (0)