2021-04-14 18:55:01 +08:00
|
|
|
<template>
|
|
|
|
|
<el-table
|
2021-04-16 15:02:40 +08:00
|
|
|
id="endpointTable"
|
2021-04-14 18:55:01 +08:00
|
|
|
ref="dataTable"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
:height="height"
|
|
|
|
|
border
|
|
|
|
|
@header-dragend="dragend"
|
|
|
|
|
@sort-change="tableDataSort"
|
2021-04-21 16:35:48 +08:00
|
|
|
@selection-change="selectionChange"
|
2021-05-25 15:37:33 +08:00
|
|
|
@row-dblclick="(row)=>{$emit('showBottomBox', 'panelTab', row)}"
|
2021-04-14 18:55:01 +08:00
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
|
:resizable="false"
|
|
|
|
|
align="center"
|
|
|
|
|
type="selection"
|
|
|
|
|
width="55">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
v-for="(item, index) in customTableTitle"
|
|
|
|
|
v-if="item.show"
|
|
|
|
|
:key="`col-${index}`"
|
|
|
|
|
:fixed="item.fixed"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:min-width="`${item.minWidth}`"
|
|
|
|
|
:prop="item.prop"
|
|
|
|
|
:resizable="true"
|
|
|
|
|
:sort-orders="['ascending', 'descending']"
|
2021-05-08 09:40:53 +08:00
|
|
|
:sortable="item.sortable"
|
2021-04-14 18:55:01 +08:00
|
|
|
:width="`${item.width}`"
|
|
|
|
|
class="data-column"
|
|
|
|
|
>
|
|
|
|
|
<template slot="header">
|
2021-05-25 17:58:38 +08:00
|
|
|
<span class="data-column__span">{{item.label}}</span>
|
2021-04-14 18:55:01 +08:00
|
|
|
<div class="col-resize-area"></div>
|
|
|
|
|
</template>
|
|
|
|
|
<template slot-scope="scope" :column="item">
|
|
|
|
|
<template v-if="item.prop === 'name'">
|
|
|
|
|
{{scope.row[item.prop]}}
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="item.prop === 'type'">
|
2021-04-16 17:36:00 +08:00
|
|
|
{{scope.row.module.type}}
|
2021-04-14 18:55:01 +08:00
|
|
|
</template>
|
|
|
|
|
<template v-else-if="item.prop === 'project'">
|
2021-08-10 09:30:12 +08:00
|
|
|
<span
|
|
|
|
|
class="pointer"
|
|
|
|
|
@mouseenter="labelHover(scope.row, item.prop, true, $event)"
|
|
|
|
|
@mouseleave="labelHover(scope.row, item.prop, false)"
|
|
|
|
|
>
|
|
|
|
|
{{scope.row[item.prop].name}}
|
|
|
|
|
</span>
|
|
|
|
|
<alertLabel
|
|
|
|
|
v-if="scope.row[item.prop] && scope.row[item.prop].loading"
|
|
|
|
|
:id="scope.row[item.prop].id"
|
|
|
|
|
:that="scope.row[item.prop]"
|
|
|
|
|
:type="'project'"
|
|
|
|
|
></alertLabel>
|
2021-04-14 18:55:01 +08:00
|
|
|
</template>
|
2021-04-16 17:36:00 +08:00
|
|
|
<template v-else-if="item.prop === 'module'">
|
2021-08-10 09:30:12 +08:00
|
|
|
<span
|
|
|
|
|
class="pointer"
|
|
|
|
|
@mouseenter="labelHover(scope.row, item.prop, true, $event)"
|
|
|
|
|
@mouseleave="labelHover(scope.row, item.prop, false)"
|
|
|
|
|
>
|
|
|
|
|
<i style="cursor: pointer" class="nz-icon nz-icon-overview-module monitorColor"/>
|
2021-04-16 17:36:00 +08:00
|
|
|
{{scope.row[item.prop].name}}
|
2021-08-10 09:30:12 +08:00
|
|
|
</span>
|
|
|
|
|
<alertLabel
|
|
|
|
|
v-if="scope.row[item.prop] && scope.row[item.prop].loading"
|
|
|
|
|
:id="scope.row[item.prop].id"
|
|
|
|
|
:that="scope.row[item.prop]"
|
|
|
|
|
:type="'module'"
|
|
|
|
|
></alertLabel>
|
2021-04-16 17:36:00 +08:00
|
|
|
</template>
|
|
|
|
|
<template v-else-if="item.prop === 'alerts'">
|
2021-04-21 16:35:48 +08:00
|
|
|
<span class="alert-num" @click="showBottomBox('endpointAlertMessage', scope.row)">
|
2021-05-08 18:08:32 +08:00
|
|
|
<i class="nz-icon nz-icon-overview-alert" :class="scope.row.alertNum>0?'colorEF7458':'color23BF9A'"/>
|
2021-04-21 16:35:48 +08:00
|
|
|
{{scope.row.alertNum}}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="item.prop === 'asset'">
|
2021-08-10 09:30:12 +08:00
|
|
|
<span
|
|
|
|
|
class="pointer"
|
|
|
|
|
@mouseenter="labelHover(scope.row, item.prop, true, $event)"
|
|
|
|
|
@mouseleave="labelHover(scope.row, item.prop, false)"
|
|
|
|
|
>
|
|
|
|
|
<i class="nz-icon nz-icon-overview-project monitorColor color23BF9A"></i>
|
2021-04-21 16:35:48 +08:00
|
|
|
{{scope.row.asset.name}}
|
2021-04-16 17:36:00 +08:00
|
|
|
</span>
|
2021-08-10 09:30:12 +08:00
|
|
|
<alertLabel
|
|
|
|
|
v-if="scope.row[item.prop] && scope.row[item.prop].loading"
|
|
|
|
|
:id="scope.row[item.prop].id"
|
|
|
|
|
:that="scope.row[item.prop]"
|
|
|
|
|
:type="'asset'"
|
|
|
|
|
></alertLabel>
|
2021-04-14 18:55:01 +08:00
|
|
|
</template>
|
2021-04-16 17:36:00 +08:00
|
|
|
<template v-else-if="item.prop === 'configs'">
|
2021-08-10 09:30:12 +08:00
|
|
|
<!-- <el-tooltip placement="left" effect="light" :popper-class="'endpointConfigsTips'" v-if="scope.row.configs[0].enable">-->
|
|
|
|
|
<!-- <span class="configs-endpoint metrics">{ Metrics }</span>-->
|
|
|
|
|
<!-- <div class="endpointConfigsTips" slot="content">-->
|
|
|
|
|
<!-- <span class="copy-value-content"> <i class="nz-icon nz-icon-override" @click="copyValue(scope.row.configs[0].config)"></i></span>-->
|
|
|
|
|
<!-- <pre >{{JSON.stringify(scope.row.configs[0].config,null,2)}}</pre>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </el-tooltip>-->
|
|
|
|
|
<!-- <el-tooltip placement="right" effect="light" :popper-class="'endpointConfigsTips'" v-if="scope.row.configs[1].enable">-->
|
|
|
|
|
<!-- <span class="configs-endpoint logs">{ Logs }</span>-->
|
|
|
|
|
<!-- <div class="endpointConfigsTips" slot="content">-->
|
|
|
|
|
<!-- <span class="copy-value-content"> <i class="nz-icon nz-icon-override" @click="copyValue(scope.row.configs[1].config)"></i></span>-->
|
|
|
|
|
<!-- <pre >{{JSON.stringify(scope.row.configs[1].config,null,2)}}</pre>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </el-tooltip>-->
|
|
|
|
|
|
|
|
|
|
<el-tooltip placement="left" effect="light" :popper-class="'endpointConfigsTips'" v-if="scope.row.configs[0].enable || scope.row.configs[1].enable">
|
|
|
|
|
<span class="configs-endpoint metrics">[{{scope.row.configs[0].enable ? 'Metrics':''}}{{scope.row.configs[0].enable&&scope.row.configs[1].enable?',':''}}{{scope.row.configs[1].enable ? 'logs' : ''}}]</span>
|
2021-08-05 14:50:29 +08:00
|
|
|
<div class="endpointConfigsTips" slot="content">
|
2021-08-10 09:30:12 +08:00
|
|
|
<span class="copy-value-content"> <i class="nz-icon nz-icon-override" @click="copyValue(clConfigs(scope.row))"></i></span>
|
|
|
|
|
<pre >{{JSON.stringify(clConfigs(scope.row),null,2)}}</pre>
|
2021-04-21 16:35:48 +08:00
|
|
|
</div>
|
2021-04-16 17:36:00 +08:00
|
|
|
</el-tooltip>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="item.prop === 'state'">
|
2021-08-24 15:11:34 +08:00
|
|
|
<el-popover placement="left" trigger="hover" width="100" :popper-class="''" :disabled="scope.row.configs[0].state<2">
|
|
|
|
|
<div>
|
|
|
|
|
<div v-html="suspendedStr(scope.row.configs[0].state)"></div>
|
2021-04-25 20:17:14 +08:00
|
|
|
</div>
|
2021-08-24 15:11:34 +08:00
|
|
|
<span slot="reference" style="width: auto">
|
|
|
|
|
<span class="endpoint-cell-left"><i class="nz-icon nz-icon-Metrics colorFA901C" /> {{$t('project.endpoint.metrics')}} </span>
|
2021-09-15 16:58:27 +08:00
|
|
|
<span v-if="scope.row.configs[0].state===0 || !scope.row.configs[0].state">
|
2021-08-24 15:11:34 +08:00
|
|
|
<span class="active-icon red-bg inline-block"></span>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else-if="scope.row.configs[0].state===1">
|
|
|
|
|
<span class="active-icon green-bg inline-block"></span>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else-if="scope.row.configs[0].state">
|
|
|
|
|
<span class="active-icon gray-bg inline-block"></span>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</el-popover>
|
|
|
|
|
<el-popover placement="right" trigger="hover" width="100" :popper-class="''" :disabled="scope.row.configs[1].state<2">
|
|
|
|
|
<div>
|
|
|
|
|
<div v-html="suspendedStr(scope.row.configs[1].state)"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<span slot="reference" style="width: auto">
|
|
|
|
|
<span class="endpoint-cell-left" style="margin-left: 10px"><i class="nz-icon nz-icon-logs colorFA901C" /> {{$t('project.endpoint.logs')}} </span>
|
2021-09-15 16:58:27 +08:00
|
|
|
<span v-if="scope.row.configs[1].state===0 || !scope.row.configs[1].state">
|
2021-08-24 15:11:34 +08:00
|
|
|
<span class="active-icon red-bg inline-block"></span>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else-if="scope.row.configs[1].state===1">
|
|
|
|
|
<span class="active-icon green-bg inline-block"></span>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else-if="scope.row.configs[1].state">
|
|
|
|
|
<span class="active-icon gray-bg inline-block"></span>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</el-popover>
|
2021-04-14 18:55:01 +08:00
|
|
|
</template>
|
2021-06-01 17:24:57 +08:00
|
|
|
<template v-else-if="item.prop === 'enabled'">
|
|
|
|
|
<span v-if="scope.row[item.prop] === 1">{{$t('project.endpoint.enable')}}</span>
|
|
|
|
|
<span v-else>{{$t('project.endpoint.disable')}}</span>
|
|
|
|
|
</template>
|
2021-04-14 18:55:01 +08:00
|
|
|
<span v-else>{{scope.row[item.prop] ? scope.row[item.prop] : ''}}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
:resizable="false"
|
|
|
|
|
:width="operationWidth"
|
2021-05-27 17:58:29 +08:00
|
|
|
v-if="showOption"
|
2021-04-14 18:55:01 +08:00
|
|
|
fixed="right">
|
|
|
|
|
<div slot="header" class="table-operation-title">{{$t('overall.option')}}</div>
|
|
|
|
|
<div slot-scope="scope" class="table-operation-items">
|
2021-06-25 14:09:18 +08:00
|
|
|
<button v-if="endpointTab" class="table-operation-item" v-has="'model_edit'" @click="$emit('edit', scope.row)"><i class="nz-icon nz-icon-edit"></i></button>
|
|
|
|
|
<button v-else class="table-operation-item" @click="$emit('showBottomBox', 'panelTab', scope.row)"><i class="nz-icon nz-icon-view1"></i></button>
|
2021-05-19 14:26:09 +08:00
|
|
|
<el-dropdown size="medium" v-has="['monitor_endpoint_edit','monitor_endpoint_delete']" trigger="hover" @command="tableOperation">
|
2021-04-14 18:55:01 +08:00
|
|
|
<div class="table-operation-item table-operation-item--more">
|
2021-05-27 13:53:42 +08:00
|
|
|
<i class="nz-icon nz-icon-more3"></i>
|
2021-04-14 18:55:01 +08:00
|
|
|
</div>
|
2021-09-26 11:56:36 +08:00
|
|
|
<el-dropdown-menu slot="dropdown" class="right-box-select-top right-box-dropdown-top">
|
2021-08-25 16:05:33 +08:00
|
|
|
<!-- <el-dropdown-item v-if="!endpointTab" :command="['endpointQuery', scope.row]"><i class="nz-icon nz-icon-search"></i><span class="operation-dropdown-text">{{$t('overall.query')}}</span></el-dropdown-item>-->
|
2021-06-25 14:09:18 +08:00
|
|
|
<el-dropdown-item v-if="!endpointTab" v-has="'monitor_endpoint_edit'" :command="['edit', scope.row]"><i class="nz-icon nz-icon-edit"></i><span class="operation-dropdown-text">{{$t('overall.edit')}}</span></el-dropdown-item>
|
2021-06-16 17:17:18 +08:00
|
|
|
<el-dropdown-item v-has="'monitor_endpoint_delete'" :command="['delete', scope.row, `sys/endpoint?ids=${scope.row.id}`]"><i class="nz-icon nz-icon-delete"></i><span class="operation-dropdown-text">{{$t('overall.delete')}}</span></el-dropdown-item>
|
2021-08-26 14:51:38 +08:00
|
|
|
<el-dropdown-item v-has="'monitor_endpoint_edit'" :command="['copy', scope.row, 'project']"><i class="nz-icon nz-icon-override"></i><span class="operation-dropdown-text">{{$t('overall.duplicate')}}</span></el-dropdown-item>
|
2021-06-01 14:26:09 +08:00
|
|
|
<el-dropdown-item v-has="'alertSilence_add'" :command="['fastSilence', scope.row, 'endpoint']"><i class="nz-icon nz-icon-fast-silence"></i><span class="operation-dropdown-text">{{$t('overall.silenceAlert')}}</span></el-dropdown-item>
|
2021-04-14 18:55:01 +08:00
|
|
|
</el-dropdown-menu>
|
|
|
|
|
</el-dropdown>
|
|
|
|
|
</div>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import table from '@/components/common/mixin/table'
|
2021-08-10 09:30:12 +08:00
|
|
|
import alertLabel from '../../alert/alertLabel'
|
2021-04-14 18:55:01 +08:00
|
|
|
export default {
|
2021-04-16 15:02:40 +08:00
|
|
|
name: 'endpointTable',
|
2021-08-10 09:30:12 +08:00
|
|
|
components: {
|
|
|
|
|
alertLabel
|
|
|
|
|
},
|
2021-04-14 18:55:01 +08:00
|
|
|
mixins: [table],
|
2021-05-27 17:58:29 +08:00
|
|
|
props: {
|
|
|
|
|
showOption: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: true
|
2021-06-25 14:09:18 +08:00
|
|
|
},
|
|
|
|
|
endpointTab: Boolean
|
2021-05-27 17:58:29 +08:00
|
|
|
},
|
2021-04-14 18:55:01 +08:00
|
|
|
data () {
|
|
|
|
|
return {
|
|
|
|
|
tableTitle: [ // 原始table列
|
|
|
|
|
{
|
|
|
|
|
label: 'ID',
|
|
|
|
|
prop: 'id',
|
|
|
|
|
show: true,
|
2021-05-08 09:40:53 +08:00
|
|
|
width: 80,
|
2021-05-13 11:40:22 +08:00
|
|
|
sortable: 'custom'
|
2021-04-14 18:55:01 +08:00
|
|
|
}, {
|
2021-04-16 17:36:00 +08:00
|
|
|
label: this.$t('project.endpoint.name'),
|
2021-04-14 18:55:01 +08:00
|
|
|
prop: 'name',
|
2021-05-08 09:40:53 +08:00
|
|
|
show: true,
|
2021-07-22 10:00:29 +08:00
|
|
|
minWidth: 200,
|
2021-05-13 11:40:22 +08:00
|
|
|
sortable: 'custom'
|
2021-04-14 18:55:01 +08:00
|
|
|
}, {
|
2021-05-13 10:06:03 +08:00
|
|
|
label: this.$t('project.project.projectName'),
|
2021-04-14 18:55:01 +08:00
|
|
|
prop: 'project',
|
2021-05-08 09:40:53 +08:00
|
|
|
show: true,
|
2021-07-23 10:53:54 +08:00
|
|
|
minWidth: 100,
|
2021-05-13 10:06:03 +08:00
|
|
|
sortable: 'custom'
|
2021-04-14 18:55:01 +08:00
|
|
|
},
|
2021-04-21 16:35:48 +08:00
|
|
|
{
|
|
|
|
|
label: this.$t('project.endpoint.asset'),
|
|
|
|
|
prop: 'asset',
|
2021-05-08 09:40:53 +08:00
|
|
|
show: true,
|
2021-07-23 10:53:54 +08:00
|
|
|
minWidth: 90,
|
2021-05-13 11:40:22 +08:00
|
|
|
sortable: 'custom'
|
2021-04-21 16:35:48 +08:00
|
|
|
},
|
2021-04-14 18:55:01 +08:00
|
|
|
{
|
2021-04-16 17:36:00 +08:00
|
|
|
label: this.$t('project.module.module'),
|
|
|
|
|
prop: 'module',
|
|
|
|
|
show: true
|
2021-04-14 18:55:01 +08:00
|
|
|
},
|
|
|
|
|
{
|
2021-04-16 17:36:00 +08:00
|
|
|
label: this.$t('project.endpoint.configs'),
|
|
|
|
|
prop: 'configs',
|
2021-09-13 15:07:14 +08:00
|
|
|
minWidth: 150,
|
2021-04-21 16:35:48 +08:00
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: this.$t('project.endpoint.alerts'),
|
|
|
|
|
prop: 'alerts',
|
2021-05-08 09:40:53 +08:00
|
|
|
show: true,
|
2021-09-13 15:07:14 +08:00
|
|
|
minWidth: 150,
|
2021-05-13 11:40:22 +08:00
|
|
|
sortable: 'custom'
|
2021-04-16 17:36:00 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: this.$t('project.endpoint.state'),
|
|
|
|
|
prop: 'state',
|
2021-05-08 09:40:53 +08:00
|
|
|
show: true,
|
2021-08-24 15:11:34 +08:00
|
|
|
minWidth: 200,
|
2021-05-13 11:40:22 +08:00
|
|
|
sortable: 'custom'
|
2021-04-14 18:55:01 +08:00
|
|
|
}
|
2021-06-01 17:24:57 +08:00
|
|
|
// {
|
|
|
|
|
// label: this.$t('project.endpoint.status'),
|
|
|
|
|
// prop: 'enabled',
|
|
|
|
|
// show: false
|
|
|
|
|
// }
|
2021-04-14 18:55:01 +08:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2021-08-10 09:30:12 +08:00
|
|
|
copyValue (item) {
|
2021-08-24 09:56:04 +08:00
|
|
|
const str = item
|
2021-04-21 16:35:48 +08:00
|
|
|
const domUrl = document.createElement('input')
|
2021-08-05 14:50:29 +08:00
|
|
|
domUrl.value = JSON.stringify(str)
|
2021-04-21 16:35:48 +08:00
|
|
|
domUrl.id = 'creatDom'
|
|
|
|
|
document.body.appendChild(domUrl)
|
|
|
|
|
domUrl.select() // 选择对象
|
|
|
|
|
document.execCommand('Copy') // 执行浏览器复制命令
|
|
|
|
|
const creatDom = document.getElementById('creatDom')
|
|
|
|
|
creatDom.parentNode.removeChild(creatDom)
|
|
|
|
|
this.$message.success(this.$t('overall.copySuccess'))
|
2021-04-25 20:17:14 +08:00
|
|
|
},
|
|
|
|
|
suspendedStr (status) { // 10进制转为2进制 分别给对应的状态
|
2021-04-27 19:24:26 +08:00
|
|
|
if (!status || status === 1 || status == 0) { return '' }
|
2021-04-25 20:17:14 +08:00
|
|
|
const arr = status.toString(2).split('')
|
2021-06-01 17:24:57 +08:00
|
|
|
while (arr.length < 4) {
|
2021-04-25 20:17:14 +08:00
|
|
|
arr.unshift('0')
|
|
|
|
|
}
|
|
|
|
|
arr.pop()
|
|
|
|
|
let str = ''
|
|
|
|
|
arr.forEach((item, index) => {
|
|
|
|
|
if (index === 0) {
|
2021-06-21 17:44:28 +08:00
|
|
|
str += `<div><div class="active-icon inline-block ${item == '0' ? 'gray-bg' : 'green-bg'}"></div> DC</div>`
|
2021-04-25 20:17:14 +08:00
|
|
|
}
|
|
|
|
|
if (index === 1) {
|
2021-06-21 17:44:28 +08:00
|
|
|
str += `<div><div class="active-icon inline-block ${item == '0' ? 'gray-bg' : 'green-bg'}"></div> ASSET</div>`
|
2021-04-25 20:17:14 +08:00
|
|
|
}
|
|
|
|
|
if (index === 2) {
|
2021-06-21 17:44:28 +08:00
|
|
|
str += `<div><div class="active-icon inline-block ${item == '0' ? 'gray-bg' : 'green-bg'}"></div> ENDPOINT</div>`
|
2021-04-25 20:17:14 +08:00
|
|
|
}
|
2021-06-01 17:24:57 +08:00
|
|
|
// if (index === 3) {
|
|
|
|
|
// str += `<div>PROMETHEUS <div class="active-icon inline-block ${item == '0' ? 'red-bg' : 'green-bg'}"></div></div>`
|
|
|
|
|
// }
|
2021-04-25 20:17:14 +08:00
|
|
|
})
|
|
|
|
|
return str
|
2021-08-10 09:30:12 +08:00
|
|
|
},
|
|
|
|
|
// label 鼠标划入
|
|
|
|
|
labelHover (item, type, loading, e) {
|
|
|
|
|
if (e) {
|
|
|
|
|
const dom = e.currentTarget
|
|
|
|
|
const position = dom.getBoundingClientRect()
|
|
|
|
|
this.$set(item[type], 'position', position)
|
|
|
|
|
}
|
|
|
|
|
this.$set(item[type], 'loading', loading)
|
|
|
|
|
// this.$set(this.tableData,index,item);// 调用父组件
|
|
|
|
|
},
|
|
|
|
|
clConfigs (item) {
|
|
|
|
|
const str = []
|
|
|
|
|
if (item.configs[0].enable) {
|
|
|
|
|
str.push(item.configs[0])
|
|
|
|
|
}
|
|
|
|
|
if (item.configs[1].enable) {
|
|
|
|
|
str.push(item.configs[1])
|
|
|
|
|
}
|
|
|
|
|
return str
|
2021-04-21 16:35:48 +08:00
|
|
|
}
|
2021-04-14 18:55:01 +08:00
|
|
|
},
|
2021-04-16 15:02:40 +08:00
|
|
|
computed: {}
|
2021-04-14 18:55:01 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
2021-04-16 17:36:00 +08:00
|
|
|
<style scoped>
|
|
|
|
|
.endpoint-num{
|
|
|
|
|
padding: 0 3px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
}
|
|
|
|
|
.bagEF7458{
|
|
|
|
|
background: #EF7458;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
.bag23BF9A{
|
|
|
|
|
background: #23BF9A;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
.configs-endpoint{
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
padding: 2px 7px;
|
2021-04-21 16:35:48 +08:00
|
|
|
color: #3C92F1;
|
|
|
|
|
}
|
2021-08-05 14:50:29 +08:00
|
|
|
.configs-endpoint.metrics{
|
|
|
|
|
color: #3C92F1;
|
|
|
|
|
}
|
|
|
|
|
.configs-endpoint.logs{
|
|
|
|
|
color: #25BF9A;
|
|
|
|
|
}
|
2021-04-21 16:35:48 +08:00
|
|
|
.colorEF7458{
|
|
|
|
|
color: #EF7458;
|
|
|
|
|
}
|
|
|
|
|
.color23BF9A{
|
|
|
|
|
color: #23BF9A;
|
|
|
|
|
}
|
|
|
|
|
.endpoint-num, .alert-num{
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
2021-04-25 20:17:14 +08:00
|
|
|
.inline-block{
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
2021-08-10 09:30:12 +08:00
|
|
|
.pointer{
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
.state-box{
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
border: 1px solid #E7EAED;
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
}
|
|
|
|
|
.state-box-content{
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
width: 50%;
|
|
|
|
|
border-bottom: 1px solid #E7EAED;
|
|
|
|
|
}
|
|
|
|
|
.state-box-content:nth-of-type(odd){
|
|
|
|
|
border-right: 1px solid #E7EAED;
|
|
|
|
|
}
|
|
|
|
|
.state-content-text{
|
|
|
|
|
width:64px;text-align:left;margin-right: 5px;display: inline-block
|
|
|
|
|
}
|
2021-08-24 15:11:34 +08:00
|
|
|
.colorFA901C{
|
|
|
|
|
color: #fa901c;
|
|
|
|
|
}
|
|
|
|
|
.endpoint-cell-left{
|
|
|
|
|
/*display: inline-block;*/
|
|
|
|
|
/*width: 70px;*/
|
2021-08-24 17:22:09 +08:00
|
|
|
margin-right: 5px;
|
2021-08-24 15:11:34 +08:00
|
|
|
}
|
2021-04-21 16:35:48 +08:00
|
|
|
</style>
|
|
|
|
|
<style>
|
|
|
|
|
.endpointConfigsTips{
|
|
|
|
|
height: 200px;
|
|
|
|
|
overflow-y: auto;
|
2021-04-21 18:54:15 +08:00
|
|
|
overflow-x: hidden;
|
2021-04-21 16:35:48 +08:00
|
|
|
}
|
|
|
|
|
.copy-value-content{
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 1px;
|
|
|
|
|
top: 4px;
|
2021-04-16 17:36:00 +08:00
|
|
|
}
|
|
|
|
|
</style>
|