asset增加ip列
This commit is contained in:
@@ -29,6 +29,28 @@
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.ip-info{
|
||||
.ip-icon{
|
||||
font-size: 16px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
.red-color {
|
||||
color: $--color-danger !important;
|
||||
}
|
||||
.green-color {
|
||||
color: $--color-success !important;
|
||||
}
|
||||
.document-copy-text{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.ip-info:hover {
|
||||
.active-icon-content {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.licenseStatus{
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,6 +5,20 @@
|
||||
"css_prefix_text": "nz-icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "40012174",
|
||||
"name": "MGT",
|
||||
"font_class": "mgt",
|
||||
"unicode": "e606",
|
||||
"unicode_decimal": 58886
|
||||
},
|
||||
{
|
||||
"icon_id": "40012142",
|
||||
"name": "IPMI",
|
||||
"font_class": "ipmi",
|
||||
"unicode": "e605",
|
||||
"unicode_decimal": 58885
|
||||
},
|
||||
{
|
||||
"icon_id": "2112052",
|
||||
"name": "磁盘",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -105,9 +105,9 @@ export default {
|
||||
label: 'sn',
|
||||
disabled: false
|
||||
}, {
|
||||
name: 'IP',
|
||||
name: this.$t('config.operationlog.ip'),
|
||||
type: 'input',
|
||||
label: 'manageIp',
|
||||
label: 'ip',
|
||||
disabled: false
|
||||
}, {
|
||||
name: this.$t('overall.state'),
|
||||
@@ -233,7 +233,7 @@ export default {
|
||||
// this.$store.commit('addConsole', consoleParam)
|
||||
},
|
||||
getTableData (params) {
|
||||
let url = this.url
|
||||
let url = this.url
|
||||
if (params && Object.keys(params).length > 0) {
|
||||
for (const key in params) {
|
||||
this.$set(this.searchLabel, key, params[key])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="document-copy-block">
|
||||
<span class="document-copy-text">
|
||||
<slot name="copy-text"></slot>
|
||||
<slot name="copy-text"></slot>
|
||||
</span>
|
||||
<i v-if="showInfo" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(copyData)" :title="$t('overall.copyText')"></i>
|
||||
</div>
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
<el-form-item :label="$t('asset.manageIp')" prop="manageIp">
|
||||
<el-input maxlength="64" show-word-limit v-model="editAsset.manageIp" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.ipmiIp')" prop="ipmiIp">
|
||||
<el-input maxlength="64" show-word-limit v-model="editAsset.ipmiIp" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.sn')" prop="sn">
|
||||
<el-input maxlength="128" show-word-limit v-model="editAsset.sn" size="small"/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -46,16 +46,41 @@
|
||||
</div> -->
|
||||
<copy :copyData='scope.row.name' :showInfo='scope.row.name'>
|
||||
<template slot="copy-text">
|
||||
{{scope.row.name ? scope.row.name : '-'}}
|
||||
{{scope.row.name ? scope.row.name : '-'}}
|
||||
</template>
|
||||
</copy>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'manageIp'">
|
||||
<copy :copyData='scope.row.manageIp' :showInfo='scope.row.manageIp'>
|
||||
<template slot="copy-text">
|
||||
{{scope.row.manageIp ? scope.row.manageIp : '-'}}
|
||||
</template>
|
||||
</copy>
|
||||
<template v-else-if="item.prop === 'ip'">
|
||||
<div class="ip-info">
|
||||
<copy :copyData='scope.row.manageIp' :showInfo='scope.row.manageIp' v-if="scope.row.manageIp">
|
||||
<template slot="copy-text">
|
||||
<i
|
||||
class="ip-icon nz-icon nz-icon-mgt"
|
||||
:class="{
|
||||
'green-color':scope.row.pingInfo && scope.row.pingInfo.status == 1,
|
||||
'red-color':!scope.row.pingInfo || scope.row.pingInfo.status == 0,
|
||||
}"
|
||||
></i>
|
||||
{{scope.row.manageIp ? scope.row.manageIp : '-'}}
|
||||
</template>
|
||||
</copy>
|
||||
<copy :copyData='scope.row.ipmiIp' :showInfo='scope.row.ipmiIp' v-if="scope.row.ipmiIp">
|
||||
<template slot="copy-text">
|
||||
<i
|
||||
class="ip-icon nz-icon nz-icon-ipmi"
|
||||
:class="{
|
||||
'green-color':scope.row.pingInfo && scope.row.pingInfo.status == 1,
|
||||
'red-color':!scope.row.pingInfo || scope.row.pingInfo.status == 0,
|
||||
}"
|
||||
></i>
|
||||
{{scope.row.ipmiIp ? scope.row.ipmiIp : ''}}
|
||||
</template>
|
||||
</copy>
|
||||
<div class="active-icon-content" v-if="scope.row.pingInfo">
|
||||
<p v-if="scope.row.pingInfo.rtt">{{$t('asset.rtt') + (scope.row.pingInfo.rtt ? scope.row.pingInfo.rtt + 'ms':'')}}</p>
|
||||
<p>{{$t('asset.assetStatPre') + (scope.row.pingInfo.lastUpdate ? utcTimeToTimezoneStr(scope.row.pingInfo.lastUpdate) : $t('asset.assetStatDown'))}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'type'">{{scope.row.type ? scope.row.type.name : '-'}}</template>
|
||||
<template v-else-if="item.prop === 'state'">{{scope.row.state ? scope.row.state.name : '-'}}</template>
|
||||
@@ -87,14 +112,14 @@
|
||||
<span v-if="scope.row.cabinet && scope.row.cabinet !== '--'">{{scope.row.cabinet.name}} {{returnCabinet( scope.row.cabinetStart, scope.row.cabinetEnd)}}</span>
|
||||
<span v-else >-</span>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'pingInfo'">
|
||||
<!-- <template v-else-if="item.prop === 'pingInfo'">
|
||||
<div class="ping-info" v-if="scope.row.pingInfo">
|
||||
<div :class="{'active-icon green-bg':scope.row.pingInfo.status == 1,'active-icon red-bg':scope.row.pingInfo.status == 0}" style="position: relative">
|
||||
</div>
|
||||
<div class="active-icon-content">{{$t('asset.assetStatPre')+(scope.row.pingInfo.lastUpdate?utcTimeToTimezoneStr(scope.row.pingInfo.lastUpdate):$t('asset.assetStatDown'))}}</div>
|
||||
<div class="active-icon-content">{{$t('asset.assetStatPre')+(scope.row.pingInfo.lastUpdate ? utcTimeToTimezoneStr(scope.row.pingInfo.lastUpdate) : $t('asset.assetStatDown'))}}</div>
|
||||
{{scope.row.pingInfo.rtt?scope.row.pingInfo.rtt+'ms':''}}
|
||||
</div>
|
||||
</template>
|
||||
</template> -->
|
||||
<template v-else-if="item.prop === 'model'">{{scope.row.model ? scope.row.model.name : '-'}}</template>
|
||||
<template v-else-if="item.prop === 'parent'">
|
||||
<span
|
||||
@@ -281,10 +306,10 @@ export default {
|
||||
minWidth: 150,
|
||||
sortable: 'custom'
|
||||
}, {
|
||||
label: this.$t('asset.manageIp'),
|
||||
prop: 'manageIp',
|
||||
label: this.$t('config.operationlog.ip'),
|
||||
prop: 'ip',
|
||||
show: true,
|
||||
minWidth: 140,
|
||||
minWidth: 200,
|
||||
sortable: 'custom'
|
||||
}, {
|
||||
label: this.$t('asset.parent'),
|
||||
@@ -308,11 +333,6 @@ export default {
|
||||
show: true,
|
||||
minWidth: 110,
|
||||
sortable: 'custom'
|
||||
}, {
|
||||
label: this.$t('asset.pingInfo'),
|
||||
prop: 'pingInfo',
|
||||
show: true,
|
||||
minWidth: 110
|
||||
}, {
|
||||
label: this.$t('overall.dc'),
|
||||
prop: 'dc',
|
||||
|
||||
@@ -317,10 +317,10 @@ export default {
|
||||
id: 'sn',
|
||||
disabled: false
|
||||
}, {
|
||||
name: 'IP',
|
||||
name: this.$t('config.operationlog.ip'),
|
||||
type: 'input',
|
||||
label: 'manageIp',
|
||||
id: 'manageIp',
|
||||
label: 'ip',
|
||||
id: 'ip',
|
||||
disabled: false
|
||||
}, {
|
||||
name: this.$t('overall.state'),
|
||||
@@ -954,16 +954,16 @@ export default {
|
||||
},
|
||||
jsonKey: 'val'
|
||||
},
|
||||
manageIp: {
|
||||
ip: {
|
||||
target: this.searchLabel,
|
||||
isSearchInput: true,
|
||||
propertyName: 'manageIp',
|
||||
type: 'number',
|
||||
propertyName: 'ip',
|
||||
type: 'string',
|
||||
defaultJson: {
|
||||
disabled: false,
|
||||
id: 'manageIp',
|
||||
label: 'manageIp',
|
||||
name: 'IP',
|
||||
id: 'ip',
|
||||
label: 'ip',
|
||||
name: this.$t('config.operationlog.ip'),
|
||||
type: 'input',
|
||||
val: ''
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user