From 1708b74f1b3d7f37feb4ab250a48193d339d2f6f Mon Sep 17 00:00:00 2001 From: gongzijian Date: Thu, 25 Apr 2019 10:22:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=9B=91=E6=8E=A7=E4=B8=AD?= =?UTF-8?q?=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- escheduler-ui/src/js/conf/home/index.js | 1 + .../datasource/pages/list/_source/list.vue | 1 - .../monitor/pages/servers/_source/gauge.vue | 62 +++++ .../pages/servers/_source/gaugeOption.js | 234 +++++++++--------- .../monitor/pages/servers/_source/list.vue | 81 ------ .../pages/servers/_source/zookeeperList.vue | 125 ++++++++++ .../pages/monitor/pages/servers/alert.vue | 2 +- .../pages/monitor/pages/servers/master.vue | 179 ++++---------- .../pages/monitor/pages/servers/mysql.vue | 71 ++++-- .../pages/monitor/pages/servers/servers.scss | 103 ++++++-- .../pages/monitor/pages/servers/worker.vue | 177 ++++--------- .../pages/monitor/pages/servers/zookeeper.vue | 20 +- .../_source/taskRecordList/_source/list.vue | 2 - .../definition/pages/list/_source/list.vue | 1 - .../pages/definition/timing/_source/list.vue | 1 - .../instance/pages/list/_source/list.vue | 1 - .../projects/pages/list/_source/list.vue | 1 - .../pages/taskInstance/_source/list.vue | 1 - .../pages/file/pages/list/_source/list.vue | 1 - .../pages/udf/pages/function/_source/list.vue | 1 - .../pages/udf/pages/resource/_source/list.vue | 1 - .../security/pages/queue/_source/list.vue | 1 - .../security/pages/tenement/_source/list.vue | 2 +- .../security/pages/users/_source/list.vue | 1 - .../pages/warningGroups/_source/list.vue | 1 - .../pages/workerGroups/_source/list.vue | 1 - .../pages/user/pages/account/_source/info.vue | 1 - .../user/pages/password/_source/info.vue | 1 - .../pages/user/pages/token/_source/list.vue | 1 - escheduler-ui/src/js/conf/home/store/index.js | 4 +- .../src/js/conf/home/store/monitor/actions.js | 57 +++++ .../src/js/conf/home/store/monitor/getters.js | 19 ++ .../src/js/conf/home/store/monitor/index.js | 30 +++ .../js/conf/home/store/monitor/mutations.js | 19 ++ .../src/js/conf/home/store/monitor/state.js | 18 ++ 35 files changed, 703 insertions(+), 519 deletions(-) create mode 100644 escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/gauge.vue delete mode 100644 escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/list.vue create mode 100644 escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue create mode 100644 escheduler-ui/src/js/conf/home/store/monitor/actions.js create mode 100644 escheduler-ui/src/js/conf/home/store/monitor/getters.js create mode 100644 escheduler-ui/src/js/conf/home/store/monitor/index.js create mode 100644 escheduler-ui/src/js/conf/home/store/monitor/mutations.js create mode 100644 escheduler-ui/src/js/conf/home/store/monitor/state.js diff --git a/escheduler-ui/src/js/conf/home/index.js b/escheduler-ui/src/js/conf/home/index.js index 1ba4b3a80..6099fb58a 100644 --- a/escheduler-ui/src/js/conf/home/index.js +++ b/escheduler-ui/src/js/conf/home/index.js @@ -25,6 +25,7 @@ import store from './store' import i18n from '@/module/i18n' import { sync } from 'vuex-router-sync' import Chart from '~/@analysys/ana-charts' +import '@/module/filter/formatDate' import themeData from '@/module/echarts/themeData.json' import Permissions from '@/module/permissions' import '~/@analysys/ans-ui/lib/ans-ui.min.css' diff --git a/escheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/list.vue index 7436d9da6..b32aeeb6b 100644 --- a/escheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/list.vue +++ b/escheduler-ui/src/js/conf/home/pages/datasource/pages/list/_source/list.vue @@ -90,7 +90,6 @@ + + diff --git a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/gaugeOption.js b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/gaugeOption.js index 003ce4969..c672769d1 100644 --- a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/gaugeOption.js +++ b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/gaugeOption.js @@ -1,121 +1,123 @@ -export default { - series: [ - { - type: 'gauge', - center: ['50%', '45%'], // 仪表位置 - radius: '80%', // 仪表大小 - startAngle: 200, // 开始角度 - endAngle: -20, // 结束角度 - axisLine: { - show: false, - lineStyle: { // 属性lineStyle控制线条样式 - color: [ - [ 0.5, new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ // eslint-disable-line - offset: 1, - color: '#E75F25' // 50% 处的颜色 - }, { - offset: 0.8, - color: '#D9452C' // 40% 处的颜色 - }], false) ], // 100% 处的颜色 - [ 0.7, new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ // eslint-disable-line - offset: 1, - color: '#FFC539' // 70% 处的颜色 - }, { - offset: 0.8, - color: '#FE951E' // 66% 处的颜色 - }, { - offset: 0, - color: '#E75F25' // 50% 处的颜色 - }], false) ], - [ 0.9, new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ // eslint-disable-line - offset: 1, - color: '#C7DD6B' // 90% 处的颜色 - }, { - offset: 0.8, - color: '#FEEC49' // 86% 处的颜色 - }, { - offset: 0, - color: '#FFC539' // 70% 处的颜色 - }], false) ], - [1, new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { // eslint-disable-line - offset: 0.2, - color: '#1CAD52' // 92% 处的颜色 - }, { - offset: 0, - color: '#C7DD6B' // 90% 处的颜色 - }], false) ] - ], - width: 10 - } - }, - splitLine: { - show: false - }, - axisTick: { - show: false - }, - axisLabel: { - show: false - }, - pointer: { // 指针样式 - length: '45%' - }, - detail: { - show: false - } - }, - { - type: 'gauge', - center: ['50%', '45%'], // 默认全局居中 - radius: '70%', - startAngle: 200, - endAngle: -20, - axisLine: { - show: true, - lineStyle: { // 属性lineStyle控制线条样式 - color: [ // 表盘颜色 - [ 0.5, '#DA462C' ], // 0-50%处的颜色 - [ 0.7, '#FF9618' ], // 51%-70%处的颜色 - [ 0.9, '#FFED44' ], // 70%-90%处的颜色 - [ 1, '#20AE51' ]// 90%-100%处的颜色 - ], - width: 30// 表盘宽度 - } - }, - splitLine: { // 分割线样式(及10、20等长线样式) - length: 30, - lineStyle: { // 属性lineStyle控制线条样式 - width: 2 - } - }, - axisTick: { // 刻度线样式(及短线样式) - length: 20 - }, - axisLabel: { // 文字样式(及“10”、“20”等文字样式) - color: 'black', - distance: 5 // 文字离表盘的距离 - }, - detail: { - formatter: '{score|{value}%}', - offsetCenter: [0, '50%'], - backgroundColor: '#2D8BF0', - height: 30, - rich: { - score: { - color: 'white', - fontFamily: '微软雅黑', - fontSize: 32 +export default function (value) { + return { + series: [ + { + type: 'gauge', + center: ['50%', '45%'], // 仪表位置 + radius: '80%', // 仪表大小 + startAngle: 200, // 开始角度 + endAngle: -20, // 结束角度 + axisLine: { + show: false, + lineStyle: { // 属性lineStyle控制线条样式 + color: [ + [ 0.5, new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ // eslint-disable-line + offset: 1, + color: '#E75F25' // 50% 处的颜色 + }, { + offset: 0.8, + color: '#D9452C' // 40% 处的颜色 + }], false) ], // 100% 处的颜色 + [ 0.7, new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ // eslint-disable-line + offset: 1, + color: '#FFC539' // 70% 处的颜色 + }, { + offset: 0.8, + color: '#FE951E' // 66% 处的颜色 + }, { + offset: 0, + color: '#E75F25' // 50% 处的颜色 + }], false) ], + [ 0.9, new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ // eslint-disable-line + offset: 1, + color: '#C7DD6B' // 90% 处的颜色 + }, { + offset: 0.8, + color: '#FEEC49' // 86% 处的颜色 + }, { + offset: 0, + color: '#FFC539' // 70% 处的颜色 + }], false) ], + [1, new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { // eslint-disable-line + offset: 0.2, + color: '#1CAD52' // 92% 处的颜色 + }, { + offset: 0, + color: '#C7DD6B' // 90% 处的颜色 + }], false) ] + ], + width: 10 } + }, + splitLine: { + show: false + }, + axisTick: { + show: false + }, + axisLabel: { + show: false + }, + pointer: { // 指针样式 + length: '45%' + }, + detail: { + show: false } }, - data: [{ - value: 70, - label: { - textStyle: { - fontSize: 12 + { + type: 'gauge', + center: ['50%', '45%'], // 默认全局居中 + radius: '70%', + startAngle: 200, + endAngle: -20, + axisLine: { + show: true, + lineStyle: { // 属性lineStyle控制线条样式 + color: [ // 表盘颜色 + [ 0.5, '#DA462C' ], // 0-50%处的颜色 + [ 0.7, '#FF9618' ], // 51%-70%处的颜色 + [ 0.9, '#FFED44' ], // 70%-90%处的颜色 + [ 1, '#20AE51' ]// 90%-100%处的颜色 + ], + width: 30// 表盘宽度 } - } - }] - } - ] + }, + splitLine: { // 分割线样式(及10、20等长线样式) + length: 30, + lineStyle: { // 属性lineStyle控制线条样式 + width: 2 + } + }, + axisTick: { // 刻度线样式(及短线样式) + length: 20 + }, + axisLabel: { // 文字样式(及“10”、“20”等文字样式) + color: 'black', + distance: 5 // 文字离表盘的距离 + }, + detail: { + formatter: '{score|{value}%}', + offsetCenter: [0, '50%'], + backgroundColor: '#2D8BF0', + height: 30, + rich: { + score: { + color: 'white', + fontFamily: '微软雅黑', + fontSize: 32 + } + } + }, + data: [{ + value: value || 0, + label: { + textStyle: { + fontSize: 12 + } + } + }] + } + ] + } } diff --git a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/list.vue deleted file mode 100644 index 55649f1ee..000000000 --- a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/list.vue +++ /dev/null @@ -1,81 +0,0 @@ - - diff --git a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue new file mode 100644 index 000000000..c8fb2648b --- /dev/null +++ b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/zookeeperList.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/alert.vue b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/alert.vue index e00e47e02..dd1881e9b 100644 --- a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/alert.vue +++ b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/alert.vue @@ -13,7 +13,7 @@ diff --git a/escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/list.vue index 76fcf4b77..6ca5a1acf 100644 --- a/escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/list.vue +++ b/escheduler-ui/src/js/conf/home/pages/projects/pages/_source/taskRecordList/_source/list.vue @@ -67,8 +67,6 @@