From 9dbd470c5ad89e327324f4aa66cf582b619027c3 Mon Sep 17 00:00:00 2001 From: tjq Date: Sat, 17 Feb 2024 22:24:44 +0800 Subject: [PATCH] feat: upgrade sql for 5.0.0 --- others/powerjob-mysql.sql | 499 ++++++++++-------- others/sql/upgrade/v4.3.x-v5.0.x.sql | 88 +++ .../src/main/resources/static/js/12.js | 97 ++++ .../src/main/resources/static/js/13.js | 97 ++++ .../src/main/resources/static/js/14.js | 97 ++++ .../src/main/resources/static/js/15.js | 63 +++ .../src/main/resources/static/js/16.js | 63 +++ 7 files changed, 794 insertions(+), 210 deletions(-) create mode 100644 others/sql/upgrade/v4.3.x-v5.0.x.sql create mode 100644 powerjob-server/powerjob-server-starter/src/main/resources/static/js/12.js create mode 100644 powerjob-server/powerjob-server-starter/src/main/resources/static/js/13.js create mode 100644 powerjob-server/powerjob-server-starter/src/main/resources/static/js/14.js create mode 100644 powerjob-server/powerjob-server-starter/src/main/resources/static/js/15.js create mode 100644 powerjob-server/powerjob-server-starter/src/main/resources/static/js/16.js diff --git a/others/powerjob-mysql.sql b/others/powerjob-mysql.sql index fec1d2ff..7801a2e4 100644 --- a/others/powerjob-mysql.sql +++ b/others/powerjob-mysql.sql @@ -1,3 +1,22 @@ +/* + 官方 SQL 仅基于特定版本(MySQL8)导出,不一定兼容其他数据库,也不一定兼容其他版本。此 SQL 仅供参考。 + 如果您的数据库无法使用此 SQL,建议使用 SpringDataJPA 自带的建表能力,先在开发环境直连测试库自动建表,然后自行导出相关的 SQL 即可。 + + Navicat Premium Data Transfer + + Source Server : Local@3306 + Source Server Type : MySQL + Source Server Version : 80300 (8.3.0) + Source Host : localhost:3306 + Source Schema : powerjob500 + + Target Server Type : MySQL + Target Server Version : 80300 (8.3.0) + File Encoding : 65001 + + Date: 17/02/2024 22:20:07 +*/ + SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; @@ -5,260 +24,320 @@ SET FOREIGN_KEY_CHECKS = 0; -- Table structure for app_info -- ---------------------------- DROP TABLE IF EXISTS `app_info`; -CREATE TABLE `app_info` -( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '应用ID', - `app_name` varchar(128) not NULL COMMENT '应用名称', - `current_server` varchar(255) default null COMMENT 'Server地址,用于负责调度应用的ActorSystem地址', - `gmt_create` datetime not null COMMENT '创建时间', - `gmt_modified` datetime not null COMMENT '更新时间', - `password` varchar(255) not null COMMENT '应用密码', - PRIMARY KEY (`id`), - UNIQUE KEY `uidx01_app_info` (`app_name`) -) ENGINE = InnoDB - AUTO_INCREMENT = 1 - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='应用表'; +CREATE TABLE `app_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `app_name` varchar(255) DEFAULT NULL, + `creator` bigint DEFAULT NULL, + `current_server` varchar(255) DEFAULT NULL, + `extra` varchar(255) DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `modifier` bigint DEFAULT NULL, + `namespace_id` bigint DEFAULT NULL, + `password` varchar(255) DEFAULT NULL, + `tags` varchar(255) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uidx01_app_info` (`app_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- ---------------------------- -- Table structure for container_info -- ---------------------------- - DROP TABLE IF EXISTS `container_info`; -CREATE TABLE `container_info` -( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '容器ID', - `app_id` bigint not null COMMENT '应用ID', - `container_name` varchar(128) not null COMMENT '容器名称', - `gmt_create` datetime not null COMMENT '创建时间', - `gmt_modified` datetime not null COMMENT '更新时间', - `last_deploy_time` datetime DEFAULT NULL COMMENT '上次部署时间', - `source_info` varchar(255) DEFAULT NULL COMMENT '资源信息,内容取决于source_type\n1、FatJar -> String\n2、Git -> JSON,{"repo”:””仓库,”branch”:”分支”,”username”:”账号,”password”:”密码”}', - `source_type` int not null COMMENT '资源类型,1:FatJar/2:Git', - `status` int not null COMMENT '状态,1:正常ENABLE/2:已禁用DISABLE/99:已删除DELETED', - `version` varchar(255) default null COMMENT '版本', - PRIMARY KEY (`id`), - KEY `idx01_container_info` (`app_id`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='容器表'; +CREATE TABLE `container_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `app_id` bigint DEFAULT NULL, + `container_name` varchar(255) DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `last_deploy_time` datetime(6) DEFAULT NULL, + `source_info` varchar(255) DEFAULT NULL, + `source_type` int DEFAULT NULL, + `status` int DEFAULT NULL, + `version` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx01_container_info` (`app_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- ---------------------------- -- Table structure for instance_info -- ---------------------------- DROP TABLE IF EXISTS `instance_info`; -CREATE TABLE `instance_info` -( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务实例ID', - `app_id` bigint not null COMMENT '应用ID', - `instance_id` bigint not null COMMENT '任务实例ID', - `type` int not NULL COMMENT '任务实例类型,1:普通NORMAL/2:工作流WORKFLOW', - `job_id` bigint not NULL COMMENT '任务ID', - `instance_params` longtext COMMENT '任务动态参数', - `job_params` longtext COMMENT '任务静态参数', - `actual_trigger_time` bigint default NULL COMMENT '实际触发时间', - `expected_trigger_time` bigint DEFAULT NULL COMMENT '计划触发时间', - `finished_time` bigint DEFAULT NULL COMMENT '执行结束时间', - `last_report_time` bigint DEFAULT NULL COMMENT '最后上报时间', - `result` longtext COMMENT '执行结果', - `running_times` bigint DEFAULT NULL COMMENT '总执行次数,用于重试判断', - `status` int not NULL COMMENT '任务状态,1:等待派发WAITING_DISPATCH/2:等待Worker接收WAITING_WORKER_RECEIVE/3:运行中RUNNING/4:失败FAILED/5:成功SUCCEED/9:取消CANCELED/10:手动停止STOPPED', - `task_tracker_address` varchar(255) DEFAULT NULL COMMENT 'TaskTracker地址', - `wf_instance_id` bigint DEFAULT NULL COMMENT '工作流实例ID', - `additional_data` longtext comment '附加信息 (JSON)', - `gmt_create` datetime not NULL COMMENT '创建时间', - `gmt_modified` datetime not NULL COMMENT '更新时间', - PRIMARY KEY (`id`), - KEY `idx01_instance_info` (`job_id`, `status`), - KEY `idx02_instance_info` (`app_id`, `status`), - KEY `idx03_instance_info` (`instance_id`, `status`) -) ENGINE = InnoDB - AUTO_INCREMENT = 1 - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='任务实例表'; +CREATE TABLE `instance_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `actual_trigger_time` bigint DEFAULT NULL, + `app_id` bigint DEFAULT NULL, + `expected_trigger_time` bigint DEFAULT NULL, + `finished_time` bigint DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `instance_id` bigint DEFAULT NULL, + `instance_params` longtext, + `job_id` bigint DEFAULT NULL, + `job_params` longtext, + `last_report_time` bigint DEFAULT NULL, + `result` longtext, + `running_times` bigint DEFAULT NULL, + `status` int DEFAULT NULL, + `task_tracker_address` varchar(255) DEFAULT NULL, + `type` int DEFAULT NULL, + `wf_instance_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx01_instance_info` (`job_id`,`status`), + KEY `idx02_instance_info` (`app_id`,`status`), + KEY `idx03_instance_info` (`instance_id`,`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- ---------------------------- -- Table structure for job_info -- ---------------------------- DROP TABLE IF EXISTS `job_info`; -CREATE TABLE `job_info` -( - `id` bigint NOT NULL AUTO_INCREMENT, - `app_id` bigint DEFAULT NULL COMMENT '应用ID', - `job_name` varchar(128) DEFAULT NULL COMMENT '任务名称', - `job_description` varchar(255) DEFAULT NULL COMMENT '任务描述', - `job_params` text COMMENT '任务默认参数', - `concurrency` int DEFAULT NULL COMMENT '并发度,同时执行某个任务的最大线程数量', - `designated_workers` varchar(255) DEFAULT NULL COMMENT '运行节点,空:不限(多值逗号分割)', - `dispatch_strategy` int DEFAULT NULL COMMENT '投递策略,1:健康优先/2:随机', - `execute_type` int not NULL COMMENT '执行类型,1:单机STANDALONE/2:广播BROADCAST/3:MAP_REDUCE/4:MAP', - `instance_retry_num` int not null DEFAULT 0 COMMENT 'Instance重试次数', - `instance_time_limit` bigint not null DEFAULT 0 COMMENT '任务整体超时时间', - `lifecycle` varchar(255) DEFAULT NULL COMMENT '生命周期', - `max_instance_num` int not null DEFAULT 1 COMMENT '最大同时运行任务数,默认 1', - `max_worker_count` int not null DEFAULT 0 COMMENT '最大运行节点数量', - `min_cpu_cores` double NOT NULL default 0 COMMENT '最低CPU核心数量,0:不限', - `min_disk_space` double NOT NULL default 0 COMMENT '最低磁盘空间(GB),0:不限', - `min_memory_space` double NOT NULL default 0 COMMENT '最低内存空间(GB),0:不限', - `next_trigger_time` bigint DEFAULT NULL COMMENT '下一次调度时间', - `notify_user_ids` varchar(255) DEFAULT NULL COMMENT '报警用户(多值逗号分割)', - `processor_info` varchar(255) DEFAULT NULL COMMENT '执行器信息', - `processor_type` int not NULL COMMENT '执行器类型,1:内建处理器BUILT_IN/2:SHELL/3:PYTHON/4:外部处理器(动态加载)EXTERNAL', - `status` int not NULL COMMENT '状态,1:正常ENABLE/2:已禁用DISABLE/99:已删除DELETED', - `task_retry_num` int not NULL default 0 COMMENT 'Task重试次数', - `time_expression` varchar(255) default NULL COMMENT '时间表达式,内容取决于time_expression_type,1:CRON/2:NULL/3:LONG/4:LONG', - `time_expression_type` int not NULL COMMENT '时间表达式类型,1:CRON/2:API/3:FIX_RATE/4:FIX_DELAY,5:WORKFLOW\n)', - `tag` varchar(255) DEFAULT NULL COMMENT 'TAG', - `log_config` varchar(255) DEFAULT NULL COMMENT '日志配置', - `extra` varchar(255) DEFAULT NULL COMMENT '扩展字段', - `gmt_create` datetime not NULL COMMENT '创建时间', - `gmt_modified` datetime not NULL COMMENT '更新时间', - PRIMARY KEY (`id`), - KEY `idx01_job_info` (`app_id`, `status`, `time_expression_type`, `next_trigger_time`) -) ENGINE = InnoDB - AUTO_INCREMENT = 1 - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='任务表'; +CREATE TABLE `job_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `alarm_config` varchar(255) DEFAULT NULL, + `app_id` bigint DEFAULT NULL, + `concurrency` int DEFAULT NULL, + `designated_workers` varchar(255) DEFAULT NULL, + `dispatch_strategy` int DEFAULT NULL, + `execute_type` int DEFAULT NULL, + `extra` varchar(255) DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `instance_retry_num` int DEFAULT NULL, + `instance_time_limit` bigint DEFAULT NULL, + `job_description` varchar(255) DEFAULT NULL, + `job_name` varchar(255) DEFAULT NULL, + `job_params` longtext, + `lifecycle` varchar(255) DEFAULT NULL, + `log_config` varchar(255) DEFAULT NULL, + `max_instance_num` int DEFAULT NULL, + `max_worker_count` int DEFAULT NULL, + `min_cpu_cores` double NOT NULL, + `min_disk_space` double NOT NULL, + `min_memory_space` double NOT NULL, + `next_trigger_time` bigint DEFAULT NULL, + `notify_user_ids` varchar(255) DEFAULT NULL, + `processor_info` varchar(255) DEFAULT NULL, + `processor_type` int DEFAULT NULL, + `status` int DEFAULT NULL, + `tag` varchar(255) DEFAULT NULL, + `task_retry_num` int DEFAULT NULL, + `time_expression` varchar(255) DEFAULT NULL, + `time_expression_type` int DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx01_job_info` (`app_id`,`status`,`time_expression_type`,`next_trigger_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- Table structure for namespace +-- ---------------------------- +DROP TABLE IF EXISTS `namespace`; +CREATE TABLE `namespace` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `code` varchar(255) DEFAULT NULL, + `creator` bigint DEFAULT NULL, + `dept` varchar(255) DEFAULT NULL, + `extra` varchar(255) DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `modifier` bigint DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, + `status` int DEFAULT NULL, + `tags` varchar(255) DEFAULT NULL, + `token` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uidx01_namespace` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- ---------------------------- -- Table structure for oms_lock -- ---------------------------- DROP TABLE IF EXISTS `oms_lock`; -CREATE TABLE `oms_lock` -( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '序号ID', - `lock_name` varchar(128) DEFAULT NULL COMMENT '名称', - `max_lock_time` bigint DEFAULT NULL COMMENT '最长持锁时间', - `ownerip` varchar(255) DEFAULT NULL COMMENT '拥有者IP', - `gmt_create` datetime not NULL COMMENT '创建时间', - `gmt_modified` datetime not NULL COMMENT '更新时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uidx01_oms_lock` (`lock_name`) -) ENGINE = InnoDB - AUTO_INCREMENT = 1 - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='数据库锁'; +CREATE TABLE `oms_lock` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `lock_name` varchar(255) DEFAULT NULL, + `max_lock_time` bigint DEFAULT NULL, + `ownerip` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uidx01_oms_lock` (`lock_name`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- Table structure for powerjob_files +-- ---------------------------- +DROP TABLE IF EXISTS `powerjob_files`; +CREATE TABLE `powerjob_files` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `bucket` varchar(255) NOT NULL COMMENT '分桶', + `name` varchar(255) NOT NULL COMMENT '文件名称', + `version` varchar(255) NOT NULL COMMENT '版本', + `meta` varchar(255) DEFAULT NULL COMMENT '元数据', + `length` bigint NOT NULL COMMENT '长度', + `status` int NOT NULL COMMENT '状态', + `data` longblob NOT NULL COMMENT '文件内容', + `extra` varchar(255) DEFAULT NULL COMMENT '其他信息', + `gmt_create` datetime NOT NULL COMMENT '创建时间', + `gmt_modified` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- Table structure for pwjb_user_info +-- ---------------------------- +DROP TABLE IF EXISTS `pwjb_user_info`; +CREATE TABLE `pwjb_user_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `extra` varchar(255) DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `password` varchar(255) DEFAULT NULL, + `username` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uidx01_username` (`username`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- ---------------------------- -- Table structure for server_info -- ---------------------------- DROP TABLE IF EXISTS `server_info`; -CREATE TABLE `server_info` -( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '服务器ID', - `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', - `gmt_modified` datetime DEFAULT NULL COMMENT '更新时间', - `ip` varchar(128) DEFAULT NULL COMMENT '服务器IP地址', - PRIMARY KEY (`id`), - UNIQUE KEY `uidx01_server_info` (`ip`), - KEY `idx01_server_info` (`gmt_modified`) -) ENGINE = InnoDB - AUTO_INCREMENT = 1 - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='服务器表'; +CREATE TABLE `server_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `ip` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uidx01_server_info` (`ip`), + KEY `idx01_server_info` (`gmt_modified`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- Table structure for sundry +-- ---------------------------- +DROP TABLE IF EXISTS `sundry`; +CREATE TABLE `sundry` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `content` varchar(255) DEFAULT NULL, + `extra` varchar(255) DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `pkey` varchar(255) DEFAULT NULL, + `skey` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uidx01_sundry` (`pkey`,`skey`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- ---------------------------- -- Table structure for user_info -- ---------------------------- DROP TABLE IF EXISTS `user_info`; -CREATE TABLE `user_info` -( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID', - `username` varchar(128) not NULL COMMENT '用户名', - `password` varchar(255) default NULL COMMENT '密码', - `phone` varchar(255) DEFAULT NULL COMMENT '手机号', - `email` varchar(128) not NULL COMMENT '邮箱', - `extra` varchar(255) DEFAULT NULL COMMENT '扩展字段', - `web_hook` varchar(255) DEFAULT NULL COMMENT 'webhook地址', - `gmt_create` datetime not NULL COMMENT '创建时间', - `gmt_modified` datetime not NULL COMMENT '更新时间', - PRIMARY KEY (`id`), - unique index uidx01_user_info (username), - unique index uidx02_user_info (email) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='用户表'; +CREATE TABLE `user_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `account_type` varchar(255) DEFAULT NULL, + `email` varchar(255) DEFAULT NULL, + `extra` varchar(255) DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `nick` varchar(255) DEFAULT NULL, + `origin_username` varchar(255) DEFAULT NULL, + `password` varchar(255) DEFAULT NULL, + `phone` varchar(255) DEFAULT NULL, + `token_login_verify_info` varchar(255) DEFAULT NULL, + `username` varchar(255) DEFAULT NULL, + `web_hook` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uidx01_user_name` (`username`), + KEY `uidx02_user_info` (`email`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- Table structure for user_role +-- ---------------------------- +DROP TABLE IF EXISTS `user_role`; +CREATE TABLE `user_role` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `extra` varchar(255) DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `role` int DEFAULT NULL, + `scope` int DEFAULT NULL, + `target` bigint DEFAULT NULL, + `user_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `uidx01_user_id` (`user_id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- ---------------------------- -- Table structure for workflow_info -- ---------------------------- DROP TABLE IF EXISTS `workflow_info`; -CREATE TABLE `workflow_info` -( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '工作流ID', - `app_id` bigint not NULL COMMENT '应用ID', - `wf_name` varchar(128) not NULL COMMENT '工作流名称', - `wf_description` varchar(255) default NULL COMMENT '工作流描述', - `extra` varchar(255) DEFAULT NULL COMMENT '扩展字段', - `lifecycle` varchar(255) DEFAULT NULL COMMENT '生命周期', - `max_wf_instance_num` int not null DEFAULT 1 COMMENT '最大运行工作流数量,默认 1', - `next_trigger_time` bigint DEFAULT NULL COMMENT '下次调度时间', - `notify_user_ids` varchar(255) DEFAULT NULL COMMENT '报警用户(多值逗号分割)', - `pedag` text COMMENT 'DAG信息(JSON)', - `status` int not NULL COMMENT '状态,1:正常ENABLE/2:已禁用DISABLE/99:已删除DELETED', - `time_expression` varchar(255) DEFAULT NULL COMMENT '时间表达式,内容取决于time_expression_type,1:CRON/2:NULL/3:LONG/4:LONG', - `time_expression_type` int not NULL COMMENT '时间表达式类型,1:CRON/2:API/3:FIX_RATE/4:FIX_DELAY,5:WORKFLOW\n)', - `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', - `gmt_modified` datetime DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`id`), - KEY `idx01_workflow_info` (`app_id`, `status`, `time_expression_type`, next_trigger_time) -) ENGINE = InnoDB - AUTO_INCREMENT = 1 - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='工作流表'; +CREATE TABLE `workflow_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `app_id` bigint DEFAULT NULL, + `extra` varchar(255) DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `lifecycle` varchar(255) DEFAULT NULL, + `max_wf_instance_num` int DEFAULT NULL, + `next_trigger_time` bigint DEFAULT NULL, + `notify_user_ids` varchar(255) DEFAULT NULL, + `pedag` longtext, + `status` int DEFAULT NULL, + `time_expression` varchar(255) DEFAULT NULL, + `time_expression_type` int DEFAULT NULL, + `wf_description` varchar(255) DEFAULT NULL, + `wf_name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx01_workflow_info` (`app_id`,`status`,`time_expression_type`,`next_trigger_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- ---------------------------- -- Table structure for workflow_instance_info -- ---------------------------- DROP TABLE IF EXISTS `workflow_instance_info`; -CREATE TABLE `workflow_instance_info` -( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '工作流实例ID', - `wf_instance_id` bigint DEFAULT NULL COMMENT '工作流实例ID', - `workflow_id` bigint DEFAULT NULL COMMENT '工作流ID', - `actual_trigger_time` bigint DEFAULT NULL COMMENT '实际触发时间', - `app_id` bigint DEFAULT NULL COMMENT '应用ID', - `dag` text COMMENT 'DAG信息(JSON)', - `expected_trigger_time` bigint DEFAULT NULL COMMENT '计划触发时间', - `finished_time` bigint DEFAULT NULL COMMENT '执行结束时间', - `result` text COMMENT '执行结果', - `status` int DEFAULT NULL COMMENT '工作流实例状态,1:等待调度WAITING/2:运行中RUNNING/3:失败FAILED/4:成功SUCCEED/10:手动停止STOPPED', - `wf_context` text COMMENT '工作流上下文', - `wf_init_params` text COMMENT '工作流启动参数', - `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', - `gmt_modified` datetime DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`id`), - unique index uidx01_wf_instance (`wf_instance_id`), - index idx01_wf_instance (`workflow_id`, `status`), - index idx02_wf_instance (`app_id`, `status`, `expected_trigger_time`) -) ENGINE = InnoDB - AUTO_INCREMENT = 1 - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='工作流实例表'; +CREATE TABLE `workflow_instance_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `actual_trigger_time` bigint DEFAULT NULL, + `app_id` bigint DEFAULT NULL, + `dag` longtext, + `expected_trigger_time` bigint DEFAULT NULL, + `finished_time` bigint DEFAULT NULL, + `gmt_create` datetime(6) DEFAULT NULL, + `gmt_modified` datetime(6) DEFAULT NULL, + `parent_wf_instance_id` bigint DEFAULT NULL, + `result` longtext, + `status` int DEFAULT NULL, + `wf_context` longtext, + `wf_init_params` longtext, + `wf_instance_id` bigint DEFAULT NULL, + `workflow_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uidx01_wf_instance` (`wf_instance_id`), + KEY `idx01_wf_instance` (`workflow_id`,`status`,`app_id`,`expected_trigger_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- ---------------------------- -- Table structure for workflow_node_info -- ---------------------------- DROP TABLE IF EXISTS `workflow_node_info`; -CREATE TABLE `workflow_node_info` -( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '节点ID', - `app_id` bigint NOT NULL COMMENT '应用ID', - `enable` bit(1) NOT NULL COMMENT '是否启动,0:否/1:是', - `extra` text COMMENT '扩展字段', - `gmt_create` datetime NOT NULL COMMENT '创建时间', - `gmt_modified` datetime NOT NULL COMMENT '更新时间', - `job_id` bigint default NULL COMMENT '任务ID', - `node_name` varchar(255) DEFAULT NULL COMMENT '节点名称', - `node_params` text COMMENT '节点参数', - `skip_when_failed` bit(1) NOT NULL COMMENT '是否允许失败跳过,0:否/1:是', - `type` int DEFAULT NULL COMMENT '节点类型,1:任务JOB', - `workflow_id` bigint DEFAULT NULL COMMENT '工作流ID', - PRIMARY KEY (`id`), - KEY `idx01_workflow_node_info` (`workflow_id`,`gmt_create`) -) ENGINE = InnoDB - AUTO_INCREMENT = 1 - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='工作流节点表'; +CREATE TABLE `workflow_node_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `app_id` bigint NOT NULL, + `enable` bit(1) NOT NULL, + `extra` longtext, + `gmt_create` datetime(6) NOT NULL, + `gmt_modified` datetime(6) NOT NULL, + `job_id` bigint DEFAULT NULL, + `node_name` varchar(255) DEFAULT NULL, + `node_params` longtext, + `skip_when_failed` bit(1) NOT NULL, + `type` int DEFAULT NULL, + `workflow_id` bigint DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx01_workflow_node_info` (`workflow_id`,`gmt_create`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; SET FOREIGN_KEY_CHECKS = 1; + diff --git a/others/sql/upgrade/v4.3.x-v5.0.x.sql b/others/sql/upgrade/v4.3.x-v5.0.x.sql new file mode 100644 index 00000000..ee9f2a12 --- /dev/null +++ b/others/sql/upgrade/v4.3.x-v5.0.x.sql @@ -0,0 +1,88 @@ +-- Upgrade SQL FROM 4.1.x to 4.2.x +-- ---------------------------- +-- Table change for app_info +-- ---------------------------- +SET FOREIGN_KEY_CHECKS=0; + +ALTER TABLE `app_info` ADD COLUMN `creator` bigint NULL DEFAULT NULL; +ALTER TABLE `app_info` ADD COLUMN `extra` varchar(255) NULL DEFAULT NULL; +ALTER TABLE `app_info` ADD COLUMN `modifier` bigint NULL DEFAULT NULL; +ALTER TABLE `app_info` ADD COLUMN `namespace_id` bigint NULL DEFAULT NULL; +ALTER TABLE `app_info` ADD COLUMN `tags` varchar(255) NULL DEFAULT NULL; +ALTER TABLE `app_info` ADD COLUMN `title` varchar(255) NULL DEFAULT NULL; + +-- ---------------------------- +-- Table change for user_info +-- ---------------------------- +ALTER TABLE `user_info` ADD COLUMN `account_type` varchar(255) NULL DEFAULT NULL; +ALTER TABLE `user_info` ADD COLUMN `nick` varchar(255) NULL DEFAULT NULL; +ALTER TABLE `user_info` ADD COLUMN `origin_username` varchar(255) NULL DEFAULT NULL; +ALTER TABLE `user_info` ADD COLUMN `token_login_verify_info` varchar(255) NULL DEFAULT NULL; +ALTER TABLE `user_info` ADD UNIQUE INDEX `uidx01_user_name`(`username` ASC) USING BTREE; + +-- ---------------------------- +-- new table 'namespace' +-- ---------------------------- +CREATE TABLE `namespace` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `code` varchar(255) NULL DEFAULT NULL, + `creator` bigint NULL DEFAULT NULL, + `dept` varchar(255) NULL DEFAULT NULL, + `extra` varchar(255) NULL DEFAULT NULL, + `gmt_create` datetime(6) NULL DEFAULT NULL, + `gmt_modified` datetime(6) NULL DEFAULT NULL, + `modifier` bigint NULL DEFAULT NULL, + `name` varchar(255) NULL DEFAULT NULL, + `status` int NULL DEFAULT NULL, + `tags` varchar(255) NULL DEFAULT NULL, + `token` varchar(255) NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `uidx01_namespace`(`code` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + + +-- ---------------------------- +-- new table 'pwjb_user_info' +-- ---------------------------- +CREATE TABLE `pwjb_user_info` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `extra` varchar(255) NULL DEFAULT NULL, + `gmt_create` datetime(6) NULL DEFAULT NULL, + `gmt_modified` datetime(6) NULL DEFAULT NULL, + `password` varchar(255) NULL DEFAULT NULL, + `username` varchar(255) NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `uidx01_username`(`username` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- new table 'sundry' +-- ---------------------------- +CREATE TABLE `sundry` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `content` varchar(255) NULL DEFAULT NULL, + `extra` varchar(255) NULL DEFAULT NULL, + `gmt_create` datetime(6) NULL DEFAULT NULL, + `gmt_modified` datetime(6) NULL DEFAULT NULL, + `pkey` varchar(255) NULL DEFAULT NULL, + `skey` varchar(255) NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `uidx01_sundry`(`pkey` ASC, `skey` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + + +-- ---------------------------- +-- new table 'user_role' +-- ---------------------------- +CREATE TABLE `user_role` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `extra` varchar(255) NULL DEFAULT NULL, + `gmt_create` datetime(6) NULL DEFAULT NULL, + `gmt_modified` datetime(6) NULL DEFAULT NULL, + `role` int NULL DEFAULT NULL, + `scope` int NULL DEFAULT NULL, + `target` bigint NULL DEFAULT NULL, + `user_id` bigint NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + INDEX `uidx01_user_id`(`user_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; \ No newline at end of file diff --git a/powerjob-server/powerjob-server-starter/src/main/resources/static/js/12.js b/powerjob-server/powerjob-server-starter/src/main/resources/static/js/12.js new file mode 100644 index 00000000..2de78a73 --- /dev/null +++ b/powerjob-server/powerjob-server-starter/src/main/resources/static/js/12.js @@ -0,0 +1,97 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[12],{ + +/***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/views/ContainerManager.vue?vue&type=script&lang=js": +/*!******************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/views/ContainerManager.vue?vue&type=script&lang=js ***! + \******************************************************************************************************************************************************************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _main__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../main */ \"./src/main.js\");\n\n\nlet ws;\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"ContainerManager\",\n data() {\n return {\n form: {\n sourceType: 'Git',\n containerName: ''\n },\n gitForm: {\n repo: '',\n branch: '',\n username: '',\n password: ''\n },\n sourceInfo: '',\n id: '',\n appId: window.localStorage.getItem(\"Power_appId\"),\n dialogVisible: false,\n arrangeTitle: '',\n arrangeVisible: false,\n containerList: [],\n logs: [],\n requestUrl: \"\",\n fileList: []\n };\n },\n methods: {\n onSubmit() {\n // 接口参数\n let data = {\n appId: this.appId,\n containerName: this.form.containerName,\n status: \"ENABLE\",\n id: this.id,\n sourceType: this.form.sourceType\n };\n if (this.form.sourceType == 'Git') {\n data.sourceInfo = JSON.stringify(this.gitForm);\n } else {\n data.sourceInfo = this.sourceInfo;\n data.sourceType = 'FatJar';\n }\n this.axios.post(\"container/save\", data).then(() => {\n let appId = window.localStorage.getItem(\"Power_appId\");\n this.axios.get(\"/container/list?appId=\" + appId).then(res => {\n this.$message.info(this.$t('message.success'));\n // 恢复默认表单\n this.dialogVisible = false;\n this.form.containerName = '';\n this.gitForm = {};\n this.sourceInfo = '';\n this.id = '';\n // 刷新容器表单\n this.containerList = res;\n });\n });\n },\n // 文件上传成功后 修改来源信息\n onSuccess(response) {\n this.sourceInfo = response.data;\n },\n deleteItem(item, index) {\n let appId = window.localStorage.getItem(\"Power_appId\");\n this.flyio.get(\"/container/delete?containerId=\" + item.id + '&appId=' + appId).then(res => {\n console.log(res);\n this.containerList.splice(index, 1);\n this.$message.info(this.$t('message.success'));\n });\n },\n editItem(item) {\n if (item.sourceType == 'Git') {\n this.form.sourceType = 'Git';\n this.gitForm = JSON.parse(item.sourceInfo);\n } else {\n this.form.sourceType = 'FatJar';\n }\n this.form.containerName = item.containerName;\n this.id = item.id;\n this.dialogVisible = true;\n },\n arrangeItem(item) {\n let wsBase = this.requestUrl.replace(\"http\", \"ws\") + \"/container/deploy/\";\n let wsUrl = wsBase + item.id;\n ws = new WebSocket(wsUrl);\n ws.onopen = () => {\n this.arrangeTitle = this.$t('message.deploy');\n this.arrangeVisible = true;\n console.log(\"Connection open ...\");\n ws.send(\"Hello WebSockets!\");\n };\n ws.onmessage = evt => {\n this.logs.push(evt.data);\n };\n ws.onclose = () => {\n console.log(\"Connection closed.\");\n };\n },\n // 关闭部署页面时 关闭ws避免dialog内的信息有上台机器信息\n closeArrange() {\n ws.close();\n this.logs = [];\n },\n closeEdit() {\n this.sourceInfo = '';\n this.fileList = [];\n },\n listOfItem(item) {\n let appId = window.localStorage.getItem(\"Power_appId\");\n this.flyio.get(\"/container/listDeployedWorker?containerId=\" + item.id + '&appId=' + appId).then(res => {\n if (res.data.data) {\n this.logs = res.data.data.split('\\n');\n this.arrangeTitle = this.$t('message.deployedWorkerList');\n this.arrangeVisible = true;\n }\n // this.containerList.splice(index,1);\n // this.$message(`容器${item.containerName}已删除`);\n });\n },\n // 兼容 java build in 模式下 baseURL 为 / 的情况(将当前url作为请求路径)\n calculateRequestUrl() {\n if (_main__WEBPACK_IMPORTED_MODULE_1__[\"default\"] === undefined || !_main__WEBPACK_IMPORTED_MODULE_1__[\"default\"].includes(\"http\")) {\n let url = window.location.href;\n let urlSplit = url.split('//'); // str1[0]--协议头\n let ip = urlSplit[1].split('/')[0];\n this.requestUrl = urlSplit[0] + '//' + ip;\n console.log(\"calculateRequestUrl: \" + this.requestUrl);\n } else {\n this.requestUrl = _main__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n }\n }\n },\n mounted() {\n this.calculateRequestUrl();\n let appId = window.localStorage.getItem(\"Power_appId\");\n this.flyio.get(\"/container/list?appId=\" + appId).then(res => {\n console.log(res);\n if (res.data.success) {\n this.containerList = res.data.data;\n }\n });\n }\n});\n\n//# sourceURL=webpack:///./src/components/views/ContainerManager.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"); + +/***/ }), + +/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"77823dab-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/views/ContainerManager.vue?vue&type=template&id=2290191d&scoped=true": +/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"77823dab-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/views/ContainerManager.vue?vue&type=template&id=2290191d&scoped=true ***! + \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/*! exports provided: render, staticRenderFns */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", [_c(\"el-card\", {\n staticClass: \"box-card\"\n }, [_c(\"div\", {\n staticClass: \"clearfix\",\n attrs: {\n slot: \"header\"\n },\n slot: \"header\"\n }, [_c(\"span\"), _c(\"el-button\", {\n staticStyle: {\n float: \"right\"\n },\n attrs: {\n type: \"primary\"\n },\n on: {\n click: function ($event) {\n _vm.dialogVisible = true;\n }\n }\n }, [_vm._v(_vm._s(_vm.$t(\"message.newContainer\")))])], 1), _c(\"div\", {\n staticClass: \"wrapper\"\n }, _vm._l(_vm.containerList, function (item, key) {\n return _c(\"div\", {\n key: key,\n staticClass: \"item\"\n }, [_c(\"div\", {\n staticClass: \"containerText\"\n }, [_c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(_vm.$t(\"message.containerId\")))]), _c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(item.id))])]), _c(\"div\", {\n staticClass: \"containerText\"\n }, [_c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(\" \" + _vm._s(_vm.$t(\"message.containerName\")) + \" \")]), _c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(item.containerName))])]), _c(\"div\", {\n staticClass: \"containerText\"\n }, [_c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(_vm.$t(\"message.containerType\")) + \" \")]), _c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(item.sourceType))])]), _c(\"div\", {\n staticClass: \"containerText\"\n }, [_c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(_vm.$t(\"message.containerVersion\")) + \" \")]), _c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(item.version))])]), _c(\"div\", {\n staticClass: \"containerText\"\n }, [_c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(_vm.$t(\"message.deployTime\")) + \" \")]), _c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(item.lastDeployTime))])]), _c(\"div\", {\n staticClass: \"containerText\"\n }, [_c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(_vm.$t(\"message.status\")) + \" \")]), _c(\"span\", {\n staticClass: \"value\"\n }, [_vm._v(_vm._s(item.status))])]), _c(\"div\", {\n staticStyle: {\n width: \"240px\",\n margin: \"0 auto\"\n }\n }, [_c(\"div\", {\n staticClass: \"btnWrap\"\n }, [_c(\"el-button\", {\n attrs: {\n type: \"primary\"\n },\n on: {\n click: function ($event) {\n return _vm.arrangeItem(item);\n }\n }\n }, [_vm._v(_vm._s(_vm.$t(\"message.deploy\")))])], 1), _c(\"div\", {\n staticClass: \"btnWrap\"\n }, [_c(\"el-button\", {\n attrs: {\n type: \"primary\"\n },\n on: {\n click: function ($event) {\n return _vm.editItem(item);\n }\n }\n }, [_vm._v(_vm._s(_vm.$t(\"message.edit\")))])], 1), _c(\"div\", {\n staticClass: \"btnWrap\"\n }, [_c(\"el-button\", {\n attrs: {\n type: \"primary\"\n },\n on: {\n click: function ($event) {\n return _vm.deleteItem(item, key);\n }\n }\n }, [_vm._v(_vm._s(_vm.$t(\"message.delete\")))])], 1), _c(\"div\", {\n staticClass: \"btnWrap\"\n }, [_c(\"el-button\", {\n attrs: {\n type: \"primary\"\n },\n on: {\n click: function ($event) {\n return _vm.listOfItem(item);\n }\n }\n }, [_vm._v(_vm._s(_vm.$t(\"message.deployedWorkerList\")))])], 1)])]);\n }), 0)]), _c(\"el-dialog\", {\n attrs: {\n title: _vm.$t(\"message.newContainer\"),\n visible: _vm.dialogVisible,\n width: \"50%\",\n \"before-close\": _vm.handleClose\n },\n on: {\n \"update:visible\": function ($event) {\n _vm.dialogVisible = $event;\n },\n close: _vm.closeEdit\n }\n }, [_c(\"el-form\", {\n ref: \"form\",\n staticClass: \"genTable\",\n attrs: {\n model: _vm.form,\n \"label-width\": \"150px\",\n \"label-position\": \"left\"\n }\n }, [_c(\"el-form-item\", {\n attrs: {\n label: _vm.$t(\"message.containerName\")\n }\n }, [_c(\"el-input\", {\n model: {\n value: _vm.form.containerName,\n callback: function ($$v) {\n _vm.$set(_vm.form, \"containerName\", $$v);\n },\n expression: \"form.containerName\"\n }\n })], 1), _c(\"el-form-item\", {\n attrs: {\n label: _vm.$t(\"message.containerType\")\n }\n }, [_c(\"el-radio-group\", {\n model: {\n value: _vm.form.sourceType,\n callback: function ($$v) {\n _vm.$set(_vm.form, \"sourceType\", $$v);\n },\n expression: \"form.sourceType\"\n }\n }, [_c(\"el-radio\", {\n attrs: {\n label: \"Git\"\n }\n }), _c(\"el-radio\", {\n attrs: {\n label: \"FatJar\"\n }\n })], 1)], 1), _vm.form.sourceType == \"Git\" ? _c(\"el-form\", {\n ref: \"gitform\",\n staticClass: \"gitTable\",\n attrs: {\n model: _vm.gitForm,\n \"label-width\": \"150px\",\n \"label-position\": \"left\"\n }\n }, [_c(\"el-form-item\", {\n attrs: {\n label: _vm.$t(\"message.containerGitURL\")\n }\n }, [_c(\"el-input\", {\n model: {\n value: _vm.gitForm.repo,\n callback: function ($$v) {\n _vm.$set(_vm.gitForm, \"repo\", $$v);\n },\n expression: \"gitForm.repo\"\n }\n })], 1), _c(\"el-form-item\", {\n attrs: {\n label: _vm.$t(\"message.branchName\")\n }\n }, [_c(\"el-input\", {\n model: {\n value: _vm.gitForm.branch,\n callback: function ($$v) {\n _vm.$set(_vm.gitForm, \"branch\", $$v);\n },\n expression: \"gitForm.branch\"\n }\n })], 1), _c(\"el-form-item\", {\n attrs: {\n label: _vm.$t(\"message.username\")\n }\n }, [_c(\"el-input\", {\n model: {\n value: _vm.gitForm.username,\n callback: function ($$v) {\n _vm.$set(_vm.gitForm, \"username\", $$v);\n },\n expression: \"gitForm.username\"\n }\n })], 1), _c(\"el-form-item\", {\n attrs: {\n label: _vm.$t(\"message.password\")\n }\n }, [_c(\"el-input\", {\n model: {\n value: _vm.gitForm.password,\n callback: function ($$v) {\n _vm.$set(_vm.gitForm, \"password\", $$v);\n },\n expression: \"gitForm.password\"\n }\n })], 1)], 1) : _vm._e(), _vm.form.sourceType == \"FatJar\" ? _c(\"el-form-item\", [_c(\"el-upload\", {\n staticClass: \"upload-demo\",\n attrs: {\n drag: \"\",\n \"file-list\": _vm.fileList,\n \"on-success\": _vm.onSuccess,\n action: `${_vm.requestUrl}/container/jarUpload`,\n multiple: \"\"\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-upload\"\n }), _c(\"div\", {\n staticClass: \"el-upload__text\"\n }, [_vm._v(\"Drag the file here, or \"), _c(\"em\", [_vm._v(\"click on Upload\")])]), _c(\"div\", {\n staticClass: \"el-upload__tip\",\n attrs: {\n slot: \"tip\"\n },\n slot: \"tip\"\n }, [_vm._v(_vm._s(_vm.$t(\"message.uploadTips\")))])])], 1) : _vm._e(), _c(\"el-form-item\", [_c(\"el-button\", {\n attrs: {\n type: \"primary\",\n disabled: _vm.form.sourceType == \"FatJar\" && !this.sourceInfo\n },\n on: {\n click: _vm.onSubmit\n }\n }, [_vm._v(\"Save\")])], 1)], 1)], 1), _c(\"el-dialog\", {\n attrs: {\n title: _vm.arrangeTitle,\n visible: _vm.arrangeVisible\n },\n on: {\n \"update:visible\": function ($event) {\n _vm.arrangeVisible = $event;\n },\n close: _vm.closeArrange\n }\n }, _vm._l(_vm.logs, function (log) {\n return _c(\"h4\", {\n key: log\n }, [_vm._v(_vm._s(log))]);\n }), 0)], 1);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack:///./src/components/views/ContainerManager.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2277823dab-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"); + +/***/ }), + +/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/views/ContainerManager.vue?vue&type=style&index=0&id=2290191d&scoped=true&lang=css": +/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/views/ContainerManager.vue?vue&type=style&index=0&id=2290191d&scoped=true&lang=css ***! + \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \"\\n.genTable[data-v-2290191d]{\\n padding:20px;\\n min-width: 500px;\\n width: 500px;\\n}\\n.clearfix[data-v-2290191d]:before,\\n .clearfix[data-v-2290191d]:after {\\n display: table;\\n content: \\\"\\\";\\n}\\n.clearfix[data-v-2290191d]:after {\\n clear: both\\n}\\n.wrapper[data-v-2290191d]{\\n display: flex;\\n flex-wrap: wrap;\\n}\\n.item[data-v-2290191d]{\\n flex:0 0 340px;\\n margin-right:20px;\\n margin-bottom:20px;\\n background-color: #f0f0f0;\\n}\\n.item button[data-v-2290191d]{\\n width:100px;\\n margin:0 auto;\\n}\\n.btnWrap[data-v-2290191d]{\\n width:50%;\\n float: left;\\n margin-bottom: 20px;\\n display: flex;\\n justify-content: center;\\n}\\n.containerText[data-v-2290191d]{\\n margin: 20px;\\n font-size: 16px;\\n box-sizing: border-box;\\n}\\n.value[data-v-2290191d]{\\n display: inline-block;\\n max-width: 200px;\\n overflow:hidden;\\n margin-left: 20px;\\n}\\n.el-dialog[data-v-2290191d]{\\n height: 100vh;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./src/components/views/ContainerManager.vue?./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"); + +/***/ }), + +/***/ "./node_modules/vue-style-loader/index.js?!./node_modules/css-loader/dist/cjs.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/views/ContainerManager.vue?vue&type=style&index=0&id=2290191d&scoped=true&lang=css": +/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/vue-style-loader??ref--6-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/views/ContainerManager.vue?vue&type=style&index=0&id=2290191d&scoped=true&lang=css ***! + \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("// style-loader: Adds some css to the DOM by adding a