Commit 031ea9de authored by 智勇's avatar 智勇

rabbitmq 增加link-type

parent d0680f82
...@@ -36,9 +36,15 @@ ...@@ -36,9 +36,15 @@
:index="indexMethod" :index="indexMethod"
type="index"/> type="index"/>
<el-table-column <el-table-column
prop="serviceName" v-if="serviceName!=='rabbitmq'"
label="服务名" label="服务名">
/> <template slot-scope="scope">
<span v-if="scope.row.serviceName !== 'rabbitmq'">{{ scope.row.serviceName }}</span>
<span v-if="scope.row.serviceName === 'rabbitmq'" class="link-type" @click="openRabbitmq(scope.row)">{{ scope.row.serviceName }}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
prop="lanIp" prop="lanIp"
label="ip地址" label="ip地址"
...@@ -48,7 +54,7 @@ ...@@ -48,7 +54,7 @@
label="服务端口" label="服务端口"
width="300px"> width="300px">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="item in scope.row.portMappings" :key="item.port" class="port">{{ item.nodePort }} -> {{ item.port }}</span> <span v-for="item in scope.row.portMappings" :key="item.port" >{{ item.nodePort }}->{{ item.port }} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -458,6 +464,11 @@ export default { ...@@ -458,6 +464,11 @@ export default {
// window.open(`http://${url}/`, '_blank') // window.open(`http://${url}/`, '_blank')
// }) // })
}, },
openRabbitmq(data) {
console.log(data)
const port = data.portMappings.filter(item => item.port === 15672)[0].nodePort
window.open(`http://${data.lanIp}:${port}/`, '_blank')
},
getServiceDetails(value) { getServiceDetails(value) {
fetchServiceDetails({ serviceName: value.serviceName, namespace: this.namespace }).then(res => { fetchServiceDetails({ serviceName: value.serviceName, namespace: this.namespace }).then(res => {
this.centerDialogVisible = true this.centerDialogVisible = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment