diff --git a/dbm-ui/frontend/src/App.vue b/dbm-ui/frontend/src/App.vue index d5cbda6495..463954d91c 100644 --- a/dbm-ui/frontend/src/App.vue +++ b/dbm-ui/frontend/src/App.vue @@ -64,7 +64,7 @@ import { useSQLTaskNotify } from '@hooks'; - import { useFunController, useUserProfile } from '@stores'; + import { useUserProfile } from '@stores'; import DbRouterView from '@components/db-router-view/Index.vue'; import LocaleSwitch from '@components/locale-switch/Index.vue'; @@ -72,6 +72,8 @@ import SystemSearch from '@components/system-search/Index.vue'; import SystemVersionLog from '@components/system-version-log/Index.vue'; + import { checkDbConsole } from '@utils'; + import NoticeComponent from '@blueking/notice-component'; import Layout from './layout/Index.vue'; @@ -81,7 +83,6 @@ const userProfileStore = useUserProfile(); userProfileStore.fetchProfile(); const { t, locale } = useI18n(); - const { funControllerData } = useFunController(); const documentTitles: Record = { en: 'DBM | Tencent BlueKing', @@ -123,7 +124,7 @@ }; onMounted(() => { - if (funControllerData.getFlatData('mysql').toolbox) { + if (checkDbConsole('mysql.toolbox.sqlExecute') || checkDbConsole('tendbCluster.toolbox.sqlExecute')) { useSQLTaskNotify(); } }); diff --git a/dbm-ui/frontend/src/views/mysql/common/hooks/useTaskCount.ts b/dbm-ui/frontend/src/views/mysql/common/hooks/useTaskCount.ts index 2a833edcf8..daf8d409ad 100644 --- a/dbm-ui/frontend/src/views/mysql/common/hooks/useTaskCount.ts +++ b/dbm-ui/frontend/src/views/mysql/common/hooks/useTaskCount.ts @@ -19,6 +19,8 @@ import { deleteUserSemanticTasks, getUserSemanticTasks } from '@services/source/ import { useSQLTaskCount } from '@stores'; +import { checkDbConsole } from '@utils'; + import { useTimeoutPoll } from '@vueuse/core'; export const useTaskCount = (clusterType: string) => { @@ -60,19 +62,21 @@ export const useTaskCount = (clusterType: string) => { }; const fetchData = () => { - getUserSemanticTasks({ - cluster_type: clusterType, - }).then((data) => { - if (taskCountStore.isPolling === false) { - resume(); - taskCountStore.isPolling = true; - } - - taskCountStore.taskList = data; - nextTick(() => { - initPopover(); + if (checkDbConsole('mysql.toolbox.sqlExecute') || checkDbConsole('tendbCluster.toolbox.sqlExecute')) { + getUserSemanticTasks({ + cluster_type: clusterType, + }).then((data) => { + if (taskCountStore.isPolling === false) { + resume(); + taskCountStore.isPolling = true; + } + + taskCountStore.taskList = data; + nextTick(() => { + initPopover(); + }); }); - }); + } }; fetchData(); diff --git a/dbm-ui/frontend/src/views/mysql/ha-cluster-list/components/List.vue b/dbm-ui/frontend/src/views/mysql/ha-cluster-list/components/List.vue index eddb25558b..44d3e29262 100644 --- a/dbm-ui/frontend/src/views/mysql/ha-cluster-list/components/List.vue +++ b/dbm-ui/frontend/src/views/mysql/ha-cluster-list/components/List.vue @@ -765,7 +765,7 @@ action-id="mysql_webconsole" resource={data.id} permission={data.permission.mysql_webconsole} - disabled={data.operationDisabled} + disabled={data.isOffline} text theme="primary" class="mr-8" diff --git a/dbm-ui/frontend/src/views/redis/list/components/list/Index.vue b/dbm-ui/frontend/src/views/redis/list/components/list/Index.vue index 842fa8afb6..f55fd3a098 100644 --- a/dbm-ui/frontend/src/views/redis/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/redis/list/components/list/Index.vue @@ -854,21 +854,17 @@ render: ({ data }: ColumnRenderData) => { const getOperations = (theme = 'primary') => { const baseOperations = [ - - handleGoWebconsole(data.id)}> - Webconsole - - , + handleGoWebconsole(data.id)}> + Webconsole + , {{ item.name }} - - - - - - diff --git a/dbm-ui/frontend/src/views/spider-manage/list/components/list/Index.vue b/dbm-ui/frontend/src/views/spider-manage/list/components/list/Index.vue index 91fc01f168..32af09a72d 100644 --- a/dbm-ui/frontend/src/views/spider-manage/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/spider-manage/list/components/list/Index.vue @@ -903,20 +903,18 @@ onClick={() => handleShowAuthorize([data])}> { t('授权') } , - - handleGoWebconsole(data.id)}> - Webconsole - - , + handleGoWebconsole(data.id)}> + Webconsole + ,