asset type页面新增列表属性
This commit is contained in:
@@ -81,7 +81,7 @@ export const asset = {
|
|||||||
],
|
],
|
||||||
assetType: {
|
assetType: {
|
||||||
authProtocolOptions: [
|
authProtocolOptions: [
|
||||||
{ value: 0, label: '无' },
|
{ value: 0, label: 'nothing' },
|
||||||
{ value: 1, label: 'SSH' },
|
{ value: 1, label: 'SSH' },
|
||||||
{ value: 2, label: 'TELNET' }
|
{ value: 2, label: 'TELNET' }
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -977,7 +977,10 @@ const en = {
|
|||||||
vmh:'VMH',
|
vmh:'VMH',
|
||||||
authProtocol:'AuthProtocol',
|
authProtocol:'AuthProtocol',
|
||||||
snmpEnable: 'SnmpEnable',
|
snmpEnable: 'SnmpEnable',
|
||||||
|
snmpCollect:'SnmpCollect',
|
||||||
createModel:'CreateModel',
|
createModel:'CreateModel',
|
||||||
|
sshCollect:'SshCollect',
|
||||||
|
sshCollectScript:'SshCollectScript',
|
||||||
parent: 'Parent',
|
parent: 'Parent',
|
||||||
pname: 'Parent name',
|
pname: 'Parent name',
|
||||||
editAssetType: 'Edit asset type',
|
editAssetType: 'Edit asset type',
|
||||||
|
|||||||
@@ -46,6 +46,27 @@
|
|||||||
:inactive-value="0">
|
:inactive-value="0">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!--snmpCollect-->
|
||||||
|
<el-form-item :label='$t("config.assetType.snmpCollect")' prop="snmpCollect">
|
||||||
|
<el-switch
|
||||||
|
v-model="editAssetType.snmpCollect"
|
||||||
|
active-color="#ee9d3f"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0">
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
<!--sshCollect-->
|
||||||
|
<el-form-item :label='$t("config.assetType.sshCollect")' prop="sshCollect">
|
||||||
|
<el-switch
|
||||||
|
v-model="editAssetType.sshCollect"
|
||||||
|
active-color="#ee9d3f"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0">
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label='$t("config.assetType.sshCollectScript")' prop="sshCollectScript">
|
||||||
|
<el-input v-model="editAssetType.sshCollectScript" size="small" type="text"></el-input>
|
||||||
|
</el-form-item>
|
||||||
<!-- ChartTemplate -->
|
<!-- ChartTemplate -->
|
||||||
<!-- <el-form-item :label="$t('config.type.ChartTemplate')" prop="ChartTemplate">
|
<!-- <el-form-item :label="$t('config.type.ChartTemplate')" prop="ChartTemplate">
|
||||||
<v-selectpage
|
<v-selectpage
|
||||||
|
|||||||
@@ -304,8 +304,7 @@ export default {
|
|||||||
save () {
|
save () {
|
||||||
if (this.prevent_opt.save) {
|
if (this.prevent_opt.save) {
|
||||||
return
|
return
|
||||||
}
|
};
|
||||||
;
|
|
||||||
this.prevent_opt.save = true
|
this.prevent_opt.save = true
|
||||||
this.$refs.editAssetMetaForm.validate((valid) => {
|
this.$refs.editAssetMetaForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|||||||
@@ -42,14 +42,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else-if=" item.prop === 'authProtocol' ">
|
<div v-else-if=" item.prop === 'authProtocol' ">
|
||||||
<div v-if="scope.row[item.prop] === 1">SSH</div>
|
<div v-if="scope.row[item.prop] === 1">SSH</div>
|
||||||
<div v-else-if="scope.row[item.prop] === 0">无</div>
|
<div v-else-if="scope.row[item.prop] === 0">nothing</div>
|
||||||
<div v-else-if="scope.row[item.prop] === 2">telnet</div>
|
<div v-else-if="scope.row[item.prop] === 2">telnet</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if=" item.prop === 'snmpEnable' ">
|
<div v-else-if=" item.prop === 'snmpEnable' ">
|
||||||
<div v-if="scope.row[item.prop] === 1">Enabled</div>
|
<div v-if="scope.row[item.prop] === 1">Enabled</div>
|
||||||
<div v-else-if="scope.row[item.prop] === 0">Disabled</div>
|
<div v-else-if="scope.row[item.prop] === 0">Disabled</div>
|
||||||
</div>
|
</div>
|
||||||
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop] || '-'}}</span>
|
<div v-else-if=" item.prop === 'snmpCollect' ">
|
||||||
|
<div v-if="scope.row[item.prop] === 1">Enabled</div>
|
||||||
|
<div v-else-if="scope.row[item.prop] === 0">Disabled</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if=" item.prop === 'sshCollect' ">
|
||||||
|
<div v-if="scope.row[item.prop] === 1">Enabled</div>
|
||||||
|
<div v-else-if="scope.row[item.prop] === 0">Disabled</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="item.prop === 'sshCollectScript'">
|
||||||
|
<div>{{ scope.row[item.prop] || '-' }}</div>
|
||||||
|
</div>
|
||||||
|
<span v-else-if="scope.row[item.prop]">{{ scope.row[item.prop] || '-' }}</span>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -108,6 +119,20 @@ export default {
|
|||||||
label: this.$t('config.assetType.snmpEnable'),
|
label: this.$t('config.assetType.snmpEnable'),
|
||||||
prop: 'snmpEnable',
|
prop: 'snmpEnable',
|
||||||
show: true,
|
show: true,
|
||||||
|
},{
|
||||||
|
label: this.$t('config.assetType.snmpCollect'),
|
||||||
|
prop: 'snmpCollect',
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: this.$t('config.assetType.sshCollect'),
|
||||||
|
prop: 'sshCollect',
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: this.$t('config.assetType.sshCollectScript'),
|
||||||
|
prop: 'sshCollectScript',
|
||||||
|
show: true,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,12 +54,11 @@
|
|||||||
</nz-data-list>
|
</nz-data-list>
|
||||||
<!--侧滑-->
|
<!--侧滑-->
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<assetMetaBox v-if="rightBox.metaShow" ref="assetMetaBox" :asset-meta="object"
|
<asset-meta-box v-if="rightBox.metaShow" ref="assetMetaBox" v-bind:asset-label="object" @close="closeRightBox"></asset-meta-box>
|
||||||
@close="closeRightBox"></assetMetaBox>
|
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<assetMetaGroup v-if="rightBox.groupShow" :metaGroup="metaGroup" @close="closeRightBox"
|
<asset-meta-group v-if="rightBox.groupShow" :metaGroup="metaGroup" @close="closeRightBox"
|
||||||
ref="assetMetaBox"></assetMetaGroup>
|
ref="assetMetaBox"></asset-meta-group>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -65,7 +65,9 @@ export default {
|
|||||||
vm: '',
|
vm: '',
|
||||||
vmh:'',
|
vmh:'',
|
||||||
authProtocol:'',
|
authProtocol:'',
|
||||||
snmpEnable:''
|
snmpEnable:'',
|
||||||
|
snmpCollect:'',
|
||||||
|
sshCollect:''
|
||||||
},
|
},
|
||||||
tableId: 'typeConfTable',
|
tableId: 'typeConfTable',
|
||||||
searchMsg: { // 给搜索框子组件传递的信息
|
searchMsg: { // 给搜索框子组件传递的信息
|
||||||
|
|||||||
Reference in New Issue
Block a user