fix: 1.调整subscriber实体中tab错误提示信息的位置;2.暂时不请求subscriber实体对应的4个tab的接口,显示未noData;
This commit is contained in:
@@ -155,6 +155,14 @@
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.entity-subscriber-detail-error {
|
||||
margin-top: 0px;
|
||||
margin-left: 0px;
|
||||
.error-block {
|
||||
margin:0px;
|
||||
}
|
||||
}
|
||||
|
||||
.entity-detail-performance {
|
||||
height: 46px;
|
||||
border-radius: $tab-border-radius;
|
||||
|
||||
@@ -126,7 +126,11 @@ export default {
|
||||
}
|
||||
const securityResponse = response[2].value
|
||||
if (securityResponse && securityResponse.status === 200) {
|
||||
this.initSetTag(entityDetailTabsName.securityEvent, securityResponse.data.data.result.length)
|
||||
if (this.entity.entityType === entityType.subscriber) {
|
||||
this.initSetTag(entityDetailTabsName.securityEvent, 0)
|
||||
} else {
|
||||
this.initSetTag(entityDetailTabsName.securityEvent, securityResponse.data.data.result.length)
|
||||
}
|
||||
}
|
||||
// let performanceResponse = response[3].value
|
||||
// if (performanceResponse && performanceResponse.status === 200) {
|
||||
@@ -158,6 +162,7 @@ export default {
|
||||
}
|
||||
|
||||
if (this.entity.entityType === entityType.subscriber) {
|
||||
/*
|
||||
axios.get(api.entity.deviceInformation, { params: this.getParamsByTabType(entityDetailTabsName.deviceInformation) }).then(response => {
|
||||
const res = response.data
|
||||
if (response.status === 200) {
|
||||
@@ -169,7 +174,9 @@ export default {
|
||||
if (response.status === 200) {
|
||||
this.initSetTag(entityDetailTabsName.accountInformation, res.data.result.length)
|
||||
}
|
||||
})
|
||||
}) */
|
||||
this.initSetTag(entityDetailTabsName.deviceInformation, 0)
|
||||
this.initSetTag(entityDetailTabsName.accountInformation, 0)
|
||||
}
|
||||
},
|
||||
promiseData (data1, data2, data3) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<chart-error v-if="showError" :content="errorMsg" class="entity-detail-event-error"></chart-error>
|
||||
<chart-error v-if="showError" :content="errorMsg" class="entity-subscriber-detail-error"></chart-error>
|
||||
<chart-no-data v-if="isNoData && !showError"></chart-no-data>
|
||||
|
||||
<div v-if="!showError && !isNoData && initFlag" class="type-data__column">
|
||||
@@ -90,6 +90,7 @@ export default {
|
||||
initData () {
|
||||
const params = this.getParams()
|
||||
this.toggleLoading(true)
|
||||
/*
|
||||
axios.get(api.entity.accountInformation, { params: params }).then(response => {
|
||||
const res = response.data
|
||||
if (response.status === 200) {
|
||||
@@ -108,7 +109,11 @@ export default {
|
||||
}).finally(() => {
|
||||
this.initFlag = true
|
||||
this.toggleLoading(false)
|
||||
})
|
||||
}) */
|
||||
this.isNoData = true
|
||||
this.showError = false
|
||||
this.initFlag = true
|
||||
this.toggleLoading(false)
|
||||
},
|
||||
httpError (e) {
|
||||
this.$emit('checkTag', entityDetailTabsName.accountInformation, 0)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<chart-error v-if="showError" :content="errorMsg" class="entity-detail-event-error"></chart-error>
|
||||
<chart-error v-if="showError" :content="errorMsg" class="entity-subscriber-detail-error"></chart-error>
|
||||
<chart-no-data v-if="isNoData && !showError"></chart-no-data>
|
||||
|
||||
<div v-if="!showError && !isNoData && initFlag" class="type-data__column">
|
||||
@@ -69,6 +69,7 @@ export default {
|
||||
initData () {
|
||||
const params = this.getParams()
|
||||
this.toggleLoading(true)
|
||||
/*
|
||||
axios.get(this.url, { params: params }).then(response => {
|
||||
const res = response.data
|
||||
if (response.status === 200) {
|
||||
@@ -87,7 +88,11 @@ export default {
|
||||
}).finally(() => {
|
||||
this.initFlag = true
|
||||
this.toggleLoading(false)
|
||||
})
|
||||
}) */
|
||||
this.isNoData = true
|
||||
this.showError = false
|
||||
this.initFlag = true
|
||||
this.toggleLoading(false)
|
||||
},
|
||||
httpError (e) {
|
||||
this.$emit('checkTag', entityDetailTabsName.deviceInformation, 0)
|
||||
|
||||
@@ -73,7 +73,7 @@ import { api } from '@/utils/api'
|
||||
import { getNowTime } from '@/utils/date-util'
|
||||
import chartMixin from '@/views/charts2/chart-mixin'
|
||||
import chartNoData from '@/views/charts/charts/ChartNoData'
|
||||
import { entityDetailTabsName } from '@/utils/constants'
|
||||
import { entityDetailTabsName, entityType } from '@/utils/constants'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
@@ -123,24 +123,30 @@ export default {
|
||||
methods: {
|
||||
initData () {
|
||||
const params = this.getParams()
|
||||
if (this.entity.entityType === 'app') {
|
||||
if (this.entity.entityType === entityType.app) {
|
||||
const ipsOfApp = axios.get(api.entity.domainNameResolutionAboutIpsOfApp, { params: params })
|
||||
const domainsOfApp = axios.get(api.entity.domainNameResolutionAboutDomainsOfApp, { params: params })
|
||||
this.promiseData(ipsOfApp, domainsOfApp)
|
||||
}
|
||||
|
||||
if (this.entity.entityType === 'ip') {
|
||||
if (this.entity.entityType === entityType.ip) {
|
||||
const appsOfIp = axios.get(api.entity.domainNameResolutionAboutAppsOfIp, { params: params })
|
||||
const domainsOfIp = axios.get(api.entity.domainNameResolutionAboutDomainsOfIp, { params: params })
|
||||
this.promiseData(appsOfIp, domainsOfIp)
|
||||
}
|
||||
|
||||
if (this.entity.entityType === 'domain') {
|
||||
if (this.entity.entityType === entityType.domain) {
|
||||
const appsOfDomain = axios.get(api.entity.domainNameResolutionAboutAppsOfDomain, { params: params })
|
||||
const ipsOfDomain = axios.get(api.entity.domainNameResolutionAboutIpsOfDomain, { params: params })
|
||||
const fqdnsOfDomain = axios.get(api.entity.domainNameResolutionAboutFQDNsOfDomain, { params: params })
|
||||
this.promiseData(appsOfDomain, ipsOfDomain, fqdnsOfDomain)
|
||||
}
|
||||
|
||||
if (this.entity.entityType === entityType.subscriber) {
|
||||
this.isNoData = true
|
||||
this.initFlag = true
|
||||
this.toggleLoading(false)
|
||||
}
|
||||
},
|
||||
promiseData (data1, data2, data3) {
|
||||
this.showError0 = false
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<script>
|
||||
import { getNowTime } from '@/utils/date-util'
|
||||
import { eventSeverityColor, entityDetailTabsName, securityLevel } from '@/utils/constants'
|
||||
import { eventSeverityColor, entityDetailTabsName, securityLevel, entityType } from '@/utils/constants'
|
||||
import unitConvert from '@/utils/unit-convert'
|
||||
import axios from 'axios'
|
||||
import { api } from '@/utils/api'
|
||||
@@ -133,25 +133,30 @@ export default {
|
||||
initData () {
|
||||
const params = this.getParams()
|
||||
this.toggleLoading(true)
|
||||
axios.get(`${api.entity.security}/${this.entityType}`, { params: params }).then(response => {
|
||||
const res = response.data
|
||||
|
||||
if (response.status === 200) {
|
||||
this.isNoData = res.data.result.length === 0
|
||||
this.$emit('checkTag', entityDetailTabsName.securityEvent, res.data.result.length)
|
||||
this.showError = false
|
||||
if (!this.isNoData) {
|
||||
this.eventList = res.data.result
|
||||
}
|
||||
} else {
|
||||
this.httpError(res)
|
||||
}
|
||||
}).catch(e => {
|
||||
console.error(e)
|
||||
this.httpError(e)
|
||||
}).finally(() => {
|
||||
if (this.entity.entityType === entityType.subscriber) {
|
||||
this.isNoData = true
|
||||
this.toggleLoading(false)
|
||||
})
|
||||
} else {
|
||||
axios.get(`${api.entity.security}/${this.entityType}`, { params: params }).then(response => {
|
||||
const res = response.data
|
||||
|
||||
if (response.status === 200) {
|
||||
this.isNoData = res.data.result.length === 0
|
||||
this.$emit('checkTag', entityDetailTabsName.securityEvent, res.data.result.length)
|
||||
this.showError = false
|
||||
if (!this.isNoData) {
|
||||
this.eventList = res.data.result
|
||||
}
|
||||
} else {
|
||||
this.httpError(res)
|
||||
}
|
||||
}).catch(e => {
|
||||
console.error(e)
|
||||
this.httpError(e)
|
||||
}).finally(() => {
|
||||
this.toggleLoading(false)
|
||||
})
|
||||
}
|
||||
},
|
||||
httpError (e) {
|
||||
this.$emit('checkTag', entityDetailTabsName.securityEvent, 0)
|
||||
|
||||
Reference in New Issue
Block a user