mirror of https://github.com/apache/cloudstack.git
CKS: Fix port numbers displayed against ETCD nodes
This commit is contained in:
parent
7483da21f2
commit
5a11451ce3
|
|
@ -115,7 +115,7 @@
|
|||
</template>
|
||||
<template v-if="column.key === 'port'" :name="text" :record="record">
|
||||
<span v-if="record.isexternalnode || (!record.isexternalnode && !record.isetcdnode)"> {{ cksSshStartingPort + index }} </span>
|
||||
<span v-else> {{ etcdSshPort }} </span>
|
||||
<span v-else> {{ parseInt(etcdSshPort) + parseInt(getEtcdIndex(record.name)) }} </span>
|
||||
</template>
|
||||
<template v-if="column.key === 'actions'">
|
||||
<a-tooltip placement="bottom" >
|
||||
|
|
@ -490,6 +490,14 @@ export default {
|
|||
}).finally(() => {
|
||||
this.parentFetchData()
|
||||
})
|
||||
},
|
||||
getEtcdIndex (name) {
|
||||
const lastIndex = name.lastIndexOf('-')
|
||||
if (lastIndex > 0) {
|
||||
return name.charAt(lastIndex - 1)
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue