mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-10-14 13:50:24 +00:00
更新1.9.5版本
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.gitee.dbswitch</groupId>
|
||||
<artifactId>dbswitch-parent</artifactId>
|
||||
<version>1.9.4</version>
|
||||
<version>1.9.5</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dbswitch-admin</artifactId>
|
||||
|
@@ -53,6 +53,7 @@ public class AssignmentDetailConverter extends
|
||||
config.setTableNameMapper(taskConfig.getTableNameMap());
|
||||
config.setColumnNameMapper(taskConfig.getColumnNameMap());
|
||||
config.setBatchSize(taskConfig.getBatchSize());
|
||||
config.setChannelSize(taskConfig.getChannelSize());
|
||||
config.setTargetSyncOption(taskConfig.getTargetSyncOption());
|
||||
config.setBeforeSqlScripts(taskConfig.getBeforeSqlScripts());
|
||||
config.setAfterSqlScripts(taskConfig.getAfterSqlScripts());
|
||||
|
@@ -95,6 +95,9 @@ public class AssignmentConfigEntity {
|
||||
@TableField("batch_size")
|
||||
private Integer batchSize;
|
||||
|
||||
@TableField("channel_size")
|
||||
private Integer channelSize;
|
||||
|
||||
@TableField("first_flag")
|
||||
private Boolean firstFlag;
|
||||
|
||||
|
@@ -0,0 +1,86 @@
|
||||
// Copyright tang. All rights reserved.
|
||||
// https://gitee.com/inrgihc/dbswitch
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license
|
||||
//
|
||||
// Author: tang (inrgihc@126.com)
|
||||
// Date : 2020/1/2
|
||||
// Location: beijing , china
|
||||
/////////////////////////////////////////////////////////////
|
||||
package com.gitee.dbswitch.admin.model.request;
|
||||
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentConfigEntity;
|
||||
import com.gitee.dbswitch.admin.type.IncludeExcludeEnum;
|
||||
import com.gitee.dbswitch.common.entity.PatternMapper;
|
||||
import com.gitee.dbswitch.common.type.CaseConvertEnum;
|
||||
import com.gitee.dbswitch.common.type.ProductTableEnum;
|
||||
import com.gitee.dbswitch.common.type.SyncOptionEnum;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
public class AssigmentBaseRequest {
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class AssigmentConfig {
|
||||
|
||||
private Long sourceConnectionId;
|
||||
private String sourceSchema;
|
||||
private ProductTableEnum tableType;
|
||||
private IncludeExcludeEnum includeOrExclude;
|
||||
private List<String> sourceTables;
|
||||
private Long targetConnectionId;
|
||||
private String targetSchema;
|
||||
private CaseConvertEnum tableNameCase;
|
||||
private CaseConvertEnum columnNameCase;
|
||||
private List<PatternMapper> tableNameMapper;
|
||||
private List<PatternMapper> columnNameMapper;
|
||||
private Boolean targetDropTable;
|
||||
private Boolean targetOnlyCreate;
|
||||
private Boolean targetAutoIncrement;
|
||||
private SyncOptionEnum targetSyncOption;
|
||||
private String beforeSqlScripts;
|
||||
private String afterSqlScripts;
|
||||
private Integer batchSize;
|
||||
private Integer channelSize;
|
||||
}
|
||||
|
||||
protected AssignmentConfigEntity toAssignmentConfig(final Long assignmentId, final AssigmentConfig config) {
|
||||
AssignmentConfigEntity assignmentConfigEntity = new AssignmentConfigEntity();
|
||||
assignmentConfigEntity.setAssignmentId(assignmentId);
|
||||
assignmentConfigEntity.setSourceConnectionId(config.getSourceConnectionId());
|
||||
assignmentConfigEntity.setSourceSchema(config.getSourceSchema());
|
||||
assignmentConfigEntity.setTableType(config.getTableType());
|
||||
assignmentConfigEntity.setSourceTables(config.getSourceTables());
|
||||
assignmentConfigEntity.setExcluded(
|
||||
config.getIncludeOrExclude() == IncludeExcludeEnum.EXCLUDE
|
||||
);
|
||||
assignmentConfigEntity.setTargetConnectionId(config.getTargetConnectionId());
|
||||
assignmentConfigEntity.setTargetSchema(config.getTargetSchema());
|
||||
assignmentConfigEntity.setTableNameCase(config.getTableNameCase());
|
||||
assignmentConfigEntity.setColumnNameCase(config.getColumnNameCase());
|
||||
assignmentConfigEntity.setTableNameMap(config.getTableNameMapper());
|
||||
assignmentConfigEntity.setColumnNameMap(config.getColumnNameMapper());
|
||||
assignmentConfigEntity.setTargetDropTable(config.getTargetDropTable());
|
||||
assignmentConfigEntity.setTargetOnlyCreate(config.getTargetOnlyCreate());
|
||||
assignmentConfigEntity.setTargetAutoIncrement(config.getTargetAutoIncrement());
|
||||
assignmentConfigEntity.setBeforeSqlScripts(getTrimValueOrNull(config.getBeforeSqlScripts()));
|
||||
assignmentConfigEntity.setAfterSqlScripts(getTrimValueOrNull(config.getAfterSqlScripts()));
|
||||
assignmentConfigEntity.setTargetSyncOption(config.getTargetSyncOption());
|
||||
assignmentConfigEntity.setBatchSize(getValueOrDefault(config.getBatchSize(), 10000));
|
||||
assignmentConfigEntity.setChannelSize(getValueOrDefault(config.getChannelSize(), 100));
|
||||
assignmentConfigEntity.setFirstFlag(Boolean.FALSE);
|
||||
|
||||
return assignmentConfigEntity;
|
||||
}
|
||||
|
||||
protected int getValueOrDefault(Integer value, int defaultValue) {
|
||||
return Objects.nonNull(value) ? value : defaultValue;
|
||||
}
|
||||
|
||||
protected String getTrimValueOrNull(String value) {
|
||||
return Objects.nonNull(value) ? value.trim() : null;
|
||||
}
|
||||
}
|
@@ -13,15 +13,9 @@ import com.gitee.dbswitch.admin.common.exception.DbswitchException;
|
||||
import com.gitee.dbswitch.admin.common.response.ResultCode;
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentConfigEntity;
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentTaskEntity;
|
||||
import com.gitee.dbswitch.admin.type.IncludeExcludeEnum;
|
||||
import com.gitee.dbswitch.admin.type.ScheduleModeEnum;
|
||||
import com.gitee.dbswitch.admin.util.CronExprUtils;
|
||||
import com.gitee.dbswitch.common.entity.PatternMapper;
|
||||
import com.gitee.dbswitch.common.type.CaseConvertEnum;
|
||||
import com.gitee.dbswitch.common.type.ProductTableEnum;
|
||||
import com.gitee.dbswitch.common.type.SyncOptionEnum;
|
||||
import com.gitee.dbswitch.common.util.PatterNameUtils;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -30,37 +24,13 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class AssigmentCreateRequest {
|
||||
public class AssigmentCreateRequest extends AssigmentBaseRequest {
|
||||
|
||||
private String name;
|
||||
private String description;
|
||||
private ScheduleModeEnum scheduleMode;
|
||||
private String cronExpression;
|
||||
private AssigmentCreateConfig config;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class AssigmentCreateConfig {
|
||||
|
||||
private Long sourceConnectionId;
|
||||
private String sourceSchema;
|
||||
private ProductTableEnum tableType;
|
||||
private IncludeExcludeEnum includeOrExclude;
|
||||
private List<String> sourceTables;
|
||||
private Long targetConnectionId;
|
||||
private String targetSchema;
|
||||
private CaseConvertEnum tableNameCase;
|
||||
private CaseConvertEnum columnNameCase;
|
||||
private List<PatternMapper> tableNameMapper;
|
||||
private List<PatternMapper> columnNameMapper;
|
||||
private Boolean targetDropTable;
|
||||
private Boolean targetOnlyCreate;
|
||||
private Boolean targetAutoIncrement;
|
||||
private SyncOptionEnum targetSyncOption;
|
||||
private String beforeSqlScripts;
|
||||
private String afterSqlScripts;
|
||||
private Integer batchSize;
|
||||
}
|
||||
private AssigmentConfig config;
|
||||
|
||||
public AssignmentTaskEntity toAssignmentTask() {
|
||||
AssignmentTaskEntity assignment = new AssignmentTaskEntity();
|
||||
@@ -81,34 +51,7 @@ public class AssigmentCreateRequest {
|
||||
throw new DbswitchException(ResultCode.ERROR_INVALID_ASSIGNMENT_CONFIG, "源端与目标端不能相同");
|
||||
}
|
||||
|
||||
AssignmentConfigEntity assignmentConfigEntity = new AssignmentConfigEntity();
|
||||
assignmentConfigEntity.setAssignmentId(assignmentId);
|
||||
assignmentConfigEntity.setSourceConnectionId(config.getSourceConnectionId());
|
||||
assignmentConfigEntity.setSourceSchema(config.getSourceSchema());
|
||||
assignmentConfigEntity.setTableType(config.getTableType());
|
||||
assignmentConfigEntity.setSourceTables(config.getSourceTables());
|
||||
assignmentConfigEntity.setExcluded(
|
||||
config.getIncludeOrExclude() == IncludeExcludeEnum.EXCLUDE
|
||||
);
|
||||
assignmentConfigEntity.setTargetConnectionId(config.getTargetConnectionId());
|
||||
assignmentConfigEntity.setTargetSchema(config.getTargetSchema());
|
||||
assignmentConfigEntity.setTableNameCase(config.getTableNameCase());
|
||||
assignmentConfigEntity.setColumnNameCase(config.getColumnNameCase());
|
||||
assignmentConfigEntity.setTableNameMap(config.getTableNameMapper());
|
||||
assignmentConfigEntity.setColumnNameMap(config.getColumnNameMapper());
|
||||
assignmentConfigEntity.setTargetDropTable(config.getTargetDropTable());
|
||||
assignmentConfigEntity.setTargetOnlyCreate(config.getTargetOnlyCreate());
|
||||
assignmentConfigEntity.setTargetAutoIncrement(config.getTargetAutoIncrement());
|
||||
assignmentConfigEntity.setBeforeSqlScripts(
|
||||
Objects.nonNull(config.getBeforeSqlScripts()) ? config.getBeforeSqlScripts().trim() : null);
|
||||
assignmentConfigEntity.setAfterSqlScripts(
|
||||
Objects.nonNull(config.getAfterSqlScripts()) ? config.getAfterSqlScripts().trim() : null);
|
||||
assignmentConfigEntity.setTargetSyncOption(config.getTargetSyncOption());
|
||||
assignmentConfigEntity.setBatchSize(
|
||||
Objects.isNull(config.getBatchSize())
|
||||
? 10000
|
||||
: config.getBatchSize()
|
||||
);
|
||||
AssignmentConfigEntity assignmentConfigEntity = toAssignmentConfig(assignmentId, config);
|
||||
assignmentConfigEntity.setFirstFlag(Boolean.TRUE);
|
||||
|
||||
if (!assignmentConfigEntity.getExcluded()
|
||||
|
@@ -13,52 +13,22 @@ import com.gitee.dbswitch.admin.common.exception.DbswitchException;
|
||||
import com.gitee.dbswitch.admin.common.response.ResultCode;
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentConfigEntity;
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentTaskEntity;
|
||||
import com.gitee.dbswitch.admin.type.IncludeExcludeEnum;
|
||||
import com.gitee.dbswitch.admin.type.ScheduleModeEnum;
|
||||
import com.gitee.dbswitch.admin.util.CronExprUtils;
|
||||
import com.gitee.dbswitch.common.entity.PatternMapper;
|
||||
import com.gitee.dbswitch.common.type.CaseConvertEnum;
|
||||
import com.gitee.dbswitch.common.type.ProductTableEnum;
|
||||
import com.gitee.dbswitch.common.type.SyncOptionEnum;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class AssigmentUpdateRequest {
|
||||
public class AssigmentUpdateRequest extends AssigmentBaseRequest {
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private String description;
|
||||
private ScheduleModeEnum scheduleMode;
|
||||
private String cronExpression;
|
||||
private AssigmentUpdateConfig config;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class AssigmentUpdateConfig {
|
||||
|
||||
private Long sourceConnectionId;
|
||||
private String sourceSchema;
|
||||
private ProductTableEnum tableType;
|
||||
private IncludeExcludeEnum includeOrExclude;
|
||||
private List<String> sourceTables;
|
||||
private Long targetConnectionId;
|
||||
private String targetSchema;
|
||||
private CaseConvertEnum tableNameCase;
|
||||
private CaseConvertEnum columnNameCase;
|
||||
private List<PatternMapper> tableNameMapper;
|
||||
private List<PatternMapper> columnNameMapper;
|
||||
private Boolean targetDropTable;
|
||||
private Boolean targetOnlyCreate;
|
||||
private Boolean targetAutoIncrement;
|
||||
private SyncOptionEnum targetSyncOption;
|
||||
private String beforeSqlScripts;
|
||||
private String afterSqlScripts;
|
||||
private Integer batchSize;
|
||||
}
|
||||
private AssigmentConfig config;
|
||||
|
||||
public AssignmentTaskEntity toAssignmentTask() {
|
||||
AssignmentTaskEntity assignment = new AssignmentTaskEntity();
|
||||
@@ -79,34 +49,7 @@ public class AssigmentUpdateRequest {
|
||||
throw new DbswitchException(ResultCode.ERROR_INVALID_ASSIGNMENT_CONFIG, "源端与目标端不能相同");
|
||||
}
|
||||
|
||||
AssignmentConfigEntity assignmentConfigEntity = new AssignmentConfigEntity();
|
||||
assignmentConfigEntity.setAssignmentId(assignmentId);
|
||||
assignmentConfigEntity.setSourceConnectionId(config.getSourceConnectionId());
|
||||
assignmentConfigEntity.setSourceSchema(config.getSourceSchema());
|
||||
assignmentConfigEntity.setTableType(config.getTableType());
|
||||
assignmentConfigEntity.setSourceTables(config.getSourceTables());
|
||||
assignmentConfigEntity.setExcluded(
|
||||
config.getIncludeOrExclude() == IncludeExcludeEnum.EXCLUDE
|
||||
);
|
||||
assignmentConfigEntity.setTargetConnectionId(config.getTargetConnectionId());
|
||||
assignmentConfigEntity.setTargetSchema(config.getTargetSchema());
|
||||
assignmentConfigEntity.setTableNameCase(config.getTableNameCase());
|
||||
assignmentConfigEntity.setColumnNameCase(config.getColumnNameCase());
|
||||
assignmentConfigEntity.setTableNameMap(config.getTableNameMapper());
|
||||
assignmentConfigEntity.setColumnNameMap(config.getColumnNameMapper());
|
||||
assignmentConfigEntity.setTargetDropTable(config.getTargetDropTable());
|
||||
assignmentConfigEntity.setTargetOnlyCreate(config.getTargetOnlyCreate());
|
||||
assignmentConfigEntity.setTargetAutoIncrement(config.getTargetAutoIncrement());
|
||||
assignmentConfigEntity.setBeforeSqlScripts(
|
||||
Objects.nonNull(config.getBeforeSqlScripts()) ? config.getBeforeSqlScripts().trim() : null);
|
||||
assignmentConfigEntity.setAfterSqlScripts(
|
||||
Objects.nonNull(config.getAfterSqlScripts()) ? config.getAfterSqlScripts().trim() : null);
|
||||
assignmentConfigEntity.setTargetSyncOption(config.getTargetSyncOption());
|
||||
assignmentConfigEntity.setBatchSize(
|
||||
Objects.isNull(config.getBatchSize())
|
||||
? 10000
|
||||
: config.getBatchSize()
|
||||
);
|
||||
AssignmentConfigEntity assignmentConfigEntity = toAssignmentConfig(assignmentId, config);
|
||||
assignmentConfigEntity.setFirstFlag(Boolean.TRUE);
|
||||
|
||||
return assignmentConfigEntity;
|
||||
|
@@ -113,6 +113,9 @@ public class AssignmentDetailResponse {
|
||||
@ApiModelProperty("数据批次大小")
|
||||
private Integer batchSize;
|
||||
|
||||
@ApiModelProperty("通道队列大小")
|
||||
private Integer channelSize;
|
||||
|
||||
@ApiModelProperty("同步操作方法")
|
||||
private SyncOptionEnum targetSyncOption;
|
||||
|
||||
|
@@ -31,6 +31,7 @@ import com.gitee.dbswitch.admin.util.PageUtils;
|
||||
import com.gitee.dbswitch.common.converter.ConverterFactory;
|
||||
import com.gitee.dbswitch.common.type.ProductTypeEnum;
|
||||
import com.gitee.dbswitch.data.config.DbswichPropertiesConfiguration;
|
||||
import com.gitee.dbswitch.data.entity.GlobalParamConfigProperties;
|
||||
import com.gitee.dbswitch.data.entity.SourceDataSourceProperties;
|
||||
import com.gitee.dbswitch.data.entity.TargetDataSourceProperties;
|
||||
import com.gitee.dbswitch.data.util.JsonUtils;
|
||||
@@ -163,6 +164,7 @@ public class AssignmentService {
|
||||
DbswichPropertiesConfiguration properties = new DbswichPropertiesConfiguration();
|
||||
properties.setSource(this.getSourceDataSourceProperties(assignmentConfigEntity));
|
||||
properties.setTarget(this.getTargetDataSourceProperties(assignmentConfigEntity));
|
||||
properties.setConfig(this.getGlobalParamConfigProperties(assignmentConfigEntity));
|
||||
|
||||
assignmentTaskEntity.setPublished(Boolean.TRUE);
|
||||
assignmentTaskEntity.setContent(JsonUtils.toJsonString(properties));
|
||||
@@ -227,7 +229,8 @@ public class AssignmentService {
|
||||
DatabaseConnectionEntity sourceDatabaseConnectionEntity = databaseConnectionDAO.getById(
|
||||
assignmentConfigEntity.getSourceConnectionId()
|
||||
);
|
||||
File driverVersionFile = driverLoadService.getVersionDriverFile(sourceDatabaseConnectionEntity.getType(),
|
||||
File driverVersionFile = driverLoadService.getVersionDriverFile(
|
||||
sourceDatabaseConnectionEntity.getType(),
|
||||
sourceDatabaseConnectionEntity.getVersion());
|
||||
sourceDataSourceProperties.setUrl(sourceDatabaseConnectionEntity.getUrl());
|
||||
sourceDataSourceProperties.setDriverClassName(sourceDatabaseConnectionEntity.getDriver());
|
||||
@@ -299,4 +302,11 @@ public class AssignmentService {
|
||||
return targetDataSourceProperties;
|
||||
}
|
||||
|
||||
private GlobalParamConfigProperties getGlobalParamConfigProperties(
|
||||
AssignmentConfigEntity assignmentConfigEntity) {
|
||||
GlobalParamConfigProperties configProperties = new GlobalParamConfigProperties();
|
||||
configProperties.setChannelQueueSize(assignmentConfigEntity.getChannelSize());
|
||||
return configProperties;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `DBSWITCH_ASSIGNMENT_CONFIG`
|
||||
ADD COLUMN `channel_size` bigint(20) unsigned not null default 100 comment '通道队列大小' AFTER `batch_size`;
|
@@ -127,6 +127,7 @@ CREATE TABLE IF NOT EXISTS DBSWITCH_ASSIGNMENT_CONFIG (
|
||||
"before_sql_scripts" text ,
|
||||
"after_sql_scripts" text ,
|
||||
"batch_size" int8 not null default 10000,
|
||||
"channel_size" int8 not null default 100,
|
||||
"first_flag" boolean not null default false,
|
||||
"create_time" timestamp(6) not null default (CURRENT_TIMESTAMP(0))::timestamp(0) without time zone,
|
||||
primary key ("id"),
|
||||
@@ -156,6 +157,7 @@ COMMENT ON COLUMN DBSWITCH_ASSIGNMENT_CONFIG."target_sync_option" IS '同步增
|
||||
COMMENT ON COLUMN DBSWITCH_ASSIGNMENT_CONFIG."before_sql_scripts" IS '目标端写入的前置执行SQL脚本';
|
||||
COMMENT ON COLUMN DBSWITCH_ASSIGNMENT_CONFIG."after_sql_scripts" IS '目标端写入的后置执行SQL脚本';
|
||||
COMMENT ON COLUMN DBSWITCH_ASSIGNMENT_CONFIG."batch_size" IS '处理批次大小';
|
||||
COMMENT ON COLUMN DBSWITCH_ASSIGNMENT_CONFIG."channel_size" IS '通道队列大小';
|
||||
COMMENT ON COLUMN DBSWITCH_ASSIGNMENT_CONFIG."first_flag" IS '首次加载数据';
|
||||
COMMENT ON COLUMN DBSWITCH_ASSIGNMENT_CONFIG."create_time" IS '创建时间';
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>异构数据迁移工具</title><link href=/static/css/app.390f0b0ef3ee9d4ddda6f481b5ab9ea8.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.b67b0f544ed39426eabc.js></script><script type=text/javascript src=/static/js/vendor.12f5219d5efab3af9f2f.js></script><script type=text/javascript src=/static/js/app.f46fc5565782c040e3e0.js></script></body></html>
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>异构数据迁移工具</title><link href=/static/css/app.703fc168e4d5b293182faa4f02830ff6.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.8e83c8948e922e7bb989.js></script><script type=text/javascript src=/static/js/vendor.12f5219d5efab3af9f2f.js></script><script type=text/javascript src=/static/js/app.21ba178ae5d97e8f4deb.js></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
webpackJsonp([16],{Modp:function(t,e){},WfA7:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{dialogVisible:!1,loading:!0,connectionTypes:[],versionDrivers:[],isActive:-1}},methods:{loadConnectionTypes:function(){var t=this;this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(e){0===e.data.code?(t.connectionTypes=e.data.data,t.handleChooseClick("MYSQL",0)):e.data.message&&alert("初始化数据库类型信息失败:"+e.data.message)})},handleChooseClick:function(t,e){var i=this;this.isActive=e,this.$http.get("/dbswitch/admin/api/v1/connection/"+t+"/drivers").then(function(t){0===t.data.code?i.versionDrivers=t.data.data:t.data.message&&alert("查询驱动版本信息失败,"+t.data.message)})},handleClose:function(t){this.$confirm("确认关闭?").then(function(e){t()}).catch(function(t){})},formatJarFileList:function(t,e){return t[e.property].join(";\n")}},created:function(){this.loadConnectionTypes()},beforeDestroy:function(){}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-card",[i("div",{staticClass:"container"},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header",align:"center"},slot:"header"},[i("span",[i("b",[t._v("数据库产品类型列表")])])]),t._v(" "),i("div",{staticClass:"navsBox"},[i("ul",t._l(t.connectionTypes,function(e,a){return i("li",{key:a,class:{active:a==t.isActive},on:{click:function(i){return t.handleChooseClick(e.type,a)}}},[t._v("["+t._s(e.id)+"]"+t._s(e.type))])}),0)])]),t._v(" "),i("div",{staticClass:"contentBox"},[i("div",{staticStyle:{margin:"10px 5px"},attrs:{align:"right",width:"95%"}},[i("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-document-add"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("添加")])],1),t._v(" "),i("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.versionDrivers,size:"small",stripe:"",border:""}},[i("template",{slot:"empty"},[i("span",[t._v("单击左侧数据库类型来查看对应的驱动版本信息")])]),t._v(" "),i("el-table-column",{attrs:{property:"driverVersion",label:"驱动版本号","min-width":"15%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverClass",label:"驱动类名","min-width":"20%"}}),t._v(" "),i("el-table-column",{attrs:{property:"jarFiles",formatter:t.formatJarFileList,label:"驱动JAR名称","min-width":"30%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverPath",label:"驱动版本路径","min-width":"50%"}})],2)],1)],1)]),t._v(" "),i("el-dialog",{attrs:{title:"添加数据库驱动JAR说明",visible:t.dialogVisible,width:"40%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("span",[t._v("请按照驱动路径所在的目录${DBSWITCH_HOME}/drivers下,在数据库类型为名称的目录下,以驱动版本号为名称创建目录并放置对应的驱动jar文件,然后重启即可生效。具体可参考https://gitee.com/inrgihc/dbswitch/tree/master/drivers下的目录结构。")]),t._v(" "),i("span"),t._v(" "),i("span",[t._v("特殊说明:驱动版本目录下的所有JAR必须无任何外部依赖,否则,也需将其依赖JAR一起放置到对应的目录下。")]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var s=i("VU/8")(a,n,!1,function(t){i("Modp")},"data-v-25cae184",null);e.default=s.exports}});
|
||||
//# sourceMappingURL=16.ba07397337433aec3ef5.js.map
|
||||
webpackJsonp([17],{Modp:function(t,e){},WfA7:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{dialogVisible:!1,loading:!0,connectionTypes:[],versionDrivers:[],isActive:-1}},methods:{loadConnectionTypes:function(){var t=this;this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(e){0===e.data.code?(t.connectionTypes=e.data.data,t.handleChooseClick("MYSQL",0)):e.data.message&&alert("初始化数据库类型信息失败:"+e.data.message)})},handleChooseClick:function(t,e){var i=this;this.isActive=e,this.$http.get("/dbswitch/admin/api/v1/connection/"+t+"/drivers").then(function(t){0===t.data.code?i.versionDrivers=t.data.data:t.data.message&&alert("查询驱动版本信息失败,"+t.data.message)})},handleClose:function(t){this.$confirm("确认关闭?").then(function(e){t()}).catch(function(t){})},formatJarFileList:function(t,e){return t[e.property].join(";\n")}},created:function(){this.loadConnectionTypes()},beforeDestroy:function(){}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-card",[i("div",{staticClass:"container"},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header",align:"center"},slot:"header"},[i("span",[i("b",[t._v("数据库产品类型列表")])])]),t._v(" "),i("div",{staticClass:"navsBox"},[i("ul",t._l(t.connectionTypes,function(e,a){return i("li",{key:a,class:{active:a==t.isActive},on:{click:function(i){return t.handleChooseClick(e.type,a)}}},[t._v("["+t._s(e.id)+"]"+t._s(e.type))])}),0)])]),t._v(" "),i("div",{staticClass:"contentBox"},[i("div",{staticStyle:{margin:"10px 5px"},attrs:{align:"right",width:"95%"}},[i("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-document-add"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("添加")])],1),t._v(" "),i("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.versionDrivers,size:"small",stripe:"",border:""}},[i("template",{slot:"empty"},[i("span",[t._v("单击左侧数据库类型来查看对应的驱动版本信息")])]),t._v(" "),i("el-table-column",{attrs:{property:"driverVersion",label:"驱动版本号","min-width":"15%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverClass",label:"驱动类名","min-width":"20%"}}),t._v(" "),i("el-table-column",{attrs:{property:"jarFiles",formatter:t.formatJarFileList,label:"驱动JAR名称","min-width":"30%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverPath",label:"驱动版本路径","min-width":"50%"}})],2)],1)],1)]),t._v(" "),i("el-dialog",{attrs:{title:"添加数据库驱动JAR说明",visible:t.dialogVisible,width:"40%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("span",[t._v("请按照驱动路径所在的目录${DBSWITCH_HOME}/drivers下,在数据库类型为名称的目录下,以驱动版本号为名称创建目录并放置对应的驱动jar文件,然后重启即可生效。具体可参考https://gitee.com/inrgihc/dbswitch/tree/master/drivers下的目录结构。")]),t._v(" "),i("span"),t._v(" "),i("span",[t._v("特殊说明:驱动版本目录下的所有JAR必须无任何外部依赖,否则,也需将其依赖JAR一起放置到对应的目录下。")]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var s=i("VU/8")(a,n,!1,function(t){i("Modp")},"data-v-25cae184",null);e.default=s.exports}});
|
||||
//# sourceMappingURL=17.17565790c33e3537001f.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
webpackJsonp([20],{NHnr:function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=t("//Fk"),r=t.n(o),a=t("7+uW"),c={render:function(){var n=this.$createElement,e=this._self._c||n;return e("div",{staticClass:"body-wrapper"},[e("router-view")],1)},staticRenderFns:[]};var i=t("VU/8")({name:"App"},c,!1,function(n){t("Pibb")},"data-v-a97617c2",null).exports,u=t("/ocq");a.default.use(u.a);var l=new u.a({routes:[{path:"/",name:"首页",component:function(){return t.e(4).then(t.bind(null,"4er+"))},redirect:"/dashboard",children:[{path:"/dashboard",name:"概览",icon:"el-icon-menu",component:function(){return Promise.all([t.e(0),t.e(9)]).then(t.bind(null,"ARoL"))}},{path:"/connection",name:"连接配置",icon:"el-icon-s-order",component:function(){return t.e(8).then(t.bind(null,"Hoc+"))},children:[{path:"/connection/driver",name:"驱动配置",icon:"el-icon-help",component:function(){return t.e(16).then(t.bind(null,"WfA7"))}},{path:"/connection/list",name:"连接管理",icon:"el-icon-bank-card",component:function(){return Promise.all([t.e(0),t.e(13)]).then(t.bind(null,"qdtB"))}}]},{path:"/metadata",name:"数据目录",icon:"el-icon-coin",component:function(){return t.e(1).then(t.bind(null,"PJ2q"))}},{path:"/task",name:"任务管理",icon:"el-icon-s-tools",component:function(){return t.e(6).then(t.bind(null,"4KEO"))},children:[{path:"/task/assignment",name:"任务安排",icon:"el-icon-eleme",component:function(){return Promise.all([t.e(0),t.e(15)]).then(t.bind(null,"D0I9"))}},{path:"/task/schedule",name:"调度记录",icon:"el-icon-pie-chart",component:function(){return Promise.all([t.e(0),t.e(10)]).then(t.bind(null,"mKp/"))}}]},{path:"/log",name:"审计日志",icon:"el-icon-platform-eleme",component:function(){return t.e(7).then(t.bind(null,"QWih"))},children:[{path:"/log/access",name:"登录日志",icon:"el-icon-place",component:function(){return t.e(12).then(t.bind(null,"oQRv"))}},{path:"/log/action",name:"操作日志",icon:"el-icon-s-check",component:function(){return t.e(11).then(t.bind(null,"0eSS"))}}]},{path:"/about",name:"关于系统",icon:"el-icon-s-custom",component:function(){return t.e(2).then(t.bind(null,"m25N"))}},{path:"/user/personal",name:"个人中心",hidden:!0,component:function(){return t.e(3).then(t.bind(null,"uTKz"))}},{path:"/task/create",name:"创建任务",hidden:!0,component:function(){return Promise.all([t.e(0),t.e(14)]).then(t.bind(null,"/rCC"))}},{path:"/task/update",name:"修改任务",hidden:!0,component:function(){return Promise.all([t.e(0),t.e(18)]).then(t.bind(null,"txod"))}},{path:"/task/detail",name:"查看任务",hidden:!0,component:function(){return t.e(17).then(t.bind(null,"nrt7"))}}]},{path:"/login",name:"登录",component:function(){return t.e(5).then(t.bind(null,"T+/8"))}}]}),p=t("mtWM"),d=t.n(p).a.create();d.interceptors.request.use(function(n){return n.url=""+n.url,n});var s=d,h=t("zL8q"),m=t.n(h),f=(t("muQq"),t("tvR6"),t("7Vno")),b=t.n(f),v=t("XLwt"),k=t.n(v);a.default.use(s),a.default.use(m.a),a.default.use(b.a),a.default.prototype.$http=s,a.default.config.productionTip=!1,a.default.prototype.$echarts=k.a,s.interceptors.request.use(function(n){var e=sessionStorage.getItem("token");return e&&(n.headers.Authorization="Bearer "+e),n},function(n){return r.a.reject(n)}),s.interceptors.response.use(function(n){return!n.data||401!==n.data.code&&403!==n.data.code&&404!==n.data.code||l.push({path:"/login"}),n},function(n){return console.log(n),r.a.reject(n.response)}),new a.default({el:"#app",router:l,components:{App:i},template:"<App/>"})},Pibb:function(n,e){},muQq:function(n,e){},tvR6:function(n,e){}},["NHnr"]);
|
||||
//# sourceMappingURL=app.f46fc5565782c040e3e0.js.map
|
||||
webpackJsonp([20],{NHnr:function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=t("//Fk"),r=t.n(o),a=t("7+uW"),c={render:function(){var n=this.$createElement,e=this._self._c||n;return e("div",{staticClass:"body-wrapper"},[e("router-view")],1)},staticRenderFns:[]};var i=t("VU/8")({name:"App"},c,!1,function(n){t("Pibb")},"data-v-a97617c2",null).exports,u=t("/ocq");a.default.use(u.a);var l=new u.a({routes:[{path:"/",name:"首页",component:function(){return t.e(4).then(t.bind(null,"4er+"))},redirect:"/dashboard",children:[{path:"/dashboard",name:"概览",icon:"el-icon-menu",component:function(){return Promise.all([t.e(0),t.e(9)]).then(t.bind(null,"ARoL"))}},{path:"/connection",name:"连接配置",icon:"el-icon-s-order",component:function(){return t.e(8).then(t.bind(null,"Hoc+"))},children:[{path:"/connection/driver",name:"驱动配置",icon:"el-icon-help",component:function(){return t.e(17).then(t.bind(null,"WfA7"))}},{path:"/connection/list",name:"连接管理",icon:"el-icon-bank-card",component:function(){return Promise.all([t.e(0),t.e(15)]).then(t.bind(null,"qdtB"))}}]},{path:"/metadata",name:"数据目录",icon:"el-icon-coin",component:function(){return t.e(1).then(t.bind(null,"PJ2q"))}},{path:"/task",name:"任务管理",icon:"el-icon-s-tools",component:function(){return t.e(6).then(t.bind(null,"4KEO"))},children:[{path:"/task/assignment",name:"任务安排",icon:"el-icon-eleme",component:function(){return Promise.all([t.e(0),t.e(16)]).then(t.bind(null,"D0I9"))}},{path:"/task/schedule",name:"调度记录",icon:"el-icon-pie-chart",component:function(){return Promise.all([t.e(0),t.e(10)]).then(t.bind(null,"mKp/"))}}]},{path:"/log",name:"审计日志",icon:"el-icon-platform-eleme",component:function(){return t.e(7).then(t.bind(null,"QWih"))},children:[{path:"/log/access",name:"登录日志",icon:"el-icon-place",component:function(){return t.e(12).then(t.bind(null,"oQRv"))}},{path:"/log/action",name:"操作日志",icon:"el-icon-s-check",component:function(){return t.e(11).then(t.bind(null,"0eSS"))}}]},{path:"/about",name:"关于系统",icon:"el-icon-s-custom",component:function(){return t.e(2).then(t.bind(null,"m25N"))}},{path:"/user/personal",name:"个人中心",hidden:!0,component:function(){return t.e(3).then(t.bind(null,"uTKz"))}},{path:"/task/create",name:"创建任务",hidden:!0,component:function(){return Promise.all([t.e(0),t.e(18)]).then(t.bind(null,"/rCC"))}},{path:"/task/update",name:"修改任务",hidden:!0,component:function(){return Promise.all([t.e(0),t.e(14)]).then(t.bind(null,"txod"))}},{path:"/task/detail",name:"查看任务",hidden:!0,component:function(){return t.e(13).then(t.bind(null,"nrt7"))}}]},{path:"/login",name:"登录",component:function(){return t.e(5).then(t.bind(null,"T+/8"))}}]}),p=t("mtWM"),d=t.n(p).a.create();d.interceptors.request.use(function(n){return n.url=""+n.url,n});var s=d,h=t("zL8q"),m=t.n(h),f=(t("muQq"),t("tvR6"),t("7Vno")),b=t.n(f),v=t("XLwt"),k=t.n(v);a.default.use(s),a.default.use(m.a),a.default.use(b.a),a.default.prototype.$http=s,a.default.config.productionTip=!1,a.default.prototype.$echarts=k.a,s.interceptors.request.use(function(n){var e=sessionStorage.getItem("token");return e&&(n.headers.Authorization="Bearer "+e),n},function(n){return r.a.reject(n)}),s.interceptors.response.use(function(n){return!n.data||401!==n.data.code&&403!==n.data.code&&404!==n.data.code||l.push({path:"/login"}),n},function(n){return console.log(n),r.a.reject(n.response)}),new a.default({el:"#app",router:l,components:{App:i},template:"<App/>"})},Pibb:function(n,e){},muQq:function(n,e){},tvR6:function(n,e){}},["NHnr"]);
|
||||
//# sourceMappingURL=app.21ba178ae5d97e8f4deb.js.map
|
@@ -0,0 +1,2 @@
|
||||
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,o,a){for(var f,d,i,u=0,b=[];u<r.length;u++)d=r[u],t[d]&&b.push(t[d][0]),t[d]=0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(e[f]=o[f]);for(n&&n(r,o,a);b.length;)b.shift()();if(a)for(u=0;u<a.length;u++)i=c(c.s=a[u]);return i};var r={},t={21:0};function c(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,c){n=t[e]=[r,c]});n[2]=r;var o=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,c.nc&&a.setAttribute("nonce",c.nc),a.src=c.p+"static/js/"+e+"."+{0:"ca67e87d8c000a42e592",1:"4917c0d3a0abb78cb20b",2:"bfc549550e9f75074384",3:"3bad9aaf46ce9329fd19",4:"880c74c2473cd4493cad",5:"837a4a67f1fcf6ee6c6a",6:"7f56c2238fb7e4ee2ecd",7:"d5dc80a855f66a3208ff",8:"0b82703c6f3d2dd72354",9:"9b19245845e7fa49300a",10:"3ded61c33158be9eb6b4",11:"c61c0ebee350b7e0cba3",12:"e59d78e330bd5e2703c1",13:"b5da7076ffad217e702a",14:"859e2adb6f2dacdb680e",15:"e3875ce9a863a129e085",16:"c306d3fe5360e077b1b4",17:"17565790c33e3537001f",18:"4e2331d646198535b9e9"}[e]+".js";var f=setTimeout(d,12e4);function d(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=d,o.appendChild(a),r},c.m=e,c.c=r,c.d=function(e,n,r){c.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},c.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(n,"a",n),n},c.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},c.p="/",c.oe=function(e){throw console.error(e),e}}([]);
|
||||
//# sourceMappingURL=manifest.8e83c8948e922e7bb989.js.map
|
@@ -1,2 +0,0 @@
|
||||
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,o){for(var f,d,i,u=0,b=[];u<r.length;u++)d=r[u],t[d]&&b.push(t[d][0]),t[d]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,o);b.length;)b.shift()();if(o)for(u=0;u<o.length;u++)i=a(a.s=o[u]);return i};var r={},t={21:0};function a(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,a){n=t[e]=[r,a]});n[2]=r;var c=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,a.nc&&o.setAttribute("nonce",a.nc),o.src=a.p+"static/js/"+e+"."+{0:"ca67e87d8c000a42e592",1:"4917c0d3a0abb78cb20b",2:"39a763d3b4021d291917",3:"3bad9aaf46ce9329fd19",4:"880c74c2473cd4493cad",5:"837a4a67f1fcf6ee6c6a",6:"7f56c2238fb7e4ee2ecd",7:"d5dc80a855f66a3208ff",8:"0b82703c6f3d2dd72354",9:"9b19245845e7fa49300a",10:"3ded61c33158be9eb6b4",11:"c61c0ebee350b7e0cba3",12:"e59d78e330bd5e2703c1",13:"0a6684d78196c46a07ab",14:"3594d283566a6a9ecea5",15:"280499c7d80fb6a8d2dc",16:"ba07397337433aec3ef5",17:"f69a7bb70293c910fcab",18:"deebbea196505476a7f2"}[e]+".js";var f=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=d,c.appendChild(o),r},a.m=e,a.c=r,a.d=function(e,n,r){a.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="/",a.oe=function(e){throw console.error(e),e}}([]);
|
||||
//# sourceMappingURL=manifest.b67b0f544ed39426eabc.js.map
|
Reference in New Issue
Block a user