Skip to content

Commit

Permalink
bugfix: 安装通道主机状态展示异常(closed #1351)
Browse files Browse the repository at this point in the history
  • Loading branch information
GONGONGONG authored and ZhuoZhuoCrayon committed Apr 25, 2023
1 parent 6117bfe commit af38d43
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import GapTab from './GapTab.vue';
import pollMixin from '@/common/poll-mixin';
import routerBackMixin from '@/common/router-back-mixin';
import { IProxyDetail } from '@/types/cloud/cloud';
import { regIPv6 } from '@/common/regexp';
@Component({
name: 'CloudManagerDetail',
Expand Down Expand Up @@ -159,7 +160,7 @@ export default class CloudManagerDetail extends Mixins(pollMixin, routerBackMixi
pagesize: 50,
page: 1,
conditions: [
{ key: 'inner_ip', value: Array.from(new Set(ips)) },
{ key: 'ip', value: Array.from(new Set(ips)) },
{ key: 'bk_cloud_id', value: [this.navActiveId] },
],
extra_data: ['job_result', 'identity_info'],
Expand All @@ -168,7 +169,8 @@ export default class CloudManagerDetail extends Mixins(pollMixin, routerBackMixi
if (list.length) {
this.channelList.forEach((item) => {
const { bk_cloud_id: cloudId, jump_servers: [jumpServers] = [''] } = item;
const host = list.find((host: Dictionary) => host.bk_cloud_id === cloudId && host.inner_ip === jumpServers);
const key = this.$DHCP && regIPv6.test(jumpServers) ? 'inner_ipv6' : 'inner_ip';
const host = list.find((host: Dictionary) => host.bk_cloud_id === cloudId && host[key] === jumpServers);
if (host) {
item.status = host.status;
}
Expand Down

0 comments on commit af38d43

Please sign in to comment.