From f97b2a9d4a0d07e40eb26e56b95726ef43cd258b Mon Sep 17 00:00:00 2001 From: zyh Date: Fri, 10 Mar 2023 16:11:23 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2664=20fix=EF=BC=9AAssetInfo=20|=20Endpoint?= =?UTF-8?q?Info=20Chart=E6=95=B0=E6=8D=AE=E5=A1=AB=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/chart/assetInfoData.js | 48 ++++++++++++++ nezha-fronted/src/components/chart/chart.vue | 2 + .../components/chart/chart/chartAssetInfo.vue | 3 +- .../chart/chart/chartEndpointInfo.vue | 3 +- .../src/components/chart/chartDetail.vue | 45 ++++++++----- .../src/components/chart/endpointInfoData.js | 66 +++++++++++++++++++ .../src/components/chart/panelChart.vue | 23 ++++++- 7 files changed, 167 insertions(+), 23 deletions(-) create mode 100644 nezha-fronted/src/components/chart/assetInfoData.js create mode 100644 nezha-fronted/src/components/chart/endpointInfoData.js diff --git a/nezha-fronted/src/components/chart/assetInfoData.js b/nezha-fronted/src/components/chart/assetInfoData.js new file mode 100644 index 000000000..84d232f7d --- /dev/null +++ b/nezha-fronted/src/components/chart/assetInfoData.js @@ -0,0 +1,48 @@ +const data = { + msg: 'success', + code: 200, + data: { + id: 'assetID', + name: 'template', + manageIp: '127.0.0.1', + type: { + name: 'Server' + }, + state: { + name: 'In use' + }, + brand: { + name: 'Dell' + }, + dc: { + name: 'JBXXG' + }, + model: { + name: 'ADC-Serve' + }, + fields: [], + cabinet: { + name: '机柜' + }, + pingInfo: { + status: 0, + rtt: null + }, + endpointNum: 0, + alert: [ + { + priority: 'P1', + num: 2 + }, + { + priority: 'P2', + num: 0 + }, + { + priority: 'P3', + num: 0 + } + ] + } +} +export default data diff --git a/nezha-fronted/src/components/chart/chart.vue b/nezha-fronted/src/components/chart/chart.vue index c88136028..198167c7e 100644 --- a/nezha-fronted/src/components/chart/chart.vue +++ b/nezha-fronted/src/components/chart/chart.vue @@ -161,6 +161,7 @@ :chart-option="chartOption" :is-fullscreen="isFullscreen" @chartIsNoData="chartIsNoData" + :from="from" > - +