Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc56a1fc0c | ||
|
|
ccd2b3d08b | ||
|
|
60bbb8b165 |
@@ -464,8 +464,7 @@ export default {
|
|||||||
newData.push(obj)
|
newData.push(obj)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (data && data.length > 0) {
|
||||||
if (data !== undefined && data.length > 0) {
|
|
||||||
newData.forEach((item) => {
|
newData.forEach((item) => {
|
||||||
item.type = getLineType(item.type)
|
item.type = getLineType(item.type)
|
||||||
if (item.type === val) {
|
if (item.type === val) {
|
||||||
@@ -478,6 +477,24 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
lineData.splice(0, 1)
|
lineData.splice(0, 1)
|
||||||
|
// TODO 下面的逻辑是判断total曲线的尾部数据,从尾往前数0值的个数,若个数大于0,所有曲线都从尾部去掉相同数量的点,最多4个
|
||||||
|
const totalData = lineData[0]
|
||||||
|
if (totalData.values.length > 4) {
|
||||||
|
let count = 0
|
||||||
|
for (let i = totalData.values.length - 1; i >= totalData.values.length - 4; i--) {
|
||||||
|
if (totalData.values[i].length > 1 && totalData.values[i][1] === 0) {
|
||||||
|
count++
|
||||||
|
} else {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count > 0) {
|
||||||
|
lineData.forEach(l => {
|
||||||
|
l.values.splice(l.values.length - count, count)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (val === 'Sessions/s') {
|
if (val === 'Sessions/s') {
|
||||||
const tabs = _.cloneDeep(this.tabsTemplate)
|
const tabs = _.cloneDeep(this.tabsTemplate)
|
||||||
lineData.forEach((d, i) => {
|
lineData.forEach((d, i) => {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-country"></i>
|
<i class="cn-icon cn-icon-country"></i>
|
||||||
<span class="row-item-label">{{ $t('overall.country') }} : </span>
|
<span class="row-item-label">{{ $t('overall.country') }} : </span>
|
||||||
<span class="row-item-value">{{ entityData.location ? entityData.location.country : '-' }}</span>
|
<span class="row-item-value">{{ $_.get(entityData, 'location.country', '-') || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-position"></i>
|
<i class="cn-icon cn-icon-position"></i>
|
||||||
@@ -36,36 +36,36 @@
|
|||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-cloud"></i>
|
<i class="cn-icon cn-icon-cloud"></i>
|
||||||
<span class="row-item-label">{{ $t('entities.asn') }} : </span>
|
<span class="row-item-label">{{ $t('entities.asn') }} : </span>
|
||||||
<span class="row-item-value">{{ entityData.asn ? entityData.asn.asn : '-' }}</span>
|
<span class="row-item-value">{{ $_.get(entityData, 'asn.asn', '-') || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="entityData.entityType === 'domain'">
|
<template v-else-if="entityData.entityType === 'domain'">
|
||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-category-group"></i>
|
<i class="cn-icon cn-icon-category-group"></i>
|
||||||
<span class="row-item-label">{{ $t('entities.category') }} : </span>
|
<span class="row-item-label">{{ $t('entities.category') }} : </span>
|
||||||
<span class="row-item-value">{{ entityData.category ? entityData.category.categoryGroup : '-' }}</span>
|
<span class="row-item-value">{{ $_.get(entityData, 'category.categoryGroup', '-') || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-sub-category"></i>
|
<i class="cn-icon cn-icon-sub-category"></i>
|
||||||
<span class="row-item-label">{{ $t('entities.subcategory') }} : </span>
|
<span class="row-item-label">{{ $t('entities.subcategory') }} : </span>
|
||||||
<span class="row-item-value">{{ entityData.category ? entityData.category.categoryName : '-' }}</span>
|
<span class="row-item-value">{{ $_.get(entityData, 'category.categoryName', '-') || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-credit-rating"></i>
|
<i class="cn-icon cn-icon-credit-rating"></i>
|
||||||
<span class="row-item-label">{{ $t('entities.reputationLevel') }} : </span>
|
<span class="row-item-label">{{ $t('entities.reputationLevel') }} : </span>
|
||||||
<span class="row-item-value">{{ entityData.category ? entityData.category.reputationLevel : '-' }}</span>
|
<span class="row-item-value">{{ $_.get(entityData, 'category.reputationLevel', '-') || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="entityData.entityType === 'app'">
|
<template v-else-if="entityData.entityType === 'app'">
|
||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-category2"></i>
|
<i class="cn-icon cn-icon-category2"></i>
|
||||||
<span class="row-item-label">{{ $t('entities.category') }} : </span>
|
<span class="row-item-label">{{ $t('entities.category') }} : </span>
|
||||||
<span class="row-item-value">{{ entityData.category ? entityData.category.appCategory : '-' }}</span>
|
<span class="row-item-value">{{ $_.get(entityData, 'category.appCategory', '-') || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-sub-category"></i>
|
<i class="cn-icon cn-icon-sub-category"></i>
|
||||||
<span class="row-item-label">{{ $t('entities.subcategory') }} : </span>
|
<span class="row-item-label">{{ $t('entities.subcategory') }} : </span>
|
||||||
<span class="row-item-value">{{ entityData.category ? entityData.category.appSubcategory : '-' }}</span>
|
<span class="row-item-value">{{ $_.get(entityData, 'category.appSubcategory', '-') || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-info__item">
|
<div class="basic-info__item">
|
||||||
<i class="cn-icon cn-icon-credit-rating"></i>
|
<i class="cn-icon cn-icon-credit-rating"></i>
|
||||||
@@ -258,7 +258,7 @@ export default {
|
|||||||
}
|
}
|
||||||
axios.get(`${url}?resource=${this.entity.entityValue}`).then(response => {
|
axios.get(`${url}?resource=${this.entity.entityValue}`).then(response => {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.entityData = { ...response.data.data, ...this.entity }
|
this.entityData = { ...this.entityData, ...response.data.data, ...this.entity }
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user