diff --git a/public/config.js b/public/config.js index d25526db..4077e081 100644 --- a/public/config.js +++ b/public/config.js @@ -9,6 +9,8 @@ const DEFAULT_TIME_FILTER_RANGE = { entity: { list: 60, trafficLine: 60, + subscriberKpi: 60, + subscriberTopApp: 60, informationAggregation: 0, relatedEntity: 60 * 24 * 7, openPort: 60 * 24 * 7, diff --git a/src/assets/css/components/index.scss b/src/assets/css/components/index.scss index c64fce69..f11f1771 100644 --- a/src/assets/css/components/index.scss +++ b/src/assets/css/components/index.scss @@ -83,6 +83,8 @@ @import 'views/setting/knowledgeBase'; @import 'views/charts2/entityDetailLine'; +@import 'views/charts2/EntityDetailSubscriberKpi.scss'; +@import 'views/charts2/EntityDetailSubscriberTopApp.scss'; @import 'views/charts2/entityDetailTabs'; @import 'views/charts2/digitalCertificate'; @import 'views/charts2/entityDetailBasicInfo'; diff --git a/src/assets/css/components/views/charts2/EntityDetailSubscriberKpi.scss b/src/assets/css/components/views/charts2/EntityDetailSubscriberKpi.scss new file mode 100644 index 00000000..120f8c82 --- /dev/null +++ b/src/assets/css/components/views/charts2/EntityDetailSubscriberKpi.scss @@ -0,0 +1,97 @@ +.subscriber-kpi { + height: 100%; + + .subscriber-kpi-header { + height:34px; + padding-bottom:10px; + font-family: NotoSansHans-Medium; + font-size: 14px; + color: #353636; + font-weight: 500; + display:flex; + align-items: center; + justify-content: space-between; + .subscriber-kpi-title { + height:24px; + overflow: hidden; + } + } + .subscriber-kpi-body { + border: 1px solid #E2E5EC; + border-radius: 4px; + height:calc(100% - 34px); + .subscriber-kpi-content { + height: calc(100% - 36px); + padding: 20px 0 20px 20px; + display: flex; + flex-direction: column; + .panel-chart__no-data { + height: calc(100% - 46px); + } + .kpi-type { + display: flex; + flex-direction: column; + justify-content:space-between; + height: calc(100% - 65px); + .kpi-type-value { + display: flex; + flex-direction: column; + padding-bottom:20px; + .kpi-type-value-name { + line-height: 12px; + margin-bottom: 10px; + font-size: 14px; + color: #575757; + font-weight: 400; + } + .kpi-type-data { + display:flex; + flex-direction: row; + .kpi-type-value-number { + font-family: Helvetica-Bold; + font-size: 20px; + color: #353636; + font-weight: 700; + } + .data-trend { + display: flex; + width: 50%; + + .data-total-trend { + display: flex; + justify-content: left; + margin-left: 6px; + font-size: 12px; + justify-content: center; + margin-top: 2px; + border-radius: 10px; + font-weight: 500; + font-size: 12px; + height: 20px; + padding: 0 5px; + } + .data-total-trend-black { + background-color: rgba(113,113,113,0.12); + color: #717171; + width: 36px; + } + .data-total-trend-green { + background-color: rgba(126,159,84,0.12); + color: #7E9F54; + } + .data-total-trend-red { + background-color: rgba(226,97,84,0.12); + color: #E26154; + .cn-icon-rise1{ + color: #E44D3E; + } + } + } + + + } + } + } + } + } +} diff --git a/src/assets/css/components/views/charts2/EntityDetailSubscriberTopApp.scss b/src/assets/css/components/views/charts2/EntityDetailSubscriberTopApp.scss new file mode 100644 index 00000000..2249131b --- /dev/null +++ b/src/assets/css/components/views/charts2/EntityDetailSubscriberTopApp.scss @@ -0,0 +1,97 @@ +.subscriber-top-app { + height: 100%; + + .subscriber-top-app-header { + height:34px; + padding-bottom:10px; + font-family: NotoSansHans-Medium; + font-size: 14px; + color: #353636; + font-weight: 500; + display:flex; + align-items: center; + justify-content: space-between; + .subscriber-top-app-title { + height:24px; + overflow: hidden; + } + } + .subscriber-top-app-body { + border: 1px solid #E2E5EC; + border-radius: 4px; + height:calc(100% - 34px); + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + padding: 20px 20px 20px; + + .panel-chart__no-data { + height: calc(100% - 46px); + } + .top-app-left { + height:100%; + display: flex; + flex-direction: column; + margin-right:15px; + .app-data { + display: flex; + flex-direction: row; + align-items: center; + font-size: 14px; + color: #353636; + font-weight: 400; + height:calc(100%/10); + //padding:5.6px 0 5.6px; + .app-index { + text-align: right; + width:20px; + margin-right:20px; + } + .app-name { + width:50px; + margin-right:30px; + } + .top-app-divider { + height:10px; + background: #717171; + margin-left:10px; + margin-right:8px; + } + .app-trend { + display: flex; + flex-direction: row; + align-items: center; + i { + margin-right:3px; + font-size:12px; + color: #717171; + } + } + .app-up { + font-size: 12px; + color: #717171; + letter-spacing: -0.2px; + text-align: center; + font-weight: 400; + } + .app-down { + font-size: 12px; + color: #717171; + letter-spacing: -0.2px; + text-align: center; + font-weight: 400; + } + } + } + .top-app-right { + height: 100%; + width:calc(100% - 248px); + position: relative; + .chart-content { + height: 100%; + width: 100%; + } + } + } +} diff --git a/src/utils/constants.js b/src/utils/constants.js index f056b25e..f437eae9 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -1887,6 +1887,8 @@ export const chartColor5 = ['#E26154', '#E7B34E', '#88AF65'] export const chartColor6 = ['#E99F67', '#D9C74B'] export const chartColorForBehaviorPattern = ['#7acac7', '#b4d38e', '#fee9b9', '#fec396', '#fb9b79', '#e3799c', '#edd5f5', '#868cac', '#a4adde', '#64b4e6'] +export const chartColorForSubscriberTopApp = ['#A7C186', '#AFCC8A', '#BEDCAC', '#80BEA5', '#7BBBBC', '#8CB9C8', '#E6BF88', '#E6D99B', '#E0D1B0', '#ECAE95'] + export const iso36112 = { [storageKey.iso36112Capital]: 'data/countriesWithCapital', [storageKey.iso36112WorldLow]: 'worldChinaLow', diff --git a/src/views/charts2/Chart.vue b/src/views/charts2/Chart.vue index 884230fa..13a469c9 100644 --- a/src/views/charts2/Chart.vue +++ b/src/views/charts2/Chart.vue @@ -166,11 +166,23 @@ :entity="entity" @toggleLoading="toggleLoading" > - + + +
+
+
{{$t('subscriber.kpi')}}
+ +
+ +
+ + + +
+
+
+
{{$t('subscriber.volume')}}
+
+
+ {{unitConvert($_.get(kpiData, 'volume'), unitTypes.number).join(' ')}} +
+ +
+
+   + 32% +
+
+ +
+
+
+
{{$t('subscriber.throughput')}}
+
+
{{unitConvert($_.get(kpiData, 'throughput'), unitTypes.bps).join(' ')}}
+
+ +
+   + 8% +
+
+
+ +
+
+
{{$t('subscriber.latency')}}
+
+
{{unitConvert($_.get(kpiData, 'latency'), unitTypes.time).join(' ')}}
+
+ +
+ +
+
+ +
+
+
+
{{$t('subscriber.packetLoss')}}
+
+
{{unitConvert($_.get(kpiData, 'packetLoss'), unitTypes.percent).join(' ')}}
+
+ +
+   + 66% +
+
+ +
+
+
+
+
+ +
+ + + diff --git a/src/views/charts2/charts/entityDetail/EntityDetailSubscriberTopApp.vue b/src/views/charts2/charts/entityDetail/EntityDetailSubscriberTopApp.vue new file mode 100644 index 00000000..69663c83 --- /dev/null +++ b/src/views/charts2/charts/entityDetail/EntityDetailSubscriberTopApp.vue @@ -0,0 +1,290 @@ + + + diff --git a/src/views/charts2/charts/options/echartOption.js b/src/views/charts2/charts/options/echartOption.js index 0b3b619e..35c991d1 100644 --- a/src/views/charts2/charts/options/echartOption.js +++ b/src/views/charts2/charts/options/echartOption.js @@ -5,7 +5,8 @@ import { chartColor5, chartColor6, chartColorForBehaviorPattern, - unitTypes + unitTypes, + chartColorForSubscriberTopApp } from '@/utils/constants' import unitConvert from '@/utils/unit-convert' import { axisFormatter } from '@/views/charts/charts/tools' @@ -666,3 +667,58 @@ export const stackedBarChartOption = { } ] } + +export const entityDetailSubscriberTopApp = { + xAxis: { + axisTick: { show: false }, + axisLine: { show: false }, + axisLabel: { + show: false + }, + splitLine: { + show: false + } + }, + grid: { + top: 0, + left: 15, + right: 20, + bottom: 0 + }, + yAxis: { + type: 'category', + axisTick: { show: false }, + axisLine: { + show: true, + lineStyle: { + color: '#E2E5EC' + } + }, + axisLabel: { + show: false + }, + splitLine: { + show: false + } + }, + series: [{ + barWidth: 14, + barMaxHeight: 20, + itemStyle: { + color: function (params) { + const colorList = chartColorForSubscriberTopApp + return colorList[params.dataIndex] + } + }, + data: [], + type: 'bar', + label: { + show: true, + position: 'right', + valueAnimation: true, + formatter: function (param, index, callback) { + return `${unitConvert(param.value[0], unitTypes.percent, null, null, 1).join(' ')}` + } + } + }] +}