Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore(sql-editor): update tab's padding (#16112)

boojack829d3378c3e4
diff --git a/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vue b/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vue
index 362ab9f920..7c02a3d978 100644
--- a/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vue
+++ b/frontend/src/views/sql-editor/EditorPanel/ResultPanel/BatchQuerySelect.vue
@@ -21,7 +21,7 @@
</template>
</NTooltip>
- <NScrollbar x-scrollable>
+ <NScrollbar x-scrollable class="pb-2">
<div class="flex flex-row justify-start items-center gap-2">
<NButton
v-for="item in filteredItems"
@@ -97,7 +97,6 @@ const queriedDatabaseNames = computed(() =>
const items = computed(() => {
return queriedDatabaseNames.value.map<BatchQueryItem>((name) => {
const database = databaseStore.getDatabaseByName(name);
- // TODO(ed):
const result = last(tab.value?.queryContext?.results.get(name));
return { database, resultSet: result?.resultSet };
});
diff --git a/frontend/src/views/sql-editor/EditorPanel/ResultPanel/ResultPanel.vue b/frontend/src/views/sql-editor/EditorPanel/ResultPanel/ResultPanel.vue
index 16a3f71be7..3b271ece22 100644
--- a/frontend/src/views/sql-editor/EditorPanel/ResultPanel/ResultPanel.vue
+++ b/frontend/src/views/sql-editor/EditorPanel/ResultPanel/ResultPanel.vue
@@ -33,7 +33,8 @@
v-else
type="card"
size="small"
- class="pt-2 flex-1 flex flex-col overflow-hidden px-2"
+ class="flex-1 flex flex-col overflow-hidden px-2"
+ :class="isBatchQuery ? 'pt-0' : 'pt-2'"
style="--n-tab-padding: 4px 12px"
v-model:value="selectedTab"
>
@@ -120,6 +121,12 @@ const queryElapsedTime = computed(() => {
return `${(elapsedMS / 1000).toFixed(1)}s`;
});
+const isBatchQuery = computed(
+ () =>
+ Array.from(tabStore.currentTab?.queryContext?.results.keys() || []).length >
+ 1
+);
+
const cancelQuery = () => {
tabStore.currentTab?.queryContext?.abortController.abort();
};