merge from upstream/dev
This commit is contained in:
commit
18c7876f28
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
|
|
@ -64,6 +64,75 @@ Lodash 高性能的 JavaScript 实用工具库
|
|||
|
||||
`util` => 工具
|
||||
|
||||
|
||||
### 开发环境搭建
|
||||
|
||||
- #### Node安装
|
||||
Node包下载 (注意版本 8.9.4) `https://nodejs.org/download/release/v8.9.4/`
|
||||
|
||||
- #### 前端项目构建
|
||||
用命令行模式 `cd` 进入 `escheduler-ui`项目目录并执行 `npm install` 拉取项目依赖包
|
||||
|
||||
> 如果 `npm install` 速度非常慢
|
||||
|
||||
> 可以转淘宝镜像命令行输入 `npm install -g cnpm --registry=https://registry.npm.taobao.org`
|
||||
|
||||
> 运行 `cnpm install`
|
||||
|
||||
|
||||
|
||||
> ##### !!!这里特别注意 项目如果在拉取依赖包的过程中报 " node-sass error " 错误,请在执行完后再次执行以下命令
|
||||
```
|
||||
npm install node-sass --unsafe-perm //单独安装node-sass依赖
|
||||
```
|
||||
|
||||
- #### 开发环境运行
|
||||
- `npm start` 项目开发环境 (启动后访问地址 http://localhost:8888/#/)
|
||||
|
||||
|
||||
#### 前端项目发布
|
||||
|
||||
- `npm run build` 项目打包 (打包后根目录会创建一个名为dist文件夹,用于发布线上Nginx)
|
||||
|
||||
运行 `npm run build` 命令,生成打包文件(dist)包
|
||||
|
||||
再拷贝到服务器对应的目录下(前端服务静态页面存放目录)
|
||||
|
||||
访问地址 `http://localhost:8888/#/`
|
||||
|
||||
|
||||
#### Liunx下使用node启动并且守护进程
|
||||
|
||||
安装pm2 `npm install -g pm2`
|
||||
|
||||
在项目`escheduler-ui`根目录执行 `pm2 start npm -- run dev` 启动项目
|
||||
|
||||
#### 命令
|
||||
|
||||
- 启用 `pm2 start npm -- run dev`
|
||||
|
||||
- 停止 `pm2 stop npm`
|
||||
|
||||
- 删除 `pm2 delete npm`
|
||||
|
||||
- 状态 `pm2 list`
|
||||
|
||||
```
|
||||
|
||||
[root@localhost escheduler-ui]# pm2 start npm -- run dev
|
||||
[PM2] Applying action restartProcessId on app [npm](ids: 0)
|
||||
[PM2] [npm](0) ✓
|
||||
[PM2] Process successfully started
|
||||
┌──────────┬────┬─────────┬──────┬──────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐
|
||||
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
|
||||
├──────────┼────┼─────────┼──────┼──────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤
|
||||
│ npm │ 0 │ N/A │ fork │ 6168 │ online │ 31 │ 0s │ 0% │ 5.6 MB │ root │ disabled │
|
||||
└──────────┴────┴─────────┴──────┴──────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘
|
||||
Use `pm2 show <id|name>` to get more details about an app
|
||||
|
||||
```
|
||||
|
||||
|
||||
### 系统功能模块
|
||||
|
||||
首页 => `http://localhost:8888/#/home`
|
||||
|
|
|
|||
|
|
@ -1,53 +1,31 @@
|
|||
# 前端部署文档
|
||||
|
||||
- ##### 1. 开发环境搭建
|
||||
前端有3种部署方式,分别为自动化部署,手动部署和编译源码部署
|
||||
|
||||
- ##### 2. 自动化部署
|
||||
## 1、准备工作
|
||||
#### 准备一:下载安装包
|
||||
|
||||
- ##### 3. 手动部署
|
||||
目前最新安装包版本是1.0.1,下载地址: [码云下载](https://gitee.com/easyscheduler/EasyScheduler/attach_files/)
|
||||
|
||||
- ##### 4. Liunx下使用node启动并且守护进程
|
||||
下载escheduler-ui-1.0.1.tar.gz后,解压后会产生dist目录,进入dist目录
|
||||
> cd dist
|
||||
|
||||
#### 准备二:新建一个`.env`文件
|
||||
|
||||
### 1.开发环境搭建
|
||||
|
||||
- #### node安装
|
||||
Node包下载 (注意版本 8.9.4) `https://nodejs.org/download/release/v8.9.4/`
|
||||
|
||||
- #### 前端项目构建
|
||||
用命令行模式 `cd` 进入 `escheduler-ui`项目目录并执行 `npm install` 拉取项目依赖包
|
||||
|
||||
> 如果 `npm install` 速度非常慢
|
||||
|
||||
> 可以转淘宝镜像命令行输入 `npm install -g cnpm --registry=https://registry.npm.taobao.org`
|
||||
|
||||
> 运行 `cnpm install`
|
||||
|
||||
|
||||
|
||||
> ##### !!!这里特别注意 项目如果在拉取依赖包的过程中报 " node-sass error " 错误,请在执行完后再次执行以下命令
|
||||
在dist目录下新建一个`.env`文件,在文件里添加后端服务的ip地址和端口,用于跟后端交互,`.env`文件内容如下:
|
||||
```
|
||||
npm install node-sass --unsafe-perm //单独安装node-sass依赖
|
||||
```
|
||||
|
||||
在项目`escheduler-ui`根目录`.env`添加代理的端口地址
|
||||
```
|
||||
# 前端代理的接口地址(例)
|
||||
API_BASE = http://192.168.220.204:12345
|
||||
# 代理的接口地址(自行修改)
|
||||
API_BASE = http://192.168.xx.xx:12345
|
||||
|
||||
# 如果您需要用ip访问项目可以把 "#" 号去掉(例)
|
||||
#DEV_HOST = 192.168.6.132
|
||||
#DEV_HOST = 192.168.xx.xx
|
||||
```
|
||||
运行
|
||||
- `npm start` 项目开发环境 (启动后访问地址 http://localhost:8888/#/)
|
||||
|
||||
- `npm run build` 项目打包 (打包后根目录会创建一个名为dist文件夹,用于发布线上Nginx)
|
||||
## 2、部署
|
||||
以下两种方式任选其一部署即可,推荐自动化部署
|
||||
### 2.1 自动化部署
|
||||
|
||||
|
||||
|
||||
### 2.自动化部署
|
||||
|
||||
在项目`escheduler-ui`根目录编辑安装文件`vi install(线上环境).sh`
|
||||
在前端项目根目录dist下编辑安装文件`vi install(线上环境).sh`(执行时,最好修改install(线上环境).sh为install-ui.sh,跟后端部署区分)
|
||||
|
||||
更改前端访问端口和后端代理接口地址
|
||||
|
||||
|
|
@ -56,40 +34,26 @@ API_BASE = http://192.168.220.204:12345
|
|||
esc_proxy="8888"
|
||||
|
||||
# 配置代理后端接口
|
||||
esc_proxy_port="http://192.168.220.154:12345"
|
||||
esc_proxy_port="http://192.168.xx.xx:12345"
|
||||
```
|
||||
|
||||
前端自动部署基于`yum`操作,部署之前请先安装更新`yum
|
||||
前端自动部署基于linux系统`yum`操作,部署之前请先安装更新`yum`
|
||||
|
||||
在项目`escheduler-ui`根目录执行`./install(线上环境).sh`
|
||||
在前端项目根目录dist下执行`./install(线上环境).sh` 或者改名后的 `./install-ui.sh`
|
||||
|
||||
|
||||
|
||||
|
||||
### 3.手动部署
|
||||
### 2.2 手动部署
|
||||
|
||||
安装epel源 `yum install epel-release -y`
|
||||
|
||||
安装Nginx `yum install nginx -y`
|
||||
|
||||
#### 命令
|
||||
|
||||
- 启用 `systemctl enable nginx`
|
||||
|
||||
- 重启 `systemctl restart nginx`
|
||||
|
||||
- 状态 `systemctl status nginx`
|
||||
|
||||
|
||||
> #### 创建静态页面存放目录
|
||||
> #### nginx配置文件地址
|
||||
```
|
||||
mkdir /data2_4T/escheduler_front/escheduler/server
|
||||
/etc/nginx/conf.d/default.conf
|
||||
```
|
||||
> #### 配置文件地址
|
||||
```
|
||||
/etc/nginx/conf.d/escheduler.conf
|
||||
```
|
||||
> #### 配置信息
|
||||
> #### 配置信息(自行修改)
|
||||
```
|
||||
server {
|
||||
listen 8888;# 访问端口
|
||||
|
|
@ -97,11 +61,11 @@ server {
|
|||
#charset koi8-r;
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
location / {
|
||||
root /data2_4T/escheduler_front/escheduler/server; # 静态文件目录
|
||||
root /xx/dist; # 上面前端解压的dist目录地址(自行修改)
|
||||
index index.html index.html;
|
||||
}
|
||||
location /escheduler {
|
||||
proxy_pass http://192.168.220.181:12345; # 接口地址
|
||||
proxy_pass http://192.168.xx.xx:12345; # 接口地址(自行修改)
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header x_real_ipP $remote_addr;
|
||||
|
|
@ -128,50 +92,16 @@ server {
|
|||
systemctl restart nginx
|
||||
```
|
||||
|
||||
#### nginx命令
|
||||
|
||||
#### 前端项目发布
|
||||
- 启用 `systemctl enable nginx`
|
||||
|
||||
前端在开发环境(dev)中运行 `npm run build` 命令,生成打包文件(dist)包
|
||||
- 重启 `systemctl restart nginx`
|
||||
|
||||
再拷贝到服务器 `/data2_4T/escheduler_front/escheduler/server`(服务器静态页面存放目录)
|
||||
|
||||
访问地址 `http://localhost:8888/#/`
|
||||
- 状态 `systemctl status nginx`
|
||||
|
||||
|
||||
|
||||
### 4.Liunx下使用node启动并且守护进程
|
||||
|
||||
安装pm2 `npm install -g pm2`
|
||||
|
||||
在项目`escheduler-ui`根目录执行 `pm2 start npm -- run dev` 启动项目
|
||||
|
||||
#### 命令
|
||||
|
||||
- 启用 `pm2 start npm -- run dev`
|
||||
|
||||
- 停止 `pm2 stop npm`
|
||||
|
||||
- 删除 `pm2 delete npm`
|
||||
|
||||
- 状态 `pm2 list`
|
||||
|
||||
```
|
||||
|
||||
[root@localhost escheduler-ui]# pm2 start npm -- run dev
|
||||
[PM2] Applying action restartProcessId on app [npm](ids: 0)
|
||||
[PM2] [npm](0) ✓
|
||||
[PM2] Process successfully started
|
||||
┌──────────┬────┬─────────┬──────┬──────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────┐
|
||||
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
|
||||
├──────────┼────┼─────────┼──────┼──────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤
|
||||
│ npm │ 0 │ N/A │ fork │ 6168 │ online │ 31 │ 0s │ 0% │ 5.6 MB │ root │ disabled │
|
||||
└──────────┴────┴─────────┴──────┴──────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘
|
||||
Use `pm2 show <id|name>` to get more details about an app
|
||||
|
||||
```
|
||||
|
||||
|
||||
## 问题
|
||||
## 前端常见问题
|
||||
#### 1. 上传文件大小限制
|
||||
编辑配置文件 `vi /etc/nginx/nginx.conf`
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
# 后端部署文档
|
||||
|
||||
后端有2种部署方式,分别为自动化部署和编译源码部署
|
||||
|
||||
## 基础软件安装
|
||||
## 1、准备工作
|
||||
|
||||
目前最新安装包版本是1.0.1,下载地址: [码云下载](https://gitee.com/easyscheduler/EasyScheduler/attach_files/) ,下载escheduler-backend-1.0.1.tar.gz后,解压后会产生escheduler-backend-1.0.1目录(后面简称escheduler-backend)
|
||||
|
||||
#### 准备一: 基础软件安装(必装项请自行安装)
|
||||
|
||||
* [Mysql](http://geek.analysys.cn/topic/124) (5.5+) : 必装
|
||||
* [JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html) (1.8+) : 必装
|
||||
|
|
@ -15,19 +20,55 @@
|
|||
注意:EasyScheduler本身不依赖Hadoop、Hive、Spark、PostgreSQL,仅是会调用他们的Client,用于对应任务的运行。
|
||||
```
|
||||
|
||||
## 项目编译
|
||||
#### 准备二: 创建部署用户
|
||||
|
||||
* 执行编译命令:
|
||||
- 在所有需要部署调度的机器上创建部署用户,因为worker服务是以 sudo -u {linux-user} 方式来执行作业,所以部署用户需要有 sudo 权限,而且是免密的。
|
||||
|
||||
```
|
||||
mvn -U clean package assembly:assembly -Dmaven.test.skip=true
|
||||
```部署账号
|
||||
vi /etc/sudoers
|
||||
|
||||
# 例如部署用户是escheduler账号
|
||||
escheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
|
||||
|
||||
# 并且需要注释掉 Default requiretty 一行
|
||||
#Default requiretty
|
||||
```
|
||||
|
||||
* 查看目录
|
||||
#### 准备三: ssh免密配置
|
||||
在部署机器和其他安装机器上配置ssh免密登录,如果要在部署机上安装调度,需要配置本机免密登录自己
|
||||
|
||||
- [将 **主机器** 和各个其它机器SSH打通](http://geek.analysys.cn/topic/113)
|
||||
|
||||
正常编译完后,会在当前目录生成 target/escheduler-{version}/
|
||||
|
||||
- 说明
|
||||
#### 准备四:数据库初始化
|
||||
|
||||
* 创建database和账号
|
||||
|
||||
通过以下mysql命令进入mysql命令行服务:
|
||||
|
||||
> mysql -h {host} -u {user} -p{password}
|
||||
|
||||
然后执行以下命令创建database和账号
|
||||
|
||||
```sql
|
||||
CREATE DATABASE escheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
|
||||
GRANT ALL PRIVILEGES ON escheduler.* TO '{user}'@'%' IDENTIFIED BY '{password}';
|
||||
GRANT ALL PRIVILEGES ON escheduler.* TO '{user}'@'localhost' IDENTIFIED BY '{password}';
|
||||
flush privileges;
|
||||
```
|
||||
|
||||
* 创建表和导入基础数据
|
||||
说明:在escheduler-backend/sql/escheduler.sql和quartz.sql
|
||||
|
||||
```sql
|
||||
mysql -h {host} -u {user} -p{password} -D {db} < escheduler.sql
|
||||
|
||||
mysql -h {host} -u {user} -p{password} -D {db} < quartz.sql
|
||||
```
|
||||
|
||||
#### 准备五: 修改部署目录权限及运行参数
|
||||
|
||||
我们先来大体了解下解压后escheduler-backend目录下的文件(夹)的作用
|
||||
|
||||
```
|
||||
bin : 基础服务启动脚本
|
||||
|
|
@ -38,80 +79,23 @@ sql : 项目依赖sql文件
|
|||
install.sh : 一键部署脚本
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 数据库初始化
|
||||
|
||||
* 创建database和账号
|
||||
|
||||
```
|
||||
mysql -h {host} -u {user} -p{password}
|
||||
mysql> CREATE DATABASE escheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
|
||||
mysql> GRANT ALL PRIVILEGES ON escheduler.* TO '{user}'@'%' IDENTIFIED BY '{password}';
|
||||
mysql> GRANT ALL PRIVILEGES ON escheduler.* TO '{user}'@'localhost' IDENTIFIED BY '{password}';
|
||||
mysql> flush privileges;
|
||||
```
|
||||
|
||||
* 创建表和导入基础数据
|
||||
|
||||
```
|
||||
说明:在 target/escheduler-{version}/sql/escheduler.sql和quartz.sql
|
||||
|
||||
mysql -h {host} -u {user} -p{password} -D {db} < escheduler.sql
|
||||
|
||||
mysql -h {host} -u {user} -p{password} -D {db} < quartz.sql
|
||||
```
|
||||
|
||||
|
||||
## 创建部署用户
|
||||
|
||||
- 在所有需要部署调度的机器上创建部署用户,因为worker服务是以 sudo -u {linux-user} 方式来执行作业,所以部署用户需要有 sudo 权限,而且是免密的。
|
||||
|
||||
```部署账号
|
||||
vi /etc/sudoers
|
||||
|
||||
# 部署用户是 escheduler 账号
|
||||
escheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
|
||||
|
||||
# 并且需要注释掉 Default requiretty 一行
|
||||
#Default requiretty
|
||||
```
|
||||
|
||||
## ssh免密配置
|
||||
在部署机器和其他安装机器上配置ssh免密登录,如果要在部署机上安装调度,需要配置本机免密登录自己
|
||||
|
||||
- [将 **主机器** 和各个其它机器SSH打通](http://geek.analysys.cn/topic/113)
|
||||
|
||||
## 部署
|
||||
|
||||
### 1. 修改安装目录权限
|
||||
|
||||
- 安装目录如下:
|
||||
|
||||
```
|
||||
bin
|
||||
conf
|
||||
install.sh
|
||||
lib
|
||||
script
|
||||
sql
|
||||
- 修改权限(请将deployUser自行修改为对应部署用户),使得部署用户对escheduler-backend目录有操作权限
|
||||
|
||||
```
|
||||
- 修改权限(deployUser修改为对应部署用户)
|
||||
`sudo chown -R deployUser:deployUser escheduler-backend`
|
||||
|
||||
`sudo chown -R deployUser:deployUser *`
|
||||
- 修改conf/env/目录下的`escheduler_env.py`, `.escheduler_env.sh` 两个文件中的环境变量
|
||||
|
||||
### 2. 修改环境变量文件
|
||||
- 修改部署参数(根据自己服务器及业务情况):
|
||||
|
||||
- 根据业务需求,修改conf/env/目录下的**escheduler_env.py**,**.escheduler_env.sh**两个文件中的环境变量
|
||||
|
||||
### 3. 修改部署参数
|
||||
|
||||
- 修改 **install.sh**中的参数,替换成自身业务所需的值
|
||||
- 修改 **install.sh**中的各参数,替换成自身业务所需的值
|
||||
|
||||
- 如果使用hdfs相关功能,需要拷贝**hdfs-site.xml**和**core-site.xml**到conf目录下
|
||||
|
||||
### 4. 一键部署
|
||||
|
||||
## 2、部署
|
||||
推荐自动化部署,有经验的小伙伴也可以使用源码部署
|
||||
|
||||
### 2.1 自动部署
|
||||
|
||||
- 安装zookeeper工具
|
||||
|
||||
|
|
@ -121,7 +105,7 @@ escheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
|
|||
|
||||
`sh install.sh`
|
||||
|
||||
- jps查看服务是否启动
|
||||
- 使用jps命令查看服务是否启动(jps为java JDK自带)
|
||||
|
||||
```aidl
|
||||
MasterServer ----- master服务
|
||||
|
|
@ -130,9 +114,10 @@ escheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
|
|||
ApiApplicationServer ----- api服务
|
||||
AlertServer ----- alert服务
|
||||
```
|
||||
如果有以上5个服务,说明自动部署成功
|
||||
|
||||
## 日志查看
|
||||
日志统一存放于指定文件夹内
|
||||
|
||||
部署成功后,可以进行日志查看,日志统一存放于指定文件夹内
|
||||
|
||||
```日志路径
|
||||
logs/
|
||||
|
|
@ -142,8 +127,24 @@ escheduler ALL=(ALL) NOPASSWD: NOPASSWD: ALL
|
|||
|—— escheduler-api-server.log
|
||||
|—— escheduler-logger-server.log
|
||||
```
|
||||
|
||||
## 启停服务
|
||||
|
||||
### 2.2 编译源码来部署
|
||||
|
||||
将源码包release版本1.0.1下载后,解压进入根目录
|
||||
|
||||
* 执行编译命令:
|
||||
|
||||
```
|
||||
mvn -U clean package assembly:assembly -Dmaven.test.skip=true
|
||||
```
|
||||
|
||||
* 查看目录
|
||||
|
||||
正常编译完后,会在当前目录生成 target/escheduler-{version}/ , 然后参考
|
||||
|
||||
|
||||
|
||||
### 2.3 系统常用启停服务
|
||||
|
||||
* 一键停止集群所有服务
|
||||
|
||||
|
|
@ -184,5 +185,4 @@ sh ./bin/escheduler-daemon.sh stop logger-server
|
|||
```
|
||||
sh ./bin/escheduler-daemon.sh start alert-server
|
||||
sh ./bin/escheduler-daemon.sh stop alert-server
|
||||
```
|
||||
|
||||
```
|
||||
|
|
@ -38,6 +38,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -209,12 +210,13 @@ public class DataSourceService extends BaseService{
|
|||
|
||||
switch (dataSource.getType()) {
|
||||
case HIVE:
|
||||
case SQLSERVER:
|
||||
separator = ";";
|
||||
break;
|
||||
case MYSQL:
|
||||
separator = "&";
|
||||
break;
|
||||
case POSTGRESQL:
|
||||
case CLICKHOUSE:
|
||||
case ORACLE:
|
||||
separator = "&";
|
||||
break;
|
||||
default:
|
||||
|
|
@ -367,6 +369,18 @@ public class DataSourceService extends BaseService{
|
|||
datasource = JSONObject.parseObject(parameter, SparkDataSource.class);
|
||||
Class.forName(Constants.ORG_APACHE_HIVE_JDBC_HIVE_DRIVER);
|
||||
break;
|
||||
case CLICKHOUSE:
|
||||
datasource = JSONObject.parseObject(parameter, ClickHouseDataSource.class);
|
||||
Class.forName(Constants.COM_CLICKHOUSE_JDBC_DRIVER);
|
||||
break;
|
||||
case ORACLE:
|
||||
datasource = JSONObject.parseObject(parameter, OracleDataSource.class);
|
||||
Class.forName(Constants.COM_ORACLE_JDBC_DRIVER);
|
||||
break;
|
||||
case SQLSERVER:
|
||||
datasource = JSONObject.parseObject(parameter, SQLServerDataSource.class);
|
||||
Class.forName(Constants.COM_SQLSERVER_JDBC_DRIVER);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -392,6 +406,11 @@ public class DataSourceService extends BaseService{
|
|||
Connection con = getConnection(type, parameter);
|
||||
if (con != null) {
|
||||
isConnection = true;
|
||||
try {
|
||||
con.close();
|
||||
} catch (SQLException e) {
|
||||
logger.error("close connection fail at DataSourceService::checkConnection()", e);
|
||||
}
|
||||
}
|
||||
return isConnection;
|
||||
}
|
||||
|
|
@ -428,9 +447,14 @@ public class DataSourceService extends BaseService{
|
|||
String address = buildAddress(type, host, port);
|
||||
String jdbcUrl = address + "/" + database;
|
||||
String separator = "";
|
||||
if (Constants.MYSQL.equals(type.name()) || Constants.POSTGRESQL.equals(type.name())) {
|
||||
if (Constants.MYSQL.equals(type.name())
|
||||
|| Constants.POSTGRESQL.equals(type.name())
|
||||
|| Constants.CLICKHOUSE.equals(type.name())
|
||||
|| Constants.ORACLE.equals(type.name())) {
|
||||
separator = "&";
|
||||
} else if (Constants.HIVE.equals(type.name()) || Constants.SPARK.equals(type.name())) {
|
||||
} else if (Constants.HIVE.equals(type.name())
|
||||
|| Constants.SPARK.equals(type.name())
|
||||
|| Constants.SQLSERVER.equals(type.name())) {
|
||||
separator = ";";
|
||||
}
|
||||
|
||||
|
|
@ -479,6 +503,15 @@ public class DataSourceService extends BaseService{
|
|||
}
|
||||
sb.deleteCharAt(sb.length() - 1);
|
||||
}
|
||||
} else if (Constants.CLICKHOUSE.equals(type.name())) {
|
||||
sb.append(Constants.JDBC_CLICKHOUSE);
|
||||
sb.append(host).append(":").append(port);
|
||||
} else if (Constants.ORACLE.equals(type.name())) {
|
||||
sb.append(Constants.JDBC_ORACLE);
|
||||
sb.append(host).append(":").append(port);
|
||||
} else if (Constants.SQLSERVER.equals(type.name())) {
|
||||
sb.append(Constants.JDBC_SQLSERVER);
|
||||
sb.append(host).append(":").append(port);
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
|
|
|
|||
|
|
@ -82,6 +82,9 @@ public class Constants {
|
|||
public static final String ORG_POSTGRESQL_DRIVER = "org.postgresql.Driver";
|
||||
public static final String COM_MYSQL_JDBC_DRIVER = "com.mysql.jdbc.Driver";
|
||||
public static final String ORG_APACHE_HIVE_JDBC_HIVE_DRIVER = "org.apache.hive.jdbc.HiveDriver";
|
||||
public static final String COM_CLICKHOUSE_JDBC_DRIVER = "ru.yandex.clickhouse.ClickHouseDriver";
|
||||
public static final String COM_ORACLE_JDBC_DRIVER = "oracle.jdbc.driver.OracleDriver";
|
||||
public static final String COM_SQLSERVER_JDBC_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
|
||||
|
||||
/**
|
||||
* database type
|
||||
|
|
@ -90,6 +93,9 @@ public class Constants {
|
|||
public static final String POSTGRESQL = "POSTGRESQL";
|
||||
public static final String HIVE = "HIVE";
|
||||
public static final String SPARK = "SPARK";
|
||||
public static final String CLICKHOUSE = "CLICKHOUSE";
|
||||
public static final String ORACLE = "ORACLE";
|
||||
public static final String SQLSERVER = "SQLSERVER";
|
||||
|
||||
/**
|
||||
* jdbc url
|
||||
|
|
@ -97,6 +103,9 @@ public class Constants {
|
|||
public static final String JDBC_MYSQL = "jdbc:mysql://";
|
||||
public static final String JDBC_POSTGRESQL = "jdbc:postgresql://";
|
||||
public static final String JDBC_HIVE_2 = "jdbc:hive2://";
|
||||
public static final String JDBC_CLICKHOUSE = "jdbc:clickhouse://";
|
||||
public static final String JDBC_ORACLE = "jdbc:oracle:thin:@//";
|
||||
public static final String JDBC_SQLSERVER = "jdbc:sqlserver://";
|
||||
|
||||
|
||||
public static final String ADDRESS = "address";
|
||||
|
|
|
|||
|
|
@ -371,6 +371,32 @@
|
|||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ru.yandex.clickhouse</groupId>
|
||||
<artifactId>clickhouse-jdbc</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>com.fasterxml.jackson.core</artifactId>
|
||||
<groupId>jackson-core</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>com.fasterxml.jackson.core</artifactId>
|
||||
<groupId>jackson-databind</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>com.microsoft.azure</artifactId>
|
||||
<groupId>azure-keyvault</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -602,15 +602,29 @@ public final class Constants {
|
|||
public static final String JDBC_POSTGRESQL_CLASS_NAME = "org.postgresql.Driver";
|
||||
|
||||
/**
|
||||
* postgresql
|
||||
* hive
|
||||
*/
|
||||
public static final String JDBC_HIVE_CLASS_NAME = "org.apache.hive.jdbc.HiveDriver";
|
||||
|
||||
/**
|
||||
* postgresql
|
||||
* spark
|
||||
*/
|
||||
public static final String JDBC_SPARK_CLASS_NAME = "org.apache.hive.jdbc.HiveDriver";
|
||||
|
||||
/**
|
||||
* ClickHouse
|
||||
*/
|
||||
public static final String JDBC_CLICKHOUSE_CLASS_NAME = "ru.yandex.clickhouse.ClickHouseDriver";
|
||||
|
||||
/**
|
||||
* Oracle
|
||||
*/
|
||||
public static final String JDBC_ORACLE_CLASS_NAME = "oracle.jdbc.driver.OracleDriver";
|
||||
|
||||
/**
|
||||
* Oracle
|
||||
*/
|
||||
public static final String JDBC_SQLSERVER_CLASS_NAME = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
|
||||
|
||||
/**
|
||||
* spark params constant
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ public enum DbType {
|
|||
* 1 postgresql
|
||||
* 2 hive
|
||||
* 3 spark
|
||||
* 4 clickhouse
|
||||
* 5 oracle
|
||||
* 6 sqlserver
|
||||
*/
|
||||
MYSQL, POSTGRESQL, HIVE, SPARK
|
||||
MYSQL, POSTGRESQL, HIVE, SPARK, CLICKHOUSE, ORACLE, SQLSERVER
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.escheduler.common.job.db;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* data source of ClickHouse
|
||||
*/
|
||||
public class ClickHouseDataSource extends BaseDataSource {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ClickHouseDataSource.class);
|
||||
|
||||
/**
|
||||
* gets the JDBC url for the data source connection
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getJdbcUrl() {
|
||||
String jdbcUrl = getAddress();
|
||||
if (jdbcUrl.lastIndexOf("/") != (jdbcUrl.length() - 1)) {
|
||||
jdbcUrl += "/";
|
||||
}
|
||||
|
||||
jdbcUrl += getDatabase();
|
||||
|
||||
if (StringUtils.isNotEmpty(getOther())) {
|
||||
jdbcUrl += "?" + getOther();
|
||||
}
|
||||
|
||||
return jdbcUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* test whether the data source can be connected successfully
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public void isConnectable() throws Exception {
|
||||
Connection con = null;
|
||||
try {
|
||||
Class.forName("ru.yandex.clickhouse.ClickHouseDriver");
|
||||
con = DriverManager.getConnection(getJdbcUrl(), getUser(), getPassword());
|
||||
} finally {
|
||||
if (con != null) {
|
||||
try {
|
||||
con.close();
|
||||
} catch (SQLException e) {
|
||||
logger.error("ClickHouse datasource try conn close conn error", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -39,6 +39,12 @@ public class DataSourceFactory {
|
|||
return JSONUtils.parseObject(parameter, HiveDataSource.class);
|
||||
case SPARK:
|
||||
return JSONUtils.parseObject(parameter, SparkDataSource.class);
|
||||
case CLICKHOUSE:
|
||||
return JSONUtils.parseObject(parameter, ClickHouseDataSource.class);
|
||||
case ORACLE:
|
||||
return JSONUtils.parseObject(parameter, OracleDataSource.class);
|
||||
case SQLSERVER:
|
||||
return JSONUtils.parseObject(parameter, SQLServerDataSource.class);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.escheduler.common.job.db;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* data source of Oracle
|
||||
*/
|
||||
public class OracleDataSource extends BaseDataSource {
|
||||
private static final Logger logger = LoggerFactory.getLogger(OracleDataSource.class);
|
||||
|
||||
/**
|
||||
* gets the JDBC url for the data source connection
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getJdbcUrl() {
|
||||
String jdbcUrl = getAddress();
|
||||
if (jdbcUrl.lastIndexOf("/") != (jdbcUrl.length() - 1)) {
|
||||
jdbcUrl += "/";
|
||||
}
|
||||
|
||||
jdbcUrl += getDatabase();
|
||||
|
||||
if (StringUtils.isNotEmpty(getOther())) {
|
||||
jdbcUrl += "?" + getOther();
|
||||
}
|
||||
|
||||
return jdbcUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* test whether the data source can be connected successfully
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public void isConnectable() throws Exception {
|
||||
Connection con = null;
|
||||
try {
|
||||
Class.forName("oracle.jdbc.driver.OracleDriver");
|
||||
con = DriverManager.getConnection(getJdbcUrl(), getUser(), getPassword());
|
||||
} finally {
|
||||
if (con != null) {
|
||||
try {
|
||||
con.close();
|
||||
} catch (SQLException e) {
|
||||
logger.error("Oracle datasource try conn close conn error", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.escheduler.common.job.db;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* data source of SQL Server
|
||||
*/
|
||||
public class SQLServerDataSource extends BaseDataSource {
|
||||
private static final Logger logger = LoggerFactory.getLogger(SQLServerDataSource.class);
|
||||
|
||||
/**
|
||||
* gets the JDBC url for the data source connection
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getJdbcUrl() {
|
||||
String jdbcUrl = getAddress();
|
||||
jdbcUrl += ";databaseName=" + getDatabase();
|
||||
|
||||
if (StringUtils.isNotEmpty(getOther())) {
|
||||
jdbcUrl += ";" + getOther();
|
||||
}
|
||||
|
||||
return jdbcUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* test whether the data source can be connected successfully
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public void isConnectable() throws Exception {
|
||||
Connection con = null;
|
||||
try {
|
||||
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
|
||||
con = DriverManager.getConnection(getJdbcUrl(), getUser(), getPassword());
|
||||
} finally {
|
||||
if (con != null) {
|
||||
try {
|
||||
con.close();
|
||||
} catch (SQLException e) {
|
||||
logger.error("SQL Server datasource try conn close conn error", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.escheduler.common.task.sql;
|
||||
|
||||
import cn.escheduler.common.process.Property;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Used to contains both prepared sql string and its to-be-bind parameters
|
||||
*/
|
||||
public class SqlBinds {
|
||||
private final String sql;
|
||||
private final Map<Integer, Property> paramsMap;
|
||||
|
||||
public SqlBinds(String sql, Map<Integer, Property> paramsMap) {
|
||||
this.sql = sql;
|
||||
this.paramsMap = paramsMap;
|
||||
}
|
||||
|
||||
public String getSql() {
|
||||
return sql;
|
||||
}
|
||||
|
||||
public Map<Integer, Property> getParamsMap() {
|
||||
return paramsMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -64,6 +64,14 @@ public class SqlParameters extends AbstractParameters {
|
|||
* SQL connection parameters
|
||||
*/
|
||||
private String connParams;
|
||||
/**
|
||||
* Pre Statements
|
||||
*/
|
||||
private List<String> preStatements;
|
||||
/**
|
||||
* Post Statements
|
||||
*/
|
||||
private List<String> postStatements;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
|
|
@ -121,6 +129,21 @@ public class SqlParameters extends AbstractParameters {
|
|||
this.connParams = connParams;
|
||||
}
|
||||
|
||||
public List<String> getPreStatements() {
|
||||
return preStatements;
|
||||
}
|
||||
|
||||
public void setPreStatements(List<String> preStatements) {
|
||||
this.preStatements = preStatements;
|
||||
}
|
||||
|
||||
public List<String> getPostStatements() {
|
||||
return postStatements;
|
||||
}
|
||||
|
||||
public void setPostStatements(List<String> postStatements) {
|
||||
this.postStatements = postStatements;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkParameters() {
|
||||
|
|
@ -142,6 +165,8 @@ public class SqlParameters extends AbstractParameters {
|
|||
", udfs='" + udfs + '\'' +
|
||||
", showType='" + showType + '\'' +
|
||||
", connParams='" + connParams + '\'' +
|
||||
", preStatements=" + preStatements +
|
||||
", postStatements=" + postStatements +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,11 @@ import cn.escheduler.common.enums.DbType;
|
|||
import cn.escheduler.common.enums.Direct;
|
||||
import cn.escheduler.common.enums.TaskTimeoutStrategy;
|
||||
import cn.escheduler.common.job.db.BaseDataSource;
|
||||
import cn.escheduler.common.job.db.ClickHouseDataSource;
|
||||
import cn.escheduler.common.job.db.MySQLDataSource;
|
||||
import cn.escheduler.common.job.db.OracleDataSource;
|
||||
import cn.escheduler.common.job.db.PostgreDataSource;
|
||||
import cn.escheduler.common.job.db.SQLServerDataSource;
|
||||
import cn.escheduler.common.process.Property;
|
||||
import cn.escheduler.common.task.AbstractParameters;
|
||||
import cn.escheduler.common.task.procedure.ProcedureParameters;
|
||||
|
|
@ -111,6 +114,17 @@ public class ProcedureTask extends AbstractTask {
|
|||
}else if (DbType.POSTGRESQL.name().equals(dataSource.getType().name())){
|
||||
baseDataSource = JSONObject.parseObject(dataSource.getConnectionParams(),PostgreDataSource.class);
|
||||
Class.forName(Constants.JDBC_POSTGRESQL_CLASS_NAME);
|
||||
}else if (DbType.CLICKHOUSE.name().equals(dataSource.getType().name())){
|
||||
// NOTE: currently, ClickHouse don't support procedure or UDF yet,
|
||||
// but still load JDBC driver to keep source code sync with other DB
|
||||
baseDataSource = JSONObject.parseObject(dataSource.getConnectionParams(),ClickHouseDataSource.class);
|
||||
Class.forName(Constants.JDBC_CLICKHOUSE_CLASS_NAME);
|
||||
}else if (DbType.ORACLE.name().equals(dataSource.getType().name())){
|
||||
baseDataSource = JSONObject.parseObject(dataSource.getConnectionParams(), OracleDataSource.class);
|
||||
Class.forName(Constants.JDBC_ORACLE_CLASS_NAME);
|
||||
}else if (DbType.SQLSERVER.name().equals(dataSource.getType().name())){
|
||||
baseDataSource = JSONObject.parseObject(dataSource.getConnectionParams(), SQLServerDataSource.class);
|
||||
Class.forName(Constants.JDBC_SQLSERVER_CLASS_NAME);
|
||||
}
|
||||
|
||||
// get jdbc connection
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import cn.escheduler.common.enums.UdfType;
|
|||
import cn.escheduler.common.job.db.*;
|
||||
import cn.escheduler.common.process.Property;
|
||||
import cn.escheduler.common.task.AbstractParameters;
|
||||
import cn.escheduler.common.task.sql.SqlBinds;
|
||||
import cn.escheduler.common.task.sql.SqlParameters;
|
||||
import cn.escheduler.common.task.sql.SqlType;
|
||||
import cn.escheduler.common.utils.CollectionUtils;
|
||||
|
|
@ -48,6 +49,7 @@ import java.sql.*;
|
|||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* sql task
|
||||
|
|
@ -120,13 +122,28 @@ public class SqlTask extends AbstractTask {
|
|||
}else if (DbType.SPARK.name().equals(dataSource.getType().name())){
|
||||
baseDataSource = JSONObject.parseObject(dataSource.getConnectionParams(),SparkDataSource.class);
|
||||
Class.forName(Constants.JDBC_SPARK_CLASS_NAME);
|
||||
}else if (DbType.CLICKHOUSE.name().equals(dataSource.getType().name())){
|
||||
baseDataSource = JSONObject.parseObject(dataSource.getConnectionParams(),ClickHouseDataSource.class);
|
||||
Class.forName(Constants.JDBC_CLICKHOUSE_CLASS_NAME);
|
||||
}else if (DbType.ORACLE.name().equals(dataSource.getType().name())){
|
||||
baseDataSource = JSONObject.parseObject(dataSource.getConnectionParams(),OracleDataSource.class);
|
||||
Class.forName(Constants.JDBC_ORACLE_CLASS_NAME);
|
||||
}else if (DbType.SQLSERVER.name().equals(dataSource.getType().name())){
|
||||
baseDataSource = JSONObject.parseObject(dataSource.getConnectionParams(),SQLServerDataSource.class);
|
||||
Class.forName(Constants.JDBC_SQLSERVER_CLASS_NAME);
|
||||
}
|
||||
|
||||
Map<Integer,Property> sqlParamMap = new HashMap<Integer,Property>();
|
||||
StringBuilder sqlBuilder = new StringBuilder();
|
||||
|
||||
// ready to execute SQL and parameter entity Map
|
||||
setSqlAndSqlParamsMap(sqlBuilder,sqlParamMap);
|
||||
SqlBinds mainSqlBinds = getSqlAndSqlParamsMap(sqlParameters.getSql());
|
||||
List<SqlBinds> preStatementSqlBinds = Optional.ofNullable(sqlParameters.getPreStatements()).orElse(new ArrayList<>())
|
||||
.stream()
|
||||
.map(this::getSqlAndSqlParamsMap)
|
||||
.collect(Collectors.toList());
|
||||
List<SqlBinds> postStatementSqlBinds = Optional.ofNullable(sqlParameters.getPostStatements()).orElse(new ArrayList<>())
|
||||
.stream()
|
||||
.map(this::getSqlAndSqlParamsMap)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if(EnumUtils.isValidEnum(UdfType.class, sqlParameters.getType()) && StringUtils.isNotEmpty(sqlParameters.getUdfs())){
|
||||
List<UdfFunc> udfFuncList = processDao.queryUdfFunListByids(sqlParameters.getUdfs());
|
||||
|
|
@ -134,7 +151,7 @@ public class SqlTask extends AbstractTask {
|
|||
}
|
||||
|
||||
// execute sql task
|
||||
con = executeFuncAndSql(baseDataSource,sqlBuilder.toString(),sqlParamMap,createFuncs);
|
||||
con = executeFuncAndSql(baseDataSource, mainSqlBinds, preStatementSqlBinds, postStatementSqlBinds, createFuncs);
|
||||
|
||||
} finally {
|
||||
if (con != null) {
|
||||
|
|
@ -153,9 +170,9 @@ public class SqlTask extends AbstractTask {
|
|||
* ready to execute SQL and parameter entity Map
|
||||
* @return
|
||||
*/
|
||||
private void setSqlAndSqlParamsMap(StringBuilder sqlBuilder,Map<Integer,Property> sqlParamsMap) {
|
||||
|
||||
String sql = sqlParameters.getSql();
|
||||
private SqlBinds getSqlAndSqlParamsMap(String sql) {
|
||||
Map<Integer,Property> sqlParamsMap = new HashMap<>();
|
||||
StringBuilder sqlBuilder = new StringBuilder();
|
||||
|
||||
// find process instance by task id
|
||||
ProcessInstance processInstance = processDao.findProcessInstanceByTaskId(taskProps.getTaskInstId());
|
||||
|
|
@ -169,7 +186,7 @@ public class SqlTask extends AbstractTask {
|
|||
// spell SQL according to the final user-defined variable
|
||||
if(paramsMap == null){
|
||||
sqlBuilder.append(sql);
|
||||
return;
|
||||
return new SqlBinds(sqlBuilder.toString(), sqlParamsMap);
|
||||
}
|
||||
|
||||
// special characters need to be escaped, ${} needs to be escaped
|
||||
|
|
@ -182,6 +199,7 @@ public class SqlTask extends AbstractTask {
|
|||
|
||||
// print repalce sql
|
||||
printReplacedSql(sql,formatSql,rgex,sqlParamsMap);
|
||||
return new SqlBinds(sqlBuilder.toString(), sqlParamsMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -192,10 +210,16 @@ public class SqlTask extends AbstractTask {
|
|||
/**
|
||||
* execute sql
|
||||
* @param baseDataSource
|
||||
* @param sql
|
||||
* @param params
|
||||
* @param mainSqlBinds
|
||||
* @param preStatementsBinds
|
||||
* @param postStatementsBinds
|
||||
* @param createFuncs
|
||||
*/
|
||||
public Connection executeFuncAndSql(BaseDataSource baseDataSource, String sql, Map<Integer,Property> params, List<String> createFuncs){
|
||||
public Connection executeFuncAndSql(BaseDataSource baseDataSource,
|
||||
SqlBinds mainSqlBinds,
|
||||
List<SqlBinds> preStatementsBinds,
|
||||
List<SqlBinds> postStatementsBinds,
|
||||
List<String> createFuncs){
|
||||
Connection connection = null;
|
||||
try {
|
||||
|
||||
|
|
@ -214,66 +238,86 @@ public class SqlTask extends AbstractTask {
|
|||
baseDataSource.getUser(), baseDataSource.getPassword());
|
||||
}
|
||||
|
||||
Statement funcStmt = connection.createStatement();
|
||||
// create temp function
|
||||
if (createFuncs != null) {
|
||||
for (String createFunc : createFuncs) {
|
||||
logger.info("hive create function sql: {}", createFunc);
|
||||
funcStmt.execute(createFunc);
|
||||
}
|
||||
}
|
||||
|
||||
PreparedStatement stmt = connection.prepareStatement(sql);
|
||||
if(taskProps.getTaskTimeoutStrategy() == TaskTimeoutStrategy.FAILED || taskProps.getTaskTimeoutStrategy() == TaskTimeoutStrategy.WARNFAILED){
|
||||
stmt.setQueryTimeout(taskProps.getTaskTimeout());
|
||||
}
|
||||
if(params != null){
|
||||
for(Integer key : params.keySet()){
|
||||
Property prop = params.get(key);
|
||||
ParameterUtils.setInParameter(key,stmt,prop.getType(),prop.getValue());
|
||||
}
|
||||
}
|
||||
// decide whether to executeQuery or executeUpdate based on sqlType
|
||||
if(sqlParameters.getSqlType() == SqlType.QUERY.ordinal()){
|
||||
// query statements need to be convert to JsonArray and inserted into Alert to send
|
||||
JSONArray array=new JSONArray();
|
||||
ResultSet resultSet = stmt.executeQuery();
|
||||
ResultSetMetaData md=resultSet.getMetaData();
|
||||
int num=md.getColumnCount();
|
||||
|
||||
while(resultSet.next()){
|
||||
JSONObject mapOfColValues=new JSONObject(true);
|
||||
for(int i=1;i<=num;i++){
|
||||
mapOfColValues.put(md.getColumnName(i), resultSet.getObject(i));
|
||||
}
|
||||
array.add(mapOfColValues);
|
||||
}
|
||||
|
||||
logger.info("execute sql : {}",JSONObject.toJSONString(array, SerializerFeature.WriteMapNullValue));
|
||||
|
||||
// send as an attachment
|
||||
if(StringUtils.isEmpty(sqlParameters.getShowType())){
|
||||
logger.info("showType is empty,don't need send email");
|
||||
}else{
|
||||
if(array.size() > 0 ){
|
||||
sendAttachment(taskProps.getNodeName() + " query resultsets ",JSONObject.toJSONString(array, SerializerFeature.WriteMapNullValue));
|
||||
if (CollectionUtils.isNotEmpty(createFuncs)) {
|
||||
try (Statement funcStmt = connection.createStatement()) {
|
||||
for (String createFunc : createFuncs) {
|
||||
logger.info("hive create function sql: {}", createFunc);
|
||||
funcStmt.execute(createFunc);
|
||||
}
|
||||
}
|
||||
|
||||
exitStatusCode = 0;
|
||||
|
||||
}else if(sqlParameters.getSqlType() == SqlType.NON_QUERY.ordinal()){
|
||||
// non query statement
|
||||
int result = stmt.executeUpdate();
|
||||
exitStatusCode = 0;
|
||||
}
|
||||
|
||||
for (SqlBinds sqlBind: preStatementsBinds) {
|
||||
try (PreparedStatement stmt = prepareStatementAndBind(connection, sqlBind)) {
|
||||
int result = stmt.executeUpdate();
|
||||
logger.info("pre statement execute result: " + result + ", for sql: " + sqlBind.getSql());
|
||||
}
|
||||
}
|
||||
|
||||
try (PreparedStatement stmt = prepareStatementAndBind(connection, mainSqlBinds)) {
|
||||
// decide whether to executeQuery or executeUpdate based on sqlType
|
||||
if (sqlParameters.getSqlType() == SqlType.QUERY.ordinal()) {
|
||||
// query statements need to be convert to JsonArray and inserted into Alert to send
|
||||
JSONArray array = new JSONArray();
|
||||
ResultSet resultSet = stmt.executeQuery();
|
||||
ResultSetMetaData md = resultSet.getMetaData();
|
||||
int num = md.getColumnCount();
|
||||
|
||||
while (resultSet.next()) {
|
||||
JSONObject mapOfColValues = new JSONObject(true);
|
||||
for (int i = 1; i <= num; i++) {
|
||||
mapOfColValues.put(md.getColumnName(i), resultSet.getObject(i));
|
||||
}
|
||||
array.add(mapOfColValues);
|
||||
}
|
||||
|
||||
logger.info("execute sql : {}", JSONObject.toJSONString(array, SerializerFeature.WriteMapNullValue));
|
||||
|
||||
// send as an attachment
|
||||
if (StringUtils.isEmpty(sqlParameters.getShowType())) {
|
||||
logger.info("showType is empty,don't need send email");
|
||||
} else {
|
||||
if (array.size() > 0) {
|
||||
sendAttachment(taskProps.getNodeName() + " query resultsets ", JSONObject.toJSONString(array, SerializerFeature.WriteMapNullValue));
|
||||
}
|
||||
}
|
||||
|
||||
exitStatusCode = 0;
|
||||
|
||||
} else if (sqlParameters.getSqlType() == SqlType.NON_QUERY.ordinal()) {
|
||||
// non query statement
|
||||
int result = stmt.executeUpdate();
|
||||
exitStatusCode = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (SqlBinds sqlBind: postStatementsBinds) {
|
||||
try (PreparedStatement stmt = prepareStatementAndBind(connection, sqlBind)) {
|
||||
int result = stmt.executeUpdate();
|
||||
logger.info("post statement execute result: " + result + ", for sql: " + sqlBind.getSql());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(),e);
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
|
||||
private PreparedStatement prepareStatementAndBind(Connection connection, SqlBinds sqlBinds) throws Exception {
|
||||
PreparedStatement stmt = connection.prepareStatement(sqlBinds.getSql());
|
||||
if(taskProps.getTaskTimeoutStrategy() == TaskTimeoutStrategy.FAILED || taskProps.getTaskTimeoutStrategy() == TaskTimeoutStrategy.WARNFAILED){
|
||||
stmt.setQueryTimeout(taskProps.getTaskTimeout());
|
||||
}
|
||||
Map<Integer, Property> params = sqlBinds.getParamsMap();
|
||||
if(params != null){
|
||||
for(Integer key : params.keySet()){
|
||||
Property prop = params.get(key);
|
||||
ParameterUtils.setInParameter(key,stmt,prop.getType(),prop.getValue());
|
||||
}
|
||||
}
|
||||
return stmt;
|
||||
}
|
||||
|
||||
/**
|
||||
* send mail as an attachment
|
||||
|
|
|
|||
|
|
@ -52,21 +52,63 @@ public class SqlExecutorTest {
|
|||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
String nodeName = "mysql sql test";
|
||||
String taskAppId = "51_11282_263978";
|
||||
String tenantCode = "hdfs";
|
||||
int taskInstId = 263978;
|
||||
sharedTestSqlTask(nodeName, taskAppId, tenantCode, taskInstId);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testClickhouse() throws Exception {
|
||||
String nodeName = "ClickHouse sql test";
|
||||
String taskAppId = "1_11_20";
|
||||
String tenantCode = "default";
|
||||
int taskInstId = 20;
|
||||
sharedTestSqlTask(nodeName, taskAppId, tenantCode, taskInstId);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOracle() throws Exception {
|
||||
String nodeName = "oracle sql test";
|
||||
String taskAppId = "2_13_25";
|
||||
String tenantCode = "demo";
|
||||
int taskInstId = 25;
|
||||
sharedTestSqlTask(nodeName, taskAppId, tenantCode, taskInstId);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSQLServer() throws Exception {
|
||||
String nodeName = "SQL Server sql test";
|
||||
String taskAppId = "3_14_27";
|
||||
String tenantCode = "demo";
|
||||
int taskInstId = 27;
|
||||
sharedTestSqlTask(nodeName, taskAppId, tenantCode, taskInstId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic test template for SQLTasks, mainly test different types of DBMS types
|
||||
* @param nodeName node name for selected task
|
||||
* @param taskAppId task app id
|
||||
* @param tenantCode tenant code
|
||||
* @param taskInstId task instance id
|
||||
* @throws Exception
|
||||
*/
|
||||
private void sharedTestSqlTask(String nodeName, String taskAppId, String tenantCode, int taskInstId) throws Exception {
|
||||
TaskProps taskProps = new TaskProps();
|
||||
taskProps.setTaskDir("");
|
||||
// processDefineId_processInstanceId_taskInstanceId
|
||||
taskProps.setTaskAppId("51_11282_263978");
|
||||
taskProps.setTaskAppId(taskAppId);
|
||||
// set tenant -> task execute linux user
|
||||
taskProps.setTenantCode("hdfs");
|
||||
taskProps.setTenantCode(tenantCode);
|
||||
taskProps.setTaskStartTime(new Date());
|
||||
taskProps.setTaskTimeout(360000);
|
||||
taskProps.setTaskInstId(263978);
|
||||
taskProps.setNodeName("mysql sql test");
|
||||
taskProps.setTaskInstId(taskInstId);
|
||||
taskProps.setNodeName(nodeName);
|
||||
|
||||
|
||||
|
||||
TaskInstance taskInstance = processDao.findTaskInstanceById(263978);
|
||||
TaskInstance taskInstance = processDao.findTaskInstanceById(taskInstId);
|
||||
|
||||
String taskJson = taskInstance.getTaskJson();
|
||||
TaskNode taskNode = JSONObject.parseObject(taskJson, TaskNode.class);
|
||||
|
|
|
|||
|
|
@ -1,21 +1,52 @@
|
|||
|
||||
#!/bin/bash
|
||||
echo "escheduler-ui-install.sh"
|
||||
echo "escheduler-ui目录下执行"
|
||||
|
||||
# 当前路径
|
||||
esc_basepath=$(cd `dirname $0`; pwd)
|
||||
|
||||
|
||||
echo "欢迎使用easy scheduler前端部署脚本,目前前端部署脚本仅支持Centos"
|
||||
echo "请在 escheduler-ui 目录下执行"
|
||||
|
||||
# 配置前端访问端口
|
||||
esc_proxy="8888"
|
||||
|
||||
# 配置代理后端接口
|
||||
esc_proxy_port="http://192.168.220.154:12345"
|
||||
|
||||
# 当前路径
|
||||
esc_basepath=$(cd `dirname $0`; pwd)
|
||||
esc_proxy_port="http://192.168.xx.xx:12345"
|
||||
|
||||
# 本机ip
|
||||
esc_ipaddr='172.0.0.1'
|
||||
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/'`
|
||||
|
||||
|
|
|
|||
|
|
@ -32,31 +32,31 @@ const toolOper = (dagThis) => {
|
|||
code: 'pointer',
|
||||
icon: '',
|
||||
disable: disabled,
|
||||
desc: `${i18n.$t('拖动节点和选中项')}`
|
||||
desc: `${i18n.$t('Drag Nodes and Selected Items')}`
|
||||
},
|
||||
{
|
||||
code: 'line',
|
||||
icon: '',
|
||||
disable: disabled,
|
||||
desc: `${i18n.$t('选择线条连接')}`
|
||||
desc: `${i18n.$t('Select Line Connection')}`
|
||||
},
|
||||
{
|
||||
code: 'remove',
|
||||
icon: '',
|
||||
disable: disabled,
|
||||
desc: `${i18n.$t('删除选中的线或节点')}`
|
||||
desc: `${i18n.$t('Delete selected lines or nodes')}`
|
||||
},
|
||||
{
|
||||
code: 'download',
|
||||
icon: '',
|
||||
disable: !!dagThis.type,
|
||||
desc: `${i18n.$t('下载')}`
|
||||
desc: `${i18n.$t('Download')}`
|
||||
},
|
||||
{
|
||||
code: 'screen',
|
||||
icon: '',
|
||||
disable: disabled,
|
||||
desc: `${i18n.$t('全屏')}`
|
||||
desc: `${i18n.$t('Full Screen')}`
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -70,17 +70,17 @@ const toolOper = (dagThis) => {
|
|||
let publishStatus = [
|
||||
{
|
||||
id: 0,
|
||||
desc: `${i18n.$t('未发布')}`,
|
||||
desc: `${i18n.$t('Unpublished')}`,
|
||||
code: 'NOT_RELEASE'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
desc: `${i18n.$t('上线')}`,
|
||||
desc: `${i18n.$t('online')}`,
|
||||
code: 'ONLINE'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
desc: `${i18n.$t('下线')}`,
|
||||
desc: `${i18n.$t('offline')}`,
|
||||
code: 'OFFLINE'
|
||||
}
|
||||
]
|
||||
|
|
@ -92,47 +92,47 @@ let publishStatus = [
|
|||
*/
|
||||
let runningType = [
|
||||
{
|
||||
desc: `${i18n.$t('启动工作流')}`,
|
||||
desc: `${i18n.$t('Start Process')}`,
|
||||
code: 'START_PROCESS'
|
||||
},
|
||||
{
|
||||
desc: `${i18n.$t('从当前节点开始执行')}`,
|
||||
desc: `${i18n.$t('Execute from the current node')}`,
|
||||
code: 'START_CURRENT_TASK_PROCESS'
|
||||
},
|
||||
{
|
||||
desc: `${i18n.$t('恢复被容错的工作流')}`,
|
||||
desc: `${i18n.$t('Recover tolerance fault process')}`,
|
||||
code: 'RECOVER_TOLERANCE_FAULT_PROCESS'
|
||||
},
|
||||
{
|
||||
desc: `${i18n.$t('恢复暂停流程')}`,
|
||||
desc: `${i18n.$t('Resume the suspension process')}`,
|
||||
code: 'RECOVER_SUSPENDED_PROCESS'
|
||||
},
|
||||
{
|
||||
desc: `${i18n.$t('从失败节点开始执行')}`,
|
||||
desc: `${i18n.$t('Execute from the failed nodes')}`,
|
||||
code: 'START_FAILURE_TASK_PROCESS'
|
||||
},
|
||||
{
|
||||
desc: `${i18n.$t('补数')}`,
|
||||
desc: `${i18n.$t('Complement Data')}`,
|
||||
code: 'COMPLEMENT_DATA'
|
||||
},
|
||||
{
|
||||
desc: `${i18n.$t('调度执行')}`,
|
||||
desc: `${i18n.$t('Scheduling execution')}`,
|
||||
code: 'SCHEDULER'
|
||||
},
|
||||
{
|
||||
desc: `${i18n.$t('重跑')}`,
|
||||
desc: `${i18n.$t('Rerun')}`,
|
||||
code: 'REPEAT_RUNNING'
|
||||
},
|
||||
{
|
||||
desc: `${i18n.$t('暂停')}`,
|
||||
desc: `${i18n.$t('Pause')}`,
|
||||
code: 'PAUSE'
|
||||
},
|
||||
{
|
||||
desc: `${i18n.$t('停止')}`,
|
||||
desc: `${i18n.$t('Stop')}`,
|
||||
code: 'STOP'
|
||||
},
|
||||
{
|
||||
desc: `${i18n.$t('恢复等待线程')}`,
|
||||
desc: `${i18n.$t('Recovery waiting thread')}`,
|
||||
code: 'RECOVER_WAITTING_THREAD'
|
||||
}
|
||||
]
|
||||
|
|
@ -149,63 +149,63 @@ let runningType = [
|
|||
let tasksState = {
|
||||
'SUBMITTED_SUCCESS': {
|
||||
id: 0,
|
||||
desc: `${i18n.$t('提交成功')}`,
|
||||
desc: `${i18n.$t('Submitted successfully')}`,
|
||||
color: '#A9A9A9',
|
||||
icoUnicode: '',
|
||||
isSpin: false
|
||||
},
|
||||
'RUNNING_EXEUTION': {
|
||||
id: 1,
|
||||
desc: `${i18n.$t('正在执行')}`,
|
||||
desc: `${i18n.$t('Executing')}`,
|
||||
color: '#0097e0',
|
||||
icoUnicode: '',
|
||||
isSpin: true
|
||||
},
|
||||
'READY_PAUSE': {
|
||||
id: 2,
|
||||
desc: `${i18n.$t('准备暂停')}`,
|
||||
desc: `${i18n.$t('Ready to pause')}`,
|
||||
color: '#07b1a3',
|
||||
icoUnicode: '',
|
||||
isSpin: false
|
||||
},
|
||||
'PAUSE': {
|
||||
id: 3,
|
||||
desc: `${i18n.$t('暂停')}`,
|
||||
desc: `${i18n.$t('Pause')}`,
|
||||
color: '#057c72',
|
||||
icoUnicode: '',
|
||||
isSpin: false
|
||||
},
|
||||
'READY_STOP': {
|
||||
id: 4,
|
||||
desc: `${i18n.$t('准备停止')}`,
|
||||
desc: `${i18n.$t('Ready to stop')}`,
|
||||
color: '#FE0402',
|
||||
icoUnicode: '',
|
||||
isSpin: false
|
||||
},
|
||||
'STOP': {
|
||||
id: 5,
|
||||
desc: `${i18n.$t('停止')}`,
|
||||
desc: `${i18n.$t('Stop')}`,
|
||||
color: '#e90101',
|
||||
icoUnicode: '',
|
||||
isSpin: false
|
||||
},
|
||||
'FAILURE': {
|
||||
id: 6,
|
||||
desc: `${i18n.$t('失败')}`,
|
||||
desc: `${i18n.$t('failed')}`,
|
||||
color: '#000000',
|
||||
icoUnicode: '',
|
||||
isSpin: false
|
||||
},
|
||||
'SUCCESS': {
|
||||
id: 7,
|
||||
desc: `${i18n.$t('成功')}`,
|
||||
desc: `${i18n.$t('success')}`,
|
||||
color: '#33cc00',
|
||||
icoUnicode: '',
|
||||
isSpin: false
|
||||
},
|
||||
'NEED_FAULT_TOLERANCE': {
|
||||
id: 8,
|
||||
desc: `${i18n.$t('需要容错')}`,
|
||||
desc: `${i18n.$t('Need fault tolerance')}`,
|
||||
color: '#FF8C00',
|
||||
icoUnicode: '',
|
||||
isSpin: false
|
||||
|
|
@ -219,14 +219,14 @@ let tasksState = {
|
|||
},
|
||||
'WAITTING_THREAD': {
|
||||
id: 10,
|
||||
desc: `${i18n.$t('等待线程')}`,
|
||||
desc: `${i18n.$t('Waiting for thread')}`,
|
||||
color: '#912eed',
|
||||
icoUnicode: '',
|
||||
isSpin: false
|
||||
},
|
||||
'WAITTING_DEPEND': {
|
||||
id: 11,
|
||||
desc: `${i18n.$t('等待依赖')}`,
|
||||
desc: `${i18n.$t('Waiting for dependence')}`,
|
||||
color: '#5101be',
|
||||
icoUnicode: '',
|
||||
isSpin: false
|
||||
|
|
|
|||
|
|
@ -386,10 +386,11 @@ svg path:hover {
|
|||
.name-p {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: -24px;
|
||||
top: 58px;
|
||||
width: 200px;
|
||||
text-align: center;
|
||||
margin-left: -100px;
|
||||
word-break:break-all;
|
||||
}
|
||||
.ban-p {
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="clearfix dag-model" >
|
||||
<div class="toolbar">
|
||||
<div class="title"><span>{{$t('工具栏')}}</span></div>
|
||||
<div class="title"><span>{{$t('Toolbar')}}</span></div>
|
||||
<div class="toolbar-btn">
|
||||
<div class="bar-box roundedRect jtk-draggable jtk-droppable jtk-endpoint-anchor jtk-connected"
|
||||
:class="v === dagBarId ? 'active' : ''"
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<x-button
|
||||
style="vertical-align: middle;"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('查看变量')"
|
||||
:title="$t('View variables')"
|
||||
data-container="body"
|
||||
type="primary"
|
||||
size="xsmall"
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
<x-button
|
||||
data-toggle="tooltip"
|
||||
:title="$t('刷新DAG状态')"
|
||||
:title="$t('Refresh DAG status')"
|
||||
data-container="body"
|
||||
style="vertical-align: middle;"
|
||||
icon="fa fa-refresh"
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
size="xsmall"
|
||||
icon="fa fa-reply"
|
||||
@click="_rtNodesDag" >
|
||||
{{$t('返回上一节点')}}
|
||||
{{$t('Return_1')}}
|
||||
</x-button>
|
||||
<x-button
|
||||
style="vertical-align: middle;"
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
@click="_saveChart"
|
||||
icon="fa fa-save"
|
||||
:disabled="isDetails">
|
||||
{{spinnerLoading ? 'Loading...' : $t('保存')}}
|
||||
{{spinnerLoading ? 'Loading...' : $t('Save')}}
|
||||
</x-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
let idArr = allNodesId()
|
||||
const titleTpl = (item, desc) => {
|
||||
let $item = _.filter(taskList, v => v.name === item.name)[0]
|
||||
return `<div style="text-align: left">${i18n.$t('名称')}:${$item.name}</br>${i18n.$t('状态')}:${desc}</br>${i18n.$t('类型')}:${$item.taskType}</br>${i18n.$t('host')}:${$item.host || '-'}</br>${i18n.$t('重试次数')}:${$item.retryTimes}</br>${i18n.$t('提交时间')}:${formatDate($item.submitTime)}</br>${i18n.$t('开始时间')}:${formatDate($item.startTime)}</br>${i18n.$t('结束时间')}:${$item.endTime ? formatDate($item.endTime) : '-'}</br></div>`
|
||||
return `<div style="text-align: left">${i18n.$t('Name')}:${$item.name}</br>${i18n.$t('State')}:${desc}</br>${i18n.$t('type')}:${$item.taskType}</br>${i18n.$t('host')}:${$item.host || '-'}</br>${i18n.$t('Retry Count')}:${$item.retryTimes}</br>${i18n.$t('Submit Time')}:${formatDate($item.submitTime)}</br>${i18n.$t('Start Time')}:${formatDate($item.startTime)}</br>${i18n.$t('End Time')}:${$item.endTime ? formatDate($item.endTime) : '-'}</br></div>`
|
||||
}
|
||||
data.forEach(v1 => {
|
||||
idArr.forEach(v2 => {
|
||||
|
|
@ -232,7 +232,7 @@
|
|||
Dag.saveStore().then(res => {
|
||||
if (this.urlParam.id) {
|
||||
/**
|
||||
* 编辑
|
||||
* Edit
|
||||
* @param saveInstanceEditDAGChart => Process instance editing
|
||||
* @param saveEditDAGChart => Process definition editing
|
||||
*/
|
||||
|
|
@ -300,7 +300,7 @@
|
|||
_saveChart () {
|
||||
// Verify node
|
||||
if (!this.tasks.length) {
|
||||
this.$message.warning(`${i18n.$t('未创建节点保存失败')}`)
|
||||
this.$message.warning(`${i18n.$t('Failed to create node to save')}`)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -350,7 +350,7 @@
|
|||
this._getTaskState(false).then(res => {
|
||||
setTimeout(() => {
|
||||
this.isRefresh = false
|
||||
this.$message.success(`${i18n.$t('刷新状态成功')}`)
|
||||
this.$message.success(`${i18n.$t('Refresh status succeeded')}`)
|
||||
}, 2200)
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
slot-scope="{ selectedModel }"
|
||||
maxlength="4"
|
||||
@on-blur="_onBlur"
|
||||
:placeholder="$t('请选择')"
|
||||
:placeholder="$t('Please choose')"
|
||||
:value="selectedModel === null ? '0' : selectedModel.value"
|
||||
style="width: 100%;"
|
||||
@on-click-icon.stop="_ckIcon">
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
if (val === '0') return true
|
||||
|
||||
if (!(/(^[0-9]*[1-9][0-9]*$)/.test(val))) {
|
||||
this.$message.warning(`${i18n.$t('请输入正整数')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter a positive integer')}`)
|
||||
// init
|
||||
this._ckIcon()
|
||||
return false
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="timeout-alarm-model">
|
||||
<div class="clearfix list">
|
||||
<div class="text-box">
|
||||
<span>{{$t('任务超时告警')}}</span>
|
||||
<span>{{$t('Timeout alarm')}}</span>
|
||||
</div>
|
||||
<div class="cont-box">
|
||||
<label class="label-box">
|
||||
|
|
@ -14,14 +14,14 @@
|
|||
</div>
|
||||
<div class="clearfix list" v-if="enable">
|
||||
<div class="text-box">
|
||||
<span>{{$t('超时策略')}}</span>
|
||||
<span>{{$t('Timeout strategy')}}</span>
|
||||
</div>
|
||||
<div class="cont-box">
|
||||
<label class="label-box">
|
||||
<div style="padding-top: 6px;">
|
||||
<x-checkbox-group v-model="strategy">
|
||||
<x-checkbox label="WARN" :disabled="isDetails">{{$t('超时告警')}}</x-checkbox>
|
||||
<x-checkbox label="FAILED" :disabled="isDetails">{{$t('超时失败')}}</x-checkbox>
|
||||
<x-checkbox label="WARN" :disabled="isDetails">{{$t('Timeout alarm')}}</x-checkbox>
|
||||
<x-checkbox label="FAILED" :disabled="isDetails">{{$t('Timeout failure')}}</x-checkbox>
|
||||
</x-checkbox-group>
|
||||
</div>
|
||||
</label>
|
||||
|
|
@ -29,12 +29,12 @@
|
|||
</div>
|
||||
<div class="clearfix list" v-if="enable">
|
||||
<div class="text-box">
|
||||
<span>{{$t('超时时长')}}</span>
|
||||
<span>{{$t('Timeout period')}}</span>
|
||||
</div>
|
||||
<div class="cont-box">
|
||||
<label class="label-box">
|
||||
<x-input v-model="interval" style="width: 128px;" :disabled="isDetails">
|
||||
<span slot="append">{{$t('分')}}</span>
|
||||
<span slot="append">{{$t('Minute')}}</span>
|
||||
</x-input>
|
||||
</label>
|
||||
</div>
|
||||
|
|
@ -71,12 +71,12 @@
|
|||
_verification () {
|
||||
// Verification timeout policy
|
||||
if (this.enable && !this.strategy.length) {
|
||||
this.$message.warning(`${this.$t('超时策略必须选一个')}`)
|
||||
this.$message.warning(`${this.$t('Timeout strategy must be selected')}`)
|
||||
return false
|
||||
}
|
||||
// Verify timeout duration Non 0 positive integer
|
||||
if (this.enable && !parseInt(this.interval) && !_.isInteger(this.interval)) {
|
||||
this.$message.warning(`${this.$t('超时时长必须为正整数')}`)
|
||||
this.$message.warning(`${this.$t('Timeout must be a positive integer')}`)
|
||||
return false
|
||||
}
|
||||
this.$emit('on-timeout', {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<div class="form-model-model" v-clickoutside="_handleClose">
|
||||
<div class="title-box">
|
||||
<span class="name">{{$t('当前节点设置')}}</span>
|
||||
<span class="name">{{$t('Current node settings')}}</span>
|
||||
<span class="go-subtask">
|
||||
<!-- Component can't pop up box to do component processing -->
|
||||
<m-log :item="backfillItem">
|
||||
<template slot="history"><a href="javascript:" @click="_seeHistory" ><i class="iconfont"></i><em>{{$t('查看历史')}}</em></a></template>
|
||||
<template slot="log"><a href="javascript:"><i class="iconfont"></i><em>{{$t('查看日志')}}</em></a></template>
|
||||
<template slot="history"><a href="javascript:" @click="_seeHistory" ><i class="iconfont"></i><em>{{$t('View history')}}</em></a></template>
|
||||
<template slot="log"><a href="javascript:"><i class="iconfont"></i><em>{{$t('View log')}}</em></a></template>
|
||||
</m-log>
|
||||
<a href="javascript:" @click="_goSubProcess" v-if="_isGoSubProcess"><i class="iconfont"></i><em>{{$t('进入该子节点')}}</em></a>
|
||||
<a href="javascript:" @click="_goSubProcess" v-if="_isGoSubProcess"><i class="iconfont"></i><em>{{$t('Enter this child node')}}</em></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="content-box" v-if="isContentBox">
|
||||
|
|
@ -16,14 +16,14 @@
|
|||
|
||||
<!-- Node name -->
|
||||
<div class="clearfix list">
|
||||
<div class="text-box"><span>{{$t('节点名称')}}</span></div>
|
||||
<div class="text-box"><span>{{$t('Node name')}}</span></div>
|
||||
<div class="cont-box">
|
||||
<label class="label-box">
|
||||
<x-input
|
||||
type="text"
|
||||
v-model="name"
|
||||
:disabled="isDetails"
|
||||
:placeholder="$t('请输入name(必填)')"
|
||||
:placeholder="$t('Please enter name(required)')"
|
||||
maxlength="100"
|
||||
@on-blur="_verifName()"
|
||||
autocomplete="off">
|
||||
|
|
@ -34,12 +34,12 @@
|
|||
|
||||
<!-- Running sign -->
|
||||
<div class="clearfix list">
|
||||
<div class="text-box"><span>{{$t('运行标志')}}</span></div>
|
||||
<div class="text-box"><span>{{$t('Run flag')}}</span></div>
|
||||
<div class="cont-box">
|
||||
<label class="label-box">
|
||||
<x-radio-group v-model="runFlag" >
|
||||
<x-radio :label="'NORMAL'" :disabled="isDetails">{{$t('正常')}}</x-radio>
|
||||
<x-radio :label="'FORBIDDEN'" :disabled="isDetails">{{$t('禁止执行')}}</x-radio>
|
||||
<x-radio :label="'NORMAL'" :disabled="isDetails">{{$t('Normal')}}</x-radio>
|
||||
<x-radio :label="'FORBIDDEN'" :disabled="isDetails">{{$t('Prohibition execution')}}</x-radio>
|
||||
</x-radio-group>
|
||||
</label>
|
||||
</div>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
<!-- desc -->
|
||||
<div class="clearfix list">
|
||||
<div class="text-box">
|
||||
<span>{{$t('描述')}}</span>
|
||||
<span>{{$t('Description')}}</span>
|
||||
</div>
|
||||
<div class="cont-box">
|
||||
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
type="textarea"
|
||||
:disabled="isDetails"
|
||||
v-model="desc"
|
||||
:placeholder="$t('请输入desc')"
|
||||
:placeholder="$t('Please enter description')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</label>
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
<!-- Task priority -->
|
||||
<div class="clearfix list">
|
||||
<div class="text-box">
|
||||
<span>{{$t('任务优先级')}}</span>
|
||||
<span>{{$t('Task priority')}}</span>
|
||||
</div>
|
||||
<div class="cont-box">
|
||||
<label class="label-box">
|
||||
|
|
@ -81,16 +81,16 @@
|
|||
<!-- Number of failed retries -->
|
||||
<div class="clearfix list" v-if="taskType !== 'SUB_PROCESS'">
|
||||
<div class="text-box">
|
||||
<span>{{$t('失败重试次数')}}</span>
|
||||
<span>{{$t('Number of failed retries')}}</span>
|
||||
</div>
|
||||
<div class="cont-box">
|
||||
<m-select-input v-model="maxRetryTimes" :list="[0,1,2,3,4]">
|
||||
</m-select-input>
|
||||
<span>({{$t('次')}})</span>
|
||||
<span class="text-b">{{$t('失败重试间隔')}}</span>
|
||||
<span>({{$t('Times')}})</span>
|
||||
<span class="text-b">{{$t('Failed retry interval')}}</span>
|
||||
<m-select-input v-model="retryInterval" :list="[1,10,30,60,120]">
|
||||
</m-select-input>
|
||||
<span>({{$t('分')}})</span>
|
||||
<span>({{$t('Minute')}})</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -163,8 +163,8 @@
|
|||
</div>
|
||||
<div class="bottom-box">
|
||||
<div class="submit" style="background: #fff;">
|
||||
<x-button type="text" @click="close()"> {{$t('取消')}} </x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" :disabled="isDetails" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : $t('确认添加')}} </x-button>
|
||||
<x-button type="text" @click="close()"> {{$t('Cancel')}} </x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" :disabled="isDetails" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : $t('Confirm add')}} </x-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -269,13 +269,13 @@
|
|||
*/
|
||||
_goSubProcess () {
|
||||
if (_.isEmpty(this.backfillItem)) {
|
||||
this.$message.warning(`${i18n.$t('新创建子工作流还未执行,不能进入子工作流')}`)
|
||||
this.$message.warning(`${i18n.$t('The newly created sub-Process has not yet been executed and cannot enter the sub-Process')}`)
|
||||
return
|
||||
}
|
||||
if (this.router.history.current.name === 'projects-instance-details') {
|
||||
let stateId = $(`#${this.id}`).attr('data-state-id') || null
|
||||
if (!stateId) {
|
||||
this.$message.warning(`${i18n.$t('该任务还未执行,不能进入子工作流')}`)
|
||||
this.$message.warning(`${i18n.$t('The task has not been executed and cannot enter the sub-Process')}`)
|
||||
return
|
||||
}
|
||||
this.store.dispatch('dag/getSubProcessId', { taskId: stateId }).then(res => {
|
||||
|
|
@ -304,7 +304,7 @@
|
|||
*/
|
||||
_verifName () {
|
||||
if (!_.trim(this.name)) {
|
||||
this.$message.warning(`${i18n.$t('请输入名称(必填)')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter name (required)')}`)
|
||||
return false
|
||||
}
|
||||
if (this.name === this.backfillItem.name) {
|
||||
|
|
@ -312,7 +312,7 @@
|
|||
}
|
||||
// Name repeat depends on dom backfill dependent store
|
||||
if (isNameExDag(this.name, _.isEmpty(this.backfillItem) ? 'dom' : 'backfill')) {
|
||||
this.$message.warning(`${i18n.$t('名称已存在请重新输入')}`)
|
||||
this.$message.warning(`${i18n.$t('Name already exists')}`)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
@ -353,6 +353,9 @@
|
|||
},
|
||||
fromThis: this
|
||||
})
|
||||
|
||||
// set run flag
|
||||
this._setRunFlag()
|
||||
},
|
||||
/**
|
||||
* Sub-workflow selected node echo name
|
||||
|
|
@ -360,6 +363,16 @@
|
|||
_onSetProcessName (name) {
|
||||
this.name = name
|
||||
},
|
||||
/**
|
||||
* set run flag
|
||||
*/
|
||||
_setRunFlag(){
|
||||
let dom = $(`#${this.id}`).find('.ban-p')
|
||||
dom.html('')
|
||||
if (this.runFlag === 'FORBIDDEN') {
|
||||
dom.append(rtBantpl())
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Submit verification
|
||||
*/
|
||||
|
|
@ -384,13 +397,7 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
runFlag(val){
|
||||
let dom = $(`#${this.id}`).find('.ban-p')
|
||||
dom.html('')
|
||||
if (val === 'FORBIDDEN') {
|
||||
dom.append(rtBantpl())
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
created () {
|
||||
// Unbind copy and paste events
|
||||
|
|
|
|||
|
|
@ -10,18 +10,18 @@
|
|||
<div v-show="isLog || source === 'list'" class="log-pop">
|
||||
<div class="log-box" >
|
||||
<div class="title">
|
||||
<span>{{$t('查看日志')}}</span>
|
||||
<span>{{$t('View log')}}</span>
|
||||
<div class="full-screen">
|
||||
<a href="javascript:" @click="_downloadLog" data-container="body" data-toggle="tooltip" :title="$t('下载日志')">
|
||||
<a href="javascript:" @click="_downloadLog" data-container="body" data-toggle="tooltip" :title="$t('Download Log')">
|
||||
<i class="iconfont" style="font-size: 20px"></i>
|
||||
</a>
|
||||
<a href="javascript:" class="refresh-log" :class="loading ? 'active' :''" @click="!loading && _refreshLog()" data-container="body" data-toggle="tooltip" :title="$t('刷新日志')">
|
||||
<a href="javascript:" class="refresh-log" :class="loading ? 'active' :''" @click="!loading && _refreshLog()" data-container="body" data-toggle="tooltip" :title="$t('Refresh Log')">
|
||||
<i class="fa iconfont"></i>
|
||||
</a>
|
||||
<a href="javascript:" @click="_screenOpen" v-show="!isScreen" data-container="body" data-toggle="tooltip" :title="$t('进入全屏')">
|
||||
<a href="javascript:" @click="_screenOpen" v-show="!isScreen" data-container="body" data-toggle="tooltip" :title="$t('Enter full screen')">
|
||||
<i class="iconfont"></i>
|
||||
</a>
|
||||
<a href="javascript:" @click="_screenClose" v-show="isScreen" data-container="body" data-toggle="tooltip" :title="$t('取消全屏')">
|
||||
<a href="javascript:" @click="_screenClose" v-show="isScreen" data-container="body" data-toggle="tooltip" :title="$t('Cancel full screen')">
|
||||
<i class="iconfont"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<x-button type="primary" shape="circle" @click="close"> {{$t('关闭')}} </x-button>
|
||||
<x-button type="primary" shape="circle" @click="close"> {{$t('Close')}} </x-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -88,13 +88,13 @@
|
|||
setTimeout(() => {
|
||||
this.loading = false
|
||||
if (res.data) {
|
||||
this.$message.success(`${i18n.$t('更新日志成功')}`)
|
||||
this.$message.success(`${i18n.$t('Update log success')}`)
|
||||
} else {
|
||||
this.$message.warning(`${i18n.$t('暂无更多日志')}`)
|
||||
this.$message.warning(`${i18n.$t('No more logs')}`)
|
||||
}
|
||||
}, 1500)
|
||||
// Handling text field size
|
||||
handerTextareaSize().html('').text(res.data || `${i18n.$t('暂无日志')}`)
|
||||
handerTextareaSize().html('').text(res.data || `${i18n.$t('No log')}`)
|
||||
}).catch(e => {
|
||||
this.$message.error(e.msg || '')
|
||||
this.loading = false
|
||||
|
|
@ -108,15 +108,15 @@
|
|||
if (!res.data) {
|
||||
this.isData = false
|
||||
setTimeout(() => {
|
||||
this.$message.warning(`${i18n.$t('暂无更多日志')}`)
|
||||
this.$message.warning(`${i18n.$t('No more logs')}`)
|
||||
}, 1000)
|
||||
// Handling text field size
|
||||
handerTextareaSize().html('').text(content || `${i18n.$t('暂无日志')}`)
|
||||
handerTextareaSize().html('').text(content || `${i18n.$t('No log')}`)
|
||||
} else {
|
||||
this.isData = true
|
||||
content = res.data
|
||||
// Handling text field size
|
||||
handerTextareaSize().html('').text(content || `${i18n.$t('暂无日志')}`)
|
||||
handerTextareaSize().html('').text(content || `${i18n.$t('No log')}`)
|
||||
|
||||
setTimeout(() => {
|
||||
$('#textarea').scrollTop(2)
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
if (($this.scrollTop() + $this.height()) === $this.height()) {
|
||||
if (self.loadingIndex > 0) {
|
||||
self.$message.loading({
|
||||
content: `${i18n.$t('正在努力请求日志中...')}`,
|
||||
content: `${i18n.$t('Loading Log...')}`,
|
||||
duration: 0,
|
||||
closable: false
|
||||
})
|
||||
|
|
@ -201,7 +201,7 @@
|
|||
// No data is not requested
|
||||
if (self.isData) {
|
||||
self.$message.loading({
|
||||
content: `${i18n.$t('正在努力请求日志中...')}`,
|
||||
content: `${i18n.$t('Loading Log...')}`,
|
||||
duration: 0,
|
||||
closable: false
|
||||
})
|
||||
|
|
@ -226,7 +226,7 @@
|
|||
// Source is a task instance
|
||||
if (this.source === 'list') {
|
||||
this.$message.loading({
|
||||
content: `${i18n.$t('正在努力请求日志中...')}`,
|
||||
content: `${i18n.$t('Loading Log...')}`,
|
||||
duration: 0,
|
||||
closable: false
|
||||
})
|
||||
|
|
|
|||
|
|
@ -7,19 +7,19 @@ import i18n from '@/module/i18n'
|
|||
const cycleList = [
|
||||
{
|
||||
value: 'month',
|
||||
label: `${i18n.$t('月')}`
|
||||
label: `${i18n.$t('month')}`
|
||||
},
|
||||
{
|
||||
value: 'week',
|
||||
label: `${i18n.$t('周')}`
|
||||
label: `${i18n.$t('week')}`
|
||||
},
|
||||
{
|
||||
value: 'day',
|
||||
label: `${i18n.$t('日')}`
|
||||
label: `${i18n.$t('day')}`
|
||||
},
|
||||
{
|
||||
value: 'hour',
|
||||
label: `${i18n.$t('时')}`
|
||||
label: `${i18n.$t('hour')}`
|
||||
}
|
||||
]
|
||||
|
||||
|
|
@ -30,81 +30,81 @@ const dateValueList = {
|
|||
'hour': [
|
||||
{
|
||||
value: 'last1Hour',
|
||||
label: `${i18n.$t('前1小时')}`
|
||||
label: `${i18n.$t('Last1Hour')}`
|
||||
},
|
||||
{
|
||||
value: 'last2Hours',
|
||||
label: `${i18n.$t('前2小时')}`
|
||||
label: `${i18n.$t('Last2Hours')}`
|
||||
},
|
||||
{
|
||||
value: 'last3Hours',
|
||||
label: `${i18n.$t('前3小时')}`
|
||||
label: `${i18n.$t('Last3Hours')}`
|
||||
}
|
||||
],
|
||||
'day': [
|
||||
{
|
||||
value: 'last1Days',
|
||||
label: `${i18n.$t('昨天')}`
|
||||
label: `${i18n.$t('Last1Days')}`
|
||||
},
|
||||
{
|
||||
value: 'last2Days',
|
||||
label: `${i18n.$t('前两天')}`
|
||||
label: `${i18n.$t('Last2Days')}`
|
||||
},
|
||||
{
|
||||
value: 'last3Days',
|
||||
label: `${i18n.$t('前三天')}`
|
||||
label: `${i18n.$t('Last3Days')}`
|
||||
},
|
||||
{
|
||||
value: 'last7Days',
|
||||
label: `${i18n.$t('前七天')}`
|
||||
label: `${i18n.$t('Last7Days')}`
|
||||
}
|
||||
],
|
||||
'week': [
|
||||
{
|
||||
value: 'lastWeek',
|
||||
label: `${i18n.$t('上周')}`
|
||||
label: `${i18n.$t('LastWeek')}`
|
||||
},
|
||||
{
|
||||
value: 'lastMonday',
|
||||
label: `${i18n.$t('上周一')}`
|
||||
label: `${i18n.$t('LastMonday')}`
|
||||
},
|
||||
{
|
||||
value: 'lastTuesday',
|
||||
label: `${i18n.$t('上周二')}`
|
||||
label: `${i18n.$t('LastTuesday')}`
|
||||
},
|
||||
{
|
||||
value: 'lastWednesday',
|
||||
label: `${i18n.$t('上周三')}`
|
||||
label: `${i18n.$t('LastWednesday')}`
|
||||
},
|
||||
{
|
||||
value: 'lastThursday',
|
||||
label: `${i18n.$t('上周四')}`
|
||||
label: `${i18n.$t('LastThursday')}`
|
||||
},
|
||||
{
|
||||
value: 'lastFriday',
|
||||
label: `${i18n.$t('上周五')}`
|
||||
label: `${i18n.$t('LastFriday')}`
|
||||
},
|
||||
{
|
||||
value: 'lastSaturday',
|
||||
label: `${i18n.$t('上周六')}`
|
||||
label: `${i18n.$t('LastSaturday')}`
|
||||
},
|
||||
{
|
||||
value: 'lastSunday',
|
||||
label: `${i18n.$t('上周日')}`
|
||||
label: `${i18n.$t('LastSunday')}`
|
||||
}
|
||||
],
|
||||
'month': [
|
||||
{
|
||||
value: 'lastMonth',
|
||||
label: `${i18n.$t('上月')}`
|
||||
label: `${i18n.$t('LastMonth')}`
|
||||
},
|
||||
{
|
||||
value: 'lastMonthBegin',
|
||||
label: `${i18n.$t('上月初')}`
|
||||
label: `${i18n.$t('LastMonthBegin')}`
|
||||
},
|
||||
{
|
||||
value: 'lastMonthEnd',
|
||||
label: `${i18n.$t('上月末')}`
|
||||
label: `${i18n.$t('LastMonthEnd')}`
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -182,11 +182,11 @@ const typeList = [
|
|||
const sqlTypeList = [
|
||||
{
|
||||
id: 0,
|
||||
code: `${i18n.$t('查询')}`
|
||||
code: `${i18n.$t('Query')}`
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
code: `${i18n.$t('非查询')}`
|
||||
code: `${i18n.$t('Non Query')}`
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
:label="city.code">
|
||||
</x-option>
|
||||
</x-select>
|
||||
<x-select :placeholder="$t('请选择数据源')"
|
||||
<x-select :placeholder="$t('Please select the datasource')"
|
||||
v-model="datasource"
|
||||
style="width: 288px;"
|
||||
:disabled="isDetails">
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
*/
|
||||
_verifDatasource () {
|
||||
if (!this.datasource) {
|
||||
this.$message.warning(`${i18n.$t('请选择数据源')}`)
|
||||
this.$message.warning(`${i18n.$t('Please select the datasource')}`)
|
||||
return false
|
||||
}
|
||||
this.$emit('on-dsData', {
|
||||
|
|
|
|||
|
|
@ -19,17 +19,17 @@
|
|||
</x-select>
|
||||
<template v-if="isInstance">
|
||||
<span class="instance-state">
|
||||
<i class="iconfont" :class="'icon-' + el.state" v-if="el.state === 'SUCCESS'" data-toggle="tooltip" data-container="body" :title="$t('成功')"></i>
|
||||
<i class="iconfont" :class="'icon-' + el.state" v-if="el.state === 'WAITING'" data-toggle="tooltip" data-container="body" :title="$t('等待')"></i>
|
||||
<i class="iconfont" :class="'icon-' + el.state" v-if="el.state === 'FAILED'" data-toggle="tooltip" data-container="body" :title="$t('失败')"></i>
|
||||
<i class="iconfont" :class="'icon-' + el.state" v-if="el.state === 'SUCCESS'" data-toggle="tooltip" data-container="body" :title="$t('success')"></i>
|
||||
<i class="iconfont" :class="'icon-' + el.state" v-if="el.state === 'WAITING'" data-toggle="tooltip" data-container="body" :title="$t('waiting')"></i>
|
||||
<i class="iconfont" :class="'icon-' + el.state" v-if="el.state === 'FAILED'" data-toggle="tooltip" data-container="body" :title="$t('failed')"></i>
|
||||
</span>
|
||||
</template>
|
||||
<span class="operation">
|
||||
<a href="javascript:" class="delete" @click="!isDetails && _remove($index)">
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" data-container="body" :title="$t('删除')" ></i>
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" data-container="body" :title="$t('delete')" ></i>
|
||||
</a>
|
||||
<a href="javascript:" class="add" @click="!isDetails && _add()" v-if="$index === (dependItemList.length - 1)">
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" data-container="body" :title="$t('添加')"></i>
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" data-container="body" :title="$t('Add')"></i>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
:disabled="isDetails"
|
||||
type="text"
|
||||
v-model="localParamsList[$index].prop"
|
||||
:placeholder="$t('prop(必填)')"
|
||||
:placeholder="$t('prop(required)')"
|
||||
maxlength="64"
|
||||
@on-blur="_verifProp()"
|
||||
style="width: 164px;">
|
||||
|
|
@ -41,25 +41,25 @@
|
|||
:disabled="isDetails"
|
||||
type="text"
|
||||
v-model="localParamsList[$index].value"
|
||||
:placeholder="$t('value(选填)')"
|
||||
:placeholder="$t('value(optional)')"
|
||||
maxlength="64"
|
||||
@on-blur="_handleValue()"
|
||||
style="width: 150px;position: relative;margin-bottom: -2px;">
|
||||
</x-input>
|
||||
<span class="lt-add">
|
||||
<a href="javascript:" style="color:red;" @click="!isDetails && _removeUdp($index)" >
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('删除')" ></i>
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('delete')" ></i>
|
||||
</a>
|
||||
</span>
|
||||
<span class="add" v-if="$index === (localParamsList.length - 1)">
|
||||
<a href="javascript:" @click="!isDetails && _addUdp()" >
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('添加')"></i>
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('Add')"></i>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<span class="add" v-if="!localParamsList.length">
|
||||
<a href="javascript:" @click="!isDetails && _addUdp()" >
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('添加')"></i>
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('Add')"></i>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -149,14 +149,14 @@
|
|||
})
|
||||
if (!flag) {
|
||||
if (!type) {
|
||||
this.$message.warning(`${i18n.$t('prop不能为空')}`)
|
||||
this.$message.warning(`${i18n.$t('prop is empty')}`)
|
||||
}
|
||||
return false
|
||||
}
|
||||
let newArr = _.cloneDeep(_.uniqWith(arr, _.isEqual))
|
||||
if (newArr.length !== arr.length) {
|
||||
if (!type) {
|
||||
this.$message.warning(`${i18n.$t('prop中有重复')}`)
|
||||
this.$message.warning(`${i18n.$t('prop is repeat')}`)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
v-model="value"
|
||||
filterable
|
||||
:disabled="isDetails"
|
||||
:placeholder="$t('请选择资源')"
|
||||
:placeholder="$t('Please select resources')"
|
||||
style="width: 100%;">
|
||||
<x-option
|
||||
v-for="city in resList"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,143 @@
|
|||
<template>
|
||||
<div class="statement-list-model">
|
||||
<div class="select-listpp"
|
||||
v-for="(item,$index) in localStatementList"
|
||||
:key="item.id"
|
||||
@click="_getIndex($index)">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
type="textarea"
|
||||
resize="none"
|
||||
:autosize="{minRows:1}"
|
||||
v-model="localStatementList[$index]"
|
||||
@on-blur="_verifProp()"
|
||||
style="width: 525px;">
|
||||
</x-input>
|
||||
<span class="lt-add">
|
||||
<a href="javascript:" style="color:red;" @click="!isDetails && _removeStatement($index)" >
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('delete')" ></i>
|
||||
</a>
|
||||
</span>
|
||||
<span class="add" v-if="$index === (localStatementList.length - 1)">
|
||||
<a href="javascript:" @click="!isDetails && _addStatement()" >
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('Add')"></i>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<span class="add" v-if="!localStatementList.length">
|
||||
<a href="javascript:" @click="!isDetails && _addStatement()" >
|
||||
<i class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('Add')"></i>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import i18n from '@/module/i18n'
|
||||
import disabledState from '@/module/mixin/disabledState'
|
||||
export default {
|
||||
name: 'user-def-statements',
|
||||
data () {
|
||||
return {
|
||||
// Increased data
|
||||
localStatementList: [],
|
||||
// Current execution index
|
||||
localStatementIndex: null
|
||||
}
|
||||
},
|
||||
mixins: [disabledState],
|
||||
props: {
|
||||
statementList: Array
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Current index
|
||||
*/
|
||||
_getIndex (index) {
|
||||
this.localStatementIndex = index
|
||||
},
|
||||
/**
|
||||
* delete item
|
||||
*/
|
||||
_removeStatement (index) {
|
||||
this.localStatementList.splice(index, 1)
|
||||
this._verifProp('value')
|
||||
},
|
||||
/**
|
||||
* add
|
||||
*/
|
||||
_addStatement () {
|
||||
this.localStatementList.push('')
|
||||
},
|
||||
/**
|
||||
* blur verification
|
||||
*/
|
||||
_handleValue () {
|
||||
this._verifProp('value')
|
||||
},
|
||||
/**
|
||||
* Verify that the value exists or is empty
|
||||
*/
|
||||
_verifProp (type) {
|
||||
let arr = []
|
||||
let flag = true
|
||||
_.map(this.localStatementList, v => {
|
||||
arr.push(v)
|
||||
if (!v) {
|
||||
flag = false
|
||||
}
|
||||
})
|
||||
if (!flag) {
|
||||
if (!type) {
|
||||
this.$message.warning(`${i18n.$t('Statement cannot be empty')}`)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
this.$emit('on-statement-list', _.cloneDeep(this.localStatementList))
|
||||
return true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// Monitor data changes
|
||||
statementList () {
|
||||
this.localStatementList = this.statementList
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.localStatementList = this.statementList
|
||||
},
|
||||
mounted () {
|
||||
},
|
||||
components: { }
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" rel="stylesheet/scss">
|
||||
.statement-list-model {
|
||||
.select-listpp {
|
||||
margin-bottom: 6px;
|
||||
.lt-add {
|
||||
padding-left: 4px;
|
||||
a {
|
||||
.iconfont {
|
||||
font-size: 18px;
|
||||
vertical-align: middle;
|
||||
margin-bottom: -2px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.add {
|
||||
a {
|
||||
.iconfont {
|
||||
font-size: 18px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
margin-top: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
<template>
|
||||
<div class="dependence-model">
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('添加依赖')}}</div>
|
||||
<div slot="text">{{$t('Add dependency')}}</div>
|
||||
<div slot="content">
|
||||
<div class="dep-opt">
|
||||
<a href="javascript:"
|
||||
@click="!isDetails && _addDep()"
|
||||
class="add-dep">
|
||||
<i v-if="!isLoading" class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('添加')">
|
||||
<i v-if="!isLoading" class="iconfont" :class="_isDetails" data-toggle="tooltip" :title="$t('Add')">
|
||||

|
||||
</i>
|
||||
<i v-if="isLoading" class="iconfont fa fa-spin" data-toggle="tooltip" :title="$t('添加')">
|
||||
<i v-if="isLoading" class="iconfont fa fa-spin" data-toggle="tooltip" :title="$t('Add')">
|
||||

|
||||
</i>
|
||||
</a>
|
||||
|
|
@ -20,20 +20,20 @@
|
|||
class="dep-relation"
|
||||
@click="!isDetails && _setGlobalRelation()"
|
||||
v-if="dependTaskList.length">
|
||||
{{relation === 'AND' ? $t('且') : $t('或')}}
|
||||
{{relation === 'AND' ? $t('and') : $t('or')}}
|
||||
</span>
|
||||
<div class="dep-list" v-for="(el,$index) in dependTaskList">
|
||||
<span class="dep-line-pie"
|
||||
v-if="el.dependItemList.length"
|
||||
@click="!isDetails && _setRelation($index)">
|
||||
{{el.relation === 'AND' ? $t('且') : $t('或')}}
|
||||
{{el.relation === 'AND' ? $t('and') : $t('or')}}
|
||||
</span>
|
||||
<i class="iconfont dep-delete"
|
||||
data-toggle="tooltip"
|
||||
data-container="body"
|
||||
:class="_isDetails"
|
||||
@click="!isDetails && _deleteDep($index)"
|
||||
:title="$t('删除')" >
|
||||
:title="$t('delete')" >
|
||||

|
||||
</i>
|
||||
<m-depend-item-list
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="spark-model">
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('程序类型')}}</div>
|
||||
<div slot="text">{{$t('Program Type')}}</div>
|
||||
<div slot="content">
|
||||
<x-select v-model="programType" :disabled="isDetails" style="width: 100px;">
|
||||
<x-option
|
||||
|
|
@ -14,23 +14,23 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box v-if="programType !== 'PYTHON'">
|
||||
<div slot="text">{{$t('主函数的class')}}</div>
|
||||
<div slot="text">{{$t('Main class')}}</div>
|
||||
<div slot="content">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
type="input"
|
||||
v-model="mainClass"
|
||||
:placeholder="$t('请输入mainClass')"
|
||||
:placeholder="$t('Please enter main class')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('主jar包')}}</div>
|
||||
<div slot="text">{{$t('Main jar package')}}</div>
|
||||
<div slot="content">
|
||||
<x-select
|
||||
style="width: 100%;"
|
||||
:placeholder="$t('请选择主jar包')"
|
||||
:placeholder="$t('Please enter main jar package')"
|
||||
v-model="mainJar"
|
||||
filterable
|
||||
:disabled="isDetails">
|
||||
|
|
@ -44,33 +44,33 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('命令行参数')}}</div>
|
||||
<div slot="text">{{$t('Command-line parameters')}}</div>
|
||||
<div slot="content">
|
||||
<x-input
|
||||
:autosize="{minRows:2}"
|
||||
:disabled="isDetails"
|
||||
type="textarea"
|
||||
v-model="mainArgs"
|
||||
:placeholder="$t('请输入命令行参数')"
|
||||
:placeholder="$t('Please enter Command-line parameters')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('其他参数')}}</div>
|
||||
<div slot="text">{{$t('Other parameters')}}</div>
|
||||
<div slot="content">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
:autosize="{minRows:2}"
|
||||
type="textarea"
|
||||
v-model="others"
|
||||
:placeholder="$t('请输入其他参数')"
|
||||
:placeholder="$t('Please enter other parameters')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('资源')}}</div>
|
||||
<div slot="text">{{$t('Resources')}}</div>
|
||||
<div slot="content">
|
||||
<m-resources
|
||||
ref="refResources"
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('自定义参数')}}</div>
|
||||
<div slot="text">{{$t('Custom Parameters')}}</div>
|
||||
<div slot="content">
|
||||
<m-local-params
|
||||
ref="refLocalParams"
|
||||
|
|
@ -145,12 +145,12 @@
|
|||
*/
|
||||
_verification () {
|
||||
if (this.programType !== 'PYTHON' && !this.mainClass) {
|
||||
this.$message.warning(`${i18n.$t('请填写主函数的class')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter main class')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.mainJar) {
|
||||
this.$message.warning(`${i18n.$t('请选择主jar包')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter main jar package')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
<template>
|
||||
<div class="procedure-model">
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('数据源')}}</div>
|
||||
<div slot="text">{{$t('Datasource')}}</div>
|
||||
<div slot="content">
|
||||
<m-datasource
|
||||
ref="refDs"
|
||||
@on-dsData="_onDsData"
|
||||
:supportType="['MYSQL','POSTGRESQL']"
|
||||
:supportType="['MYSQL','POSTGRESQL','CLICKHOUSE', 'ORACLE', 'SQLSERVER']"
|
||||
:data="{ type:type,datasource:datasource }">
|
||||
</m-datasource>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('方法')}}</div>
|
||||
<div slot="text">{{$t('methods')}}</div>
|
||||
<div slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
:disabled="isDetails"
|
||||
v-model="method"
|
||||
:placeholder="$t('请输入method(选填)')"
|
||||
:placeholder="$t('Please enter method(optional)')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('自定义参数')}}</div>
|
||||
<div slot="text">{{$t('Custom Parameters')}}</div>
|
||||
<div slot="content">
|
||||
<m-local-params
|
||||
ref="refLocalParams"
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
// Verification function
|
||||
if (!this.method) {
|
||||
this.$message.warning(`${i18n.$t('请输入方法')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter method')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="shell-model">
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('脚本')}}</div>
|
||||
<div slot="text">{{$t('Script')}}</div>
|
||||
<div slot="content">
|
||||
<div class="from-mirror">
|
||||
<textarea id="code-python-mirror" name="code-python-mirror" style="opacity: 0;">
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('资源')}}</div>
|
||||
<div slot="text">{{$t('Resources')}}</div>
|
||||
<div slot="content">
|
||||
<m-resources
|
||||
ref="refResources"
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
</m-list-box>
|
||||
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('自定义参数')}}</div>
|
||||
<div slot="text">{{$t('Custom Parameters')}}</div>
|
||||
<div slot="content">
|
||||
<m-local-params
|
||||
ref="refLocalParams"
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
_verification () {
|
||||
// rawScript 验证
|
||||
if (!editor.getValue()) {
|
||||
this.$message.warning(`${i18n.$t('请输入rawScript(必填)')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter script(required)')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="shell-model">
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('脚本')}}</div>
|
||||
<div slot="text">{{$t('Script')}}</div>
|
||||
<div slot="content">
|
||||
<div class="from-mirror">
|
||||
<textarea
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('资源')}}</div>
|
||||
<div slot="text">{{$t('Resources')}}</div>
|
||||
<div slot="content">
|
||||
<m-resources
|
||||
ref="refResources"
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('自定义参数')}}</div>
|
||||
<div slot="text">{{$t('Custom Parameters')}}</div>
|
||||
<div slot="content">
|
||||
<m-local-params
|
||||
ref="refLocalParams"
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
_verification () {
|
||||
// rawScript verification
|
||||
if (!editor.getValue()) {
|
||||
this.$message.warning(`${i18n.$t('请输入rawScript(必填)')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter script(required)')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="spark-model">
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('程序类型')}}</div>
|
||||
<div slot="text">{{$t('Program Type')}}</div>
|
||||
<div slot="content">
|
||||
<x-select
|
||||
style="width: 130px;"
|
||||
|
|
@ -17,23 +17,23 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box v-if="programType !== 'PYTHON'">
|
||||
<div slot="text">{{$t('主函数的class')}}</div>
|
||||
<div slot="text">{{$t('Main class')}}</div>
|
||||
<div slot="content">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
type="input"
|
||||
v-model="mainClass"
|
||||
:placeholder="$t('请输入mainClass')"
|
||||
:placeholder="$t('Please enter main class')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('主jar包')}}</div>
|
||||
<div slot="text">{{$t('Main jar package')}}</div>
|
||||
<div slot="content">
|
||||
<x-select
|
||||
style="width: 100%;"
|
||||
:placeholder="$t('请选择主jar包')"
|
||||
:placeholder="$t('Please enter main jar package')"
|
||||
v-model="mainJar"
|
||||
filterable
|
||||
:disabled="isDetails">
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('部署方式')}}</div>
|
||||
<div slot="text">{{$t('Deploy Mode')}}</div>
|
||||
<div slot="content">
|
||||
<x-radio-group v-model="deployMode">
|
||||
<x-radio :label="'cluster'" :disabled="isDetails"></x-radio>
|
||||
|
|
@ -58,61 +58,61 @@
|
|||
</m-list-box>
|
||||
<div class="list-box-4p">
|
||||
<div class="clearfix list">
|
||||
<span class="sp1">{{$t('Driver内核数')}}</span>
|
||||
<span class="sp1">{{$t('Driver core number')}}</span>
|
||||
<span class="sp2">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
type="input"
|
||||
v-model="driverCores"
|
||||
:placeholder="$t('请输入Driver内核数')"
|
||||
:placeholder="$t('Please enter driver core number')"
|
||||
style="width: 200px;"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</span>
|
||||
<span class="sp1 sp3">{{$t('Driver内存数')}}</span>
|
||||
<span class="sp1 sp3">{{$t('Driver memory use')}}</span>
|
||||
<span class="sp2">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
type="input"
|
||||
v-model="driverMemory"
|
||||
:placeholder="$t('请输入Driver内存数')"
|
||||
:placeholder="$t('Please enter driver memory use')"
|
||||
style="width: 186px;"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</span>
|
||||
</div>
|
||||
<div class="clearfix list">
|
||||
<span class="sp1">{{$t('Executor数量')}}</span>
|
||||
<span class="sp1">{{$t('Number of Executors')}}</span>
|
||||
<span class="sp2">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
type="input"
|
||||
v-model="numExecutors"
|
||||
:placeholder="$t('请输入Executor数量')"
|
||||
:placeholder="$t('Please enter the number of Executor')"
|
||||
style="width: 200px;"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</span>
|
||||
<span class="sp1 sp3">{{$t('Executor内存数')}}</span>
|
||||
<span class="sp1 sp3">{{$t('Executor memory')}}</span>
|
||||
<span class="sp2">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
type="input"
|
||||
v-model="executorMemory"
|
||||
:placeholder="$t('请输入Executor内存数')"
|
||||
:placeholder="$t('Please enter the Executor memory')"
|
||||
style="width: 186px;"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</span>
|
||||
</div>
|
||||
<div class="clearfix list">
|
||||
<span class="sp1">{{$t('Executor内核数')}}</span>
|
||||
<span class="sp1">{{$t('Executor core number')}}</span>
|
||||
<span class="sp2">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
type="input"
|
||||
v-model="executorCores"
|
||||
:placeholder="$t('请输入Executor内核数')"
|
||||
:placeholder="$t('Please enter Executor core number')"
|
||||
style="width: 200px;"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
|
|
@ -120,32 +120,32 @@
|
|||
</div>
|
||||
</div>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('命令行参数')}}</div>
|
||||
<div slot="text">{{$t('Command-line parameters')}}</div>
|
||||
<div slot="content">
|
||||
<x-input
|
||||
:autosize="{minRows:2}"
|
||||
:disabled="isDetails"
|
||||
type="textarea"
|
||||
v-model="mainArgs"
|
||||
:placeholder="$t('请输入命令行参数')"
|
||||
:placeholder="$t('Please enter Command-line parameters')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('其他参数')}}</div>
|
||||
<div slot="text">{{$t('Other parameters')}}</div>
|
||||
<div slot="content">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
:autosize="{minRows:2}"
|
||||
type="textarea"
|
||||
v-model="others"
|
||||
:placeholder="$t('请输入其他参数')">
|
||||
:placeholder="$t('Please enter other parameters')">
|
||||
</x-input>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('资源')}}</div>
|
||||
<div slot="text">{{$t('Resources')}}</div>
|
||||
<div slot="content">
|
||||
<m-resources
|
||||
ref="refResources"
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('自定义参数')}}</div>
|
||||
<div slot="text">{{$t('Custom Parameters')}}</div>
|
||||
<div slot="content">
|
||||
<m-local-params
|
||||
ref="refLocalParams"
|
||||
|
|
@ -233,47 +233,47 @@
|
|||
*/
|
||||
_verification () {
|
||||
if (this.programType !== 'PYTHON' && !this.mainClass) {
|
||||
this.$message.warning(`${i18n.$t('请填写主函数的class')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter main class')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.mainJar) {
|
||||
this.$message.warning(`${i18n.$t('请选择主jar包')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter main jar package')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.numExecutors) {
|
||||
this.$message.warning(`${i18n.$t('请填写Executor数量')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter the number of Executor')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!Number.isInteger(parseInt(this.numExecutors))) {
|
||||
this.$message.warning(`${i18n.$t('Executor数量为正整数')}`)
|
||||
this.$message.warning(`${i18n.$t('The number of Executors should be a positive integer')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.executorMemory) {
|
||||
this.$message.warning(`${i18n.$t('请填写Executor内存数')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter the Executor memory')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.executorMemory) {
|
||||
this.$message.warning(`${i18n.$t('请填写Executor内存数')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter the Executor memory')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!_.isNumber(parseInt(this.executorMemory))) {
|
||||
this.$message.warning(`${i18n.$t('内存数为数字')}`)
|
||||
this.$message.warning(`${i18n.$t('Memory should be a positive integer')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.executorCores) {
|
||||
this.$message.warning(`${i18n.$t('请填写Executor内核数')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter ExecutorPlease enter Executor core number')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!Number.isInteger(parseInt(this.executorCores))) {
|
||||
this.$message.warning(`${i18n.$t('内核数为正整数')}`)
|
||||
this.$message.warning(`${i18n.$t('Core number should be positive integer')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="sql-model">
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('数据源')}}</div>
|
||||
<div slot="text">{{$t('Datasource')}}</div>
|
||||
<div slot="content">
|
||||
<m-datasource
|
||||
ref="refDs"
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('sql类型')}}</div>
|
||||
<div slot="text">{{$t('SQL Type')}}</div>
|
||||
<div slot="content">
|
||||
<div style="display: inline-block;">
|
||||
<m-sql-type
|
||||
|
|
@ -21,26 +21,26 @@
|
|||
</div>
|
||||
<div v-if="!sqlType" style="display: inline-block;padding-left: 10px;margin-top: 2px;">
|
||||
<x-checkbox-group v-model="showType">
|
||||
<x-checkbox :label="'TABLE'" :disabled="isDetails">{{$t('表格')}}</x-checkbox>
|
||||
<x-checkbox :label="'ATTACHMENT'" :disabled="isDetails">{{$t('附件')}}</x-checkbox>
|
||||
<x-checkbox :label="'TABLE'" :disabled="isDetails">{{$t('Table')}}</x-checkbox>
|
||||
<x-checkbox :label="'ATTACHMENT'" :disabled="isDetails">{{$t('Attachment')}}</x-checkbox>
|
||||
</x-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box v-show="type === 'HIVE'">
|
||||
<div slot="text">{{$t('sql参数')}}</div>
|
||||
<div slot="text">{{$t('SQL Parameter')}}</div>
|
||||
<div slot="content">
|
||||
<x-input
|
||||
:disabled="isDetails"
|
||||
type="input"
|
||||
v-model="connParams"
|
||||
:placeholder="$t('请输入格式为') + ' key1=value1;key2=value2...'"
|
||||
:placeholder="$t('Please enter format') + ' key1=value1;key2=value2...'"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('sql语句')}}</div>
|
||||
<div slot="text">{{$t('SQL Statement')}}</div>
|
||||
<div slot="content">
|
||||
<div class="from-mirror">
|
||||
<textarea
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box v-if="type === 'HIVE'">
|
||||
<div slot="text">{{$t('UDF函数')}}</div>
|
||||
<div slot="text">{{$t('UDF Function')}}</div>
|
||||
<div slot="content">
|
||||
<m-udfs
|
||||
ref="refUdfs"
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('自定义参数')}}</div>
|
||||
<div slot="text">{{$t('Custom Parameters')}}</div>
|
||||
<div slot="content">
|
||||
<m-local-params
|
||||
ref="refLocalParams"
|
||||
|
|
@ -72,6 +72,26 @@
|
|||
</m-local-params>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('Pre Statement')}}</div>
|
||||
<div slot="content">
|
||||
<m-statement-list
|
||||
ref="refPreStatements"
|
||||
@on-statement-list="_onPreStatements"
|
||||
:statement-list="preStatements">
|
||||
</m-statement-list>
|
||||
</div>
|
||||
</m-list-box>
|
||||
<m-list-box>
|
||||
<div slot="text">{{$t('Post Statement')}}</div>
|
||||
<div slot="content">
|
||||
<m-statement-list
|
||||
ref="refPostStatements"
|
||||
@on-statement-list="_onPostStatements"
|
||||
:statement-list="postStatements">
|
||||
</m-statement-list>
|
||||
</div>
|
||||
</m-list-box>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -82,6 +102,7 @@
|
|||
import mSqlType from './_source/sqlType'
|
||||
import mDatasource from './_source/datasource'
|
||||
import mLocalParams from './_source/localParams'
|
||||
import mStatementList from './_source/statementList'
|
||||
import disabledState from '@/module/mixin/disabledState'
|
||||
import codemirror from '@/conf/home/pages/resource/pages/file/pages/_source/codemirror'
|
||||
|
||||
|
|
@ -108,7 +129,11 @@
|
|||
// Form/attachment
|
||||
showType: ['TABLE'],
|
||||
// Sql parameter
|
||||
connParams: ''
|
||||
connParams: '',
|
||||
// Pre statements
|
||||
preStatements: [],
|
||||
// Post statements
|
||||
postStatements: []
|
||||
}
|
||||
},
|
||||
mixins: [disabledState],
|
||||
|
|
@ -141,12 +166,24 @@
|
|||
this.type = o.type
|
||||
this.rtDatasource = o.datasource
|
||||
},
|
||||
/**
|
||||
* return pre statements
|
||||
*/
|
||||
_onPreStatements (a) {
|
||||
this.preStatements = a
|
||||
},
|
||||
/**
|
||||
* return post statements
|
||||
*/
|
||||
_onPostStatements (a) {
|
||||
this.postStatements = a
|
||||
},
|
||||
/**
|
||||
* verification
|
||||
*/
|
||||
_verification () {
|
||||
if (!editor.getValue()) {
|
||||
this.$message.warning(`${i18n.$t('请输入sql语句(必填)')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter a SQL Statement(required)')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
@ -167,6 +204,16 @@
|
|||
return false
|
||||
}
|
||||
|
||||
// preStatements Subcomponent verification
|
||||
if (!this.$refs.refPreStatements._verifProp()) {
|
||||
return false
|
||||
}
|
||||
|
||||
// postStatements Subcomponent verification
|
||||
if (!this.$refs.refPostStatements._verifProp()) {
|
||||
return false
|
||||
}
|
||||
|
||||
// storage
|
||||
this.$emit('on-params', {
|
||||
type: this.type,
|
||||
|
|
@ -187,7 +234,9 @@
|
|||
}
|
||||
})(),
|
||||
localParams: this.localParams,
|
||||
connParams: this.connParams
|
||||
connParams: this.connParams,
|
||||
preStatements: this.preStatements,
|
||||
postStatements: this.postStatements
|
||||
})
|
||||
return true
|
||||
},
|
||||
|
|
@ -245,6 +294,8 @@
|
|||
this.connParams = o.params.connParams || ''
|
||||
this.localParams = o.params.localParams || []
|
||||
this.showType = o.params.showType.split(',') || []
|
||||
this.preStatements = o.params.preStatements || []
|
||||
this.postStatements = o.params.postStatements || []
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
|
@ -262,6 +313,6 @@
|
|||
}
|
||||
},
|
||||
computed: {},
|
||||
components: { mListBox, mDatasource, mLocalParams, mUdfs, mSqlType }
|
||||
components: { mListBox, mDatasource, mLocalParams, mUdfs, mSqlType, mStatementList }
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="sub_process-model">
|
||||
<div class="clearfix list">
|
||||
<div class="text-box">
|
||||
<span>{{$t('子节点')}}</span>
|
||||
<span>{{$t('Child Node')}}</span>
|
||||
</div>
|
||||
<div class="cont-box">
|
||||
<div class="label-box">
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
*/
|
||||
_verification () {
|
||||
if (!this.wdiCurr) {
|
||||
this.$message.warning(`${i18n.$t('请选择子工作流')}`)
|
||||
this.$message.warning(`${i18n.$t('Please select a sub-Process')}`)
|
||||
return false
|
||||
}
|
||||
this.$emit('on-params', {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="affirm-model">
|
||||
<m-popup :ok-text="$t('确认保存')"
|
||||
:nameText="$t('是否保存DAG图')"
|
||||
<m-popup :ok-text="$t('Save')"
|
||||
:nameText="$t('Whether to save the DAG graph')"
|
||||
@close="_close"
|
||||
@ok="_ok">
|
||||
</m-popup>
|
||||
|
|
|
|||
|
|
@ -264,10 +264,10 @@ JSP.prototype.tasksContextmenu = function (event) {
|
|||
let isTwo = store.state.dag.isDetails
|
||||
|
||||
let html = [
|
||||
`<a href="javascript:" id="startRunning" class="${isOne ? '' : 'disbled'}"><i class="iconfont"></i><span>${i18n.$t('开始运行')}</span></a>`,
|
||||
`<a href="javascript:" id="editNodes" class="${isTwo ? 'disbled' : ''}"><i class="iconfont"></i><span>${i18n.$t('编辑节点')}</span></a>`,
|
||||
`<a href="javascript:" id="copyNodes" class="${isTwo ? 'disbled' : ''}"><i class="iconfont"></i><span>${i18n.$t('复制节点')}</span></a>`,
|
||||
`<a href="javascript:" id="removeNodes" class="${isTwo ? 'disbled' : ''}"><i class="iconfont"></i><span>${i18n.$t('删除节点')}</span></a>`
|
||||
`<a href="javascript:" id="startRunning" class="${isOne ? '' : 'disbled'}"><i class="iconfont"></i><span>${i18n.$t('Start')}</span></a>`,
|
||||
`<a href="javascript:" id="editNodes" class="${isTwo ? 'disbled' : ''}"><i class="iconfont"></i><span>${i18n.$t('Edit')}</span></a>`,
|
||||
`<a href="javascript:" id="copyNodes" class="${isTwo ? 'disbled' : ''}"><i class="iconfont"></i><span>${i18n.$t('Copy')}</span></a>`,
|
||||
`<a href="javascript:" id="removeNodes" class="${isTwo ? 'disbled' : ''}"><i class="iconfont"></i><span>${i18n.$t('Delete')}</span></a>`
|
||||
]
|
||||
|
||||
let operationHtml = () => {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const saveTargetarr = (valId, domId) => {
|
|||
}
|
||||
|
||||
const rtBantpl = () => {
|
||||
return `<i class="iconfont" data-toggle="tooltip" data-html="true" data-container="body" data-placement="left" title="${i18n.$t('禁止执行')}"></i>`
|
||||
return `<i class="iconfont" data-toggle="tooltip" data-html="true" data-container="body" data-placement="left" title="${i18n.$t('Prohibition execution')}"></i>`
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
<div class="udp-model">
|
||||
<div class="scrollbar contpi-boxt">
|
||||
<div class="title">
|
||||
<span>{{$t('设置DAG图名称')}}</span>
|
||||
<span>{{$t('Set the DAG diagram name')}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<x-input
|
||||
type="text"
|
||||
v-model="name"
|
||||
:disabled="router.history.current.name === 'projects-instance-details'"
|
||||
:placeholder="$t('请输入name(必填)')">
|
||||
:placeholder="$t('Please enter name(required)')">
|
||||
</x-input>
|
||||
</div>
|
||||
<template v-if="router.history.current.name !== 'projects-instance-details'">
|
||||
|
|
@ -18,13 +18,13 @@
|
|||
type="textarea"
|
||||
v-model="desc"
|
||||
:autosize="{minRows:2}"
|
||||
:placeholder="$t('请输入desc(选填)')"
|
||||
:placeholder="$t('Please enter description(optional)')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</div>
|
||||
</template>
|
||||
<div class="title" style="padding-top: 6px;">
|
||||
<span>{{$t('设置全局')}}</span>
|
||||
<span>{{$t('Set global')}}</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div>
|
||||
|
|
@ -41,11 +41,11 @@
|
|||
<div class="submit">
|
||||
<template v-if="router.history.current.name === 'projects-instance-details'">
|
||||
<div class="lint-pt">
|
||||
<x-checkbox v-model="syncDefine">{{$t('是否更新流程定义')}}</x-checkbox>
|
||||
<x-checkbox v-model="syncDefine">{{$t('Whether to update the process definition')}}</x-checkbox>
|
||||
</div>
|
||||
</template>
|
||||
<x-button type="text" @click="close()"> {{$t('取消')}} </x-button>
|
||||
<x-button type="primary" shape="circle" @click="ok()" v-ps="['GENERAL_USER']" >{{$t('添加')}}</x-button>
|
||||
<x-button type="text" @click="close()"> {{$t('Cancel')}} </x-button>
|
||||
<x-button type="primary" shape="circle" @click="ok()" v-ps="['GENERAL_USER']" >{{$t('Add')}}</x-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
*/
|
||||
ok () {
|
||||
if (!this.name) {
|
||||
this.$message.warning(`${i18n.$t('DAG图名称不能为空')}`)
|
||||
this.$message.warning(`${i18n.$t('DAG graph name cannot be empty')}`)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<div class="variable-model">
|
||||
<div class="list">
|
||||
<div class="name"><i class="fa fa-code"></i><b style="padding-top: 3px;display: inline-block">{{$t('全局参数')}}</b></div>
|
||||
<div class="name"><i class="fa fa-code"></i><b style="padding-top: 3px;display: inline-block">{{$t('Global parameters')}}</b></div>
|
||||
<div class="var-cont">
|
||||
<x-button size="xsmall" type="ghost" v-for="(item,$index) in list.globalParams" @click="_copy('gbudp-' + $index)" :data-clipboard-text="item.prop + ' = ' +item.value" :class="'gbudp-' + $index"><b style="color: #2A455B;">{{item.prop}}</b> = {{item.value}}</x-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list" style="height: 30px;">
|
||||
<div class="name"><i class="fa fa-code"></i><b style="padding-top: 3px;display: inline-block">{{$t('局部参数')}}</b></div>
|
||||
<div class="name"><i class="fa fa-code"></i><b style="padding-top: 3px;display: inline-block">{{$t('Local parameters')}}</b></div>
|
||||
<div class="var-cont">
|
||||
|
||||
</div>
|
||||
|
|
@ -57,13 +57,13 @@
|
|||
_copy (className) {
|
||||
let clipboard = new Clipboard(`.${className}`)
|
||||
clipboard.on('success', e => {
|
||||
this.$message.success(`${i18n.$t('复制成功')}`)
|
||||
this.$message.success(`${i18n.$t('Copy success')}`)
|
||||
// Free memory
|
||||
clipboard.destroy()
|
||||
})
|
||||
clipboard.on('error', e => {
|
||||
// Copy is not supported
|
||||
this.$message.warning(`${i18n.$t('该浏览器不支持自动复制')}`)
|
||||
this.$message.warning(`${i18n.$t('The browser does not support automatic copying')}`)
|
||||
// Free memory
|
||||
clipboard.destroy()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,100 +1,103 @@
|
|||
<template>
|
||||
<div class="datasource-popup-model">
|
||||
<div class="top-p">
|
||||
<span>{{item ? `${$t('编辑')}` : `${$t('创建')}`}}{{`${$t('数据源')}`}}</span>
|
||||
<span>{{item ? `${$t('Edit')}` : `${$t('Create')}`}}{{`${$t('Datasource')}`}}</span>
|
||||
</div>
|
||||
<div class="content-p">
|
||||
<div class="create-datasource-model">
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('数据源')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Datasource')}}</template>
|
||||
<template slot="content">
|
||||
<x-radio-group v-model="type" size="small">
|
||||
<x-radio :label="'MYSQL'">MYSQL</x-radio>
|
||||
<x-radio :label="'POSTGRESQL'">POSTGRESQL</x-radio>
|
||||
<x-radio :label="'HIVE'">HIVE</x-radio>
|
||||
<x-radio :label="'SPARK'">SPARK</x-radio>
|
||||
<x-radio :label="'CLICKHOUSE'">CLICKHOUSE</x-radio>
|
||||
<x-radio :label="'ORACLE'">ORACLE</x-radio>
|
||||
<x-radio :label="'SQLSERVER'">SQLSERVER</x-radio>
|
||||
</x-radio-group>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('数据源名称')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Datasource Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="name"
|
||||
:placeholder="$t('请输入数据源名称')"
|
||||
:placeholder="$t('Please enter datasource name')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('描述')}}</template>
|
||||
<template slot="name">{{$t('Description')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="textarea"
|
||||
v-model="note"
|
||||
:placeholder="$t('请输入描述')"
|
||||
:placeholder="$t('Please enter description')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('IP主机名')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('IP')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="host"
|
||||
:placeholder="$t('请输入IP主机名')"
|
||||
:placeholder="$t('Please enter IP')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('端口')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Port')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="port"
|
||||
:placeholder="$t('请输入端口')"
|
||||
:placeholder="$t('Please enter port')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('用户名')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('User Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="userName"
|
||||
:placeholder="$t('请输入用户名')"
|
||||
:placeholder="$t('Please enter user name')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('密码')}}</template>
|
||||
<template slot="name">{{$t('Password')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="password"
|
||||
v-model="password"
|
||||
:placeholder="$t('请输入密码')"
|
||||
:placeholder="$t('Please enter your password')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('数据库名')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Database Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="database"
|
||||
:placeholder="$t('请输入数据库名')"
|
||||
:placeholder="$t('Please enter database name')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('jdbc连接参数')}}</template>
|
||||
<template slot="name">{{$t('jdbc connect parameters')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="textarea"
|
||||
|
|
@ -108,9 +111,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="bottom-p">
|
||||
<x-button type="text" @click="_close()"> {{$t('取消')}} </x-button>
|
||||
<x-button type="success" shape="circle" @click="_testConnect()" :loading="testLoading">{{testLoading ? 'Loading...' : $t('测试连接')}}</x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="_ok()">{{spinnerLoading ? 'Loading...' :item ? `${$t('确认编辑')}` : `${$t('确认提交')}`}} </x-button>
|
||||
<x-button type="text" @click="_close()"> {{$t('Cancel')}} </x-button>
|
||||
<x-button type="success" shape="circle" @click="_testConnect()" :loading="testLoading">{{testLoading ? 'Loading...' : $t('Test Connect')}}</x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="_ok()">{{spinnerLoading ? 'Loading...' :item ? `${$t('Edit')}` : `${$t('Submit')}`}} </x-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -155,7 +158,7 @@
|
|||
},
|
||||
methods: {
|
||||
_rtOtherPlaceholder () {
|
||||
return `${i18n.$t('请输入格式为')} {"key1":"value1","key2":"value2"...} ${i18n.$t('连接参数')}`
|
||||
return `${i18n.$t('Please enter format')} {"key1":"value1","key2":"value2"...} ${i18n.$t('connection parameter')}`
|
||||
},
|
||||
/**
|
||||
* submit
|
||||
|
|
@ -228,29 +231,29 @@
|
|||
*/
|
||||
_verification () {
|
||||
if (!this.name) {
|
||||
this.$message.warning(`${i18n.$t('请输入资源名称')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter resource name')}`)
|
||||
return false
|
||||
}
|
||||
if (!this.host) {
|
||||
this.$message.warning(`${i18n.$t('请输入IP/主机名')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter IP/hostname')}`)
|
||||
return false
|
||||
}
|
||||
if (!this.port) {
|
||||
this.$message.warning(`${i18n.$t('请输入端口')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter port')}`)
|
||||
return false
|
||||
}
|
||||
if (!this.userName) {
|
||||
this.$message.warning(`${i18n.$t('请输入用户名')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter user name')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.database) {
|
||||
this.$message.warning(`${i18n.$t('请输入数据库名')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter database name')}`)
|
||||
return false
|
||||
}
|
||||
if (this.other) {
|
||||
if (!isJson(this.other)) {
|
||||
this.$message.warning(`${i18n.$t('jdbc连接参数不是一个正确的JSON格式')}`)
|
||||
this.$message.warning(`${i18n.$t('jdbc connection parameters is not a correct JSON format')}`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,28 +4,28 @@
|
|||
<table class="fixed">
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('数据源名称')}}</span>
|
||||
<span>{{$t('Datasource Name')}}</span>
|
||||
</th>
|
||||
<th width="120">
|
||||
<span>{{$t('数据源类型')}}</span>
|
||||
<span>{{$t('Datasource Type')}}</span>
|
||||
</th>
|
||||
<th width="100">
|
||||
<span>{{$t('数据源参数')}}</span>
|
||||
<span>{{$t('Datasource Parameter')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('描述')}}</span>
|
||||
<span>{{$t('Description')}}</span>
|
||||
</th>
|
||||
<th width="150">
|
||||
<span>{{$t('创建时间')}}</span>
|
||||
<span>{{$t('Create Time')}}</span>
|
||||
</th>
|
||||
<th width="150">
|
||||
<span>{{$t('更新时间')}}</span>
|
||||
<span>{{$t('Update Time')}}</span>
|
||||
</th>
|
||||
<th width="80">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="$index">
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<td>
|
||||
<m-tooltips-JSON :JSON="JSON.parse(item.connectionParams)" :id="item.id">
|
||||
<span slot="reference">
|
||||
<a href="javascript:" class="links" style="font-size: 12px;">{{$t('点击查看')}}</a>
|
||||
<a href="javascript:" class="links" style="font-size: 12px;">{{$t('Click to view')}}</a>
|
||||
</span>
|
||||
</m-tooltips-JSON>
|
||||
</td>
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
v-ps="['GENERAL_USER']"
|
||||
:title="$t('编辑')"
|
||||
:title="$t('Edit')"
|
||||
icon="iconfont icon-bianjixiugai"
|
||||
@click="_edit(item)">
|
||||
</x-button>
|
||||
|
|
@ -65,10 +65,10 @@
|
|||
:ref="'poptip-delete-' + $index"
|
||||
placement="bottom-end"
|
||||
width="90">
|
||||
<p>{{$t('确定删除吗?')}}</p>
|
||||
<p>{{$t('Delete?')}}</p>
|
||||
<div style="text-align: right; margin: 0;padding-top: 4px;">
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('取消')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('确定')}}</x-button>
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
|
||||
</div>
|
||||
<template slot="reference">
|
||||
<x-button
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
size="xsmall"
|
||||
icon="iconfont icon-shanchu"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('删除')"
|
||||
:title="$t('delete')"
|
||||
v-ps="['GENERAL_USER']">
|
||||
</x-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<m-list-construction :title="$t('数据源中心')">
|
||||
<m-list-construction :title="$t('Datasource')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-conditions="_onConditions">
|
||||
<template slot="button-group">
|
||||
<x-button type="ghost" size="small" @click="_create('')" v-ps="['GENERAL_USER']">{{$t('创建数据源')}}</x-button>
|
||||
<x-button type="ghost" size="small" @click="_create('')" v-ps="['GENERAL_USER']">{{$t('Create Datasource')}}</x-button>
|
||||
</template>
|
||||
</m-conditions>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<m-list-construction :title="$t('首页')">
|
||||
<m-list-construction :title="$t('Home')">
|
||||
<template slot="content">
|
||||
<m-project-chart :id="0"></m-project-chart>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
:style="{width:emailWidth + 'px'}"
|
||||
type="text"
|
||||
v-model="email"
|
||||
:placeholder="$t('请输入邮箱')"
|
||||
:placeholder="$t('Please enter email')"
|
||||
@keydown.tab="_emailTab"
|
||||
@keyup.delete="_emailDelete"
|
||||
@keyup.enter="_emailEnter"
|
||||
|
|
@ -87,10 +87,10 @@
|
|||
this.email = ''
|
||||
this._handlerEmailWitch()
|
||||
} else {
|
||||
this.$message.warning(`${i18n.$t('邮箱已存在!收件人和抄送人不能重复')}`)
|
||||
this.$message.warning(`${i18n.$t('Mailbox already exists! Recipients and copyers cannot repeat')}`)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(`${i18n.$t('邮箱输入不合法')}`)
|
||||
this.$message.warning(`${i18n.$t('Mailbox input is illegal')}`)
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
|
||||
// Non-existing data
|
||||
if (_.filter(_.cloneDeep(this.repeatData).concat(_.cloneDeep(this.activeList)), v => v === item).length) {
|
||||
this.$message.warning(`${i18n.$t('邮箱已存在!收件人和抄送人不能重复')}`)
|
||||
this.$message.warning(`${i18n.$t('Mailbox already exists! Recipients and copyers cannot repeat')}`)
|
||||
return
|
||||
}
|
||||
// Width initialization
|
||||
|
|
|
|||
|
|
@ -4,28 +4,28 @@
|
|||
<table class="fixed">
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('工作流名称')}}</span>
|
||||
<span>{{$t('Process Name')}}</span>
|
||||
</th>
|
||||
<th width="50">
|
||||
<span>{{$t('状态')}}</span>
|
||||
<span>{{$t('State')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('创建时间')}}</span>
|
||||
<span>{{$t('Create Time')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('更新时间')}}</span>
|
||||
<span>{{$t('Update Time')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('描述')}}</span>
|
||||
<span>{{$t('Description')}}</span>
|
||||
</th>
|
||||
<th width="90">
|
||||
<span>{{$t('定时状态')}}</span>
|
||||
<span>{{$t('Timing state')}}</span>
|
||||
</th>
|
||||
<th width="220">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="item.id">
|
||||
|
|
@ -49,18 +49,18 @@
|
|||
</td>
|
||||
<td><span class="ellipsis">{{item.desc}}</span></td>
|
||||
<td>
|
||||
<span v-if="item.scheduleReleaseState === 'OFFLINE'">{{$t('下线')}}</span>
|
||||
<span v-if="item.scheduleReleaseState === 'ONLINE'">{{$t('上线')}}</span>
|
||||
<span v-if="item.scheduleReleaseState === 'OFFLINE'">{{$t('offline')}}</span>
|
||||
<span v-if="item.scheduleReleaseState === 'ONLINE'">{{$t('online')}}</span>
|
||||
<span v-if="!item.scheduleReleaseState">-</span>
|
||||
</td>
|
||||
<td>
|
||||
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('编辑')" @click="_edit(item)" :disabled="item.releaseState === 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-bianji"><!--{{$t('编辑')}}--></x-button>
|
||||
<x-button type="success" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('启动')" @click="_start(item)" :disabled="item.releaseState !== 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-qidong"><!--{{$t('启动')}}--></x-button>
|
||||
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('定时')" @click="_timing(item)" :disabled="item.releaseState !== 'ONLINE' || item.scheduleReleaseState !== null" v-ps="['GENERAL_USER']" icon="iconfont icon-timer"><!--{{$t('定时')}}--></x-button>
|
||||
<x-button type="error" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('下线')" @click="_downline(item)" v-if="item.releaseState === 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-erji-xiaxianjilu"><!--{{$t('下线')}}--></x-button>
|
||||
<x-button type="warning" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('上线')" @click="_poponline(item)" v-if="item.releaseState === 'OFFLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-erji-xiaxianjilu-copy"><!--{{$t('上线')}}--></x-button>
|
||||
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('定时管理')" @click="_timingManage(item)" :disabled="item.releaseState !== 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-paibanguanli"><!--{{$t('定时管理')}}--></x-button>
|
||||
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('树形图')" @click="_treeView(item)" icon="iconfont icon-juxingkaobei"><!--{{$t('树形图')}}--></x-button>
|
||||
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Edit')" @click="_edit(item)" :disabled="item.releaseState === 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-bianji"><!--{{$t('编辑')}}--></x-button>
|
||||
<x-button type="success" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Start')" @click="_start(item)" :disabled="item.releaseState !== 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-qidong"><!--{{$t('启动')}}--></x-button>
|
||||
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Timing')" @click="_timing(item)" :disabled="item.releaseState !== 'ONLINE' || item.scheduleReleaseState !== null" v-ps="['GENERAL_USER']" icon="iconfont icon-timer"><!--{{$t('定时')}}--></x-button>
|
||||
<x-button type="error" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('offline')" @click="_downline(item)" v-if="item.releaseState === 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-erji-xiaxianjilu"><!--{{$t('下线')}}--></x-button>
|
||||
<x-button type="warning" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('online')" @click="_poponline(item)" v-if="item.releaseState === 'OFFLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-erji-xiaxianjilu-copy"><!--{{$t('上线')}}--></x-button>
|
||||
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Cron Management')" @click="_timingManage(item)" :disabled="item.releaseState !== 'ONLINE'" v-ps="['GENERAL_USER']" icon="iconfont icon-paibanguanli"><!--{{$t('定时管理')}}--></x-button>
|
||||
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('TreeView')" @click="_treeView(item)" icon="iconfont icon-juxingkaobei"><!--{{$t('树形图')}}--></x-button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -1,34 +1,34 @@
|
|||
<template>
|
||||
<div class="start-process-model">
|
||||
<div class="title-box">
|
||||
<span>{{$t('启动前请先设置参数')}}</span>
|
||||
<span>{{$t('Please set the parameters before starting')}}</span>
|
||||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('失败策略')}}
|
||||
{{$t('Failure Strategy')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<x-radio-group v-model="failureStrategy" style="margin-top: 7px;">
|
||||
<x-radio :label="'CONTINUE'">{{$t('继续')}}</x-radio>
|
||||
<x-radio :label="'END'">{{$t('结束')}}</x-radio>
|
||||
<x-radio :label="'CONTINUE'">{{$t('Continue')}}</x-radio>
|
||||
<x-radio :label="'END'">{{$t('End')}}</x-radio>
|
||||
</x-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix list" v-if="sourceType === 'contextmenu'">
|
||||
<div class="text">
|
||||
{{$t('节点执行')}}
|
||||
{{$t('Node execution')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<x-radio-group v-model="taskDependType">
|
||||
<x-radio :label="'TASK_POST'">{{$t('向后执行')}}</x-radio>
|
||||
<x-radio :label="'TASK_PRE'">{{$t('向前执行')}}</x-radio>
|
||||
<x-radio :label="'TASK_ONLY'">{{$t('仅执行当前节点')}}</x-radio>
|
||||
<x-radio :label="'TASK_POST'">{{$t('Backward execution')}}</x-radio>
|
||||
<x-radio :label="'TASK_PRE'">{{$t('Forward execution')}}</x-radio>
|
||||
<x-radio :label="'TASK_ONLY'">{{$t('Execute only the current node')}}</x-radio>
|
||||
</x-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('通知策略')}}
|
||||
{{$t('Notification strategy')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<x-select style="width: 200px;" v-model="warningType">
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('流程优先级')}}
|
||||
{{$t('Process priority')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<m-priority v-model="processInstancePriority"></m-priority>
|
||||
|
|
@ -51,14 +51,14 @@
|
|||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('通知组')}}
|
||||
{{$t('Notification group')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<x-select
|
||||
style="width: 200px;"
|
||||
v-model="warningGroupId"
|
||||
:disabled="!notifyGroupList.length">
|
||||
<x-input slot="trigger" slot-scope="{ selectedModel }" readonly :placeholder="$t('请选择通知组')" :value="selectedModel ? selectedModel.label : ''" style="width: 200px;" @on-click-icon.stop="warningGroupId = {}">
|
||||
<x-input slot="trigger" slot-scope="{ selectedModel }" readonly :placeholder="$t('Please select a notification group')" :value="selectedModel ? selectedModel.label : ''" style="width: 200px;" @on-click-icon.stop="warningGroupId = {}">
|
||||
<i slot="suffix" class="fa fa-times-circle" style="font-size: 15px;cursor: pointer;" v-show="warningGroupId.id"></i>
|
||||
<i slot="suffix" class="ans-icon-arrow-down" style="font-size: 12px;" v-show="!warningGroupId.id"></i>
|
||||
</x-input>
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('收件人')}}
|
||||
{{$t('Recipient')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<m-email v-model="receivers" :repeat-data="receiversCc"></m-email>
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('抄送人')}}
|
||||
{{$t('Cc')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<m-email v-model="receiversCc" :repeat-data="receivers"></m-email>
|
||||
|
|
@ -89,29 +89,29 @@
|
|||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('补数')}}
|
||||
{{$t('Complement Data')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<div style="padding-top: 6px;">
|
||||
<x-checkbox v-model="execType">{{$t('是否补数')}}</x-checkbox>
|
||||
<x-checkbox v-model="execType">{{$t('Whether it is a complement process?')}}</x-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="execType">
|
||||
<div class="clearfix list" style="margin:-6px 0 16px 0">
|
||||
<div class="text">
|
||||
{{$t('执行方式')}}
|
||||
{{$t('Mode of execution')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<x-radio-group v-model="runMode" style="margin-top: 7px;">
|
||||
<x-radio :label="'RUN_MODE_SERIAL'">{{$t('串行执行')}}</x-radio>
|
||||
<x-radio :label="'RUN_MODE_PARALLEL'">{{$t('并行执行')}}</x-radio>
|
||||
<x-radio :label="'RUN_MODE_SERIAL'">{{$t('Serial execution')}}</x-radio>
|
||||
<x-radio :label="'RUN_MODE_PARALLEL'">{{$t('Parallel execution')}}</x-radio>
|
||||
</x-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('时间')}}
|
||||
{{$t('Date')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<x-datepicker
|
||||
|
|
@ -121,15 +121,15 @@
|
|||
@on-change="_datepicker"
|
||||
:value="scheduleTime"
|
||||
type="daterange"
|
||||
:placeholder="$t('选择日期区间')"
|
||||
:placeholder="$t('Select date range')"
|
||||
format="YYYY-MM-DD HH:mm:ss">
|
||||
</x-datepicker>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="submit">
|
||||
<x-button type="text" @click="close()"> {{$t('取消')}} </x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : $t('启动')}} </x-button>
|
||||
<x-button type="text" @click="close()"> {{$t('Cancel')}} </x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : $t('Start')}} </x-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<div class="timing-process-model">
|
||||
<div class="title-box">
|
||||
<span>{{$t('定时前请先设置参数')}}</span>
|
||||
<span>{{$t('Set parameters before timing')}}</span>
|
||||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('起止时间')}}
|
||||
{{$t('Start and stop time')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<x-datepicker
|
||||
|
|
@ -15,14 +15,14 @@
|
|||
@on-change="_datepicker"
|
||||
:value="scheduleTime"
|
||||
type="daterange"
|
||||
:placeholder="$t('选择日期区间')"
|
||||
:placeholder="$t('Select date range')"
|
||||
format="YYYY-MM-DD HH:mm:ss">
|
||||
</x-datepicker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('定时')}}
|
||||
{{$t('Timing')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<template>
|
||||
|
|
@ -45,18 +45,18 @@
|
|||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('失败策略')}}
|
||||
{{$t('Failure Strategy')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<x-radio-group v-model="failureStrategy" style="margin-top: 7px;">
|
||||
<x-radio :label="'CONTINUE'">{{$t('继续')}}</x-radio>
|
||||
<x-radio :label="'END'">{{$t('结束')}}</x-radio>
|
||||
<x-radio :label="'CONTINUE'">{{$t('Continue')}}</x-radio>
|
||||
<x-radio :label="'END'">{{$t('End')}}</x-radio>
|
||||
</x-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('通知策略')}}
|
||||
{{$t('Notification strategy')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<x-select
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('流程优先级')}}
|
||||
{{$t('Process priority')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<m-priority v-model="processInstancePriority"></m-priority>
|
||||
|
|
@ -81,14 +81,14 @@
|
|||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('通知组')}}
|
||||
{{$t('Notification group')}}
|
||||
</div>
|
||||
<div class="cont">
|
||||
<x-select
|
||||
style="width: 200px;"
|
||||
:disabled="!notifyGroupList.length"
|
||||
v-model="warningGroupId">
|
||||
<x-input slot="trigger" readonly slot-scope="{ selectedModel }" :placeholder="$t('请选择通知组')" :value="selectedModel ? selectedModel.label : ''" style="width: 200px;" @on-click-icon.stop="warningGroupId = {}">
|
||||
<x-input slot="trigger" readonly slot-scope="{ selectedModel }" :placeholder="$t('Please select a notification group')" :value="selectedModel ? selectedModel.label : ''" style="width: 200px;" @on-click-icon.stop="warningGroupId = {}">
|
||||
<i slot="suffix" class="fa fa-times-circle" style="font-size: 15px;cursor: pointer;" v-show="warningGroupId.id"></i>
|
||||
<i slot="suffix" class="ans-icon-arrow-down" style="font-size: 12px;" v-show="!warningGroupId.id"></i>
|
||||
</x-input>
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('收件人')}}
|
||||
{{$t('Recipient')}}
|
||||
</div>
|
||||
<div class="cont" style="width: 680px;">
|
||||
<m-email v-model="receivers" :repeat-data="receiversCc"></m-email>
|
||||
|
|
@ -111,15 +111,15 @@
|
|||
</div>
|
||||
<div class="clearfix list">
|
||||
<div class="text">
|
||||
{{$t('抄送人')}}
|
||||
{{$t('Cc')}}
|
||||
</div>
|
||||
<div class="cont" style="width: 680px;">
|
||||
<m-email v-model="receiversCc" :repeat-data="receivers"></m-email>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submit">
|
||||
<x-button type="text" @click="close()"> {{$t('取消')}} </x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : (item.crontab ? $t('编辑') : $t('创建'))}} </x-button>
|
||||
<x-button type="text" @click="close()"> {{$t('Cancel')}} </x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : (item.crontab ? $t('Edit') : $t('Create'))}} </x-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -166,12 +166,12 @@
|
|||
},
|
||||
_verification () {
|
||||
if (!this.scheduleTime) {
|
||||
this.$message.warning(`${i18n.$t('请选择时间')}`)
|
||||
this.$message.warning(`${i18n.$t('Please select time')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!this.crontab) {
|
||||
this.$message.warning(`${i18n.$t('请填写 crontab')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter crontab')}`)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
@ -192,18 +192,21 @@
|
|||
receivers: this.receivers.join(',') || '',
|
||||
receiversCc: this.receiversCc.join(',') || ''
|
||||
}
|
||||
let msg = ''
|
||||
|
||||
// edit
|
||||
if (this.item.crontab) {
|
||||
api = 'dag/updateSchedule'
|
||||
searchParams.id = this.item.id
|
||||
msg = '编辑成功!不要忘记上线'
|
||||
} else {
|
||||
api = 'dag/createSchedule'
|
||||
searchParams.processDefinitionId = this.item.id
|
||||
msg = '创建成功'
|
||||
}
|
||||
|
||||
this.store.dispatch(api, searchParams).then(res => {
|
||||
this.$message.success(res.msg)
|
||||
this.$message.success(msg)
|
||||
this.$emit('onUpdate')
|
||||
}).catch(e => {
|
||||
this.$message.error(e.msg || '')
|
||||
|
|
|
|||
|
|
@ -20,19 +20,19 @@ import i18n from '@/module/i18n'
|
|||
let warningTypeList = [
|
||||
{
|
||||
id: 'NONE',
|
||||
code: `${i18n.$t('都不发')}`
|
||||
code: `${i18n.$t('none_1')}`
|
||||
},
|
||||
{
|
||||
id: 'SUCCESS',
|
||||
code: `${i18n.$t('成功发')}`
|
||||
code: `${i18n.$t('success_1')}`
|
||||
},
|
||||
{
|
||||
id: 'FAILURE',
|
||||
code: `${i18n.$t('失败发')}`
|
||||
code: `${i18n.$t('failure_1')}`
|
||||
},
|
||||
{
|
||||
id: 'ALL',
|
||||
code: `${i18n.$t('成功或失败都发')}`
|
||||
code: `${i18n.$t('All_1')}`
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'projects'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('工作流定义')">
|
||||
<m-list-construction :title="$t('Process definition')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-conditions="_onConditions">
|
||||
<template slot="button-group">
|
||||
<x-button type="ghost" size="small" v-ps="['GENERAL_USER']" @click="() => this.$router.push({name: 'definition-create'})">{{$t('创建工作流')}}</x-button>
|
||||
<x-button type="ghost" size="small" v-ps="['GENERAL_USER']" @click="() => this.$router.push({name: 'definition-create'})">{{$t('Create process')}}</x-button>
|
||||
</template>
|
||||
</m-conditions>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'projects'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('树形图')">
|
||||
<m-list-construction :title="$t('TreeView')">
|
||||
<template slot="conditions"></template>
|
||||
<template slot="content">
|
||||
<div class="tree-view-index-model">
|
||||
|
|
@ -20,13 +20,13 @@
|
|||
type="primary"
|
||||
size="default"
|
||||
icon="fa fa-reply">
|
||||
返回上一节点
|
||||
{{$t('Return_1')}}
|
||||
</x-button>
|
||||
</div>
|
||||
<div class="tasks-color">
|
||||
<div class="toolbar-color-sp">
|
||||
<a href="javascript:">
|
||||
<span>节点类型</span>
|
||||
<span>Node Type</span>
|
||||
</a>
|
||||
<a href="javascript:" v-for="(k,v) in tasksType">
|
||||
<i class="fa fa-circle" :style="{color:k.color}"></i>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
<div class="state-tasks-color-sp">
|
||||
<a href="javascript:">
|
||||
<span>任务状态</span>
|
||||
<span>{{$t('Task Status')}}</span>
|
||||
</a>
|
||||
<a href="javascript:" v-for="(item) in tasksState">
|
||||
<i class="fa fa-square" :style="{color:item.color}"></i>
|
||||
|
|
|
|||
|
|
@ -9,34 +9,34 @@
|
|||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('流程名称')}}</span>
|
||||
<span>{{$t('Process Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('开始时间')}}</span>
|
||||
<span>{{$t('Start Time')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('结束时间')}}</span>
|
||||
<span>{{$t('End Time')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('crontab')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('失败策略')}}</span>
|
||||
<span>{{$t('Failure Strategy')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('状态')}}</span>
|
||||
<span>{{$t('State')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('创建时间')}}</span>
|
||||
<span>{{$t('Create Time')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('更新时间')}}</span>
|
||||
<span>{{$t('Update Time')}}</span>
|
||||
</th>
|
||||
<th width="80">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="item.id">
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('编辑')"
|
||||
:title="$t('Edit')"
|
||||
@click="_editTiming(item)"
|
||||
icon="iconfont icon-bianji"
|
||||
:disabled="item.releaseState === 'ONLINE'" >
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('上线')"
|
||||
:title="$t('online')"
|
||||
@click="_online(item)"
|
||||
icon="iconfont icon-erji-xiaxianjilu-copy"
|
||||
v-if="item.releaseState === 'OFFLINE'">
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('下线')"
|
||||
:title="$t('offline')"
|
||||
icon="iconfont icon-erji-xiaxianjilu"
|
||||
@click="_offline(item)"
|
||||
v-if="item.releaseState === 'ONLINE'">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'projects'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('定时管理')">
|
||||
<m-list-construction :title="$t('Cron Management')">
|
||||
<template slot="content">
|
||||
<m-list></m-list>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@
|
|||
@on-change="_datepicker"
|
||||
:value="scheduleTime"
|
||||
type="daterange"
|
||||
:placeholder="$t('选择日期区间')"
|
||||
:placeholder="$t('Select date range')"
|
||||
format="YYYY-MM-DD HH:mm:ss">
|
||||
</x-datepicker>
|
||||
</div>
|
||||
<div class="row" >
|
||||
<div class="col-md-6">
|
||||
<div class="chart-title">
|
||||
<span>{{$t('任务状态统计')}}</span>
|
||||
<span>{{$t('Task status statistics')}}</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
|
|
@ -26,9 +26,9 @@
|
|||
<div class="table-small-model">
|
||||
<table>
|
||||
<tr>
|
||||
<th width="40">{{$t('序号')}}</th>
|
||||
<th>{{$t('数量')}}</th>
|
||||
<th>{{$t('状态')}}</th>
|
||||
<th width="40">{{$t('#')}}</th>
|
||||
<th>{{$t('Number')}}</th>
|
||||
<th>{{$t('State')}}</th>
|
||||
</tr>
|
||||
<tr v-for="(item,$index) in taskCountDtosList">
|
||||
<td><span>{{$index+1}}</span></td>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="chart-title">
|
||||
<span>{{$t('流程状态统计')}}</span>
|
||||
<span>{{$t('Process Status Statistics')}}</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
|
|
@ -56,9 +56,9 @@
|
|||
<div class="table-small-model">
|
||||
<table>
|
||||
<tr>
|
||||
<th width="40">{{$t('序号')}}</th>
|
||||
<th>{{$t('数量')}}</th>
|
||||
<th>{{$t('状态')}}</th>
|
||||
<th width="40">{{$t('#')}}</th>
|
||||
<th>{{$t('Number')}}</th>
|
||||
<th>{{$t('State')}}</th>
|
||||
</tr>
|
||||
<tr v-for="(item,$index) in processStateCountList">
|
||||
<td><span>{{$index+1}}</span></td>
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="chart-title" style="margin-bottom: -20px;margin-top: 30px">
|
||||
<span>{{$t('流程定义统计')}}</span>
|
||||
<span>{{$t('Process Definition Statistics')}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div id="process-definition-bar" style="height:500px"></div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'projects'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('项目首页')">
|
||||
<m-list-construction :title="$t('Project Home')">
|
||||
<template slot="content">
|
||||
<m-project-chart :id="id"></m-project-chart>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'projects'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('甘特图')">
|
||||
<m-list-construction :title="$t('Gantt')">
|
||||
<template slot="content">
|
||||
<div class="gantt-model">
|
||||
<div class="gantt-state">
|
||||
<div class="state-tasks-color-sp">
|
||||
<a href="javascript:">
|
||||
<span>{{$t('任务状态')}}</span>
|
||||
<span>{{$t('Task Status')}}</span>
|
||||
</a>
|
||||
<a href="javascript:" v-for="(item) in tasksState">
|
||||
<i class="fa fa-square" :style="{color:item.color}"></i>
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
this.isNodata = true
|
||||
return
|
||||
}
|
||||
// 甘特图
|
||||
// Gantt
|
||||
Gantt.init({
|
||||
el: '.gantt',
|
||||
tasks: res.tasks
|
||||
|
|
|
|||
|
|
@ -23,43 +23,43 @@ import i18n from '@/module/i18n'
|
|||
let stateType = [
|
||||
{
|
||||
code: '',
|
||||
label: `${i18n.$t('无')}`
|
||||
label: `${i18n.$t('none')}`
|
||||
}, {
|
||||
code: 'SUBMITTED_SUCCESS',
|
||||
label: `${i18n.$t('提交成功')}`
|
||||
label: `${i18n.$t('Submitted successfully')}`
|
||||
}, {
|
||||
code: 'RUNNING_EXEUTION',
|
||||
label: `${i18n.$t('正在运行')}`
|
||||
label: `${i18n.$t('Running')}`
|
||||
}, {
|
||||
code: 'READY_PAUSE',
|
||||
label: `${i18n.$t('准备暂停')}`
|
||||
label: `${i18n.$t('Ready to pause')}`
|
||||
}, {
|
||||
code: 'PAUSE',
|
||||
label: `${i18n.$t('暂停')}`
|
||||
label: `${i18n.$t('Pause')}`
|
||||
}, {
|
||||
code: 'READY_STOP',
|
||||
label: `${i18n.$t('准备停止')}`
|
||||
label: `${i18n.$t('Ready to stop')}`
|
||||
}, {
|
||||
code: 'STOP',
|
||||
label: `${i18n.$t('停止')}`
|
||||
label: `${i18n.$t('Stop')}`
|
||||
}, {
|
||||
code: 'FAILURE',
|
||||
label: `${i18n.$t('失败')}`
|
||||
label: `${i18n.$t('failed')}`
|
||||
}, {
|
||||
code: 'SUCCESS',
|
||||
label: `${i18n.$t('成功')}`
|
||||
label: `${i18n.$t('success')}`
|
||||
}, {
|
||||
code: 'NEED_FAULT_TOLERANCE',
|
||||
label: `${i18n.$t('需要容错')}`
|
||||
label: `${i18n.$t('Need fault tolerance')}`
|
||||
}, {
|
||||
code: 'KILL',
|
||||
label: `${i18n.$t('kill')}`
|
||||
}, {
|
||||
code: 'WAITTING_THREAD',
|
||||
label: `${i18n.$t('等待线程')}`
|
||||
label: `${i18n.$t('Waiting for thread')}`
|
||||
}, {
|
||||
code: 'WAITTING_DEPEND',
|
||||
label: `${i18n.$t('等待依赖完成')}`
|
||||
label: `${i18n.$t('Waiting for dependency to complete')}`
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
placement="bottom-end"
|
||||
v-model="datepicker"
|
||||
:panelNum="2">
|
||||
<x-input slot="input" readonly slot-scope="{value}" :value="value" style="width: 310px;" size="small" :placeholder="$t('按选择日期区间')">
|
||||
<x-input slot="input" readonly slot-scope="{value}" :value="value" style="width: 310px;" size="small" :placeholder="$t('Select date range')">
|
||||
<i slot="suffix"
|
||||
@click.stop="_dateEmpty()"
|
||||
class="ans-icon-fail-solid"
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
<div class="list">
|
||||
<x-select style="width: 160px;" @on-change="_onChangeState" :value="stateType" >
|
||||
<x-input slot="trigger" readonly :value="selectedModel ? selectedModel.label : ''" slot-scope="{ selectedModel }" style="width: 160px;" size="small" :placeholder="$t('按状态')" suffix-icon="ans-icon-arrow-down">
|
||||
<x-input slot="trigger" readonly :value="selectedModel ? selectedModel.label : ''" slot-scope="{ selectedModel }" style="width: 160px;" size="small" :placeholder="$t('State')" suffix-icon="ans-icon-arrow-down">
|
||||
</x-input>
|
||||
<x-option
|
||||
v-for="city in stateTypeList"
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<x-input v-model="host" style="width: 140px;" size="small" :placeholder="$t('host')"></x-input>
|
||||
</div>
|
||||
<div class="list">
|
||||
<x-input v-model="searchVal" style="width: 200px;" size="small" :placeholder="$t('按名称')"></x-input>
|
||||
<x-input v-model="searchVal" style="width: 200px;" size="small" :placeholder="$t('name')"></x-input>
|
||||
</div>
|
||||
</template>
|
||||
</m-conditions>
|
||||
|
|
|
|||
|
|
@ -4,37 +4,37 @@
|
|||
<table class="fixed">
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('工作流名称')}}</span>
|
||||
<span>{{$t('Process Name')}}</span>
|
||||
</th>
|
||||
<th width="120">
|
||||
<span>{{$t('运行类型')}}</span>
|
||||
<span>{{$t('Run Type')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('开始时间')}}</span>
|
||||
<span>{{$t('Start Time')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('结束时间')}}</span>
|
||||
<span>{{$t('End Time')}}</span>
|
||||
</th>
|
||||
<th width="90">
|
||||
<span>{{$t('运行时长(s)')}}</span>
|
||||
<span>{{$t('Duration')}}s</span>
|
||||
</th>
|
||||
<th width="72">
|
||||
<span>{{$t('运行次数')}}</span>
|
||||
<span>{{$t('Run Times')}}</span>
|
||||
</th>
|
||||
<th width="100">
|
||||
<span>{{$t('host')}}</span>
|
||||
</th>
|
||||
<th width="70">
|
||||
<span>{{$t('容错标识')}}</span>
|
||||
<span>{{$t('fault-tolerant sign')}}</span>
|
||||
</th>
|
||||
<th width="50">
|
||||
<span>{{$t('状态')}}</span>
|
||||
<span>{{$t('State')}}</span>
|
||||
</th>
|
||||
<th width="260">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="item.id">
|
||||
|
|
@ -67,55 +67,55 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('编辑')"
|
||||
:title="$t('Edit')"
|
||||
@click="_reEdit(item)"
|
||||
v-ps="['GENERAL_USER']"
|
||||
icon="iconfont icon-bianjixiugai"
|
||||
:disabled="item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP'"><!--{{$t('编辑')}}--></x-button>
|
||||
:disabled="item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP'"></x-button>
|
||||
<x-button type="info"
|
||||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('重跑')"
|
||||
:title="$t('Rerun')"
|
||||
@click="_reRun(item,$index)"
|
||||
v-ps="['GENERAL_USER']"
|
||||
icon="iconfont icon-shuaxin"
|
||||
:disabled="item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP'"><!--{{$t('重跑')}}--></x-button>
|
||||
:disabled="item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP'"></x-button>
|
||||
<x-button type="success"
|
||||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('恢复失败')"
|
||||
:title="$t('Recovery Failed')"
|
||||
@click="_restore(item,$index)"
|
||||
v-ps="['GENERAL_USER']"
|
||||
icon="iconfont icon-cuowuguanbishibai"
|
||||
:disabled="item.state !== 'FAILURE'"><!--{{$t('恢复失败')}}--></x-button>
|
||||
:disabled="item.state !== 'FAILURE'"></x-button>
|
||||
<x-button type="error"
|
||||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('停止')"
|
||||
:title="$t('Stop')"
|
||||
@click="_stop(item)"
|
||||
v-ps="['GENERAL_USER']"
|
||||
icon="iconfont icon-zanting1"
|
||||
:disabled="item.state !== 'RUNNING_EXEUTION'"><!--{{$t('停止')}}--></x-button>
|
||||
:disabled="item.state !== 'RUNNING_EXEUTION'"></x-button>
|
||||
<x-button type="warning"
|
||||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="item.state === 'PAUSE' ? $t('恢复暂停') : $t('暂停')"
|
||||
:title="item.state === 'PAUSE' ? $t('Recovery Suspend') : $t('Pause')"
|
||||
@click="_suspend(item,$index)"
|
||||
v-ps="['GENERAL_USER']"
|
||||
:icon="item.state === 'PAUSE' ? 'iconfont icon-ai06' : 'iconfont icon-zanting'"
|
||||
:disabled="item.state !== 'RUNNING_EXEUTION' && item.state !== 'PAUSE'"><!--{{item.state === 'PAUSE' ? $t('恢复暂停') : $t('暂停')}}--></x-button>
|
||||
:disabled="item.state !== 'RUNNING_EXEUTION' && item.state !== 'PAUSE'"></x-button>
|
||||
<x-poptip
|
||||
:ref="'poptip-delete-' + $index"
|
||||
placement="bottom-end"
|
||||
width="90">
|
||||
<p>{{$t('确定删除吗?')}}</p>
|
||||
<p>{{$t('Delete?')}}</p>
|
||||
<div style="text-align: right; margin: 0;padding-top: 4px;">
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('取消')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('确定')}}</x-button>
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
|
||||
</div>
|
||||
<template slot="reference">
|
||||
<x-button
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('删除')"
|
||||
:title="$t('delete')"
|
||||
v-ps="['GENERAL_USER']">
|
||||
</x-button>
|
||||
</template>
|
||||
|
|
@ -134,15 +134,14 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('甘特图')"
|
||||
:title="$t('Gantt')"
|
||||
@click="_gantt(item)"
|
||||
icon="iconfont icon-gantt">
|
||||
<!--{{$t('甘特图')}}-->
|
||||
</x-button>
|
||||
|
||||
</div>
|
||||
<div v-show="!item.disabled">
|
||||
<!--编辑-->
|
||||
<!--Edit-->
|
||||
<x-button
|
||||
type="info"
|
||||
shape="circle"
|
||||
|
|
@ -151,7 +150,7 @@
|
|||
disabled="true">
|
||||
</x-button>
|
||||
|
||||
<!--重跑-->
|
||||
<!--Rerun-->
|
||||
<x-button
|
||||
v-show="buttonType === 'run'"
|
||||
type="info"
|
||||
|
|
@ -169,7 +168,7 @@
|
|||
disabled="true">
|
||||
</x-button>
|
||||
|
||||
<!--恢复失败-->
|
||||
<!--Recovery Failed-->
|
||||
<x-button
|
||||
v-show="buttonType === 'store'"
|
||||
type="success"
|
||||
|
|
@ -187,7 +186,7 @@
|
|||
disabled="true">
|
||||
</x-button>
|
||||
|
||||
<!--停止-->
|
||||
<!--Stop-->
|
||||
<x-button
|
||||
type="error"
|
||||
shape="circle"
|
||||
|
|
@ -196,7 +195,7 @@
|
|||
disabled="true">
|
||||
</x-button>
|
||||
|
||||
<!--倒计时 => 恢复暂停/暂停-->
|
||||
<!--倒计时 => Recovery Suspend/Pause-->
|
||||
<x-button
|
||||
v-show="item.state === 'PAUSE' && buttonType === 'suspend'"
|
||||
type="warning"
|
||||
|
|
@ -205,7 +204,7 @@
|
|||
disabled="true">
|
||||
{{item.count}}s
|
||||
</x-button>
|
||||
<!--恢复暂停-->
|
||||
<!--Recovery Suspend-->
|
||||
<x-button
|
||||
v-show="item.state === 'PAUSE' && buttonType !== 'suspend'"
|
||||
type="warning"
|
||||
|
|
@ -214,7 +213,7 @@
|
|||
icon="iconfont icon-ai06"
|
||||
disabled="true">
|
||||
</x-button>
|
||||
<!--暂停-->
|
||||
<!--Pause-->
|
||||
<x-button
|
||||
v-show="item.state !== 'PAUSE'"
|
||||
type="warning"
|
||||
|
|
@ -224,7 +223,7 @@
|
|||
disabled="true">
|
||||
</x-button>
|
||||
|
||||
<!--删除-->
|
||||
<!--delete-->
|
||||
<x-button
|
||||
type="error"
|
||||
shape="circle"
|
||||
|
|
@ -233,7 +232,7 @@
|
|||
:disabled="true">
|
||||
</x-button>
|
||||
|
||||
<!--甘特图-->
|
||||
<!--Gantt-->
|
||||
<x-button
|
||||
type="info"
|
||||
shape="circle"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'projects'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('工作流实例')">
|
||||
<m-list-construction :title="$t('Process Instance')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-query="_onQuery"></m-conditions>
|
||||
</template>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
total: null,
|
||||
// 数据
|
||||
processInstanceList: [],
|
||||
// 参数
|
||||
// Parameter
|
||||
searchParams: {
|
||||
// 搜索关键词
|
||||
searchVal: '',
|
||||
|
|
@ -53,11 +53,11 @@
|
|||
pageNo: 1,
|
||||
// host
|
||||
host: '',
|
||||
// 状态
|
||||
// State
|
||||
stateType: '',
|
||||
// 开始时间
|
||||
// Start Time
|
||||
startDate: '',
|
||||
// 结束时间
|
||||
// End Time
|
||||
endDate: ''
|
||||
}
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
methods: {
|
||||
...mapActions('dag', ['getProcessInstance']),
|
||||
/**
|
||||
* 查询
|
||||
* Query
|
||||
*/
|
||||
_onQuery (o) {
|
||||
this.searchParams = _.assign(this.searchParams, o)
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
<template>
|
||||
<m-popup ref="popup" :ok-text="item ? $t('确认编辑') : $t('确认提交')" :nameText="item ? $t('编辑项目') : $t('创建项目')" @ok="_ok">
|
||||
<m-popup ref="popup" :ok-text="item ? $t('Edit') : $t('Submit')" :nameText="item ? $t('Edit') : $t('Create Project')" @ok="_ok">
|
||||
<template slot="content">
|
||||
<div class="projects-create-model">
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('项目名称')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Project Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="projectName"
|
||||
:placeholder="$t('请输入name')"
|
||||
:placeholder="$t('Please enter name')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('描述')}}</template>
|
||||
<template slot="name">{{$t('Description')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="textarea"
|
||||
v-model="desc"
|
||||
:placeholder="$t('请输入desc')"
|
||||
:placeholder="$t('Please enter description')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
},
|
||||
_verification () {
|
||||
if (!this.projectName) {
|
||||
this.$message.warning(`${i18n.$t('请输入名称')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter name')}`)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -4,25 +4,25 @@
|
|||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('项目名称')}}</span>
|
||||
<span>{{$t('Project Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('所属用户')}}</span>
|
||||
<span>{{$t('Owned Users')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('描述')}}</span>
|
||||
<span>{{$t('Description')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('创建时间')}}</span>
|
||||
<span>{{$t('Create Time')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('更新时间')}}</span>
|
||||
<span>{{$t('Update Time')}}</span>
|
||||
</th>
|
||||
<th width="80">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="$index">
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('编辑')"
|
||||
:title="$t('Edit')"
|
||||
@click="_edit(item)"
|
||||
icon="iconfont icon-bianjixiugai"
|
||||
v-ps="['GENERAL_USER']">
|
||||
|
|
@ -58,10 +58,10 @@
|
|||
:ref="'poptip-' + $index"
|
||||
placement="bottom-end"
|
||||
width="90">
|
||||
<p>{{$t('确定删除吗?')}}</p>
|
||||
<p>{{$t('Delete?')}}</p>
|
||||
<div style="text-align: right; margin: 0;padding-top: 4px;">
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('取消')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('确定')}}</x-button>
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
|
||||
</div>
|
||||
<template slot="reference">
|
||||
<x-button
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('删除')"
|
||||
:title="$t('delete')"
|
||||
icon="iconfont icon-shanchu"
|
||||
v-ps="['GENERAL_USER']">
|
||||
</x-button>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<m-list-construction :title="$t('项目管理')">
|
||||
<m-list-construction :title="$t('Project')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-conditions="_onConditions">
|
||||
<template slot="button-group">
|
||||
<x-button type="ghost" size="small" @click="_create('')" v-ps="['GENERAL_USER']">{{$t('创建项目')}}</x-button>
|
||||
<x-button type="ghost" size="small" @click="_create('')" v-ps="['GENERAL_USER']">{{$t('Create Project')}}</x-button>
|
||||
</template>
|
||||
</m-conditions>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -4,40 +4,40 @@
|
|||
<table class="fixed">
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('名称')}}</span>
|
||||
<span>{{$t('Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('工作流实例')}}</span>
|
||||
<span>{{$t('Process Instance')}}</span>
|
||||
</th>
|
||||
<th width="80">
|
||||
<span>{{$t('节点类型')}}</span>
|
||||
<span>{{$t('Node Type')}}</span>
|
||||
</th>
|
||||
<th width="40">
|
||||
<span>{{$t('状态')}}</span>
|
||||
<span>{{$t('State')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('提交时间')}}</span>
|
||||
<span>{{$t('Submit Time')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('开始时间')}}</span>
|
||||
<span>{{$t('Start Time')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('结束时间')}}</span>
|
||||
<span>{{$t('End Time')}}</span>
|
||||
</th>
|
||||
<th width="110">
|
||||
<span>{{$t('host')}}</span>
|
||||
</th>
|
||||
<th width="74">
|
||||
<span>{{$t('运行时长')}}(s)</span>
|
||||
<span>{{$t('Duration')}}(s)</span>
|
||||
</th>
|
||||
<th width="84">
|
||||
<span>{{$t('重试次数')}}</span>
|
||||
<span>{{$t('Retry Count')}}</span>
|
||||
</th>
|
||||
<th width="50">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="item.id">
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('查看日志')"
|
||||
:title="$t('View log')"
|
||||
icon="iconfont icon-xitongcaozuorizhi"
|
||||
@click="_refreshLog(item)">
|
||||
</x-button>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'projects'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('任务实例')">
|
||||
<m-list-construction :title="$t('Task Instance')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-query="_onQuery"></m-conditions>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -4,37 +4,37 @@
|
|||
<table class="fixed">
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('任务名称')}}</span>
|
||||
<span>{{$t('Task Name')}}</span>
|
||||
</th>
|
||||
<th width="66">
|
||||
<span>{{$t('任务日期')}}</span>
|
||||
<span>{{$t('Task Date')}}</span>
|
||||
</th>
|
||||
<th width="150">
|
||||
<span>{{$t('开始时间')}}</span>
|
||||
<span>{{$t('Start Time')}}</span>
|
||||
</th>
|
||||
<th width="150">
|
||||
<span>{{$t('结束时间')}}</span>
|
||||
<span>{{$t('End Time')}}</span>
|
||||
</th>
|
||||
<th width="134">
|
||||
<span>{{$t('运行时长')}}({{$t('秒')}})</span>
|
||||
<span>{{$t('Duration')}}(s)</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('源表')}}</span>
|
||||
<span>{{$t('Source Table')}}</span>
|
||||
</th>
|
||||
<th width="100">
|
||||
<span>{{$t('记录数')}}</span>
|
||||
<span>{{$t('Record Number')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('目标表')}}</span>
|
||||
<span>{{$t('Target Table')}}</span>
|
||||
</th>
|
||||
<th width="100">
|
||||
<span>{{$t('记录数')}}</span>
|
||||
<span>{{$t('Record Number')}}</span>
|
||||
</th>
|
||||
<th width="88">
|
||||
<span>{{$t('状态')}}</span>
|
||||
<span>{{$t('State')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="item.id">
|
||||
|
|
@ -45,8 +45,14 @@
|
|||
<span class="ellipsis" data-toggle="tooltip" data-container="body" :title="_rtTooltip(item.procName)" data-html="true">{{item.procName}}</span>
|
||||
</td>
|
||||
<td><span>{{item.procDate}}</span></td>
|
||||
<td><span>{{item.startTime | formatDate}}</span></td>
|
||||
<td><span>{{item.endTime | formatDate}}</span></td>
|
||||
<td>
|
||||
<span v-if="item.startTime">{{item.startTime | formatDate}}</span>
|
||||
<span v-else>-</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="item.endTime">{{item.endTime | formatDate}}</span>
|
||||
<span v-else>-</span>
|
||||
</td>
|
||||
<td><span>{{item.duration}}</span></td>
|
||||
<td><span class="ellipsis" data-toggle="tooltip" data-container="body" :title="_rtTooltip(item.sourceTab)" data-html="true">{{item.sourceTab}}</span></td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'projects'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('任务记录')">
|
||||
<m-list-construction :title="$t('Task record')">
|
||||
<template slot="conditions">
|
||||
<m-conditions>
|
||||
<template slot="search-group">
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
format="YYYY-MM-DD HH:mm:ss"
|
||||
placement="bottom-end"
|
||||
:panelNum="2">
|
||||
<x-input slot="input" readonly slot-scope="{value}" :value="value" style="width: 310px;" size="small" :placeholder="$t('按选择日期区间')">
|
||||
<x-input slot="input" readonly slot-scope="{value}" :value="value" style="width: 310px;" size="small" :placeholder="$t('Select date range')">
|
||||
<i slot="suffix"
|
||||
@click.stop="_dateEmpty()"
|
||||
class="ans-icon-fail-solid"
|
||||
|
|
@ -27,14 +27,14 @@
|
|||
</x-datepicker>
|
||||
</div>
|
||||
<div class="list">
|
||||
<x-input v-model="destTable" style="width: 120px;" size="small" :placeholder="$t('按目标表')"></x-input>
|
||||
<x-input v-model="destTable" style="width: 120px;" size="small" :placeholder="$t('Target Table')"></x-input>
|
||||
</div>
|
||||
<div class="list">
|
||||
<x-input v-model="sourceTable" style="width: 120px;" size="small" :placeholder="$t('按源表')"></x-input>
|
||||
<x-input v-model="sourceTable" style="width: 120px;" size="small" :placeholder="$t('Source Table')"></x-input>
|
||||
</div>
|
||||
<div class="list">
|
||||
<x-select style="width: 90px;" @on-change="_onChangeState">
|
||||
<x-input slot="trigger" readonly :value="selectedModel ? selectedModel.label : ''" slot-scope="{ selectedModel }" style="width: 90px;" size="small" :placeholder="$t('按状态')" suffix-icon="ans-icon-arrow-down"></x-input>
|
||||
<x-input slot="trigger" readonly :value="selectedModel ? selectedModel.label : ''" slot-scope="{ selectedModel }" style="width: 90px;" size="small" :placeholder="$t('State')" suffix-icon="ans-icon-arrow-down"></x-input>
|
||||
<x-option
|
||||
v-for="city in stateList"
|
||||
:key="city.label"
|
||||
|
|
@ -48,11 +48,11 @@
|
|||
@on-change="_onChangeDate"
|
||||
format="YYYY-MM-DD"
|
||||
:panelNum="1">
|
||||
<x-input slot="input" readonly slot-scope="{value}" style="width: 130px;" :value="value" size="small" :placeholder="$t('按日期')"></x-input>
|
||||
<x-input slot="input" readonly slot-scope="{value}" style="width: 130px;" :value="value" size="small" :placeholder="$t('Date')"></x-input>
|
||||
</x-datepicker>
|
||||
</div>
|
||||
<div class="list">
|
||||
<x-input v-model="taskName" style="width: 130px;" size="small" :placeholder="$t('按任务名称')"></x-input>
|
||||
<x-input v-model="taskName" style="width: 130px;" size="small" :placeholder="$t('Task Name')"></x-input>
|
||||
</div>
|
||||
</template>
|
||||
</m-conditions>
|
||||
|
|
@ -101,27 +101,27 @@
|
|||
endDate: '',
|
||||
stateList: [
|
||||
{
|
||||
label: `${i18n.$t('无')}`,
|
||||
label: `${i18n.$t('none')}`,
|
||||
code: ``
|
||||
},
|
||||
{
|
||||
label: `${i18n.$t('成功')}`,
|
||||
code: `${i18n.$t('成功')}`
|
||||
label: `${i18n.$t('success')}`,
|
||||
code: `${i18n.$t('success')}`
|
||||
},
|
||||
{
|
||||
label: `${i18n.$t('等待')}`,
|
||||
code: `${i18n.$t('等待')}`
|
||||
label: `${i18n.$t('waiting')}`,
|
||||
code: `${i18n.$t('waiting')}`
|
||||
},
|
||||
{
|
||||
label: `${i18n.$t('执行中')}`,
|
||||
code: `${i18n.$t('执行中')}`
|
||||
label: `${i18n.$t('In Execution')}`,
|
||||
code: `${i18n.$t('In Execution')}`
|
||||
},
|
||||
{
|
||||
label: `${i18n.$t('完成')}`,
|
||||
code: `${i18n.$t('完成')}`
|
||||
label: `${i18n.$t('Finish')}`,
|
||||
code: `${i18n.$t('Finish')}`
|
||||
}, {
|
||||
label: `${i18n.$t('失败')}`,
|
||||
code: `${i18n.$t('失败')}`
|
||||
label: `${i18n.$t('failed')}`,
|
||||
code: `${i18n.$t('failed')}`
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<m-list-construction :title="$t('定时管理')">
|
||||
<m-list-construction :title="$t('Cron Management')">
|
||||
<template slot="content">
|
||||
<m-list></m-list>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'resource'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('创建文件')">
|
||||
<m-list-construction :title="$t('Create File')">
|
||||
<template slot="content">
|
||||
<div class="resource-create-model">
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('文件名称')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('File Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="fileName"
|
||||
style="width: 300px;"
|
||||
:placeholder="$t('请输入name')"
|
||||
:placeholder="$t('Please enter name')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('文件格式')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('File Format')}}</template>
|
||||
<template slot="content">
|
||||
<x-select v-model="suffix" style="width: 100px;" @on-change="_onChange">
|
||||
<x-option
|
||||
|
|
@ -30,19 +30,19 @@
|
|||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('描述')}}</template>
|
||||
<template slot="name">{{$t('Description')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="textarea"
|
||||
v-model="desc"
|
||||
style="width: 430px;"
|
||||
:placeholder="$t('请输入desc')"
|
||||
:placeholder="$t('Please enter description')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('文件内容')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('File Content')}}</template>
|
||||
<template slot="content">
|
||||
<textarea id="code-create-mirror" name="code-create-mirror"></textarea>
|
||||
</template>
|
||||
|
|
@ -51,8 +51,8 @@
|
|||
<template slot="name"> </template>
|
||||
<template slot="content">
|
||||
<div class="submit">
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : $t('确认创建')}} </x-button>
|
||||
<x-button type="text" @click="() => $router.push({name: 'file'})"> {{$t('取消')}} </x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()" v-ps="['GENERAL_USER']">{{spinnerLoading ? 'Loading...' : $t('Create')}} </x-button>
|
||||
<x-button type="text" @click="() => $router.push({name: 'file'})"> {{$t('Cancel')}} </x-button>
|
||||
</div>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
|
|
@ -112,11 +112,11 @@
|
|||
},
|
||||
_validation () {
|
||||
if (!this.fileName) {
|
||||
this.$message.warning(`${i18n.$t('请输入资源名称')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter resource name')}`)
|
||||
return false
|
||||
}
|
||||
if (!editor.getValue()) {
|
||||
this.$message.warning(`${i18n.$t('请输入资源内容')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter the resource content')}`)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="no-type-model">
|
||||
<img src="./down_error.png" alt="">
|
||||
<p>{{$t('不支持在线查看类型')}}</p>
|
||||
<p>{{$t('Online viewing type is not supported')}}</p>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<div class="main-layout-box file-details-model">
|
||||
<m-secondary-menu :type="'resource'" ></m-secondary-menu>
|
||||
<m-list-construction :title="$t('文件详情')">
|
||||
<m-list-construction :title="$t('File Details')">
|
||||
<div slot="content" style="margin: 20px">
|
||||
<div class="file-details-content">
|
||||
<h2>
|
||||
<span>{{name}}</span>
|
||||
<div class="down">
|
||||
<i class="iconfont" data-container="body" data-toggle="tooltip" :title="$t('下载详情')" @click="_downloadFile"></i>
|
||||
<i class="iconfont" data-container="body" data-toggle="tooltip" :title="$t('Download Details')" @click="_downloadFile"></i>
|
||||
<em>{{size}}</em>
|
||||
</div>
|
||||
</h2>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'resource'" ></m-secondary-menu>
|
||||
<m-list-construction :title="$t('文件详情')">
|
||||
<m-list-construction :title="$t('File Details')">
|
||||
<div slot="content" style="margin: 20px">
|
||||
<div class="file-edit-content">
|
||||
<h2>
|
||||
|
|
@ -13,8 +13,8 @@
|
|||
<textarea id="code-edit-mirror" name="code-edit-mirror"></textarea>
|
||||
</div>
|
||||
<div class="submit-c">
|
||||
<x-button type="text" shape="circle" @click="close()" :disabled="disabled"> {{$t('返回')}} </x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()">{{spinnerLoading ? 'Loading...' : $t('保存')}} </x-button>
|
||||
<x-button type="text" shape="circle" @click="close()" :disabled="disabled"> {{$t('Return')}} </x-button>
|
||||
<x-button type="primary" shape="circle" :loading="spinnerLoading" @click="ok()">{{spinnerLoading ? 'Loading...' : $t('Save')}} </x-button>
|
||||
</div>
|
||||
</template>
|
||||
<m-no-data :msg="msg" v-if="msg"></m-no-data>
|
||||
|
|
|
|||
|
|
@ -4,25 +4,25 @@
|
|||
<table class="fixed">
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('名称')}}</span>
|
||||
<span>{{$t('Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('文件名称')}}</span>
|
||||
<span>{{$t('File Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('描述')}}</span>
|
||||
<span>{{$t('Description')}}</span>
|
||||
</th>
|
||||
<th width="100">
|
||||
<span>{{$t('大小')}}</span>
|
||||
<span>{{$t('Size')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('更新时间')}}</span>
|
||||
<span>{{$t('Update Time')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="item.id">
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('编辑')"
|
||||
:title="$t('Edit')"
|
||||
:disabled="_rtDisb(item)"
|
||||
@click="_edit(item,$index)"
|
||||
icon="iconfont icon-bianjixiugai"
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
size="xsmall"
|
||||
icon="iconfont icon-wendangxiugai"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('重命名')"
|
||||
:title="$t('Rename')"
|
||||
@click="_rename(item,$index)"
|
||||
v-ps="['GENERAL_USER']">
|
||||
</x-button>
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('下载')"
|
||||
:title="$t('Download')"
|
||||
@click="_downloadFile(item)"
|
||||
icon="iconfont icon-download"
|
||||
v-ps="['GENERAL_USER']">
|
||||
|
|
@ -80,10 +80,10 @@
|
|||
:ref="'poptip-' + $index"
|
||||
placement="bottom-end"
|
||||
width="90">
|
||||
<p>{{$t('确定删除吗?')}}</p>
|
||||
<p>{{$t('Delete?')}}</p>
|
||||
<div style="text-align: right; margin: 0;padding-top: 4px;">
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('取消')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('确定')}}</x-button>
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
|
||||
</div>
|
||||
<template slot="reference">
|
||||
<x-button
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('删除')"
|
||||
:title="$t('delete')"
|
||||
v-ps="['GENERAL_USER']">
|
||||
</x-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
<template>
|
||||
<m-popup :ok-text="$t('确认重命名')" :nameText="$t('重命名')" @ok="_ok" :asyn-loading="true">
|
||||
<m-popup :ok-text="$t('Confirm Rename')" :nameText="$t('Rename')" @ok="_ok" :asyn-loading="true">
|
||||
<template slot="content">
|
||||
<div class="resource-rename-model">
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('名称')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="name"
|
||||
:placeholder="$t('请输入name')"
|
||||
:placeholder="$t('Please enter name')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('描述')}}</template>
|
||||
<template slot="name">{{$t('Description')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="textarea"
|
||||
v-model="desc"
|
||||
:placeholder="$t('请输入desc')"
|
||||
:placeholder="$t('Please enter description')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
return new Promise((resolve, reject) => {
|
||||
if (!this.name) {
|
||||
reject({ // eslint-disable-line
|
||||
msg: `${i18n.$t('请输入资源名称')}`
|
||||
msg: `${i18n.$t('Please enter resource name')}`
|
||||
})
|
||||
} else {
|
||||
resolve()
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'resource'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('文件管理')">
|
||||
<m-list-construction :title="$t('File Management')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-conditions="_onConditions">
|
||||
<template slot="button-group">
|
||||
<x-button-group size="small" >
|
||||
<x-button type="ghost" @click="() => $router.push({name: 'resource-file-create'})" v-ps="['GENERAL_USER']">{{$t('创建文件')}}</x-button>
|
||||
<x-button type="ghost" @click="_uploading" v-ps="['GENERAL_USER']">{{$t('上传文件')}}</x-button>
|
||||
<x-button type="ghost" @click="() => $router.push({name: 'resource-file-create'})" v-ps="['GENERAL_USER']">{{$t('Create File')}}</x-button>
|
||||
<x-button type="ghost" @click="_uploading" v-ps="['GENERAL_USER']">{{$t('Upload Files')}}</x-button>
|
||||
</x-button-group>
|
||||
</template>
|
||||
</m-conditions>
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
methods: {
|
||||
...mapActions('resource', ['getResourcesListP']),
|
||||
/**
|
||||
* 文件上传
|
||||
* File Upload
|
||||
*/
|
||||
_uploading () {
|
||||
findComponentDownward(this.$root, 'roof-nav')._fileUpdate('FILE')
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<m-popup :ok-text="item ? $t('编辑') : $t('确定提交')" :nameText="item ? $t('编辑UDF函数') : $t('创建UDF函数')" @ok="_ok" ref="popup">
|
||||
<m-popup :ok-text="item ? $t('Edit') : $t('Submit')" :nameText="item ? $t('Edit UDF Function') : $t('Create UDF Function')" @ok="_ok" ref="popup">
|
||||
<template slot="content">
|
||||
<div class="udf-create-model">
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('类型')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('type')}}</template>
|
||||
<template slot="content">
|
||||
<x-radio-group v-model="type">
|
||||
<x-radio :label="'HIVE'">HIVE UDF</x-radio>
|
||||
|
|
@ -12,49 +12,49 @@
|
|||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('UDF函数名称')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('UDF Function Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
maxlength="40"
|
||||
v-model="funcName"
|
||||
:placeholder="$t('请输入函数名')">
|
||||
:placeholder="$t('Please enter a function name')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('包名类名')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Package Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
maxlength="40"
|
||||
v-model="className"
|
||||
:placeholder="$t('请输入包名类名')">
|
||||
:placeholder="$t('Please enter a Package name')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('参数')}}</template>
|
||||
<template slot="name">{{$t('Parameter')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="argTypes"
|
||||
:placeholder="$t('请输入参数')">
|
||||
:placeholder="$t('Please enter a parameter')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('数据库名')}}</template>
|
||||
<template slot="name">{{$t('Database Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="database"
|
||||
:placeholder="$t('请输入数据库名')">
|
||||
:placeholder="$t('Please enter database name')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('UDF资源')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('UDF Resources')}}</template>
|
||||
<template slot="content">
|
||||
<x-select
|
||||
filterable
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
:label="city.alias">
|
||||
</x-option>
|
||||
</x-select>
|
||||
<x-button type="primary" @click="_toggleUpdate" :disabled="upDisabled">{{$t('上传资源')}}</x-button>
|
||||
<x-button type="primary" @click="_toggleUpdate" :disabled="upDisabled">{{$t('Upload Resources')}}</x-button>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f v-if="isUpdate">
|
||||
|
|
@ -81,12 +81,12 @@
|
|||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('使用说明')}}</template>
|
||||
<template slot="name">{{$t('Instructions')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="textarea"
|
||||
v-model="desc"
|
||||
:placeholder="$t('请输入使用说明')">
|
||||
:placeholder="$t('Please enter a instructions')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
|
|
@ -209,15 +209,15 @@
|
|||
*/
|
||||
_validation () {
|
||||
if (!this.funcName) {
|
||||
this.$message.warning(`${i18n.$t('请输入UDF函数名称')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter a UDF function name')}`)
|
||||
return false
|
||||
}
|
||||
if (!this.className) {
|
||||
this.$message.warning(`${i18n.$t('请输入包名类名')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter a Package name')}`)
|
||||
return false
|
||||
}
|
||||
if (!this.resourceId) {
|
||||
this.$message.warning(`${i18n.$t('请选择UDF资源')}`)
|
||||
this.$message.warning(`${i18n.$t('Select UDF Resources')}`)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -4,34 +4,34 @@
|
|||
<table class="fixed">
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('UDF函数名称')}}</span>
|
||||
<span>{{$t('UDF Function Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('类名')}}</span>
|
||||
<span>{{$t('Class Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('参数')}}</span>
|
||||
<span>{{$t('Parameter')}}</span>
|
||||
</th>
|
||||
<th width="80">
|
||||
<span>{{$t('类型')}}</span>
|
||||
<span>{{$t('type')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('描述')}}</span>
|
||||
<span>{{$t('Description')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('jar包')}}</span>
|
||||
<span>{{$t('Jar Package')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('库名')}}</span>
|
||||
<span>{{$t('Library Name')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('更新时间')}}</span>
|
||||
<span>{{$t('Update Time')}}</span>
|
||||
</th>
|
||||
<th width="80">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="$index">
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('编辑')"
|
||||
:title="$t('Edit')"
|
||||
@click="_edit(item)"
|
||||
icon="iconfont icon-bianjixiugai"
|
||||
v-ps="['GENERAL_USER']">
|
||||
|
|
@ -77,10 +77,10 @@
|
|||
:ref="'poptip-' + $index"
|
||||
placement="bottom-end"
|
||||
width="90">
|
||||
<p>{{$t('确定删除吗?')}}</p>
|
||||
<p>{{$t('Delete?')}}</p>
|
||||
<div style="text-align: right; margin: 0;padding-top: 4px;">
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('取消')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('确定')}}</x-button>
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
|
||||
</div>
|
||||
<template slot="reference">
|
||||
<x-button
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
size="xsmall"
|
||||
icon="iconfont icon-shanchu"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('删除')"
|
||||
:title="$t('delete')"
|
||||
v-ps="['GENERAL_USER']">
|
||||
</x-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'resource'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('UDF函数管理')">
|
||||
<m-list-construction :title="$t('UDF Function')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-conditions="_onConditions">
|
||||
<template slot="button-group">
|
||||
<x-button type="ghost" @click="_create" v-ps="['GENERAL_USER']" size="small" >{{$t('创建UDF函数')}}</x-button>
|
||||
<x-button type="ghost" @click="_create" v-ps="['GENERAL_USER']" size="small" >{{$t('Create UDF Function')}}</x-button>
|
||||
</template>
|
||||
</m-conditions>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -4,28 +4,28 @@
|
|||
<table class="fixed">
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('UDF资源名称')}}</span>
|
||||
<span>{{$t('UDF Resource Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('文件名称')}}</span>
|
||||
<span>{{$t('File Name')}}</span>
|
||||
</th>
|
||||
<th width="80">
|
||||
<span>{{$t('文件大小')}}</span>
|
||||
<span>{{$t('File Size')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('文件描述')}}</span>
|
||||
<span>{{$t('Description')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('创建时间')}}</span>
|
||||
<span>{{$t('Create Time')}}</span>
|
||||
</th>
|
||||
<th width="140">
|
||||
<span>{{$t('更新时间')}}</span>
|
||||
<span>{{$t('Update Time')}}</span>
|
||||
</th>
|
||||
<th width="110">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="$index">
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
size="xsmall"
|
||||
icon="iconfont icon-wendangxiugai"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('重命名')"
|
||||
:title="$t('Rename')"
|
||||
@click="_rename(item,$index)"
|
||||
v-ps="['GENERAL_USER']">
|
||||
</x-button>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('下载')"
|
||||
:title="$t('Download')"
|
||||
icon="iconfont icon-download"
|
||||
@click="_downloadFile(item)"
|
||||
v-ps="['GENERAL_USER']">
|
||||
|
|
@ -75,10 +75,10 @@
|
|||
:ref="'poptip-' + $index"
|
||||
placement="bottom-end"
|
||||
width="90">
|
||||
<p>{{$t('确定删除吗?')}}</p>
|
||||
<p>{{$t('Delete?')}}</p>
|
||||
<div style="text-align: right; margin: 0;padding-top: 4px;">
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('取消')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('确定')}}</x-button>
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
|
||||
</div>
|
||||
<template slot="reference">
|
||||
<x-button
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('删除')"
|
||||
:title="$t('delete')"
|
||||
icon="iconfont icon-shanchu"
|
||||
v-ps="['GENERAL_USER']">
|
||||
</x-button>
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
<template>
|
||||
<m-popup :ok-text="$t('确认重命名')" :nameText="$t('重命名')" @ok="_ok" :asyn-loading="true">
|
||||
<m-popup :ok-text="$t('Confirm Rename')" :nameText="$t('Rename')" @ok="_ok" :asyn-loading="true">
|
||||
<template slot="content">
|
||||
<div class="resource-rename-model">
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('名称')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="name"
|
||||
:placeholder="$t('请输入name')"
|
||||
:placeholder="$t('Please enter name')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('描述')}}</template>
|
||||
<template slot="name">{{$t('Description')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="textarea"
|
||||
v-model="desc"
|
||||
:placeholder="$t('请输入desc')"
|
||||
:placeholder="$t('Please enter description')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
return new Promise((resolve, reject) => {
|
||||
if (!this.name) {
|
||||
reject({ // eslint-disable-line
|
||||
msg: `${i18n.$t('请输入资源名称')}`
|
||||
msg: `${i18n.$t('Please enter resource name')}`
|
||||
})
|
||||
} else {
|
||||
resolve()
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'resource'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('UDF资源管理')">
|
||||
<m-list-construction :title="$t('UDF Resources')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-conditions="_onConditions">
|
||||
<template slot="button-group">
|
||||
<x-button type="ghost" size="small" @click="_uploading" v-ps="['GENERAL_USER']">{{$t('上传UDF资源')}}</x-button>
|
||||
<x-button type="ghost" size="small" @click="_uploading" v-ps="['GENERAL_USER']">{{$t('Upload UDF Resources')}}</x-button>
|
||||
</template>
|
||||
</m-conditions>
|
||||
</template>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
methods: {
|
||||
...mapActions('resource', ['getResourcesListP']),
|
||||
/**
|
||||
* 文件上传
|
||||
* File Upload
|
||||
*/
|
||||
_uploading () {
|
||||
findComponentDownward(this.$root, 'roof-nav')._fileUpdate('UDF')
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
<template>
|
||||
<m-popup
|
||||
ref="popup"
|
||||
:ok-text="item ? $t('确认编辑') : $t('确认提交')"
|
||||
:nameText="item ? $t('编辑队列') : $t('创建队列')"
|
||||
:ok-text="item ? $t('Edit') : $t('Submit')"
|
||||
:nameText="item ? $t('Edit queue') : $t('Create queue')"
|
||||
@ok="_ok">
|
||||
<template slot="content">
|
||||
<div class="create-tenement-model">
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>名称</template>
|
||||
<template slot="name"><b>*</b>{{$t('Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="queueName"
|
||||
placeholder="请输入名称"
|
||||
placeholder="Please enter name"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
},
|
||||
_verification(){
|
||||
if (!this.queueName) {
|
||||
this.$message.warning(`请输入名称`)
|
||||
this.$message.warning(`Please enter name`)
|
||||
return false
|
||||
}
|
||||
if (!this.queue) {
|
||||
|
|
|
|||
|
|
@ -4,22 +4,22 @@
|
|||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('名称')}}</span>
|
||||
<span>{{$t('Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>队列值</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('创建时间')}}</span>
|
||||
<span>{{$t('Create Time')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('更新时间')}}</span>
|
||||
<span>{{$t('Update Time')}}</span>
|
||||
</th>
|
||||
<th width="70">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="$index">
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('编辑')"
|
||||
:title="$t('Edit')"
|
||||
@click="_edit(item)"
|
||||
icon="iconfont icon-bianjixiugai">
|
||||
</x-button>
|
||||
|
|
@ -62,13 +62,13 @@
|
|||
:ref="'poptip-' + $index"
|
||||
placement="bottom-end"
|
||||
width="90">
|
||||
<p>{{$t('确定删除吗?')}}</p>
|
||||
<p>{{$t('Delete?')}}</p>
|
||||
<div style="text-align: right; margin: 0;padding-top: 4px;">
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('取消')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('确定')}}</x-button>
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
|
||||
</div>
|
||||
<template slot="reference">
|
||||
<x-button type="error" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('删除')">{{$t('删除')}}</x-button>
|
||||
<x-button type="error" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('delete')">{{$t('delete')}}</x-button>
|
||||
</template>
|
||||
</x-poptip>-->
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'security'"></m-secondary-menu>
|
||||
<template>
|
||||
<m-list-construction :title="$t('队列管理')">
|
||||
<m-list-construction :title="$t('Queue manage')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-conditions="_onConditions">
|
||||
<template slot="button-group">
|
||||
<x-button type="ghost" size="small" @click="_create('')">{{$t('创建队列')}}</x-button>
|
||||
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create queue')}}</x-button>
|
||||
</template>
|
||||
</m-conditions>
|
||||
</template>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
methods: {
|
||||
...mapActions('security', ['getQueueListP']),
|
||||
/**
|
||||
* 查询
|
||||
* Query
|
||||
*/
|
||||
_onConditions (o) {
|
||||
this.searchVal = o.searchVal
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@
|
|||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('ip')}}</span>
|
||||
<span>{{$t('IP')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('进程pid')}}</span>
|
||||
<span>{{$t('Process Pid')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('zk注册目录')}}</span>
|
||||
<span>{{$t('zk registration directory')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('cpuUsage')}}</span>
|
||||
|
|
@ -22,10 +22,10 @@
|
|||
<span>{{$t('memoryUsage')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('创建时间')}}</span>
|
||||
<span>{{$t('Create Time')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('最后心跳时间')}}</span>
|
||||
<span>{{$t('Last heartbeat time')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="$index">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'security'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('服务管理-Master')">
|
||||
<m-list-construction :title="$t('Service-Master')">
|
||||
<template slot="content">
|
||||
<template v-if="masterList.length">
|
||||
<m-list :list="masterList"></m-list>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'security'"></m-secondary-menu>
|
||||
<m-list-construction :title="$t('服务管理-Worker')">
|
||||
<m-list-construction :title="$t('Service-Worker')">
|
||||
<template slot="content">
|
||||
<template v-if="workerList.length">
|
||||
<m-list :list="workerList"></m-list>
|
||||
|
|
|
|||
|
|
@ -1,35 +1,35 @@
|
|||
<template>
|
||||
<m-popup
|
||||
ref="popup"
|
||||
:ok-text="item ? $t('确认编辑') : $t('确认提交')"
|
||||
:nameText="item ? $t('编辑租户') : $t('创建租户')"
|
||||
:ok-text="item ? $t('Edit') : $t('Submit')"
|
||||
:nameText="item ? $t('Edit Tenant') : $t('Create Tenant')"
|
||||
@ok="_ok">
|
||||
<template slot="content">
|
||||
<div class="create-tenement-model">
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('租户编码')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Tenant Code')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
:disabled="item ? true : false"
|
||||
v-model="tenantCode"
|
||||
:placeholder="$t('请输入name')">
|
||||
:placeholder="$t('Please enter name')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('租户名称')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Tenant Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="tenantName"
|
||||
:placeholder="$t('请输入name')"
|
||||
:placeholder="$t('Please enter name')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('队列')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Queue')}}</template>
|
||||
<template slot="content">
|
||||
<x-select v-model="queueId">
|
||||
<x-option
|
||||
|
|
@ -42,12 +42,12 @@
|
|||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('描述')}}</template>
|
||||
<template slot="name">{{$t('Description')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="textarea"
|
||||
v-model="desc"
|
||||
:placeholder="$t('请输入desc')"
|
||||
:placeholder="$t('Please enter description')"
|
||||
autocomplete="off">
|
||||
</x-input>
|
||||
</template>
|
||||
|
|
@ -116,15 +116,15 @@
|
|||
_verification () {
|
||||
let isEn = /^[A-Za-z]+$/
|
||||
if (!this.tenantCode) {
|
||||
this.$message.warning(`${i18n.$t('请输入租户编码只允许英文')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter the tenant code in English')}`)
|
||||
return false
|
||||
}
|
||||
if (!isEn.test(this.tenantCode)) {
|
||||
this.$message.warning(`${i18n.$t('请输入英文租户编码')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter tenant code in English')}`)
|
||||
return false
|
||||
}
|
||||
if (!this.tenantName) {
|
||||
this.$message.warning(`${i18n.$t('请输入租户名称')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter name')}`)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -4,28 +4,28 @@
|
|||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('租户编码')}}</span>
|
||||
<span>{{$t('Tenant Code')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('租户名称')}}</span>
|
||||
<span>{{$t('Tenant Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('描述')}}</span>
|
||||
<span>{{$t('Description')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('队列')}}</span>
|
||||
<span>{{$t('Queue')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('创建时间')}}</span>
|
||||
<span>{{$t('Create Time')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('更新时间')}}</span>
|
||||
<span>{{$t('Update Time')}}</span>
|
||||
</th>
|
||||
<th width="70">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="$index">
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('编辑')"
|
||||
:title="$t('Edit')"
|
||||
@click="_edit(item)"
|
||||
icon="iconfont icon-bianjixiugai">
|
||||
</x-button>
|
||||
|
|
@ -68,13 +68,13 @@
|
|||
:ref="'poptip-' + $index"
|
||||
placement="bottom-end"
|
||||
width="90">
|
||||
<p>{{$t('确定删除吗?')}}</p>
|
||||
<p>{{$t('Delete?')}}</p>
|
||||
<div style="text-align: right; margin: 0;padding-top: 4px;">
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('取消')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('确定')}}</x-button>
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
|
||||
</div>
|
||||
<template slot="reference">
|
||||
<x-button type="error" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('删除')">{{$t('删除')}}</x-button>
|
||||
<x-button type="error" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('delete')">{{$t('delete')}}</x-button>
|
||||
</template>
|
||||
</x-poptip>-->
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'security'"></m-secondary-menu>
|
||||
<template>
|
||||
<m-list-construction :title="$t('租户管理')">
|
||||
<m-list-construction :title="$t('Tenant Management')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-conditions="_onConditions">
|
||||
<template slot="button-group">
|
||||
<x-button type="ghost" size="small" @click="_create('')">{{$t('创建租户')}}</x-button>
|
||||
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create Tenant')}}</x-button>
|
||||
</template>
|
||||
</m-conditions>
|
||||
</template>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
methods: {
|
||||
...mapActions('security', ['getTenantListP']),
|
||||
/**
|
||||
* 查询
|
||||
* Query
|
||||
*/
|
||||
_onConditions (o) {
|
||||
this.searchVal = o.searchVal
|
||||
|
|
|
|||
|
|
@ -1,33 +1,33 @@
|
|||
<template>
|
||||
<m-popup
|
||||
ref="popup"
|
||||
:ok-text="item ? $t('确认编辑') : $t('确认提交')"
|
||||
:nameText="item ? $t('编辑用户') : $t('创建用户')"
|
||||
:ok-text="item ? $t('Edit') : $t('Submit')"
|
||||
:nameText="item ? $t('Edit User') : $t('Create User')"
|
||||
@ok="_ok">
|
||||
<template slot="content">
|
||||
<div class="create-user-model">
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('用户名称')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('User Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="userName"
|
||||
:placeholder="$t('请输入用户名称')">
|
||||
:placeholder="$t('Please enter user name')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f v-if="router.history.current.name !== 'account'">
|
||||
<template slot="name"><b>*</b>{{$t('密码')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Password')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="userPassword"
|
||||
:placeholder="$t('请输入密码')">
|
||||
:placeholder="$t('Please enter your password')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f v-if="isADMIN">
|
||||
<template slot="name"><b>*</b>{{$t('租户')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Tenant')}}</template>
|
||||
<template slot="content">
|
||||
<x-select v-model="tenantId">
|
||||
<x-option
|
||||
|
|
@ -40,22 +40,22 @@
|
|||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('邮件')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Email')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="email"
|
||||
:placeholder="$t('请输入邮件')">
|
||||
:placeholder="$t('Please enter email')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('手机')}}</template>
|
||||
<template slot="name">{{$t('Phone')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="phone"
|
||||
:placeholder="$t('请输入手机')">
|
||||
:placeholder="$t('Please enter phone number')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
|
|
@ -116,28 +116,28 @@
|
|||
|
||||
// user name
|
||||
if (!this.userName) {
|
||||
this.$message.warning(`${i18n.$t('请输入用户名')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter user name')}`)
|
||||
return false
|
||||
}
|
||||
// password
|
||||
if (!this.userPassword && !this.item) {
|
||||
this.$message.warning(`${i18n.$t('请输入密码')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter your password')}`)
|
||||
return false
|
||||
}
|
||||
// email
|
||||
if (!this.email) {
|
||||
this.$message.warning(`${i18n.$t('请输入邮箱')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter email')}`)
|
||||
return false
|
||||
}
|
||||
// Verify email
|
||||
if (!regEmail.test(this.email)) {
|
||||
this.$message.warning(`${i18n.$t('请输入正确的邮箱格式')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter the correct email format')}`)
|
||||
return false
|
||||
}
|
||||
// Verify phone
|
||||
if (this.phone) {
|
||||
if (!regPhone.test(this.phone)) {
|
||||
this.$message.warning(`${i18n.$t('请输入正确的手机格式')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter the correct mobile phone format')}`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,28 +4,28 @@
|
|||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<span>{{$t('编号')}}</span>
|
||||
<span>{{$t('#')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('用户名称')}}</span>
|
||||
<span>{{$t('User Name')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('租户')}}</span>
|
||||
<span>{{$t('Tenant')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('邮箱')}}</span>
|
||||
<span>{{$t('Email')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('手机')}}</span>
|
||||
<span>{{$t('Phone')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('创建时间')}}</span>
|
||||
<span>{{$t('Create Time')}}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>{{$t('更新时间')}}</span>
|
||||
<span>{{$t('Update Time')}}</span>
|
||||
</th>
|
||||
<th width="120">
|
||||
<span>{{$t('操作')}}</span>
|
||||
<span>{{$t('Operation')}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="(item, $index) in list" :key="item.id">
|
||||
|
|
@ -52,26 +52,26 @@
|
|||
popper-class="user-list-poptip"
|
||||
placement="bottom-end">
|
||||
<div class="auth-select-box">
|
||||
<a href="javascript:" @click="_authProject(item,$index)">{{$t('项目')}}</a>
|
||||
<a href="javascript:" @click="_authFile(item,$index)">{{$t('资源')}}</a>
|
||||
<a href="javascript:" @click="_authDataSource(item,$index)">{{$t('数据源')}}</a>
|
||||
<a href="javascript:" @click="_authUdfFunc(item,$index)">{{$t('UDF函数')}}</a>
|
||||
<a href="javascript:" @click="_authProject(item,$index)">{{$t('Project')}}</a>
|
||||
<a href="javascript:" @click="_authFile(item,$index)">{{$t('Resources')}}</a>
|
||||
<a href="javascript:" @click="_authDataSource(item,$index)">{{$t('Datasource')}}</a>
|
||||
<a href="javascript:" @click="_authUdfFunc(item,$index)">{{$t('UDF Function')}}</a>
|
||||
</div>
|
||||
<template slot="reference">
|
||||
<x-button type="warning" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('授权')" icon="iconfont icon-yonghu1"></x-button>
|
||||
<x-button type="warning" shape="circle" size="xsmall" data-toggle="tooltip" :title="$t('Authorize')" icon="iconfont icon-yonghu1"></x-button>
|
||||
</template>
|
||||
</x-poptip>
|
||||
|
||||
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" icon="iconfont icon-bianjixiugai" :title="$t('编辑')" @click="_edit(item)">
|
||||
<x-button type="info" shape="circle" size="xsmall" data-toggle="tooltip" icon="iconfont icon-bianjixiugai" :title="$t('Edit')" @click="_edit(item)">
|
||||
</x-button>
|
||||
<x-poptip
|
||||
:ref="'poptip-delete-' + $index"
|
||||
placement="bottom-end"
|
||||
width="90">
|
||||
<p>{{$t('确定删除吗?')}}</p>
|
||||
<p>{{$t('Delete?')}}</p>
|
||||
<div style="text-align: right; margin: 0;padding-top: 4px;">
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('取消')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('确定')}}</x-button>
|
||||
<x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
|
||||
<x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
|
||||
</div>
|
||||
<template slot="reference">
|
||||
<x-button
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
shape="circle"
|
||||
size="xsmall"
|
||||
data-toggle="tooltip"
|
||||
:title="$t('删除')"
|
||||
:title="$t('delete')"
|
||||
icon="iconfont icon-shanchu">
|
||||
</x-button>
|
||||
</template>
|
||||
|
|
@ -174,7 +174,7 @@
|
|||
sourceListPrs: sourceListPrs,
|
||||
targetListPrs: targetListPrs,
|
||||
type: {
|
||||
name: `${i18n.$t('项目')}`
|
||||
name: `${i18n.$t('Project')}`
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -226,7 +226,7 @@
|
|||
sourceListPrs: sourceListPrs,
|
||||
targetListPrs: targetListPrs,
|
||||
type: {
|
||||
name: `${i18n.$t('资源')}`
|
||||
name: `${i18n.$t('Resources')}`
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -278,7 +278,7 @@
|
|||
sourceListPrs: sourceListPrs,
|
||||
targetListPrs: targetListPrs,
|
||||
type: {
|
||||
name: `${i18n.$t('数据源')}`
|
||||
name: `${i18n.$t('Datasource')}`
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -330,7 +330,7 @@
|
|||
sourceListPrs: sourceListPrs,
|
||||
targetListPrs: targetListPrs,
|
||||
type: {
|
||||
name: 'UDF函数'
|
||||
name: 'UDF Function'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
<div class="main-layout-box">
|
||||
<m-secondary-menu :type="'security'"></m-secondary-menu>
|
||||
<template>
|
||||
<m-list-construction :title="$t('用户管理')">
|
||||
<m-list-construction :title="$t('User Management')">
|
||||
<template slot="conditions">
|
||||
<m-conditions @on-conditions="_onConditions">
|
||||
<template slot="button-group">
|
||||
<x-button type="ghost" size="small" @click="_create('')">{{$t('创建用户')}}</x-button>
|
||||
<x-button type="ghost" size="small" @click="_create('')">{{$t('Create User')}}</x-button>
|
||||
</template>
|
||||
</m-conditions>
|
||||
</template>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
methods: {
|
||||
...mapActions('security', ['getUsersList']),
|
||||
/**
|
||||
* 查询
|
||||
* Query
|
||||
*/
|
||||
_onConditions (o) {
|
||||
this.searchVal = o.searchVal
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
<template>
|
||||
<m-popup
|
||||
ref="popup"
|
||||
:ok-text="item ? $t('确认编辑') : $t('确认提交')"
|
||||
:nameText="item ? $t('编辑告警组') : $t('创建告警组')"
|
||||
:ok-text="item ? $t('Edit') : $t('Submit')"
|
||||
:nameText="item ? $t('Edit alarm group') : $t('Create alarm group')"
|
||||
@ok="_ok">
|
||||
<template slot="content">
|
||||
<div class="create-warning-model">
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('组名称')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Group Name')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="input"
|
||||
v-model="groupName"
|
||||
:placeholder="$t('请输入组名称')">
|
||||
:placeholder="$t('Please enter group name')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name"><b>*</b>{{$t('组类型')}}</template>
|
||||
<template slot="name"><b>*</b>{{$t('Group Type')}}</template>
|
||||
<template slot="content">
|
||||
<x-select v-model="groupType">
|
||||
<x-option
|
||||
|
|
@ -30,12 +30,12 @@
|
|||
</template>
|
||||
</m-list-box-f>
|
||||
<m-list-box-f>
|
||||
<template slot="name">{{$t('备注')}}</template>
|
||||
<template slot="name">{{$t('Remarks')}}</template>
|
||||
<template slot="content">
|
||||
<x-input
|
||||
type="textarea"
|
||||
v-model="desc"
|
||||
:placeholder="$t('请输入desc')">
|
||||
:placeholder="$t('Please enter description')">
|
||||
</x-input>
|
||||
</template>
|
||||
</m-list-box-f>
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
groupName: '',
|
||||
groupType: 'EMAIL',
|
||||
desc: '',
|
||||
options: [{ code: `${i18n.$t('邮件')}`, id: 'EMAIL' }, { code: `${i18n.$t('短信')}`, id: 'SMS' }]
|
||||
options: [{ code: `${i18n.$t('Email')}`, id: 'EMAIL' }, { code: `${i18n.$t('SMS')}`, id: 'SMS' }]
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
_verification () {
|
||||
// group name
|
||||
if (!this.groupName) {
|
||||
this.$message.warning(`${i18n.$t('请输入组名称')}`)
|
||||
this.$message.warning(`${i18n.$t('Please enter group name')}`)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue