diff --git a/src/assets/css/components/views/charts/chartAlarmInfo.scss b/src/assets/css/components/views/charts/chartAlarmInfo.scss index 675eec66..0953c57e 100644 --- a/src/assets/css/components/views/charts/chartAlarmInfo.scss +++ b/src/assets/css/components/views/charts/chartAlarmInfo.scss @@ -62,6 +62,10 @@ align-items: center; flex-wrap: wrap; + &>div { + margin-bottom: 4px; + } + .cn-alarm-info-bottom-middle { display: flex; margin-left: 20px; @@ -147,4 +151,4 @@ height: 40px !important; width: 100%; } -} \ No newline at end of file +} diff --git a/src/assets/css/components/views/charts/chartEchartWithTable.scss b/src/assets/css/components/views/charts/chartEchartWithTable.scss index 0d08ee21..49fca417 100644 --- a/src/assets/css/components/views/charts/chartEchartWithTable.scss +++ b/src/assets/css/components/views/charts/chartEchartWithTable.scss @@ -3,7 +3,6 @@ .chart-list { .vue-grid-layout>.vue-grid-item { .cn-chart { - height: 100% !important; .cn-chart__echarts { display: flex; flex-direction: column; diff --git a/src/assets/css/components/views/charts/chartSingleValue.scss b/src/assets/css/components/views/charts/chartSingleValue.scss index 5b017cfc..d5e97407 100644 --- a/src/assets/css/components/views/charts/chartSingleValue.scss +++ b/src/assets/css/components/views/charts/chartSingleValue.scss @@ -67,7 +67,7 @@ .content__data { padding-bottom: 7%; - font-size: 24px; + font-size: 20px; color: #333333; font-weight: bold; } @@ -345,4 +345,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/css/components/views/charts/panel.scss b/src/assets/css/components/views/charts/panel.scss index 52b26691..7448512e 100644 --- a/src/assets/css/components/views/charts/panel.scss +++ b/src/assets/css/components/views/charts/panel.scss @@ -213,7 +213,8 @@ &>.cn-chart { position: relative; border-radius: 2px; - height: 100%; + flex-grow: 1; + overflow: auto; width: 100%; .chart-drawing { height: 100%; diff --git a/src/mixins/relatedServer.js b/src/mixins/relatedServer.js index 79b5dc09..c9235627 100644 --- a/src/mixins/relatedServer.js +++ b/src/mixins/relatedServer.js @@ -24,7 +24,7 @@ export default { } }) }, - getRelatedServerDataTow (relationshipUrlTow, refTow) { + getRelatedServerDataTwo (relationshipUrlTow, refTow) { get(relationshipUrlTow, this.getQueryParams()).then(response => { if (response.code === 200) { const relationshipDataTwo = response.data.result diff --git a/src/views/charts/charts/ChartAppBasicInfo.vue b/src/views/charts/charts/ChartAppBasicInfo.vue index 4dd3f23f..f0a09237 100644 --- a/src/views/charts/charts/ChartAppBasicInfo.vue +++ b/src/views/charts/charts/ChartAppBasicInfo.vue @@ -15,10 +15,10 @@
- {{$t('entities.category')}} + {{$t('entities.category')}}
- {{$_.get(chartData, "category") || '-'}} + {{$_.get(chartData, "category") || '-'}}
@@ -28,10 +28,10 @@
- {{$t('entities.subcategory')}} + {{$t('entities.subcategory')}}
- {{$_.get(chartData, "subcategory") || '-'}} + {{$_.get(chartData, "subcategory") || '-'}}
@@ -41,10 +41,10 @@
- {{$t('entities.reputationLevel')}} + {{$t('entities.reputationLevel')}}
- {{$_.get(chartData, "risk") || '-'}} + {{$_.get(chartData, "risk") || '-'}}
diff --git a/src/views/entityExplorer/entityList/detailOverview/App.vue b/src/views/entityExplorer/entityList/detailOverview/App.vue index 5e9f763f..b844cc95 100644 --- a/src/views/entityExplorer/entityList/detailOverview/App.vue +++ b/src/views/entityExplorer/entityList/detailOverview/App.vue @@ -264,7 +264,7 @@ export default { const queryParams = { startTime: parseInt(this.timeFilter.startTime / 1000), endTime: parseInt(this.timeFilter.endTime / 1000), - appName: this.entityData.appName + appName: this.entity.appName } return queryParams }, @@ -278,25 +278,10 @@ export default { this.chartData = response.data.result } }) - } - }, - watch: { - entityData: { - immediate: true, - deep: true, - handler (n) { - if (n) { - this.singleValues.chartDatas.splice(0, 1, this.$_.get(n, 'establishLatency')) - this.singleValues.chartDatas.splice(1, 1, this.$_.get(n, 'httpResponseLatency')) - this.singleValues.chartDatas.splice(2, 1, this.$_.get(n, 'sslConLatency')) - this.singleValues.chartDatas.splice(3, 1, this.$_.get(n, 'sequenceGapLossPercent')) - this.singleValues.chartDatas.splice(4, 1, this.$_.get(n, 'pktRetransPercent')) - this.$nextTick(() => { - this.getRelatedServerDataOne(this.relatedServerDomainUrl) - this.getRelatedServerDataTow(this.relatedServerIpUrl) - }) - } - } + }, + queryRelated () { + this.getRelatedServerDataOne(this.relatedServerDomainUrl) + this.getRelatedServerDataTwo(this.relatedServerIpUrl) } }, mounted () { diff --git a/src/views/entityExplorer/entityList/detailOverview/Domain.vue b/src/views/entityExplorer/entityList/detailOverview/Domain.vue index dc3a1302..37660b04 100644 --- a/src/views/entityExplorer/entityList/detailOverview/Domain.vue +++ b/src/views/entityExplorer/entityList/detailOverview/Domain.vue @@ -272,7 +272,7 @@ export default { const queryParams = { startTime: parseInt(this.timeFilter.startTime / 1000), endTime: parseInt(this.timeFilter.endTime / 1000), - domain: this.entityData.domainName + domain: this.entity.domainName } return queryParams }, @@ -290,28 +290,21 @@ export default { getBasicProperties () { get(this.basicProperties, this.getQueryParams()).then(response => { if (response.code === 200) { - this.entityData = response.data.result + this.entityData = { + ...this.entityData, + domainCategory: response.data.result.domainCategory, + domainCategoryGroup: response.data.result.domainCategoryGroup, + domainDescription: response.data.result.domainDescription, + domainReputationScore: response.data.result.domainReputationScore, + domainWhoisAddress: response.data.result.domainWhoisAddress, + domainWhoisOrg: response.data.result.domainWhoisOrg + } } }) - } - }, - watch: { - entityData: { - immediate: true, - deep: true, - handler (n) { - if (n) { - this.singleValues.chartDatas.splice(0, 1, this.$_.get(n, 'establishLatency')) - this.singleValues.chartDatas.splice(1, 1, this.$_.get(n, 'httpResponseLatency')) - this.singleValues.chartDatas.splice(2, 1, this.$_.get(n, 'sslConLatency')) - this.singleValues.chartDatas.splice(3, 1, this.$_.get(n, 'sequenceGapLossPercent')) - this.singleValues.chartDatas.splice(4, 1, this.$_.get(n, 'pktRetransPercent')) - this.$nextTick(() => { - this.getRelatedServerDataOne(this.relatedServerAppUrl) - this.getRelatedServerDataTow(this.relatedServerIpUrl) - }) - } - } + }, + queryRelated () { + this.getRelatedServerDataOne(this.relatedServerAppUrl) + this.getRelatedServerDataTwo(this.relatedServerIpUrl) } }, mounted () { diff --git a/src/views/entityExplorer/entityList/detailOverview/Ip.vue b/src/views/entityExplorer/entityList/detailOverview/Ip.vue index e70b645a..84bbae50 100644 --- a/src/views/entityExplorer/entityList/detailOverview/Ip.vue +++ b/src/views/entityExplorer/entityList/detailOverview/Ip.vue @@ -4,11 +4,11 @@
{{$t('overall.location')}}
-
{{entityData.ipLocationCountry || '-'}}
+
{{ipLocationRegion(entity)}}
ASN
-
{{entityData.ipAsn || '-'}}
+
{{entity.ipAsn || '-'}}
@@ -252,12 +252,31 @@ export default { timer: null } }, + computed: { + ipLocationRegion () { + return function (entityData) { + const hasProvinceAndCity = entityData.ipLocationProvince && entityData.ipLocationCity && + entityData.ipLocationProvince !== 'null' && entityData.ipLocationCity !== 'null' + const hasProvince = entityData.ipLocationProvince && entityData.ipLocationProvince !== 'null' + const hasCity = entityData.ipLocationCity && entityData.ipLocationCity !== 'null' + if (hasProvinceAndCity) { + return `${entityData.ipLocationProvince}, ${entityData.ipLocationCity}` + } else if (hasProvince) { + return entityData.ipLocationProvince + } else if (hasCity) { + return entityData.ipLocationCity + } else { + return '-' + } + } + } + }, methods: { getQueryParams () { const queryParams = { startTime: parseInt(this.timeFilter.startTime / 1000), endTime: parseInt(this.timeFilter.endTime / 1000), - ip: this.entityData.ipAddr + ip: this.entity.ipAddr } return queryParams }, @@ -271,24 +290,10 @@ export default { this.chartData = response.data.result } }) - } - }, - watch: { - entityData: { - deep: true, - handler (n) { - if (n) { - this.singleValues.chartDatas.splice(0, 1, this.$_.get(n, 'establishLatency')) - this.singleValues.chartDatas.splice(1, 1, this.$_.get(n, 'httpResponseLatency')) - this.singleValues.chartDatas.splice(2, 1, this.$_.get(n, 'sslConLatency')) - this.singleValues.chartDatas.splice(3, 1, this.$_.get(n, 'sequenceGapLossPercent')) - this.singleValues.chartDatas.splice(4, 1, this.$_.get(n, 'pktRetransPercent')) - this.$nextTick(() => { - this.getRelatedServerDataOne(this.relatedServerDomainUrl) - this.getRelatedServerDataTow(this.relatedServerAppUrl) - }) - } - } + }, + queryRelated () { + this.getRelatedServerDataOne(this.relatedServerDomainUrl) + this.getRelatedServerDataTwo(this.relatedServerAppUrl) } }, mounted () { diff --git a/src/views/entityExplorer/entityList/detailOverview/entityDetailMixin.js b/src/views/entityExplorer/entityList/detailOverview/entityDetailMixin.js index 8405c283..0f85a212 100644 --- a/src/views/entityExplorer/entityList/detailOverview/entityDetailMixin.js +++ b/src/views/entityExplorer/entityList/detailOverview/entityDetailMixin.js @@ -149,6 +149,12 @@ export default { this.entityData.sslConLatency = response.data.result.sslConLatency this.entityData.sequenceGapLossPercent = response.data.result.sequenceGapLossPercent this.entityData.pktRetransPercent = response.data.result.pktRetransPercent + + this.singleValues.chartDatas.splice(0, 1, this.$_.get(this.entityData, 'establishLatency')) + this.singleValues.chartDatas.splice(1, 1, this.$_.get(this.entityData, 'httpResponseLatency')) + this.singleValues.chartDatas.splice(2, 1, this.$_.get(this.entityData, 'sslConLatency')) + this.singleValues.chartDatas.splice(3, 1, this.$_.get(this.entityData, 'sequenceGapLossPercent')) + this.singleValues.chartDatas.splice(4, 1, this.$_.get(this.entityData, 'pktRetransPercent')) } }) } @@ -224,12 +230,13 @@ export default { queryEntityDetail () { this.queryEntityDetailTraffic() - this.queryEntityDetailRelation() + // this.queryEntityDetailRelation() this.queryEntityDetailAlert() this.queryEntityDetailSecurity() this.queryEntityDetailNetworkQuantity() this.queryEntityDetailLinkOutUrl() this.queryEntityDetailLinkInUrl() + this.queryRelated() } }, setup () { @@ -241,7 +248,6 @@ export default { }, mounted () { if (this.listMode === 'list') { - this.entityData = _.cloneDeep(this.entity) this.chartOption = _.cloneDeep(entityListLineOption) setTimeout(() => { this.queryEntityDetail() }) }