fix(hive): support JDBC URLs and HTTP noSasl connections

This commit is contained in:
zipg authored and GitHub committed 2026-08-17 19:40:40 +08:00
1 parent c724fd46b0
commit 4794a66aba
12 files changed
+517 -67

No files matched your search

@@ -75,6 +75,7 @@ import {
ArrowLeft,
ArrowDown,
ArrowUp,
Check,
CheckSquare,
ChevronRight,
CircleHelp,
@@ -261,6 +262,8 @@ const agentInstallError = ref("");
const showConnectionErrorDialog = ref(false);
const connectionErrorRawDetail = ref("");
const connectionErrorDetail = ref("");
const testResultCopied = ref(false);
const connectionErrorCopied = ref(false);
const editingId = ref<string | null>(null);
const draftTestConnectionId = ref(uuid());
const showVisibleDatabasesDialog = ref(false);
@@ -1915,6 +1918,7 @@ function failAgentDriverInstall(error: unknown) {
function showConnectionError(message: string) {
connectionErrorRawDetail.value = message;
connectionErrorDetail.value = translateBackendError(t, message);
connectionErrorCopied.value = false;
showConnectionErrorDialog.value = true;
}
@@ -3594,6 +3598,7 @@ async function testConnection() {
const runId = ++testRunId;
isTesting.value = true;
testResult.value = null;
testResultCopied.value = false;
let config: ConnectionConfig | null = null;
const submittedSourceName = form.value.name;
try {
@@ -4421,6 +4426,8 @@ function resetTestState() {
showConnectionErrorDialog.value = false;
connectionErrorRawDetail.value = "";
connectionErrorDetail.value = "";
testResultCopied.value = false;
connectionErrorCopied.value = false;
}
function resetVisibleDatabaseDraftState() {
@@ -4793,6 +4800,7 @@ async function copyTestResult() {
if (!testResultMessage.value) return;
try {
await copyToClipboard(testResultMessage.value);
testResultCopied.value = true;
toast(t("grid.copied"));
} catch (e: any) {
toast(t("grid.copyFailed", { message: e?.message || String(e) }), 5000);
@@ -4824,6 +4832,7 @@ async function copyConnectionErrorDetail() {
if (!connectionErrorDetail.value) return;
try {
await copyToClipboard(connectionErrorDetail.value);
connectionErrorCopied.value = true;
toast(t("grid.copied"));
} catch (e: any) {
toast(t("grid.copyFailed", { message: e?.message || String(e) }), 5000);
@@ -8464,8 +8473,9 @@ function openExternalUrl(url: string) {
<span class="block min-w-0 flex-1 basis-0 truncate text-xs" :class="testResult.ok ? 'text-green-600' : 'text-red-600'" :title="testResultMessage" role="status" aria-live="polite">
{{ testResultMessage }}
</span>
<Button v-if="!testResult.ok" variant="ghost" size="icon-xs" class="h-5 w-5 shrink-0" :title="t('connection.copyTestResult')" :aria-label="t('connection.copyTestResult')" @click="copyTestResult">
<Copy class="h-3 w-3" />
<Button v-if="!testResult.ok" variant="ghost" size="icon-xs" class="h-5 w-5 shrink-0" :title="testResultCopied ? t('grid.copied') : t('connection.copyTestResult')" :aria-label="testResultCopied ? t('grid.copied') : t('connection.copyTestResult')" @click="copyTestResult">
<Check v-if="testResultCopied" class="h-3 w-3" />
<Copy v-else class="h-3 w-3" />
</Button>
</template>
</div>
@@ -8550,8 +8560,9 @@ function openExternalUrl(url: string) {
{{ t("toolbar.driverManager") }}
</Button>
<Button variant="outline" @click="copyConnectionErrorDetail">
<Copy class="mr-1.5 h-3.5 w-3.5" />
{{ t("connection.copyError") }}
<Check v-if="connectionErrorCopied" class="mr-1.5 h-3.5 w-3.5" />
<Copy v-else class="mr-1.5 h-3.5 w-3.5" />
{{ connectionErrorCopied ? t("grid.copied") : t("connection.copyError") }}
</Button>
<Button @click="showConnectionErrorDialog = false">{{ t("common.close") }}</Button>
</DialogFooter>