Skip to content

Commit

Permalink
feat: revert fetch Cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenChunShenG19 committed Dec 22, 2024
1 parent 3e419a5 commit 57c1bb3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
15 changes: 0 additions & 15 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ declare module 'vue' {
NCard: typeof import('naive-ui')['NCard']
NCollapse: typeof import('naive-ui')['NCollapse']
NCollapseItem: typeof import('naive-ui')['NCollapseItem']
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
NDataTable: typeof import('naive-ui')['NDataTable']
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
NDivider: typeof import('naive-ui')['NDivider']
NDropdown: typeof import('naive-ui')['NDropdown']
NEllipsis: typeof import('naive-ui')['NEllipsis']
NEmpty: typeof import('naive-ui')['NEmpty']
NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem']
NFormItemRow: typeof import('naive-ui')['NFormItemRow']
NGi: typeof import('naive-ui')['NGi']
NGrid: typeof import('naive-ui')['NGrid']
NGridItem: typeof import('naive-ui')['NGridItem']
NIcon: typeof import('naive-ui')['NIcon']
Expand All @@ -36,28 +29,20 @@ declare module 'vue' {
NInputNumber: typeof import('naive-ui')['NInputNumber']
NList: typeof import('naive-ui')['NList']
NListItem: typeof import('naive-ui')['NListItem']
NLoadingBarProvider: typeof import('naive-ui')['NLoadingBarProvider']
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
NModal: typeof import('naive-ui')['NModal']
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
NP: typeof import('naive-ui')['NP']
NPopover: typeof import('naive-ui')['NPopover']
NProgress: typeof import('naive-ui')['NProgress']
NRadio: typeof import('naive-ui')['NRadio']
NRadioGroup: typeof import('naive-ui')['NRadioGroup']
NScrollbar: typeof import('naive-ui')['NScrollbar']
NSelect: typeof import('naive-ui')['NSelect']
NSpace: typeof import('naive-ui')['NSpace']
NSplit: typeof import('naive-ui')['NSplit']
NSwitch: typeof import('naive-ui')['NSwitch']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag']
NText: typeof import('naive-ui')['NText']
NThing: typeof import('naive-ui')['NThing']
NTooltip: typeof import('naive-ui')['NTooltip']
NUpload: typeof import('naive-ui')['NUpload']
NUploadDragger: typeof import('naive-ui')['NUploadDragger']
PathBreadcrumb: typeof import('./src/components/PathBreadcrumb.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterMain: typeof import('./src/components/RouterMain.vue')['default']
Expand Down
15 changes: 15 additions & 0 deletions src/views/manage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { useLang } from '../../lang';
import IndexManage from './components/index-manage.vue';
import { DatabaseType } from '../../store/connectionStore';
const message = useMessage();
const lang = useLang();
const activeTab = ref(lang.t('manage.cluster'));
Expand Down Expand Up @@ -62,6 +63,20 @@ watch(established, async () => {
const handleManageTabChange = (tab: string) => {
activeTab.value = tab;
};
fetchCluster().catch(err =>
!established.value?.id
? message.warning(lang.t('editor.establishedRequired'), {
closable: true,
keepAliveOnHover: true,
duration: 3000,
})
: message.error(`status: ${err.status}, details: ${err.details}`, {
closable: true,
keepAliveOnHover: true,
duration: 3000,
}),
);
</script>

<style lang="scss" scoped>
Expand Down

0 comments on commit 57c1bb3

Please sign in to comment.