diff --git a/dbm-ui/frontend/src/components/apply-items/SpecSelector.vue b/dbm-ui/frontend/src/components/apply-items/SpecSelector.vue index b0dbbeb74c..1878e7a7ba 100644 --- a/dbm-ui/frontend/src/components/apply-items/SpecSelector.vue +++ b/dbm-ui/frontend/src/components/apply-items/SpecSelector.vue @@ -106,11 +106,13 @@ cloudId: number | string; showRefresh?: boolean; clearable?: boolean; + city?: string; } const props = withDefaults(defineProps(), { showRefresh: true, clearable: true, + city: undefined, }); const emits = defineEmits(); @@ -175,6 +177,7 @@ bk_biz_id: Number(props.bizId), bk_cloud_id: Number(props.cloudId), spec_ids: list.value.map((item) => item.spec_id), + city: props.city, }).then((data) => { list.value = list.value.map((item) => ({ ...item, @@ -185,7 +188,7 @@ }, 100); watch( - [() => props.bizId, () => props.cloudId, data], + [() => props.bizId, () => props.cloudId, () => props.city, data], () => { if ( typeof props.bizId === 'number' && diff --git a/dbm-ui/frontend/src/services/source/dbresourceResource.ts b/dbm-ui/frontend/src/services/source/dbresourceResource.ts index d0577dbf27..e5b52eb316 100644 --- a/dbm-ui/frontend/src/services/source/dbresourceResource.ts +++ b/dbm-ui/frontend/src/services/source/dbresourceResource.ts @@ -157,6 +157,7 @@ export function fetchResourceImportUrls() { */ export function getSpecResourceCount(params: { bk_biz_id: number; + city?: string; resource_type?: string; bk_cloud_id: number; spec_ids: number[]; diff --git a/dbm-ui/frontend/src/views/es-manage/apply/Index.vue b/dbm-ui/frontend/src/views/es-manage/apply/Index.vue index b0dfad5a7a..1749d81bf5 100644 --- a/dbm-ui/frontend/src/views/es-manage/apply/Index.vue +++ b/dbm-ui/frontend/src/views/es-manage/apply/Index.vue @@ -174,6 +174,7 @@ ref="specMasterRef" v-model="formData.details.resource_spec.master.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" cluster-type="es" machine-type="es_master" /> @@ -199,6 +200,7 @@ ref="specClientRef" v-model="formData.details.resource_spec.client.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" cluster-type="es" machine-type="es_client" /> @@ -233,6 +235,7 @@ ref="specHotRef" v-model="formData.details.resource_spec.hot.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" cluster-type="es" machine-type="es_datanode" /> @@ -257,6 +260,7 @@ ref="specColdRef" v-model="formData.details.resource_spec.cold.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" cluster-type="es" machine-type="es_datanode" /> @@ -331,17 +335,11 @@ import InfoBox from 'bkui-vue/lib/info-box'; import _ from 'lodash'; import { useI18n } from 'vue-i18n'; - import { - useRoute, - useRouter, - } from 'vue-router'; + import { useRoute, useRouter } from 'vue-router'; - import type { - BizItem, - HostDetails, - } from '@services/types'; + import type { BizItem, HostDetails } from '@services/types'; - import { useApplyBase } from '@hooks'; + import { useApplyBase } from '@hooks'; import { OSTypes } from '@common/const'; @@ -365,10 +363,14 @@ const router = useRouter(); const { t } = useI18n(); - const makeMapByHostId = (hostList: HostDetails[]) => hostList.reduce((result, item) => ({ - ...result, - [item.host_id]: true, - }), {} as Record); + const makeMapByHostId = (hostList: HostDetails[]) => + hostList.reduce( + (result, item) => ({ + ...result, + [item.host_id]: true, + }), + {} as Record, + ); const genDefaultFormData = () => ({ bk_biz_id: '' as number | '', @@ -411,11 +413,11 @@ }, }); - const formatIpDataWidthInstance = (data: HostDetails[]) => data.map(item => ({ - instance_num: 1, - ...item, - })); - + const formatIpDataWidthInstance = (data: HostDetails[]) => + data.map((item) => ({ + instance_num: 1, + ...item, + })); const formRef = ref(); const specMasterRef = ref(); @@ -437,19 +439,17 @@ const tipTheme = computed(() => { if (isClickSubmit.value === false) { return 'info'; - }; - - const { - hot, - cold, - } = formData.details.resource_spec; - - const { - hot: hotNodes, - cold: coldNodes, - } = formData.details.nodes; - const isPass = Boolean(hot.spec_id && hot.count) || Boolean(cold.spec_id && cold.count) || hotNodes.length > 0 || coldNodes.length > 0; - return (isPass ? 'info' : 'danger'); + } + + const { hot, cold } = formData.details.resource_spec; + + const { hot: hotNodes, cold: coldNodes } = formData.details.nodes; + const isPass = + Boolean(hot.spec_id && hot.count) || + Boolean(cold.spec_id && cold.count) || + hotNodes.length > 0 || + coldNodes.length > 0; + return isPass ? 'info' : 'danger'; }); // const isDefaultCity = computed(() => formData.details.city_code === 'default'); @@ -485,34 +485,31 @@ ], }; - watch([ - () => formData.details.resource_spec.hot, - () => formData.details.resource_spec.cold, - ], () => { - const hotCount = Number(formData.details.resource_spec.hot.count); - const coldCount = Number(formData.details.resource_spec.cold.count); - if (specHotRef.value && specColdRef.value) { - const { storage_spec: hotStorageSpec = [] } = specHotRef.value.getData(); - const { storage_spec: coldStorageSpec = [] } = specColdRef.value.getData(); - const hotDisk = hotStorageSpec.reduce((total: number, item: { size: number }) => ( - total + Number(item.size || 0) - ), 0); - const coldDisk = coldStorageSpec.reduce((total: number, item: { size: number }) => ( - total + Number(item.size || 0) - ), 0); - totalCapacity.value = hotDisk * hotCount + coldCount * coldDisk; - } - }, { flush: 'post', deep: true }); + watch( + [() => formData.details.resource_spec.hot, () => formData.details.resource_spec.cold], + () => { + const hotCount = Number(formData.details.resource_spec.hot.count); + const coldCount = Number(formData.details.resource_spec.cold.count); + if (specHotRef.value && specColdRef.value) { + const { storage_spec: hotStorageSpec = [] } = specHotRef.value.getData(); + const { storage_spec: coldStorageSpec = [] } = specColdRef.value.getData(); + const hotDisk = hotStorageSpec.reduce( + (total: number, item: { size: number }) => total + Number(item.size || 0), + 0, + ); + const coldDisk = coldStorageSpec.reduce( + (total: number, item: { size: number }) => total + Number(item.size || 0), + 0, + ); + totalCapacity.value = hotDisk * hotCount + coldCount * coldDisk; + } + }, + { flush: 'post', deep: true }, + ); const getSmartActionOffsetTarget = () => document.querySelector('.bk-form-content'); - const { - baseState, - bizState, - handleCreateAppAbbr, - handleCreateTicket, - handleCancel, - } = useApplyBase(); + const { baseState, bizState, handleCreateAppAbbr, handleCreateTicket, handleCancel } = useApplyBase(); // 切换业务,需要重置 IP 相关的选择 function handleChangeBiz(info: BizItem) { @@ -528,7 +525,7 @@ /** * 变更所属管控区域 */ - function handleChangeCloud(info: {id: number | string, name: string}) { + function handleChangeCloud(info: { id: number | string; name: string }) { cloudInfo.id = info.id; cloudInfo.name = info.name; @@ -610,7 +607,8 @@ }; // master 节点 IP 选择器提交 - const masterDisableDialogSubmitMethod = (hostList: Array) => (hostList.length >= 3 ? false : t('至少n台', { n: 3 })); + const masterDisableDialogSubmitMethod = (hostList: Array) => + hostList.length >= 3 ? false : t('至少n台', { n: 3 }); // 更新 master 节点 const handleMasterIpListChange = (data: HostDetails[]) => { formData.details.nodes.master = data; @@ -631,20 +629,21 @@ // 提交 const handleSubmit = () => { isClickSubmit.value = true; - formRef.value.validate() - .then(() => { - if (tipTheme.value === 'danger' && formData.details.ip_source === 'resource_pool') { - return Promise.reject(t('请确保冷节点和热节点的总数至少为一台')); - } - baseState.isSubmitting = true; + formRef.value.validate().then(() => { + if (tipTheme.value === 'danger' && formData.details.ip_source === 'resource_pool') { + return Promise.reject(t('请确保冷节点和热节点的总数至少为一台')); + } + baseState.isSubmitting = true; - const mapIpField = (ipList: Array) => ipList.map(item => ({ + const mapIpField = (ipList: Array) => + ipList.map((item) => ({ bk_host_id: item.host_id, ip: item.ip, bk_cloud_id: item.cloud_area.id, bk_biz_id: item.biz.id, })); - const mapIpFieldWithInstance = (ipList: Array) => ipList.map(item => ({ + const mapIpFieldWithInstance = (ipList: Array) => + ipList.map((item) => ({ bk_host_id: item.host_id, ip: item.ip, bk_cloud_id: item.cloud_area.id, @@ -652,82 +651,82 @@ bk_biz_id: item.biz.id, })); - const getDetails = () => { - const details: Record = _.cloneDeep(formData.details); - const { cityCode } = regionItemRef.value.getValue(); + const getDetails = () => { + const details: Record = _.cloneDeep(formData.details); + const { cityCode } = regionItemRef.value.getValue(); - if (formData.details.ip_source === 'resource_pool') { - delete details.nodes; + if (formData.details.ip_source === 'resource_pool') { + delete details.nodes; - const regionAndDisasterParams = { - affinity: details.disaster_tolerance_level, - location_spec: { - city: cityCode, - sub_zone_ids: [], - }, - }; - - const result: Record = { - ...details, - resource_spec: { - master: { - ...details.resource_spec.master, - ...specMasterRef.value.getData(), - ...regionAndDisasterParams, - count: Number(details.resource_spec.master.count), - }, - }, - }; - - const clientCount = Number(details.resource_spec.client.count); - const hotCount = Number(details.resource_spec.hot.count); - const coldCount = Number(details.resource_spec.cold.count); - if (clientCount > 0) { - result.resource_spec.client = { - ...details.resource_spec.client, - ...specClientRef.value.getData(), - ...regionAndDisasterParams, - count: clientCount, - }; - } - if (hotCount > 0) { - result.resource_spec.hot = { - ...details.resource_spec.hot, - ...specHotRef.value.getData(), - ...regionAndDisasterParams, - count: hotCount, - }; - } - if (coldCount > 0) { - result.resource_spec.cold = { - ...details.resource_spec.cold, - ...specColdRef.value.getData(), - ...regionAndDisasterParams, - count: coldCount, - }; - } - return result; - } + const regionAndDisasterParams = { + affinity: details.disaster_tolerance_level, + location_spec: { + city: cityCode, + sub_zone_ids: [], + }, + }; - delete details.resource_spec; - return { + const result: Record = { ...details, - nodes: { - master: mapIpField(formData.details.nodes.master), - client: mapIpField(formData.details.nodes.client), - hot: mapIpFieldWithInstance(formData.details.nodes.hot), - cold: mapIpFieldWithInstance(formData.details.nodes.cold), + resource_spec: { + master: { + ...details.resource_spec.master, + ...specMasterRef.value.getData(), + ...regionAndDisasterParams, + count: Number(details.resource_spec.master.count), + }, }, }; - }; - const params = { - ...formData, - details: getDetails(), + const clientCount = Number(details.resource_spec.client.count); + const hotCount = Number(details.resource_spec.hot.count); + const coldCount = Number(details.resource_spec.cold.count); + if (clientCount > 0) { + result.resource_spec.client = { + ...details.resource_spec.client, + ...specClientRef.value.getData(), + ...regionAndDisasterParams, + count: clientCount, + }; + } + if (hotCount > 0) { + result.resource_spec.hot = { + ...details.resource_spec.hot, + ...specHotRef.value.getData(), + ...regionAndDisasterParams, + count: hotCount, + }; + } + if (coldCount > 0) { + result.resource_spec.cold = { + ...details.resource_spec.cold, + ...specColdRef.value.getData(), + ...regionAndDisasterParams, + count: coldCount, + }; + } + return result; + } + + delete details.resource_spec; + return { + ...details, + nodes: { + master: mapIpField(formData.details.nodes.master), + client: mapIpField(formData.details.nodes.client), + hot: mapIpFieldWithInstance(formData.details.nodes.hot), + cold: mapIpFieldWithInstance(formData.details.nodes.cold), + }, }; - // 若业务没有英文名称则先创建业务英文名称再创建单据,否则直接创建单据 - bizState.hasEnglishName ? handleCreateTicket(params) : handleCreateAppAbbr(params); - }); + }; + + const params = { + ...formData, + details: getDetails(), + }; + // 若业务没有英文名称则先创建业务英文名称再创建单据,否则直接创建单据 + bizState.hasEnglishName ? handleCreateTicket(params) : handleCreateAppAbbr(params); + }); }; // 重置表单 diff --git a/dbm-ui/frontend/src/views/hdfs-manage/apply/Index.vue b/dbm-ui/frontend/src/views/hdfs-manage/apply/Index.vue index db74fd2f84..d9ccc430eb 100644 --- a/dbm-ui/frontend/src/views/hdfs-manage/apply/Index.vue +++ b/dbm-ui/frontend/src/views/hdfs-manage/apply/Index.vue @@ -201,6 +201,7 @@ ref="specNamenodeRef" v-model="formData.details.resource_spec.namenode.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" cluster-type="hdfs" machine-type="hdfs_master" /> @@ -229,6 +230,7 @@ ref="specZookeeperRef" v-model="formData.details.resource_spec.zookeeper.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" cluster-type="hdfs" machine-type="hdfs_master" /> @@ -266,6 +268,7 @@ ref="specDatanodeRef" v-model="formData.details.resource_spec.datanode.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" cluster-type="hdfs" machine-type="hdfs_datanode" /> diff --git a/dbm-ui/frontend/src/views/influxdb-manage/apply/index.vue b/dbm-ui/frontend/src/views/influxdb-manage/apply/index.vue index ab46bf1f55..4de2add52b 100644 --- a/dbm-ui/frontend/src/views/influxdb-manage/apply/index.vue +++ b/dbm-ui/frontend/src/views/influxdb-manage/apply/index.vue @@ -103,6 +103,7 @@ ref="specRef" v-model="formdata.details.resource_spec.influxdb.spec_id" :biz-id="formdata.bk_biz_id" + :city="formdata.details.city_code" :cloud-id="formdata.details.bk_cloud_id" cluster-type="influxdb" machine-type="influxdb" diff --git a/dbm-ui/frontend/src/views/kafka-manage/apply/Index.vue b/dbm-ui/frontend/src/views/kafka-manage/apply/Index.vue index f562bb7598..7f99f88c99 100644 --- a/dbm-ui/frontend/src/views/kafka-manage/apply/Index.vue +++ b/dbm-ui/frontend/src/views/kafka-manage/apply/Index.vue @@ -147,6 +147,7 @@ ref="specZookeeperRef" v-model="formData.details.resource_spec.zookeeper.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" cluster-type="kafka" machine-type="zookeeper" /> @@ -176,6 +177,7 @@ ref="specBrokerRef" v-model="formData.details.resource_spec.broker.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" cluster-type="kafka" machine-type="broker" /> diff --git a/dbm-ui/frontend/src/views/mongodb-manage/replica-set-apply/Index.vue b/dbm-ui/frontend/src/views/mongodb-manage/replica-set-apply/Index.vue index 696989051d..41b5f129eb 100644 --- a/dbm-ui/frontend/src/views/mongodb-manage/replica-set-apply/Index.vue +++ b/dbm-ui/frontend/src/views/mongodb-manage/replica-set-apply/Index.vue @@ -125,6 +125,7 @@ ref="specRef" v-model="formData.details.resource_spec.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" :cluster-type="ClusterTypes.MONGO_REPLICA_SET" :machine-type="MachineTypes.MONGODB" diff --git a/dbm-ui/frontend/src/views/mongodb-manage/shared-cluster-apply/Index.vue b/dbm-ui/frontend/src/views/mongodb-manage/shared-cluster-apply/Index.vue index 624c1a8572..d7716812a8 100644 --- a/dbm-ui/frontend/src/views/mongodb-manage/shared-cluster-apply/Index.vue +++ b/dbm-ui/frontend/src/views/mongodb-manage/shared-cluster-apply/Index.vue @@ -85,6 +85,7 @@ ref="mongoCofigSpecRef" v-model="formData.details.resource_spec.mongo_config.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" :cluster-type="ClusterTypes.MONGO_SHARED_CLUSTER" :machine-type="MachineTypes.MONGO_CONFIG" @@ -114,6 +115,7 @@ ref="mongosSpecRef" v-model="formData.details.resource_spec.mongos.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" :cluster-type="ClusterTypes.MONGO_SHARED_CLUSTER" :machine-type="MachineTypes.MONGOS" diff --git a/dbm-ui/frontend/src/views/mysql/apply/ApplyMySQL.vue b/dbm-ui/frontend/src/views/mysql/apply/ApplyMySQL.vue index bf272e6098..3e5dafea4a 100644 --- a/dbm-ui/frontend/src/views/mysql/apply/ApplyMySQL.vue +++ b/dbm-ui/frontend/src/views/mysql/apply/ApplyMySQL.vue @@ -281,6 +281,7 @@ ref="specSingleRef" v-model="formdata.details.resource_spec.single.spec_id" :biz-id="formdata.bk_biz_id" + :city="formdata.details.city_code" :cloud-id="formdata.details.bk_cloud_id" :cluster-type="ClusterTypes.TENDBSINGLE" machine-type="single" @@ -295,6 +296,7 @@ ref="specProxyRef" v-model="formdata.details.resource_spec.proxy.spec_id" :biz-id="formdata.bk_biz_id" + :city="formdata.details.city_code" :cloud-id="formdata.details.bk_cloud_id" :cluster-type="ClusterTypes.TENDBHA" machine-type="proxy" @@ -308,6 +310,7 @@ ref="specBackendRef" v-model="formdata.details.resource_spec.backend.spec_id" :biz-id="formdata.bk_biz_id" + :city="formdata.details.city_code" :cloud-id="formdata.details.bk_cloud_id" :cluster-type="ClusterTypes.TENDBHA" machine-type="backend" @@ -387,7 +390,7 @@ import { useApplyBase, useTicketCloneInfo } from '@hooks'; - import { ClusterTypes, mysqlType,type MysqlTypeString, TicketTypes } from '@common/const'; + import { ClusterTypes, mysqlType, type MysqlTypeString, TicketTypes } from '@common/const'; import { OSTypes } from '@common/const'; import { nameRegx } from '@common/regex'; @@ -473,7 +476,7 @@ // nodes, remark, startMysqlPort, - singleSpecId + singleSpecId, } = cloneData; formdata.details.resource_spec.backend.affinity = affinity; @@ -581,7 +584,10 @@ }); const hostNums = computed(() => { const { cluster_count: clusterCount, inst_num: instCount } = formdata.details; - if (clusterCount <= 0 || instCount <= 0) return 0; + + if (clusterCount <= 0 || instCount <= 0) { + return 0; + } const nums = Math.ceil(clusterCount / instCount); return isSingleType ? nums : nums * 2; }); @@ -638,16 +644,16 @@ proxy: (hostList: Array) => hostList.length !== hostNums.value ? t('xx共需n台', { - title: 'Proxy', - n: hostNums.value, - }) + title: 'Proxy', + n: hostNums.value, + }) : false, backend: (hostList: Array) => hostList.length !== hostNums.value ? t('xx共需n台', { - title: 'Master / Slave', - n: hostNums.value, - }) + title: 'Master / Slave', + n: hostNums.value, + }) : false, }; const makeMapByHostId = (hostList: HostDetails[]) => @@ -869,8 +875,8 @@ const moduleName = moduleInfo?.name ?? ''; const moduleNameQuery = moduleName ? { - module_name: moduleName, - } + module_name: moduleName, + } : {}; isBindModule.value = true; const url = router.resolve({ diff --git a/dbm-ui/frontend/src/views/pulsar-manage/apply/index.vue b/dbm-ui/frontend/src/views/pulsar-manage/apply/index.vue index e191a085eb..34e8c8becc 100644 --- a/dbm-ui/frontend/src/views/pulsar-manage/apply/index.vue +++ b/dbm-ui/frontend/src/views/pulsar-manage/apply/index.vue @@ -172,6 +172,7 @@ ref="specBookkeeperRef" v-model="formdata.details.resource_spec.bookkeeper.spec_id" :biz-id="formdata.bk_biz_id" + :city="formdata.details.city_code" :cloud-id="formdata.details.bk_cloud_id" cluster-type="pulsar" machine-type="pulsar_bookkeeper" @@ -201,6 +202,7 @@ ref="specZookeeperRef" v-model="formdata.details.resource_spec.zookeeper.spec_id" :biz-id="formdata.bk_biz_id" + :city="formdata.details.city_code" :cloud-id="formdata.details.bk_cloud_id" cluster-type="pulsar" machine-type="pulsar_zookeeper" @@ -232,6 +234,7 @@ ref="specBrokerRef" v-model="formdata.details.resource_spec.broker.spec_id" :biz-id="formdata.bk_biz_id" + :city="formdata.details.city_code" :cloud-id="formdata.details.bk_cloud_id" cluster-type="pulsar" machine-type="pulsar_broker" diff --git a/dbm-ui/frontend/src/views/redis/apply-ha/Index.vue b/dbm-ui/frontend/src/views/redis/apply-ha/Index.vue index 04e9de01d8..9141eebbfb 100644 --- a/dbm-ui/frontend/src/views/redis/apply-ha/Index.vue +++ b/dbm-ui/frontend/src/views/redis/apply-ha/Index.vue @@ -144,6 +144,7 @@ ref="specRef" v-model="formData.details.resource_spec.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" :cluster-type="ClusterTypes.REDIS_INSTANCE" :machine-type="MachineTypes.TENDISCACHE" diff --git a/dbm-ui/frontend/src/views/redis/apply/ApplyRedis.vue b/dbm-ui/frontend/src/views/redis/apply/ApplyRedis.vue index 2b0df0d1bf..acd344c8e0 100644 --- a/dbm-ui/frontend/src/views/redis/apply/ApplyRedis.vue +++ b/dbm-ui/frontend/src/views/redis/apply/ApplyRedis.vue @@ -269,6 +269,7 @@ ref="specProxyRef" v-model="state.formdata.details.resource_spec.proxy.spec_id" :biz-id="state.formdata.bk_biz_id" + :city="state.formdata.details.city_code" :cloud-id="state.formdata.details.bk_cloud_id" :cluster-type="typeInfos.cluster_type" :machine-type="typeInfos.machine_type" @@ -916,8 +917,8 @@ diff --git a/dbm-ui/frontend/src/views/riak-manage/apply/Index.vue b/dbm-ui/frontend/src/views/riak-manage/apply/Index.vue index 676d7cc17a..55fb356c2c 100644 --- a/dbm-ui/frontend/src/views/riak-manage/apply/Index.vue +++ b/dbm-ui/frontend/src/views/riak-manage/apply/Index.vue @@ -123,6 +123,7 @@ ref="specRef" v-model="formData.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" :cluster-type="ClusterTypes.RIAK" machine-type="riak" diff --git a/dbm-ui/frontend/src/views/spider-manage/apply/Index.vue b/dbm-ui/frontend/src/views/spider-manage/apply/Index.vue index 7f783e0b64..46d214a9f7 100644 --- a/dbm-ui/frontend/src/views/spider-manage/apply/Index.vue +++ b/dbm-ui/frontend/src/views/spider-manage/apply/Index.vue @@ -56,6 +56,7 @@ ref="specProxyRef" v-model="formdata.details.resource_spec.spider.spec_id" :biz-id="formdata.bk_biz_id" + :city="formdata.details.city_code" :cloud-id="formdata.details.bk_cloud_id" cluster-type="tendbcluster" machine-type="spider" /> diff --git a/dbm-ui/frontend/src/views/sqlserver-manage/apply/SqlServer.vue b/dbm-ui/frontend/src/views/sqlserver-manage/apply/SqlServer.vue index 2611004fda..42f166dfa7 100644 --- a/dbm-ui/frontend/src/views/sqlserver-manage/apply/SqlServer.vue +++ b/dbm-ui/frontend/src/views/sqlserver-manage/apply/SqlServer.vue @@ -217,6 +217,7 @@ ref="specBackendRef" v-model="formData.details.resource_spec.backend.spec_id" :biz-id="formData.bk_biz_id" + :city="formData.details.city_code" :cloud-id="formData.details.bk_cloud_id" :cluster-type="clusterType" :machine-type="clusterType"