fix(gbase8s): stabilize connections and table access
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
This commit is contained in:
1 parent
7d5a9459e4
commit
7e6923d53b
26 files changed
+375
-46
No files matched your search
@@ -51,6 +51,7 @@ import { JDBCX_DEFAULT_URL, JDBCX_DRIVER_PROFILE, JDBCX_JDBC_DRIVER_CLASS, ensur
|
||||
import { SQLITE_DATABASE_FILE_EXTENSIONS } from "@/lib/database/databaseFileDetection";
|
||||
import { connectionAttemptOriginalErrorMessage, connectionAttemptTimeoutMessage, connectionAttemptTimeoutMs } from "@/lib/connection/connectionAttemptTimeout";
|
||||
import { appendConnectionErrorHints, isJdbcMissingRuntimeDependencyError } from "@/lib/connection/connectionErrorHints";
|
||||
import { preventDialogDocumentSelectAll } from "@/lib/connection/dialogTextSelection";
|
||||
import { postgresTlsModeForForm } from "@/lib/connection/postgresTlsMode";
|
||||
import { buildMqKafkaConnectionExtra, mqKafkaConnectionTarget, resolveMqKafkaConnectionSource, type MqKafkaConnectionSource } from "@/lib/connection/mqKafkaConnection";
|
||||
import { assertCompleteDatabaseCategories, databaseSelectionForCategory } from "@/lib/connection/databaseCategoryOptions";
|
||||
@@ -4735,7 +4736,7 @@ function openExternalUrl(url: string) {
|
||||
|
||||
<template>
|
||||
<Dialog v-model:open="open">
|
||||
<DialogContent class="connection-dialog-content" :class="connectionDialogContentClass" :data-wide="shouldUseWideConnectionDialog ? 'true' : undefined" @interact-outside.prevent @escape-key-down="handleDialogEscape">
|
||||
<DialogContent class="connection-dialog-content" :class="connectionDialogContentClass" :data-wide="shouldUseWideConnectionDialog ? 'true' : undefined" @interact-outside.prevent @escape-key-down="handleDialogEscape" @keydown="preventDialogDocumentSelectAll">
|
||||
<DialogHeader>
|
||||
<DialogTitle>{{ editingId ? t("connection.editTitle") : t("connection.title") }}</DialogTitle>
|
||||
</DialogHeader>
|
||||
@@ -6000,7 +6001,10 @@ function openExternalUrl(url: string) {
|
||||
|
||||
<div v-if="form.driver_profile === 'gbase8s'" class="grid grid-cols-4 items-center gap-4">
|
||||
<Label :class="connectionLabelSmallClass">{{ t("connection.gbaseServer") }}</Label>
|
||||
<Input v-model="form.gbase_server" class="col-span-3" placeholder="gbase01" />
|
||||
<div class="col-span-3 space-y-1">
|
||||
<Input v-model="form.gbase_server" placeholder="gbase01" />
|
||||
<p class="text-xs text-muted-foreground">{{ t("connection.gbaseServerHint") }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="form.db_type === 'informix'" class="grid grid-cols-4 items-center gap-4">
|
||||
@@ -7126,7 +7130,7 @@ function openExternalUrl(url: string) {
|
||||
</Dialog>
|
||||
|
||||
<Dialog v-model:open="showVisibleDatabasesDialog">
|
||||
<DialogContent class="sm:max-w-[460px]">
|
||||
<DialogContent class="sm:max-w-[520px]" @keydown="preventDialogDocumentSelectAll">
|
||||
<DialogHeader>
|
||||
<DialogTitle>{{ t(visibleObjectTitleKey) }}</DialogTitle>
|
||||
<p class="text-sm text-muted-foreground">
|
||||
@@ -7174,9 +7178,7 @@ function openExternalUrl(url: string) {
|
||||
<Loader2 class="h-4 w-4 animate-spin" />
|
||||
{{ t("common.loading") }}
|
||||
</div>
|
||||
<div v-else-if="visibleDatabaseError" class="p-3 text-sm text-destructive">
|
||||
{{ t(visibleObjectLoadFailedKey, { message: visibleDatabaseError }) }}
|
||||
</div>
|
||||
<textarea v-else-if="visibleDatabaseError" class="h-full w-full resize-none overflow-auto border-0 bg-transparent p-3 text-sm leading-5 text-destructive outline-none" :value="t(visibleObjectLoadFailedKey, { message: visibleDatabaseError })" readonly />
|
||||
<div v-else-if="!filteredVisibleDatabaseNames.length" class="p-3 text-sm text-muted-foreground">
|
||||
{{ t("grid.noSearchResults") }}
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,10 @@ const errorMessage = computed(() => (props.connectionId ? connectionStore.connec
|
||||
function clearError() {
|
||||
if (props.connectionId) connectionStore.clearConnectionError(props.connectionId);
|
||||
}
|
||||
|
||||
function selectErrorText(event: FocusEvent) {
|
||||
if (event.target instanceof HTMLTextAreaElement) event.target.select();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -40,15 +44,13 @@ function clearError() {
|
||||
<AlertTriangle class="h-3.5 w-3.5" />
|
||||
</button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent side="top" class="w-72 gap-2 p-2 text-xs" @click.stop>
|
||||
<PopoverContent side="top" class="w-96 max-w-[calc(100vw-2rem)] gap-2 p-2 text-xs" @click.stop>
|
||||
<div class="flex items-start gap-2">
|
||||
<div class="min-w-0 flex-1">
|
||||
<div class="font-medium text-foreground">
|
||||
{{ t("connection.lastError") }}
|
||||
</div>
|
||||
<div class="mt-1 max-h-36 overflow-auto whitespace-pre-wrap break-words text-muted-foreground">
|
||||
{{ errorMessage }}
|
||||
</div>
|
||||
<textarea class="mt-1 max-h-40 min-h-20 w-full resize-none overflow-auto rounded border bg-muted/30 p-2 font-mono text-[11px] leading-4 text-muted-foreground outline-none" :value="errorMessage" readonly @focus="selectErrorText" />
|
||||
</div>
|
||||
<button type="button" class="shrink-0 rounded px-1.5 py-0.5 text-xs text-muted-foreground hover:bg-muted hover:text-foreground" @click="clearError">{{ t("connection.clearError") }}</button>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user