From db55e8ed71a5f8b7a054925371a4c9f69c8de3b4 Mon Sep 17 00:00:00 2001 From: qiaozhanwei Date: Tue, 21 May 2019 19:17:36 +0800 Subject: [PATCH 1/3] support ubuntu and centos6 deploy update --- escheduler-ui/install-escheduler-ui.sh | 234 ++++++++++++++----------- 1 file changed, 130 insertions(+), 104 deletions(-) diff --git a/escheduler-ui/install-escheduler-ui.sh b/escheduler-ui/install-escheduler-ui.sh index 60bf2b5341..be9a3801ac 100755 --- a/escheduler-ui/install-escheduler-ui.sh +++ b/escheduler-ui/install-escheduler-ui.sh @@ -1,66 +1,17 @@ #!/bin/bash - # 当前路径 esc_basepath=$(cd `dirname $0`; pwd) - -echo "欢迎使用easy scheduler前端部署脚本,目前前端部署脚本仅支持Centos" -echo "请在 escheduler-ui 目录下执行" - -# 配置前端访问端口 -esc_proxy="8888" - -# 配置代理后端接口 -esc_proxy_port="http://192.168.xx.xx:12345" - -# 本机ip -esc_ipaddr='127.0.0.1' - -esc_ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}') - - -#To be compatible with MacOS and Linux -if [[ "$OSTYPE" == "darwin"* ]]; then - # Mac OSX - echo "Easy Scheduler ui install not support Mac OSX operating system" - exit 1 -elif [[ "$OSTYPE" == "linux-gnu" ]]; then - # linux - echo "linux" -elif [[ "$OSTYPE" == "cygwin" ]]; then - # POSIX compatibility layer and Linux environment emulation for Windows - echo "Easy Scheduler ui not support Windows operating system" - exit 1 -elif [[ "$OSTYPE" == "msys" ]]; then - # Lightweight shell and GNU utilities compiled for Windows (part of MinGW) - echo "Easy Scheduler ui not support Windows operating system" - exit 1 -elif [[ "$OSTYPE" == "win32" ]]; then - echo "Easy Scheduler ui not support Windows operating system" - exit 1 -elif [[ "$OSTYPE" == "freebsd"* ]]; then - # ... - echo "freebsd" -else - # Unknown. - echo "Operating system unknown, please tell us(submit issue) for better service" - exit 1 -fi - -# 区分版本 -version=`cat /etc/redhat-release|sed -r 's/.* ([0-9]+)\..*/\1/'` - - -echo "========================================================================配置信息=======================================================================" - -echo "前端访问端口:${esc_proxy}" -echo "后端代理接口地址:${esc_proxy_port}" -echo "静态文件地址:${esc_basepath}/dist" -echo "当前路径:${esc_basepath}" -echo "本机ip:${esc_ipaddr}" - -echo "========================================================================配置信息=======================================================================" -echo "" +menu(){ + cat <> /etc/yum.repos.d/nginx.repo + + rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm # install nginx yum install nginx -y # 配置nginx - eschedulerConf - - # 防火墙 - E_iptables=`lsof -i:$esc_proxy | wc -l` - if [ "$E_iptables" -gt "0" ];then - # 已开启端口防火墙重启 - service iptables restart - else - # 未开启防火墙添加端口再重启 - iptables -I INPUT 5 -i eth0 -p tcp --dport $esc_proxy -m state --state NEW,ESTABLISHED -j ACCEPT - service iptables save - service iptables restart - fi + eschedulerConf $1 $2 - # start + # 启动nginx /etc/init.d/nginx start + sleep 1 + if [ $? -ne 0 ];then + /etc/init.d/nginx start + fi + nginx -s reload # 调整SELinux的参数 sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config @@ -178,16 +133,87 @@ centos6(){ } -# centos 6 -if [[ $version -eq 6 ]]; then - centos6 -fi - -# centos 7 -if [[ $version -eq 7 ]]; then - centos7 -fi +function main(){ + echo "欢迎使用easy scheduler前端部署脚本,目前前端部署脚本仅支持CentOS,Ubuntu" + echo "请在 escheduler-ui 目录下执行" + + #To be compatible with MacOS and Linux + if [[ "$OSTYPE" == "darwin"* ]]; then + # Mac OSX + echo "Easy Scheduler ui install not support Mac OSX operating system" + exit 1 + elif [[ "$OSTYPE" == "linux-gnu" ]]; then + # linux + echo "linux" + elif [[ "$OSTYPE" == "cygwin" ]]; then + # POSIX compatibility layer and Linux environment emulation for Windows + echo "Easy Scheduler ui not support Windows operating system" + exit 1 + elif [[ "$OSTYPE" == "msys" ]]; then + # Lightweight shell and GNU utilities compiled for Windows (part of MinGW) + echo "Easy Scheduler ui not support Windows operating system" + exit 1 + elif [[ "$OSTYPE" == "win32" ]]; then + echo "Easy Scheduler ui not support Windows operating system" + exit 1 + elif [[ "$OSTYPE" == "freebsd"* ]]; then + # ... + echo "freebsd" + else + # Unknown. + echo "Operating system unknown, please tell us(submit issue) for better service" + exit 1 + fi + + + # 配置前端访问端口 + read -p "请输入nginx代理端口,不输入,则默认8888 :" esc_proxy_port + if [ -z "${esc_proxy_port}" ];then + esc_proxy_port="8888" + fi + + read -p "请输入api server代理ip,必须输入,例如:192.168.xx.xx :" esc_api_server_ip + if [ -z "${esc_api_server_ip}" ];then + echo "api server代理ip不能为空." + exit 1 + fi + + read -p "请输入api server代理端口,不输入,则默认12345 :" esc_api_server_port + if [ -z "${esc_api_server_port}" ];then + esc_api_server_port="12345" + fi + + # api server后端地址 + esc_api_server="http://$esc_api_server_ip:$esc_api_server_port" + + # 本机ip地址 + esc_ipaddr=$(ip a | grep inet | grep -v inet6 | grep -v 127 | sed 's/^[ \t]*//g' | cut -d ' ' -f2 | head -n 1 | awk -F '/' '{print $1}') + + # 提示信息 + menu + + read -p "请输入安装编号(1|2|3|4):" num + + case $num in + 1) + centos6 ${esc_proxy_port} ${esc_api_server} + ;; + 2) + centos7 ${esc_proxy_port} ${esc_api_server} + ;; + 3) + ubuntu ${esc_proxy_port} ${esc_api_server} + ;; + 4) + echo $"Usage :sh $0" + exit 1 + ;; + *) + echo $"Usage :sh $0" + exit 1 + esac + echo "请浏览器访问:http://${esc_ipaddr}:${esc_proxy_port}" +} -echo "请浏览器访问:http://${esc_ipaddr}:${esc_proxy}" - +main From 92e8da44355e272ee78801a1687a45001cd998a2 Mon Sep 17 00:00:00 2001 From: huyuanming Date: Wed, 22 May 2019 15:02:54 +0800 Subject: [PATCH 2/3] gantt --- .../projects/pages/instance/pages/gantt/_source/gantt.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/_source/gantt.js b/escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/_source/gantt.js index f105eb96f1..482a395fa1 100644 --- a/escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/_source/gantt.js +++ b/escheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/gantt/_source/gantt.js @@ -107,11 +107,11 @@ Gantt.prototype.drawChart = function () { .append('svg') .attr('class', 'chart') .attr('width', this.width + this.margin.left + this.margin.right) - .attr('height', this.height + this.margin.top + this.margin.bottom) + .attr('height', this.height + this.margin.top + this.margin.bottom + 150) .append('g') .attr('class', 'gantt-chart') .attr('width', this.width + this.margin.left + this.margin.right) - .attr('height', this.height + this.margin.top + this.margin.bottom) + .attr('height', this.height + this.margin.top + this.margin.bottom + 150) .attr('transform', 'translate(' + this.margin.left + ', ' + this.margin.top + ')') svg.selectAll('.chart') @@ -132,6 +132,9 @@ Gantt.prototype.drawChart = function () { .attr('transform', 'translate(0, ' + (this.height - this.margin.top - this.margin.bottom) + ')') .transition() .call(this.xAxis) + .selectAll("text") + .attr("transform", `rotate(-${this.width / ($('.tick').length - 1) > 50 ? 0 : Math.acos(this.width / ($('.tick').length - 1) / 50) * 57 })`) + .style("text-anchor", `${this.width / ($('.tick').length - 1) > 50 ? 'middle' : 'end'}`) svg.append('g') .attr('class', 'y axis') From 32b9737e0ec13dfd44779eeada9432ed10e40a1c Mon Sep 17 00:00:00 2001 From: huyuanming Date: Wed, 22 May 2019 17:18:56 +0800 Subject: [PATCH 3/3] fixed the batch delete --- .../definition/pages/list/_source/list.vue | 23 ++++++------ .../instance/pages/list/_source/list.vue | 35 ++++++++++--------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue index c9b121c90d..310cc22727 100644 --- a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue +++ b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue @@ -6,7 +6,7 @@ - + {{$t('#')}} @@ -33,7 +33,7 @@ - + {{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}} @@ -90,7 +90,7 @@ - 批量删除 + 删除