From 8c7bdd55a6f236ad66323001e2efafefdddca622 Mon Sep 17 00:00:00 2001
From: gatewayJ <835269233@qq.com>
Date: Wed, 7 Oct 2026 10:34:55 +0800
Subject: [PATCH 1/2] feat: add empty table catalog disable action
---
app/(dashboard)/table-catalog/page.tsx | 34 ++++++++++++++++++++++++++
docs/ui-review/register.md | 2 ++
hooks/use-table-catalog.ts | 13 ++++++++++
i18n/locales/ar-MA.json | 4 +++
i18n/locales/de-DE.json | 4 +++
i18n/locales/en-US.json | 4 +++
i18n/locales/es-ES.json | 4 +++
i18n/locales/fr-FR.json | 4 +++
i18n/locales/id-ID.json | 4 +++
i18n/locales/it-IT.json | 4 +++
i18n/locales/ja-JP.json | 4 +++
i18n/locales/ko-KR.json | 4 +++
i18n/locales/pt-BR.json | 4 +++
i18n/locales/ru-RU.json | 4 +++
i18n/locales/tr-TR.json | 4 +++
i18n/locales/vi-VN.json | 4 +++
i18n/locales/zh-CN.json | 4 +++
tests/lib/table-catalog-source.test.js | 8 ++++++
18 files changed, 113 insertions(+)
diff --git a/app/(dashboard)/table-catalog/page.tsx b/app/(dashboard)/table-catalog/page.tsx
index 5fa609e7..f30ef91d 100644
--- a/app/(dashboard)/table-catalog/page.tsx
+++ b/app/(dashboard)/table-catalog/page.tsx
@@ -101,6 +101,7 @@ export default function TableCatalogPage() {
getCatalogConfig,
getTableBucket,
enableTableBucket,
+ disableTableBucket,
listNamespaces,
dropNamespace,
listTables,
@@ -472,6 +473,27 @@ export default function TableCatalogPage() {
})
}
+ const handleDisableBucket = () => {
+ if (!selectedBucket || !canEnableBucket || !selectedInfo?.enabled || !selectedInfo.disableSupported) return
+ const bucket = selectedBucket
+ dialog.warning({
+ title: t("Disable table bucket"),
+ content: `${bucket}: ${t("Only an empty catalog can be disabled. Existing objects are preserved. Review bucket lifecycle rules before continuing: expiration can resume and delete objects.")}`,
+ positiveText: t("Disable"),
+ negativeText: t("Cancel"),
+ onPositiveClick: async () => {
+ try {
+ const info = await disableTableBucket(bucket)
+ setBucketInfo((current) => ({ ...current, [bucket]: info }))
+ message.success(t("Table bucket disabled"))
+ } catch (error) {
+ message.error(errorText(error, t("Unable to disable table bucket.")))
+ throw error
+ }
+ },
+ })
+ }
+
const handleDeleteNamespace = React.useCallback(
(row: NamespaceSummary) => {
if (!canDeleteNamespace || !selectedBucket) return
@@ -925,6 +947,18 @@ export default function TableCatalogPage() {
) : selectedInfo ? (
{t("Not enabled")}
) : null}
+ {selectedInfo?.enabled && selectedInfo.disableSupported ? (
+
+ ) : null}
{selectedInfo?.enabled && activeTab === "tables" ? (