Skip to content

Commit

Permalink
fix(frontend): 临时密码修改实例选择时参数过滤错误 TencentBlueKing#6872
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 18170
  • Loading branch information
hLinx authored and iSecloud committed Sep 12, 2024
1 parent 90edeb8 commit c7c0266
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dbm-ui/frontend/src/components/instance-selector/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
import MysqlContent from './components/mysql/Index.vue';
import RedisContent from './components/redis/Index.vue';
import RenderRedisHost from './components/redis-host/Index.vue';
import SqlServerContent from './components/sql-server/Index.vue';
import SqlServerContent from './components/sqlserver/Index.vue';
import TendbClusterContent from './components/tendb-cluster/Index.vue';
import TendbClusterHostContent from './components/tendb-cluster-host/Index.vue';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@
},
) => {
selectClusterId.value = node.obj === 'cluster' ? node.payload.id : 0;
console.log('selectClusterId.value = ', selectClusterId.value);
const rawNode = treeRef.value.getData().data.find((item: { id: number }) => item.id === node.id);
if (!isOpen && !isSelected) {
treeRef.value.setNodeOpened(rawNode, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,7 @@
}, { immediate: true, deep: true });

watch(() => props.clusterId, () => {
setTimeout(() => {
fetchResources();
})
}, {
immediate: true,
});

const triggerChange = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
import SqlServerHaInstanceModel from '@services/model/sqlserver/sqlserver-ha-instance';
import SqlServerSingleInstanceModel from '@services/model/sqlserver/sqlserver-single-instance';
import { queryAdminPassword } from '@services/source/permission';
import { getSpiderInstanceList } from '@services/source/spider';
import { getTendbhaInstanceList } from '@services/source/tendbha';
import { clusterTypeInfos,ClusterTypes } from '@common/const';
Expand All @@ -63,31 +65,39 @@
`${instance.bk_cloud_id}:${instance.ip}:${instance.port}`;
const tabListConfig = {
[ClusterTypes.TENDBCLUSTER]: [
[ClusterTypes.TENDBHA]: [
{
name: 'TendbCluster',
id: 'tendbha',
name: t('Mysql 主从'),
tableConfig: {
getTableList: (params: ServiceParameters<typeof getTendbhaInstanceList>) => getTendbhaInstanceList({
...params,
role_exclude: 'proxy',
}),
firsrColumn: {
label: 'instance_address',
label: t('实例'),
field: 'instance_address',
role: '',
},
},
},
}
],
[ClusterTypes.TENDBHA]: [
[ClusterTypes.TENDBCLUSTER]: [
{
id: 'tendbha',
name: t('Mysql 主从'),
name: 'TendbCluster',
tableConfig: {
getTableList: (params: ServiceParameters<typeof getSpiderInstanceList>) => getSpiderInstanceList({
...params,
spider_ctl: true,
}),
firsrColumn: {
label: t('实例'),
field: 'instance_address',
role: '',
},
},
}
]
},
],
} as unknown as Record<ClusterTypes, PanelListType>;
Expand Down

0 comments on commit c7c0266

Please sign in to comment.