From f4f74a1cf32704b17c51c2e05706ee111d10eba1 Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Wed, 1 Apr 2020 21:45:05 +0800 Subject: [PATCH] =?UTF-8?q?perf:=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=8F=8Aasset=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4=20&=20overvi?= =?UTF-8?q?ew=20map=20tooltip=E8=B0=83=E6=95=B4=20&=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.系统设置界面调整 2.overview map tooltip样式调整 3.endpoint 查询metric接口调整 4.asset 左侧菜单调整 --- .../bottomBox/tabs/endpointQueryTab.vue | 2 +- .../src/components/common/language/en.js | 71 +++--- .../src/components/page/asset/asset.vue | 238 +++++++++++++----- .../src/components/page/config/mib.vue | 4 +- .../src/components/page/config/system.vue | 13 +- .../page/dashboard/overview/chartConfig.vue | 2 +- .../page/dashboard/overview/overview.scss | 1 + .../page/dashboard/overview/overview.vue | 114 ++++++++- 8 files changed, 323 insertions(+), 122 deletions(-) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue index 8399cf1ac..aaaf50716 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue @@ -563,7 +563,7 @@ this.queryData = []; this.tableData = []; this.tableDataCopy = ''; - this.$get("/prom/api/v1/query?query={job='ed_" + this.currentEndpoint.id + "'}&time=" + this.formatTime).then(response=>{ + this.$get("/prom/api/v1/query?query={endpoint='" + this.currentEndpoint.id + "'}&time=" + this.formatTime).then(response=>{ if(response.status==="success"){ let results = response.data.result; this.queryData=JSON.parse(JSON.stringify(results)); diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index 2a93f24d9..f2fe7e14f 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -210,7 +210,7 @@ const en = { type:'type', model:'model', dc:'dataCenter' - } + }, }, project:{ project:'Project', @@ -233,8 +233,26 @@ const en = { top:'Top', chart:{ chartTitle:'Alert Trend' - } + }, }, + mapTooltip:{ + asset:'asset', + state:'state', + ping:'ping', + inStock:'in stock', + outStock:'out stock', + active:'active', + inactive:'inactive', + alert:'alert', + high:'high', + medium:'medium', + low:'low', + endpoint:'endpoint', + total:'total', + up:'up', + down:'down', + prometheus:'prometheus', + } } }, validate: { //校验规则 @@ -271,7 +289,8 @@ const en = { testSuccess:'Test success', downloadSuccess : 'Download Success', uploadSuccess: 'Upload Success', - pressEnterToAdd: 'Press enter to add new line' + pressEnterToAdd: 'Press enter to add new line', + resetSuccess:'Reset success', }, asset:{ asset: 'Asset', @@ -281,6 +300,12 @@ const en = { assetStatPre:'Last reply:', assetStatDown:'Never', pingInactive:'inactive', + left:{ + dataCenter:'DataCenter', + assetType:'Asset Type', + vendor:'Vendor', + ping:'Ping', + }, createAssetTab:{ title:'New asset',//'新增资产' sn:'SN',//SN @@ -506,35 +531,6 @@ const en = { remark: 'Remark', type: 'Type' }, - terminallog: { - terminallog: 'TerminalLog', - status: 'Status',//"状态" - option: 'Operation',//"操作", - host: 'Host', - cmd: 'CMD', - port: 'Port', - userId: 'UserID', - protocol: 'Protocol', - user: 'User', - detail: 'Terminal Log Detail', - resize: 'Terminal Resize', - download: 'Terminal Download', - upload: 'Terminal Upload', - selectFile: 'Select File', - SSH: 'SSH', - TELNET: 'TELNET', - id: 'ID', - time: 'Time', - width: 'Width', - height: 'Height', - cols: 'Cols', - rows: 'Rows', - uuid: 'UUID', - path: 'Path', - file: 'File', - success: 'Success', - fail: 'Fail' - }, mib:{ mib:'Mib', fileName:'FileName', @@ -670,17 +666,6 @@ const en = { editModule: 'Edit module',//"编辑组件" description: 'Description',//"描述" createModule: 'New module',//"新增组件" - version: 'Version', - walk: 'Walk', - maxRepetitions: 'Max repetitions', - retries: 'Retries', - timeout: 'Timeout', - community: 'Community', - securityLevel: 'Security level', - authProtocol: 'Auth protocol', - privProtocol: 'Priv protocol', - contextName: 'Context name', - privPassword: 'Priv password', tip: { defaultEndpointSet: 'Default endpoint settings',//"默认的Endpoint设置" relation: 'Module associated Endpoint will configure the following ports/paths/parameters by default'//"组件关联的Endpoint将默认配置以下端口/路径/参数" diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue index 725f4cef3..073429cd4 100644 --- a/nezha-fronted/src/components/page/asset/asset.vue +++ b/nezha-fronted/src/components/page/asset/asset.vue @@ -5,7 +5,7 @@ -
-
-
-
- - - - -
- -
+
+
+
+
+ + + + +
+ +
- - -