This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nezha-nezha-fronted/nezha-fronted/src/components/common/rightBox/moduleBox.vue

743 lines
28 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="right-box right-box-module" v-clickoutside="{obj:editModule,func:clickOutside}">
<!-- begin--顶部按钮-->
<div class="right-box-top-btns right-box-form-delete">
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="module-del" type="button" v-has="'project_module_delete'" v-if="editModule.id">
<span class="right-box-top-btn-icon"><i class="nz-icon nz-icon-delete"></i></span>
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
</button>
</div>
<!-- end--顶部按钮-->
<!-- begin--标题-->
<div class="right-box-title">{{editModule.id ? $t("project.module.editModule") + " ID" + editModule.id : $t("project.module.createModule")}}</div>
<!-- end--标题-->
<!-- begin--表单-->
<div class="right-box-form-box" ref="scrollbar">
<el-form class="right-box-form right-box-form-left" :model="editModule" label-position = "top" label-width="120px" :rules="rules" ref="moduleForm">
<!--name-->
<el-form-item :label='$t("project.module.moduleName")' prop="name" label-width="125px">
<el-input placeholder="" maxlength="64" show-word-limit v-model="editModule.name" size="small" id="module-box-input-name"></el-input>
</el-form-item>
<!--project-->
<el-form-item :label='$t("project.project.project")' prop="projectId">
<el-select value-key="id" popper-class="config-dropdown" v-model="editModule.projectId" placeholder="" size="small" id="module-box-input-project">
<el-option :id="'module-project-'+item.id" v-for="item in projectList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<!--remark-->
<el-form-item :label='$t("project.module.description")' prop="remark">
<el-input
type="textarea"
placeholder=""
maxlength="1024"
v-model="editModule.remark"
size="small"
:autosize="{ minRows: 1, maxRows: 6}"
class="not-fixed-height no-resize"
id="module-box-input-remark"></el-input>
</el-form-item>
<!--type-->
<el-form-item :label='$t("project.endpoint.type")' prop="type">
<el-select value-key="id" popper-class="config-dropdown" v-model="editModule.type" placeholder="" size="small" id="module-box-input-type" :disabled="!!editModule.id" @change="changeAuthType">
<el-option :id="'module-type-'+item.id" v-for="item in typetList" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<!-- snmp表单 -->
<span class="snmp-form" v-if="editModule.type && editModule.type == 'snmp'">
<div class="right-box-sub-title">SNMP settings
</div>
<div class="right-box-line"></div>
<el-row>
<el-col :span="6">
<div class="sub-label sub-label-required">{{$t('project.module.walk')}}</div>
</el-col>
<el-col :span="24">
<el-form-item prop="walk">
<select-walk ref="selectWalk" :walkData="walkData" :expandedWalk="expandedWalkData" :placement="'bottom-start'" @selectWalk="selectWalk" :currentWalk="editModule.walk">
<template v-slot:trigger>
<div class="el-cascader">
<div class="el-input">
<input type="text" readonly="readonly" autocomplete="off" class="el-input__inner" aria-expanded="false">
</div>
<div class="el-cascader__tags">
<div ref="walkScrollbar" style="height: 100%; overflow: auto;">
<span v-for="(item, index) in editModule.walk" :key="index" class="el-tag el-tag--info el-tag--small el-tag--light">
<span v-html="mibName(item)"></span>
<div class="walk-close-box" @click.stop="removeWalk(item)">
<i class="el-tag__close nz-icon nz-icon-close walk-close"></i>
</div>
</span>
</div>
</div>
</div>
</template>
</select-walk>
</el-form-item>
</el-col>
</el-row>
<!--credentials-->
<el-form-item :label='$t("project.endpoint.credentials")' prop="credentials">
<el-select value-key="id" popper-class="config-dropdown" v-model="editModule.configs.snmpCredentialsId" placeholder="" size="small" id="module-box-input-credentials">
<el-option :id="'module-type-'+item.id" v-for="item in credentialList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</span>
<!--Enpoint template-->
<div class="right-box-sub-title">Enpoint template
<el-tooltip placement="top" effect="light">
<div slot="content">
{{$t('project.module.tip.defaultEndpointSet')}}
<div></div>
{{$t('project.module.tip.relation')}}
</div>
<i class="nz-icon nz-icon-info-normal"></i>
</el-tooltip>
</div>
<div class="right-box-line"></div>
<el-tabs v-model="activeName">
<el-tab-pane label="Basic" name="Basic">
<!--path-->
<el-form-item :label='$t("project.endpoint.path")' prop="configs.metrics_path" class="half-form-item">
<el-input placeholder="" v-model="editModule.configs.metrics_path" size="small" id="module-box-input-path"></el-input>
</el-form-item>
<!--port-->
<el-form-item :label='$t("project.endpoint.port")' prop="port" class="half-form-item">
<el-input placeholder="" v-model.number="editModule.port" size="small" id="module-box-input-port"></el-input>
</el-form-item>
<!--name pattern-->
<el-form-item :label='$t("project.endpoint.pattern")' prop="pattern" class="half-form-item">
<!-- <el-input placeholder="" v-model=""></el-input>-->
<el-autocomplete
class="inline-input"
size="small"
id="module-box-input-pattern"
v-model="editModule.endpointNameTmpl"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
></el-autocomplete>
</el-form-item>
<!--host-->
<el-form-item :label='$t("project.endpoint.host")' prop="host" class="half-form-item">
<el-input placeholder="" v-model.number="editModule.configs.host" size="small" id="module-box-input-host"></el-input>
</el-form-item>
<transition name="el-zoom-in-top">
<div v-show="showAllBasicOption" >
<!--scrape_interval-->
<el-form-item :label='$t("project.endpoint.scrape_interval")' prop="scrape_interval" class="half-form-item">
<el-input :placeholder='$t("project.endpoint.scrape_interval_placeholder")' v-model.number="editModule.configs.scrape_interval" size="small" id="module-box-input-scrape_interval"></el-input>
</el-form-item>
<!--scrape_timeout-->
<el-form-item :label='$t("project.endpoint.scrape_timeout")' prop="scrape_timeout" class="half-form-item">
<el-input :placeholder='$t("project.endpoint.scrape_timeout_placeholder")' v-model.number="editModule.configs.scrape_timeout" size="small" id="module-box-input-scrape_timeout"></el-input>
</el-form-item>
</div>
</transition>
<div style="text-align: center"><i class="nz-icon nz-icon-drop-down need-rotate" :class="showAllBasicOption?'is-active':''" @click="showAllBasicOption=!showAllBasicOption"></i></div>
</el-tab-pane>
<el-tab-pane label="Labels" name="Labels">
<el-form-item :label="$t('project.endpoint.labels')" class="right-box-form-param label-position">
<div style="text-align: right;margin-bottom: 5px">
<button style="display: none;">第一个button会出现意料之外的hover样式找不到原因只好加个不可见的button规避问题</button>
<!--<button id="module-clear-all" type="button" @click="clearAllParam" class="nz-btn nz-btn-size-normal nz-btn-style-light">-->
<!--<span><i class="nz-icon nz-icon-delete"></i></span>-->
<!--</button>-->
<span id="module-add-label" type="button" @click="addLabel" class="right-box-form-add">
<span><i style="font-size: 16px;" class="nz-icon nz-icon-create-square"></i></span>
</span>
</div>
<div class="param-box param-box-module">
<div ref="labelBoxScrollbar" style="height: 100%; overflow: auto;" id="module-box-labels">
<div v-for="(item, index) in editModule.configs.labelModule" :key="index" class="param-box-row">
<el-form-item class="param-box-row-key" :rules="[{required: true, message: $t('validate.required'), trigger: 'blur'},{ pattern: /[a-zA-Z_:][a-zA-Z0-9_:]*/, message: $t('validate.key') ,trigger: 'blur'}]" :prop="'labelModule.' + index + '.key'">
<el-input placeholder="key" size="mini" v-model="item.key"></el-input>
</el-form-item>
<span class="param-box-row-eq">=</span>
<el-form-item class="param-box-row-value" :rules="{required: true, message: $t('validate.required'), trigger: 'blur'}" :prop="'labelModule.' + index + '.value'">
<el-input placeholder="value" size="mini" v-model="item.value"></el-input>
</el-form-item>
<span class="param-box-row-symbol" :id="'moduel-remove-label-'+index" @click="removeLabel(index)"><i class="nz-icon nz-icon-shanchu1" style="color:#666;"></i></span>
</div>
</div>
</div>
</el-form-item>
</el-tab-pane>
<el-tab-pane label="Parameter" name="Parameter">
<el-form-item :label="$t('project.endpoint.param')" class="right-box-form-param label-position">
<div style="text-align: right;margin-bottom: 5px">
<button style="display: none;">第一个button会出现意料之外的hover样式找不到原因只好加个不可见的button规避问题</button>
<!--<button id="module-clear-all" type="button" @click="clearAllParam" class="nz-btn nz-btn-size-normal nz-btn-style-light">-->
<!--<span><i class="nz-icon nz-icon-delete"></i></span>-->
<!--</button>-->
<span id="module-add-param" type="button" @click="addParam" class="right-box-form-add">
<span><i style="font-size: 16px;" class="nz-icon nz-icon-create-square"></i></span>
</span>
</div>
<div class="param-box param-box-module">
<div style="height: 100%; overflow: auto;" id="module-box-params">
<div v-for="(item, index) in editModule.configs.paramObj" :key="index" class="param-box-row">
<el-form-item class="param-box-row-key" :rules="{required: true, message: $t('validate.required'), trigger: 'blur'}" :prop="'paramObj.' + index + '.key'">
<el-input placeholder="key" size="mini" v-model="item.key" ></el-input>
</el-form-item>
<span class="param-box-row-eq">=</span>
<el-form-item class="param-box-row-value" :rules="{required: true, message: $t('validate.required'), trigger: 'blur'}" :prop="'paramObj.' + index + '.value'">
<el-input placeholder="value" size="mini" v-model="item.value"></el-input>
</el-form-item>
<span class="param-box-row-symbol" :id="'moduel-remove-param-'+index" @click="removeParam(index)"><i class="nz-icon nz-icon-shanchu1" style="color:#666;"></i></span>
</div>
</div>
</div>
</el-form-item>
</el-tab-pane>
<el-tab-pane label="Auth" name="Auth" v-if="editModule.type !== 'snmp'">
<!--authtype-->
<el-form-item :label='$t("project.endpoint.type")' prop="authtype">
<el-select @change="changeAuthType" value-key="id" popper-class="config-dropdown" v-model="authType" placeholder="" size="small" id="module-box-input-auth-type">
<el-option :id="'module-type-'+item.id" v-for="item in authTypeList" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<!--authtype 1-->
<el-form-item :label='$t("project.endpoint.username")' prop="authtype" v-if="authType === 1" class="half-form-item">
<el-input placeholder='' v-model.number="editModule.configs.basic_auth.username" size="small" id="module-box-input-uername"></el-input>
</el-form-item>
<el-form-item :label='$t("project.endpoint.password")' prop="authtype" v-if="authType === 1" class="half-form-item">
<el-input placeholder='' v-model.number="editModule.configs.basic_auth.password" size="small" id="module-box-input-password"></el-input>
</el-form-item>
<!--authtype 2-->
<el-form-item :label='$t("project.endpoint.bearer_token")' prop="authtype" v-if="authType === 2">
<el-input placeholder='' v-model.number="editModule.configs.bearer_token" size="small" id="module-box-input-bearer_token"></el-input>
</el-form-item>
</el-tab-pane>
</el-tabs>
<div>
asd
</div>
<div class="right-box-form-tip" :style="{'margin-bottom': '15px','margin-left':editModule.type.toLowerCase()=='snmp'?'15px':'0'}">
</div>
</el-form>
</div>
<!--底部按钮-->
<div class="right-box-bottom-btns">
<button v-cancel="{obj:editModule,func:esc}" id="module-box-esc" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new">
<span>{{$t('overall.cancel')}}</span>
</button>
<button :class="{'nz-btn-disabled':prevent_opt.save}" :disabled="prevent_opt.save" @click="save" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" id="module-box-save">
<span>{{$t('overall.save')}}</span>
</button>
</div>
</div>
</template>
<script>
import { noSpecialChar, port, nzNumber } from '../js/validate'
import selectWalk from '../popBox/selectWalk'
export default {
name: 'moduleBox',
props: {
module: Object,
currentProject: Object
},
components: {
'select-walk': selectWalk
},
data () {
return {
walkData: [],
activeName: 'Basic',
expandedWalkData: [],
radio: 'password',
editModule: {},
restaurants: [
{ value: '{{module.name}}-{{asset.name}}' },
{ value: '{{module.name}}-{{asset.manageIp}}' }
],
showAllBasicOption: false,
rules: {
name: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
{ validator: noSpecialChar, trigger: 'change' }
],
projectId: [
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
],
walk: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
port: [
{ validator: port, trigger: 'blur' }
],
username: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
password: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
priv_password: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
max_repetitions: [
{ validator: nzNumber, trigger: 'blur' }
],
retries: [
{ validator: nzNumber, trigger: 'blur' }
],
timeout: [
{ validator: nzNumber, trigger: 'blur' }
]
},
projectList: [],
credentialList: [],
typetList: [
{
value: 'http',
name: 'HTTP'
},
{
value: 'snmp',
name: 'SNMP'
}
],
authType: 0,
authTypeList: [
{ name: this.$t('project.endpoint.authTypeNull'), value: 0 },
{ name: this.$t('project.endpoint.authTypeWord'), value: 1 },
{ name: this.$t('project.endpoint.authTypeToken'), value: 2 }
]
}
},
methods: {
selectWalk (walk) {
if (this.editModule.walk.indexOf(walk) != -1) {
this.editModule.walk.splice(this.editModule.walk.indexOf(walk), 1)
} else {
this.editModule.walk.push(walk)
}
},
// 从mibData里取得oid对应的mib名称
getMibName (walkData, walk) {
let mibName = ''
let objectName = ''
walkData.forEach((item, index) => {
if (!mibName && item.subTree && item.subTree.length > 0) {
item.subTree.forEach((item2, index2) => {
if (!mibName && getMibName(item2, walk)) {
mibName = item.name
}
})
}
})
function getMibName (tree, oid) {
if (oid.indexOf(tree.objectID) > -1) {
if (tree.objectID == oid) {
objectName = tree.name
return true
} else {
if (tree.subTree && tree.subTree.length > 0) {
let result = false
for (let i = 0; i < tree.subTree.length; i++) {
if (getMibName(tree.subTree[i], oid)) {
result = true
break
}
}
return result
} else {
return false
}
}
} else {
return false
}
}
if (!objectName) {
objectName = walk
}
objectName = "<span style='font-weight:bold'>" + objectName + '</span>'
return mibName ? mibName + '' + objectName : objectName
},
removeWalk (walk) {
this.editModule.walk.splice(this.editModule.walk.indexOf(walk), 1)
this.$refs.selectWalk.$refs.walkTree.setChecked(walk, false)
},
initWalk () {
this.$nextTick(() => {
if (this.$refs.selectWalk) {
this.$refs.selectWalk.show()
}
})
},
getWalkData () {
this.$get('mib/tree', { pageSize: -1, pageNo: 1 }).then(response => {
if (response.code === 200) {
const obj = JSON.parse(response.data)
console.log(obj)
this.walkData = []
for (const item in obj) {
setAttr(obj[item], 'detailShow', false)
this.walkData.push({ name: item, detailShow: false, subTree: obj[item] })
}
console.log(this.walkData)
}
})
function setAttr (tree, name, value) {
if (tree && tree.length > 0) {
for (let i = 0; i < tree.length; i++) {
tree[i][name] = value
if (tree[i].subTree && tree[i].subTree.length > 0) {
setAttr(tree[i].subTree, name, value)
}
}
}
}
},
/* 关闭弹框 */
esc (refresh) {
this.$emit('close', refresh)
},
clickOutside () {
this.esc(false)
},
changeType (type) {
if (this.editModule.id) {
return
}
this.editModule.type = type
if (type == 'http') {
this.editModule.port = 9100
} else {
this.$nextTick(() => {
this.$refs.selectWalk.show()
})
this.editModule.port = 161
}
},
/* 保存 */
save () {
this.editModule.configs.param = this.paramToJson(this.editModule.configs.paramObj)
this.editModule.configs.labels = this.labelsToJson(this.editModule.configs.labelModule)
const params = { ...this.editModule }
params.configs.walk = params.walk
params.configs.prot = params.prot
params.configs = JSON.stringify(params.configs)
if (this.authType === 2 && !this.editModule.configs.bearer_token) {
this.$message.error("'token' is required")
} else if (this.authType === 1 && !(this.editModule.configs.basic_auth.username && this.editModule.configs.basic_auth.password)) {
this.$message.error("'username' and 'password' is required")
} else {
this.authType = 0
}
this.$refs.moduleForm.validate((valid) => {
if (valid) {
this.prevent_opt.save = true
if (this.editModule.id) {
this.$put('monitor/module', params).then(response => {
if (response.code === 200) {
this.$message({ duration: 1000, type: 'success', message: this.$t('tip.saveSuccess') })
this.$store.commit('setReloadFacade')
this.esc(true)
} else {
this.$message.error(response.msg)
}
this.prevent_opt.save = false
})
} else {
this.$post('monitor/module', params).then(response => {
if (response.code === 200) {
this.$message({ duration: 1000, type: 'success', message: this.$t('tip.saveSuccess') })
this.$store.commit('setReloadFacade')
this.esc(true)
} else {
this.$message.error(response.msg)
}
this.prevent_opt.save = false
})
}
} else {
return false
}
})
},
/* 删除 */
del () {
this.$confirm(this.$t('tip.confirmDelete'), {
confirmButtonText: this.$t('tip.yes'),
cancelButtonText: this.$t('tip.no'),
type: 'warning'
}).then(() => {
this.$delete('monitor/module?ids=' + this.editModule.id).then(response => {
if (response.code === 200) {
this.$message({ duration: 1000, type: 'success', message: this.$t('tip.deleteSuccess') })
this.$store.commit('setReloadFacade')
this.esc(true)
} else {
this.$message.error(response.msg)
}
})
})
},
/* 获取project列表 */
getProjectList () {
this.$get('monitor/project', { pageSize: -1, pageNo: 1 }).then(response => {
if (response.code === 200) {
this.projectList = response.data.list
}
})
},
// get snmp
getCredential () {
this.$get('/snmp/credential', { pageSize: -1, pageNo: 1 }).then(response => {
if (response.code === 200) {
this.credentialList = response.data.list
}
})
},
// 清除param
clearAllParam () {
this.editModule.configs.paramObj = []
},
// 新增param
addParam () {
this.editModule.configs.paramObj.push({ key: '', value: '' })
},
// 移除单个param
removeParam (index) {
this.editModule.configs.paramObj.splice(index, 1)
},
// 新增label
addLabel () {
this.editModule.configs.labelModule.push({ key: '', value: '' })
},
// 移除单个Label
removeLabel (index) {
this.editModule.configs.labelModule.splice(index, 1)
},
// 将param转为json字符串格式
paramToJson (param) {
const tempParam = {}
for (let i = 0; i < param.length; i++) {
eval('tempParam["' + param[i].key + '"]="' + param[i].value + '"')
}
const jsonString = JSON.stringify(tempParam)
if (jsonString == '{}') {
return ''
} else {
return jsonString
}
},
// 将labels转为json字符串格式
labelsToJson (param) {
const tempParam = {}
for (let i = 0; i < param.length; i++) {
eval('tempParam["' + param[i].key + '"]="' + param[i].value + '"')
}
const jsonString = JSON.stringify(tempParam)
if (jsonString == '{}') {
return ''
} else {
return jsonString
}
},
// 输入建议
querySearch (queryString, cb) {
const restaurants = this.restaurants
const results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
// 调用 callback 返回建议列表的数据
cb(results)
},
createFilter (queryString) {
return (restaurant) => {
return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
}
},
changeAuthType () {
this.editModule.configs.bearer_token = ''
this.editModule.configs.basic_auth = {
username: '',
password: ''
}
}
},
mounted () {
this.getWalkData()
},
created () {
this.getProjectList()
this.getCredential()
},
computed: {
mibName () {
return (value) => {
return this.getMibName(this.walkData, value)
}
}
},
watch: {
module: {
immediate: true,
deep: true,
handler (n, o) {
this.editModule = JSON.parse(JSON.stringify(n))
this.activeName = 'Basic'
if (this.editModule.configs.bearer_token) {
this.authType = 2
} else if (this.editModule.configs.basic_auth.username) {
this.authType = 1
} else {
this.authType = 0
}
if (n.type && n.type.toLowerCase() == 'snmp') {
this.$refs.selectWalk.show()
for (let i = 0; i < this.editModule.walk.length; i++) {
this.expandedWalkData.push(this.editModule.configs.walk[i].substring(0, this.editModule.configs.walk[i].lastIndexOf('.')))
}
}
// if (n.id) {
// } else {
// if (n.type && n.type.toLowerCase() == 'snmp') {
// this.$refs.selectWalk.show()
// for (let i = 0; i < this.editModule.walk.length; i++) {
// this.expandedWalkData.push(this.editModule.walk[i].substring(0, this.editModule.walk[i].lastIndexOf('.')))
// }
// }
// }
}
}
}
}
</script>
<style scoped>
.module-walk-box {
width: 100%;
border: 1px solid #DCDFE6;
border-radius: 4px;
min-height: 32px;
margin-bottom: 22px;
padding: 3px 0;
}
.module-walk-box i {
color: #C0C4CC;
}
.walk-box-item {
padding: 5px 15px;
display: flex;
justify-content: space-between;
align-items: center;
}
.walk-box-item-txt {
color: #606266;
}
.walk-box-item-op span:first-of-type {
margin-right: 4px;
}
.walk-box-item-op span {
cursor: pointer;
}
.walk-box-op {
width: 18px;
margin: 5px 0 5px 15px;
cursor: pointer;
}
.el-cascader {
width: 100%;
}
.el-cascader__tags {
height: calc(100% - 10px);
width: 100%;
}
.right-box-module .el-cascader .el-input__inner {
height: 150px;
}
.right-box-form-tip{
color: #999999;
line-height: 21px;
}
.half-form-item {
width: calc(50% - 30px);
display: inline-block;
padding: 0 18px 0 8px;
}
/deep/ .el-tabs__item{
width: 90px;
padding: 0;
text-align: center;
}
/deep/ .el-tabs__item.is-active{
color: #FA901C
}
/deep/ .el-tabs__active-bar{
background-color: #FA901C
}
/deep/ .el-radio-group{
width: 100%;
}
/deep/ .el-radio{
width: 100%;
}
/deep/ .el-autocomplete{
width: 100%;
}
.need-rotate.nz-icon-drop-down{
display: inline-block;
transition: transform .3s;
}
.need-rotate.nz-icon-drop-down.is-active{
transform: rotate(
-180deg
);
}
</style>
<style>
.sub-label {
padding-right: 15px;
font-size: 14px;
color: #666;
text-align: left;
line-height: 30px;
padding-left: 15px;
font-weight: bold;
}
.sub-label-required::after {
content: '*';
color: #F56C6C;
margin-left: 4px;
}
.module-box-type {
margin: 25px 0 10px -15px;
}
.walk-close-box {
margin-left: 6px;
width: 14px;
}
.walk-close {
font-size: 12px;
}
</style>