diff --git a/escheduler-ui/.env b/escheduler-ui/.env
index d4dcd9f473..52ce563e9b 100644
--- a/escheduler-ui/.env
+++ b/escheduler-ui/.env
@@ -1,6 +1,6 @@
# 后端接口地址
-API_BASE = http://192.168.220.154:12345
+API_BASE = http://192.168.220.247:12345
# 本地开发如需ip访问项目把"#"号去掉
#DEV_HOST = 192.168.xx.xx
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
new file mode 100644
index 0000000000..46c26186a6
--- /dev/null
+++ b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/_source/gaugeOption.js
@@ -0,0 +1,121 @@
+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
+ }
+ }
+ },
+ data: [{
+ value: 70,
+ 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
index 5bc030c848..55649f1eec 100644
--- 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
@@ -7,25 +7,28 @@
{{$t('#')}}
- {{$t('IP')}}
+ node
|
- {{$t('Process Pid')}}
+ ip
|
- {{$t('zk registration directory')}}
+ 模式
|
- {{$t('cpuUsage')}}
+ 连接数
|
- {{$t('memoryUsage')}}
+ watch数
|
- {{$t('Create Time')}}
+ 数据量
|
- {{$t('Last heartbeat time')}}
+ Sent/Received
+ |
+
+ 节点自检状态
|
@@ -34,22 +37,25 @@
- {{item.host}}
+ task1
|
- {{item.port}} |
+ 192.11.1.1 |
- {{item.zkDirectory}}
+ 2222
|
- {{_rtResInfo(JSON.parse(item.resInfo)['cpuUsage'])}}
+ 3333
|
- {{_rtResInfo(JSON.parse(item.resInfo)['memoryUsage'])}}
+ 4444
|
- {{item.createTime | formatDate}} |
+ 5555 |
- {{item.lastHeartbeatTime | formatDate}}
+ 6666
+ |
+
+ 7777
|
@@ -70,9 +76,6 @@
list: Array
},
methods: {
- _rtResInfo (val) {
- return (val * 100).toFixed(2) + ' %'
- }
}
}
diff --git a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue
index e9f9f2947f..d807b4d7f9 100644
--- a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue
+++ b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/master.vue
@@ -1,11 +1,129 @@
-
+
-
.col-md-8
-
.col-md-4
-
.col-md-4
+
+
+
+ Cpu详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+ 12
+
+
+ cpu
+
+
+
+
+
+
+
+
+ Cpu详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+ 72
+
+
+ cpu
+
+
+
+
+
+
+
+
+ Cpu详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+ 44
+
+
+ cpu
+
+
+
@@ -16,6 +134,7 @@
import mList from './_source/list'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
+ import gaugeOption from './_source/gaugeOption'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
@@ -36,14 +155,20 @@
},
watch: {},
created () {
- this.isLoading = true
- this.getProcessMasterList().then(res => {
- this.masterList = res.data
- this.isLoading = false
- })
+
+
},
mounted () {
+ let b = {}
+ let a = ['a1', 'a2', 'a3', 'a4', 'a5', 'a6']
+ a.forEach((v, i) => {
+ b[v] = echarts.init(document.getElementById(v)) // eslint-disable-line
+ b[v].setOption(gaugeOption, true)
+ })
},
components: { mList, mListConstruction, mSpin, mNoData }
}
+
\ No newline at end of file
diff --git a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/mysql.vue b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/mysql.vue
index b96873cf67..749cd71202 100644
--- a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/mysql.vue
+++ b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/mysql.vue
@@ -1,40 +1,83 @@
-
- mysql
-
+
+
+
+
+
+
+
+ 正常与否
+
+
+ 78
+
+
+ 正常与否
+
+
+
+
+
+
+ 最大连接数
+
+
+ 55
+
+
+ 最大连接数
+
+
+
+
+
+
+ 当前活跃连接
+
+
+ 32
+
+
+ 当前活跃连接
+
+
+
+
+
+
+
-
+ @import "./servers";
+
\ No newline at end of file
diff --git a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/servers.scss b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/servers.scss
new file mode 100644
index 0000000000..7dfe4b7be4
--- /dev/null
+++ b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/servers.scss
@@ -0,0 +1,44 @@
+.servers-wrapper {
+ padding: 16px;
+ >.row {
+ margin-bottom: 20px;
+ }
+ .gridb-model {
+ width: 100%;
+ height: 360px;
+ overflow: hidden;
+ border: 1px solid #E8E8E8;
+ margin: 0 auto;
+ >.title {
+ height: 36px;
+ line-height: 36px;
+ background: #F9F9F9;
+ border-bottom: 1px solid #E8E8E8;
+ span {
+ padding-left: 8px;
+ }
+ }
+ .gauge-echart {
+ width: 350px;
+ margin: auto;
+ margin-bottom: -80px;
+ }
+ .text-1 {
+ width: 100%;
+ margin: 0 auto;
+ font-size: 32px;
+ text-align: center;
+ }
+ .value-p {
+ height: 254px;
+ line-height: 254px;
+ text-align: center;
+ >b {
+ font-size: 140px;
+ color: #333;
+ }
+ }
+ }
+
+}
+
diff --git a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue
index 8112ea372e..526d1565df 100644
--- a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue
+++ b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/worker.vue
@@ -1,13 +1,131 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+ Cpu详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+ 83
+
+
+ cpu
+
+
+
+
+
+
+
+
+ Cpu详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+ 18
+
+
+ cpu
+
+
+
+
+
+
+
+
+ Cpu详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+
+ cpu
+
+
+
+
+
+
+ 内存详细信息
+
+
+ 15
+
+
+ cpu
+
+
+
+
+
@@ -16,10 +134,11 @@
import mList from './_source/list'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
+ import gaugeOption from './_source/gaugeOption'
import mListConstruction from '@/module/components/listConstruction/listConstruction'
export default {
- name: 'worker-index',
+ name: 'servers-worker',
data () {
return {
pageSize: 10,
@@ -27,23 +146,28 @@
totalPage: null,
searchVal: '',
isLoading: false,
- workerList: []
+ masterList: []
}
},
props: {},
methods: {
- ...mapActions('security', ['getProcessWorkerList'])
+ ...mapActions('security', ['getProcessMasterList'])
},
watch: {},
created () {
- this.isLoading = true
- this.getProcessWorkerList().then(res => {
- this.workerList = res.data
- this.isLoading = false
- })
+
},
mounted () {
+ let b = {}
+ let a = ['a1', 'a2', 'a3', 'a4', 'a5', 'a6']
+ a.forEach((v, i) => {
+ b[v] = echarts.init(document.getElementById(v)) // eslint-disable-line
+ b[v].setOption(gaugeOption, true)
+ })
},
components: { mList, mListConstruction, mSpin, mNoData }
}
+
\ No newline at end of file
diff --git a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/zookeeper.vue b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/zookeeper.vue
index c86cd4c746..c226f95d9d 100644
--- a/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/zookeeper.vue
+++ b/escheduler-ui/src/js/conf/home/pages/monitor/pages/servers/zookeeper.vue
@@ -1,10 +1,10 @@
-
+
-
-
+
+
-
+
@@ -27,7 +27,7 @@
totalPage: null,
searchVal: '',
isLoading: false,
- masterList: []
+ zookeeperList: []
}
},
props: {},
@@ -36,11 +36,7 @@
},
watch: {},
created () {
- this.isLoading = true
- this.getProcessMasterList().then(res => {
- this.masterList = res.data
- this.isLoading = false
- })
+ this.zookeeperList = [{ id: 1 }, { id: 1 }, { id: 1 }, { id: 1 }]
},
mounted () {
},
diff --git a/escheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/projectChart.vue b/escheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/projectChart.vue
index 3f6f6a600b..80b9eaf122 100644
--- a/escheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/projectChart.vue
+++ b/escheduler-ui/src/js/conf/home/pages/projects/pages/index/_source/projectChart.vue
@@ -93,10 +93,10 @@
import dayjs from 'dayjs'
import { mapActions } from 'vuex'
import { pie, bar } from './chartConfig'
- import { stateType } from '@/conf/home/pages/projects/pages/_source/instanceConditions/common'
import Chart from '~/@analysys/ana-charts'
- import mNoData from '@/module/components/noData/noData'
import mSpin from '@/module/components/spin/spin'
+ import mNoData from '@/module/components/noData/noData'
+ import { stateType } from '@/conf/home/pages/projects/pages/_source/instanceConditions/common'
export default {
diff --git a/escheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/list.vue
index d2330f2bd6..994d79f877 100644
--- a/escheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/list.vue
+++ b/escheduler-ui/src/js/conf/home/pages/security/pages/queue/_source/list.vue
@@ -80,7 +80,6 @@
+
+
diff --git a/escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/list.vue
index 6de20e7cc4..028b2166d7 100644
--- a/escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/list.vue
+++ b/escheduler-ui/src/js/conf/home/pages/security/pages/users/_source/list.vue
@@ -99,7 +99,6 @@
import i18n from '@/module/i18n'
import { mapActions } from 'vuex'
import '@/module/filter/formatDate'
- import { findComponentDownward } from '@/module/util/'
import mTransfer from '@/module/components/transfer/transfer'
export default {
@@ -132,7 +131,7 @@
})
},
_edit (item) {
- findComponentDownward(this.$root, 'users-index')._create(item)
+ this.$emit('on-edit', item)
},
_authProject (item, i) {
this.$refs[`poptip-auth-${i}`][0].doClose()
diff --git a/escheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue b/escheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue
index 47b17185e3..4469a1f759 100644
--- a/escheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue
+++ b/escheduler-ui/src/js/conf/home/pages/security/pages/users/index.vue
@@ -9,7 +9,12 @@
-
+
+
+
@@ -60,6 +65,9 @@
_page (val) {
this.searchParams.pageNo = val
},
+ _onEdit (item) {
+ this._create(item)
+ },
_create (item) {
let self = this
let modal = this.$modal.dialog({
diff --git a/escheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue
index 699408bdb6..b8c95be92c 100644
--- a/escheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue
+++ b/escheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/_source/list.vue
@@ -72,7 +72,6 @@
import i18n from '@/module/i18n'
import { mapActions } from 'vuex'
import '@/module/filter/formatDate'
- import { findComponentDownward } from '@/module/util/'
import mTransfer from '@/module/components/transfer/transfer'
export default {
@@ -105,7 +104,7 @@
})
},
_edit (item) {
- findComponentDownward(this.$root, 'warning-groups-index')._create(item)
+ this.$emit('on-edit', item)
},
_mangeUser (item, i) {
this.getAuthList({
diff --git a/escheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue b/escheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
index 9ea3d2498f..5d5390fbca 100644
--- a/escheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
+++ b/escheduler-ui/src/js/conf/home/pages/security/pages/warningGroups/index.vue
@@ -9,7 +9,12 @@
-
+
+
+
@@ -60,6 +65,9 @@
_page (val) {
this.searchParams.pageNo = val
},
+ _onEdit (item) {
+ this._create(item)
+ },
_create (item) {
let self = this
let modal = this.$modal.dialog({
diff --git a/escheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/list.vue
index 9597e0fa9a..b30f7a86c7 100644
--- a/escheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/list.vue
+++ b/escheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/_source/list.vue
@@ -66,7 +66,6 @@
// import i18n from '@/module/i18n'
import { mapActions } from 'vuex'
import '@/module/filter/formatDate'
- import { findComponentDownward } from '@/module/util/'
export default {
name: 'user-list',
@@ -98,7 +97,7 @@
})
},
_edit (item) {
- findComponentDownward(this.$root, 'worker-groups-index')._create(item)
+ this.$emit('on-edit', item)
}
},
watch: {
diff --git a/escheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue b/escheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue
index d962b937c5..65f40a8380 100644
--- a/escheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue
+++ b/escheduler-ui/src/js/conf/home/pages/security/pages/workerGroups/index.vue
@@ -9,7 +9,11 @@
-
+
+
@@ -60,6 +64,9 @@
_page (val) {
this.searchParams.pageNo = val
},
+ _onEdit (item) {
+ this._create(item)
+ },
_create (item) {
let self = this
let modal = this.$modal.dialog({
diff --git a/escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue b/escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue
index 4616dfe6e6..5720b86ca0 100644
--- a/escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue
+++ b/escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/createToken.vue
@@ -18,7 +18,7 @@
-
+
*用户
@@ -53,6 +53,7 @@
import dayjs from 'dayjs'
// import i18n from '@/module/i18n'
import store from '@/conf/home/store'
+ import Permissions from '@/module/permissions'
import mPopup from '@/module/components/popup/popup'
import mListBoxF from '@/module/components/listBoxF/listBoxF'
@@ -66,7 +67,8 @@
disabledDate: date => (date.getTime() - new Date(new Date().getTime() - 24 * 60 * 60 * 1000)) < 0,
token: '',
userIdList: [],
- tokenLoading: false
+ tokenLoading: false,
+ auth: !Permissions.getAuth()
}
},
props: {
@@ -128,16 +130,23 @@
},
watch: {},
created () {
- this.store.dispatch(`security/getUsersList`).then(res => {
- this.userIdList = _.map(res, v => _.pick(v, ['id', 'userName']))
+ const d = (userId) => {
if (this.item) {
this.expireTime = this.item.expireTime
this.userId = this.item.userId
this.token = this.item.token
} else {
- this.userId = this.userIdList[0].id
+ this.userId = userId
}
- })
+ }
+ if (this.auth) {
+ this.store.dispatch(`security/getUsersList`).then(res => {
+ this.userIdList = _.map(res, v => _.pick(v, ['id', 'userName']))
+ d(this.userIdList[0].id)
+ })
+ } else {
+ d(this.store.state.user.userInfo.id)
+ }
},
mounted () {
},
diff --git a/escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/list.vue
index 2f8156b29d..ed2f9648ce 100644
--- a/escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/list.vue
+++ b/escheduler-ui/src/js/conf/home/pages/user/pages/token/_source/list.vue
@@ -72,7 +72,6 @@