Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
fa58f026
提交
fa58f026
authored
2月 22, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
feat: 数据连接
上级
d3b15391
91372f77
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
47 个修改的文件
包含
1144 行增加
和
114 行删除
+1144
-114
DatasetGroup.java
...d/src/main/java/io/dataease/base/domain/DatasetGroup.java
+22
-0
DatasetGroupExample.java
...ain/java/io/dataease/base/domain/DatasetGroupExample.java
+0
-0
DatasetScene.java
...d/src/main/java/io/dataease/base/domain/DatasetScene.java
+20
-0
DatasetSceneExample.java
...ain/java/io/dataease/base/domain/DatasetSceneExample.java
+0
-0
SysDept.java
backend/src/main/java/io/dataease/base/domain/SysDept.java
+33
-0
SysDeptExample.java
...src/main/java/io/dataease/base/domain/SysDeptExample.java
+0
-0
DatasetGroupMapper.java
...main/java/io/dataease/base/mapper/DatasetGroupMapper.java
+31
-0
DatasetGroupMapper.xml
.../main/java/io/dataease/base/mapper/DatasetGroupMapper.xml
+229
-0
DatasetSceneMapper.java
...main/java/io/dataease/base/mapper/DatasetSceneMapper.java
+31
-0
DatasetSceneMapper.xml
.../main/java/io/dataease/base/mapper/DatasetSceneMapper.xml
+212
-0
SysDeptMapper.java
.../src/main/java/io/dataease/base/mapper/SysDeptMapper.java
+31
-0
SysDeptMapper.xml
...d/src/main/java/io/dataease/base/mapper/SysDeptMapper.xml
+0
-0
DEException.java
.../main/java/io/dataease/commons/exception/DEException.java
+7
-7
FileUtils.java
...nd/src/main/java/io/dataease/commons/utils/FileUtils.java
+2
-2
ServiceUtils.java
...src/main/java/io/dataease/commons/utils/ServiceUtils.java
+2
-2
I18nController.java
.../src/main/java/io/dataease/controller/I18nController.java
+2
-2
UserController.java
.../src/main/java/io/dataease/controller/UserController.java
+5
-5
RestControllerExceptionHandler.java
...se/controller/handler/RestControllerExceptionHandler.java
+4
-4
SysDeptController.java
...in/java/io/dataease/controller/sys/SysDeptController.java
+38
-0
DeptCreateRequest.java
...io/dataease/controller/sys/request/DeptCreateRequest.java
+6
-0
DatasourceController.java
.../dataease/datasource/controller/DatasourceController.java
+4
-4
DatasourceProvider.java
...a/io/dataease/datasource/provider/DatasourceProvider.java
+10
-19
JdbcProvider.java
...in/java/io/dataease/datasource/provider/JdbcProvider.java
+2
-2
ProviderFactory.java
...java/io/dataease/datasource/provider/ProviderFactory.java
+2
-0
DatasourceService.java
...ava/io/dataease/datasource/service/DatasourceService.java
+9
-2
UserModularRealmAuthenticator.java
...a/io/dataease/security/UserModularRealmAuthenticator.java
+2
-2
FileService.java
backend/src/main/java/io/dataease/service/FileService.java
+2
-2
NodeResourcePoolService.java
...ain/java/io/dataease/service/NodeResourcePoolService.java
+3
-3
OrganizationService.java
...rc/main/java/io/dataease/service/OrganizationService.java
+4
-4
UserKeyService.java
...end/src/main/java/io/dataease/service/UserKeyService.java
+3
-3
UserService.java
backend/src/main/java/io/dataease/service/UserService.java
+14
-14
WorkspaceService.java
...d/src/main/java/io/dataease/service/WorkspaceService.java
+8
-8
DeptService.java
...nd/src/main/java/io/dataease/service/sys/DeptService.java
+48
-0
V2__metersphere_ddl.sql
...d/src/main/resources/db/migration/V2__metersphere_ddl.sql
+20
-0
App.vue
frontend/src/business/App.vue
+2
-2
MsDialogFooter.vue
.../business/components/common/components/MsDialogFooter.vue
+13
-1
AboutUs.vue
frontend/src/business/components/common/head/AboutUs.vue
+4
-3
HeaderTopMenus.vue
...nd/src/business/components/common/head/HeaderTopMenus.vue
+2
-2
router.js
frontend/src/business/components/common/router/router.js
+4
-2
DataSet.vue
frontend/src/business/components/dataset/DataSet.vue
+45
-0
Group.vue
frontend/src/business/components/dataset/group/Group.vue
+173
-0
router.js
frontend/src/business/components/dataset/router.js
+66
-0
SettingMenu.vue
frontend/src/business/components/settings/SettingMenu.vue
+2
-2
router.js
frontend/src/business/components/settings/router.js
+15
-15
Datasource.vue
...nd/src/business/components/settings/system/Datasource.vue
+0
-0
en-US.js
frontend/src/i18n/en-US.js
+6
-1
zh-TW.js
frontend/src/i18n/zh-TW.js
+6
-1
没有找到文件。
backend/src/main/java/io/dataease/base/domain/DatasetGroup.java
0 → 100644
浏览文件 @
fa58f026
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
lombok.Data
;
@Data
public
class
DatasetGroup
implements
Serializable
{
private
String
id
;
private
String
name
;
private
String
pid
;
private
Integer
level
;
private
String
createBy
;
private
Long
createTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/DatasetGroupExample.java
0 → 100644
浏览文件 @
fa58f026
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/base/domain/DatasetScene.java
0 → 100644
浏览文件 @
fa58f026
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
lombok.Data
;
@Data
public
class
DatasetScene
implements
Serializable
{
private
String
id
;
private
String
name
;
private
String
groupId
;
private
String
createBy
;
private
Long
createTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/DatasetSceneExample.java
0 → 100644
浏览文件 @
fa58f026
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/base/domain/SysDept.java
0 → 100644
浏览文件 @
fa58f026
package
io
.
dataease
.
base
.
domain
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
@Data
public
class
SysDept
implements
Serializable
{
private
Long
deptId
;
private
Long
pid
;
private
Integer
subCount
;
private
String
name
;
private
Integer
level
;
private
Integer
deptSort
;
private
Boolean
enabled
;
private
String
createBy
;
private
String
updateBy
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/domain/SysDeptExample.java
0 → 100644
浏览文件 @
fa58f026
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/base/mapper/DatasetGroupMapper.java
0 → 100644
浏览文件 @
fa58f026
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.DatasetGroup
;
import
io.dataease.base.domain.DatasetGroupExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
DatasetGroupMapper
{
long
countByExample
(
DatasetGroupExample
example
);
int
deleteByExample
(
DatasetGroupExample
example
);
int
deleteByPrimaryKey
(
String
id
);
int
insert
(
DatasetGroup
record
);
int
insertSelective
(
DatasetGroup
record
);
List
<
DatasetGroup
>
selectByExample
(
DatasetGroupExample
example
);
DatasetGroup
selectByPrimaryKey
(
String
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
DatasetGroup
record
,
@Param
(
"example"
)
DatasetGroupExample
example
);
int
updateByExample
(
@Param
(
"record"
)
DatasetGroup
record
,
@Param
(
"example"
)
DatasetGroupExample
example
);
int
updateByPrimaryKeySelective
(
DatasetGroup
record
);
int
updateByPrimaryKey
(
DatasetGroup
record
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/DatasetGroupMapper.xml
0 → 100644
浏览文件 @
fa58f026
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.dataease.base.mapper.DatasetGroupMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.dataease.base.domain.DatasetGroup"
>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"pid"
jdbcType=
"VARCHAR"
property=
"pid"
/>
<result
column=
"level"
jdbcType=
"INTEGER"
property=
"level"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, `name`, pid, `level`, create_by, create_time
</sql>
<select
id=
"selectByExample"
parameterType=
"io.dataease.base.domain.DatasetGroupExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from dataset_group
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from dataset_group
where id = #{id,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dataset_group
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.dataease.base.domain.DatasetGroupExample"
>
delete from dataset_group
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.DatasetGroup"
>
insert into dataset_group (id, `name`, pid,
`level`, create_by, create_time
)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
#{level,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.DatasetGroup"
>
insert into dataset_group
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"name != null"
>
`name`,
</if>
<if
test=
"pid != null"
>
pid,
</if>
<if
test=
"level != null"
>
`level`,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"pid != null"
>
#{pid,jdbcType=VARCHAR},
</if>
<if
test=
"level != null"
>
#{level,jdbcType=INTEGER},
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.dataease.base.domain.DatasetGroupExample"
resultType=
"java.lang.Long"
>
select count(*) from dataset_group
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update dataset_group
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=VARCHAR},
</if>
<if
test=
"record.name != null"
>
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.pid != null"
>
pid = #{record.pid,jdbcType=VARCHAR},
</if>
<if
test=
"record.level != null"
>
`level` = #{record.level,jdbcType=INTEGER},
</if>
<if
test=
"record.createBy != null"
>
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update dataset_group
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
pid = #{record.pid,jdbcType=VARCHAR},
`level` = #{record.level,jdbcType=INTEGER},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"io.dataease.base.domain.DatasetGroup"
>
update dataset_group
<set>
<if
test=
"name != null"
>
`name` = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"pid != null"
>
pid = #{pid,jdbcType=VARCHAR},
</if>
<if
test=
"level != null"
>
`level` = #{level,jdbcType=INTEGER},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"io.dataease.base.domain.DatasetGroup"
>
update dataset_group
set `name` = #{name,jdbcType=VARCHAR},
pid = #{pid,jdbcType=VARCHAR},
`level` = #{level,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/DatasetSceneMapper.java
0 → 100644
浏览文件 @
fa58f026
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.DatasetScene
;
import
io.dataease.base.domain.DatasetSceneExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
DatasetSceneMapper
{
long
countByExample
(
DatasetSceneExample
example
);
int
deleteByExample
(
DatasetSceneExample
example
);
int
deleteByPrimaryKey
(
String
id
);
int
insert
(
DatasetScene
record
);
int
insertSelective
(
DatasetScene
record
);
List
<
DatasetScene
>
selectByExample
(
DatasetSceneExample
example
);
DatasetScene
selectByPrimaryKey
(
String
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
DatasetScene
record
,
@Param
(
"example"
)
DatasetSceneExample
example
);
int
updateByExample
(
@Param
(
"record"
)
DatasetScene
record
,
@Param
(
"example"
)
DatasetSceneExample
example
);
int
updateByPrimaryKeySelective
(
DatasetScene
record
);
int
updateByPrimaryKey
(
DatasetScene
record
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/DatasetSceneMapper.xml
0 → 100644
浏览文件 @
fa58f026
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.dataease.base.mapper.DatasetSceneMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.dataease.base.domain.DatasetScene"
>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"group_id"
jdbcType=
"VARCHAR"
property=
"groupId"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, `name`, group_id, create_by, create_time
</sql>
<select
id=
"selectByExample"
parameterType=
"io.dataease.base.domain.DatasetSceneExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from dataset_scene
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from dataset_scene
where id = #{id,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dataset_scene
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.dataease.base.domain.DatasetSceneExample"
>
delete from dataset_scene
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.dataease.base.domain.DatasetScene"
>
insert into dataset_scene (id, `name`, group_id,
create_by, create_time)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{groupId,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.dataease.base.domain.DatasetScene"
>
insert into dataset_scene
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"name != null"
>
`name`,
</if>
<if
test=
"groupId != null"
>
group_id,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"groupId != null"
>
#{groupId,jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.dataease.base.domain.DatasetSceneExample"
resultType=
"java.lang.Long"
>
select count(*) from dataset_scene
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update dataset_scene
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=VARCHAR},
</if>
<if
test=
"record.name != null"
>
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.groupId != null"
>
group_id = #{record.groupId,jdbcType=VARCHAR},
</if>
<if
test=
"record.createBy != null"
>
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update dataset_scene
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
group_id = #{record.groupId,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"io.dataease.base.domain.DatasetScene"
>
update dataset_scene
<set>
<if
test=
"name != null"
>
`name` = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"groupId != null"
>
group_id = #{groupId,jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"io.dataease.base.domain.DatasetScene"
>
update dataset_scene
set `name` = #{name,jdbcType=VARCHAR},
group_id = #{groupId,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/SysDeptMapper.java
0 → 100644
浏览文件 @
fa58f026
package
io
.
dataease
.
base
.
mapper
;
import
io.dataease.base.domain.SysDept
;
import
io.dataease.base.domain.SysDeptExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
SysDeptMapper
{
long
countByExample
(
SysDeptExample
example
);
int
deleteByExample
(
SysDeptExample
example
);
int
deleteByPrimaryKey
(
Long
deptId
);
int
insert
(
SysDept
record
);
int
insertSelective
(
SysDept
record
);
List
<
SysDept
>
selectByExample
(
SysDeptExample
example
);
SysDept
selectByPrimaryKey
(
Long
deptId
);
int
updateByExampleSelective
(
@Param
(
"record"
)
SysDept
record
,
@Param
(
"example"
)
SysDeptExample
example
);
int
updateByExample
(
@Param
(
"record"
)
SysDept
record
,
@Param
(
"example"
)
SysDeptExample
example
);
int
updateByPrimaryKeySelective
(
SysDept
record
);
int
updateByPrimaryKey
(
SysDept
record
);
}
\ No newline at end of file
backend/src/main/java/io/dataease/base/mapper/SysDeptMapper.xml
0 → 100644
浏览文件 @
fa58f026
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/commons/exception/
MS
Exception.java
→
backend/src/main/java/io/dataease/commons/exception/
DE
Exception.java
浏览文件 @
fa58f026
package
io
.
dataease
.
commons
.
exception
;
package
io
.
dataease
.
commons
.
exception
;
public
class
MS
Exception
extends
RuntimeException
{
public
class
DE
Exception
extends
RuntimeException
{
private
MS
Exception
(
String
message
)
{
private
DE
Exception
(
String
message
)
{
super
(
message
);
super
(
message
);
}
}
private
MS
Exception
(
Throwable
t
)
{
private
DE
Exception
(
Throwable
t
)
{
super
(
t
);
super
(
t
);
}
}
public
static
void
throwException
(
String
message
)
{
public
static
void
throwException
(
String
message
)
{
throw
new
MS
Exception
(
message
);
throw
new
DE
Exception
(
message
);
}
}
public
static
MS
Exception
getException
(
String
message
)
{
public
static
DE
Exception
getException
(
String
message
)
{
throw
new
MS
Exception
(
message
);
throw
new
DE
Exception
(
message
);
}
}
public
static
void
throwException
(
Throwable
t
)
{
public
static
void
throwException
(
Throwable
t
)
{
throw
new
MS
Exception
(
t
);
throw
new
DE
Exception
(
t
);
}
}
}
}
backend/src/main/java/io/dataease/commons/utils/FileUtils.java
浏览文件 @
fa58f026
package
io
.
dataease
.
commons
.
utils
;
package
io
.
dataease
.
commons
.
utils
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
io.dataease.i18n.Translator
;
import
io.dataease.i18n.Translator
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.aspectj.util.FileUtil
;
import
org.aspectj.util.FileUtil
;
...
@@ -26,7 +26,7 @@ public class FileUtils {
...
@@ -26,7 +26,7 @@ public class FileUtils {
FileUtil
.
copyStream
(
in
,
out
);
FileUtil
.
copyStream
(
in
,
out
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
LogUtil
.
error
(
e
);
LogUtil
.
error
(
e
);
MS
Exception
.
throwException
(
Translator
.
get
(
"upload_fail"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"upload_fail"
));
}
}
}
}
}
}
...
...
backend/src/main/java/io/dataease/commons/utils/ServiceUtils.java
浏览文件 @
fa58f026
package
io
.
dataease
.
commons
.
utils
;
package
io
.
dataease
.
commons
.
utils
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
io.dataease.controller.request.BaseQueryRequest
;
import
io.dataease.controller.request.BaseQueryRequest
;
import
io.dataease.controller.request.OrderRequest
;
import
io.dataease.controller.request.OrderRequest
;
...
@@ -44,7 +44,7 @@ public class ServiceUtils {
...
@@ -44,7 +44,7 @@ public class ServiceUtils {
setIds
.
invoke
(
batchRequest
,
ids
);
setIds
.
invoke
(
batchRequest
,
ids
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
e
.
getMessage
(),
e
);
LogUtil
.
error
(
e
.
getMessage
(),
e
);
MS
Exception
.
throwException
(
"请求没有setIds方法"
);
DE
Exception
.
throwException
(
"请求没有setIds方法"
);
}
}
}
}
}
}
...
...
backend/src/main/java/io/dataease/controller/I18nController.java
浏览文件 @
fa58f026
...
@@ -2,7 +2,7 @@ package io.dataease.controller;
...
@@ -2,7 +2,7 @@ package io.dataease.controller;
import
io.dataease.commons.constants.I18nConstants
;
import
io.dataease.commons.constants.I18nConstants
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.i18n.Lang
;
import
io.dataease.i18n.Lang
;
import
io.dataease.i18n.Translator
;
import
io.dataease.i18n.Translator
;
...
@@ -37,7 +37,7 @@ public class I18nController {
...
@@ -37,7 +37,7 @@ public class I18nController {
if
(
targetLang
==
null
)
{
if
(
targetLang
==
null
)
{
response
.
setStatus
(
HttpServletResponse
.
SC_NOT_ACCEPTABLE
);
response
.
setStatus
(
HttpServletResponse
.
SC_NOT_ACCEPTABLE
);
LogUtil
.
error
(
"Invalid parameter: "
+
lang
);
LogUtil
.
error
(
"Invalid parameter: "
+
lang
);
MS
Exception
.
throwException
(
Translator
.
get
(
"error_lang_invalid"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"error_lang_invalid"
));
}
}
userService
.
setLanguage
(
targetLang
.
getDesc
());
userService
.
setLanguage
(
targetLang
.
getDesc
());
Cookie
cookie
=
new
Cookie
(
I18nConstants
.
LANG_COOKIE_NAME
,
targetLang
.
getDesc
());
Cookie
cookie
=
new
Cookie
(
I18nConstants
.
LANG_COOKIE_NAME
,
targetLang
.
getDesc
());
...
...
backend/src/main/java/io/dataease/controller/UserController.java
浏览文件 @
fa58f026
...
@@ -4,7 +4,7 @@ import com.github.pagehelper.Page;
...
@@ -4,7 +4,7 @@ import com.github.pagehelper.Page;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
io.dataease.base.domain.User
;
import
io.dataease.base.domain.User
;
import
io.dataease.commons.constants.RoleConstants
;
import
io.dataease.commons.constants.RoleConstants
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
io.dataease.commons.user.SessionUser
;
import
io.dataease.commons.user.SessionUser
;
import
io.dataease.commons.utils.PageUtils
;
import
io.dataease.commons.utils.PageUtils
;
import
io.dataease.commons.utils.Pager
;
import
io.dataease.commons.utils.Pager
;
...
@@ -138,7 +138,7 @@ public class UserController {
...
@@ -138,7 +138,7 @@ public class UserController {
public
UserDTO
updateCurrentUser
(
@RequestBody
User
user
)
{
public
UserDTO
updateCurrentUser
(
@RequestBody
User
user
)
{
String
currentUserId
=
SessionUtils
.
getUserId
();
String
currentUserId
=
SessionUtils
.
getUserId
();
if
(!
StringUtils
.
equals
(
currentUserId
,
user
.
getId
()))
{
if
(!
StringUtils
.
equals
(
currentUserId
,
user
.
getId
()))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"not_authorized"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"not_authorized"
));
}
}
userService
.
updateUser
(
user
);
userService
.
updateUser
(
user
);
UserDTO
userDTO
=
userService
.
getUserDTO
(
user
.
getId
());
UserDTO
userDTO
=
userService
.
getUserDTO
(
user
.
getId
());
...
@@ -169,7 +169,7 @@ public class UserController {
...
@@ -169,7 +169,7 @@ public class UserController {
@GetMapping
(
"/info/{userId}"
)
@GetMapping
(
"/info/{userId}"
)
public
UserDTO
getUserInfo
(
@PathVariable
(
value
=
"userId"
)
String
userId
)
{
public
UserDTO
getUserInfo
(
@PathVariable
(
value
=
"userId"
)
String
userId
)
{
if
(!
StringUtils
.
equals
(
userId
,
SessionUtils
.
getUserId
()))
{
if
(!
StringUtils
.
equals
(
userId
,
SessionUtils
.
getUserId
()))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"not_authorized"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"not_authorized"
));
}
}
return
userService
.
getUserInfo
(
userId
);
return
userService
.
getUserInfo
(
userId
);
}
}
...
@@ -215,7 +215,7 @@ public class UserController {
...
@@ -215,7 +215,7 @@ public class UserController {
workspaceService
.
checkWorkspaceOwner
(
workspaceId
);
workspaceService
.
checkWorkspaceOwner
(
workspaceId
);
String
currentUserId
=
SessionUtils
.
getUser
().
getId
();
String
currentUserId
=
SessionUtils
.
getUser
().
getId
();
if
(
StringUtils
.
equals
(
userId
,
currentUserId
))
{
if
(
StringUtils
.
equals
(
userId
,
currentUserId
))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"cannot_remove_current"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"cannot_remove_current"
));
}
}
userService
.
deleteMember
(
workspaceId
,
userId
);
userService
.
deleteMember
(
workspaceId
,
userId
);
}
}
...
@@ -239,7 +239,7 @@ public class UserController {
...
@@ -239,7 +239,7 @@ public class UserController {
organizationService
.
checkOrgOwner
(
organizationId
);
organizationService
.
checkOrgOwner
(
organizationId
);
String
currentUserId
=
SessionUtils
.
getUser
().
getId
();
String
currentUserId
=
SessionUtils
.
getUser
().
getId
();
if
(
StringUtils
.
equals
(
userId
,
currentUserId
))
{
if
(
StringUtils
.
equals
(
userId
,
currentUserId
))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"cannot_remove_current"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"cannot_remove_current"
));
}
}
userService
.
delOrganizationMember
(
organizationId
,
userId
);
userService
.
delOrganizationMember
(
organizationId
,
userId
);
}
}
...
...
backend/src/main/java/io/dataease/controller/handler/RestControllerExceptionHandler.java
浏览文件 @
fa58f026
package
io
.
dataease
.
controller
.
handler
;
package
io
.
dataease
.
controller
.
handler
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
io.dataease.controller.ResultHolder
;
import
io.dataease.controller.ResultHolder
;
import
org.apache.shiro.ShiroException
;
import
org.apache.shiro.ShiroException
;
import
org.apache.shiro.authz.UnauthorizedException
;
import
org.apache.shiro.authz.UnauthorizedException
;
...
@@ -32,13 +32,13 @@ public class RestControllerExceptionHandler {
...
@@ -32,13 +32,13 @@ public class RestControllerExceptionHandler {
@ExceptionHandler
(
SQLException
.
class
)
@ExceptionHandler
(
SQLException
.
class
)
public
ResultHolder
sqlExceptionHandler
(
HttpServletRequest
request
,
HttpServletResponse
response
,
MS
Exception
e
)
{
public
ResultHolder
sqlExceptionHandler
(
HttpServletRequest
request
,
HttpServletResponse
response
,
DE
Exception
e
)
{
response
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
response
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
return
ResultHolder
.
error
(
"SQL error happened, please check logs."
);
return
ResultHolder
.
error
(
"SQL error happened, please check logs."
);
}
}
@ExceptionHandler
(
MS
Exception
.
class
)
@ExceptionHandler
(
DE
Exception
.
class
)
public
ResultHolder
msExceptionHandler
(
HttpServletRequest
request
,
HttpServletResponse
response
,
MS
Exception
e
)
{
public
ResultHolder
msExceptionHandler
(
HttpServletRequest
request
,
HttpServletResponse
response
,
DE
Exception
e
)
{
response
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
response
.
setStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
.
value
());
return
ResultHolder
.
error
(
e
.
getMessage
());
return
ResultHolder
.
error
(
e
.
getMessage
());
}
}
...
...
backend/src/main/java/io/dataease/controller/sys/SysDeptController.java
0 → 100644
浏览文件 @
fa58f026
package
io
.
dataease
.
controller
.
sys
;
import
io.dataease.base.domain.SysDept
;
import
io.dataease.service.sys.DeptService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@RequiredArgsConstructor
@Api
(
tags
=
"系统:部门管理"
)
@RequestMapping
(
"/api/dept"
)
public
class
SysDeptController
{
@Resource
private
DeptService
deptService
;
@ApiOperation
(
"查询部门"
)
@PostMapping
(
"/root"
)
public
List
<
SysDept
>
rootData
(){
List
<
SysDept
>
root
=
deptService
.
root
();
return
root
;
}
@ApiOperation
(
"新增部门"
)
@PostMapping
(
"/create"
)
public
void
create
(
@RequestBody
SysDept
dept
){
deptService
.
add
(
dept
);
}
}
backend/src/main/java/io/dataease/controller/sys/request/DeptCreateRequest.java
0 → 100644
浏览文件 @
fa58f026
package
io
.
dataease
.
controller
.
sys
.
request
;
public
class
DeptCreateRequest
{
}
backend/src/main/java/io/dataease/datasource/controller/DatasourceController.java
浏览文件 @
fa58f026
...
@@ -19,13 +19,13 @@ public class DatasourceController {
...
@@ -19,13 +19,13 @@ public class DatasourceController {
private
DatasourceService
datasourceService
;
private
DatasourceService
datasourceService
;
@PostMapping
(
"/add"
)
@PostMapping
(
"/add"
)
public
Datasource
addDatasource
(
@RequestBody
Datasource
D
atasource
)
{
public
Datasource
addDatasource
(
@RequestBody
Datasource
d
atasource
)
{
return
datasourceService
.
addDatasource
(
D
atasource
);
return
datasourceService
.
addDatasource
(
d
atasource
);
}
}
@PostMapping
(
"/validate"
)
@PostMapping
(
"/validate"
)
public
void
validate
(
@RequestBody
Datasource
D
atasource
)
throws
Exception
{
public
void
validate
(
@RequestBody
Datasource
d
atasource
)
throws
Exception
{
datasourceService
.
validate
(
D
atasource
);
datasourceService
.
validate
(
d
atasource
);
}
}
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
...
...
backend/src/main/java/io/dataease/datasource/provider/DatasourceProvider.java
浏览文件 @
fa58f026
package
io
.
dataease
.
datasource
.
provider
;
package
io
.
dataease
.
datasource
.
provider
;
import
io.dataease.base.domain.Datasource
;
import
java.util.List
;
import
java.util.List
;
public
abstract
class
DatasourceProvider
{
public
abstract
class
DatasourceProvider
{
protected
String
dataSourceConfigration
;
protected
String
query
;
protected
String
type
;
private
int
resultLimit
=
30000
;
protected
Datasource
datasource
;
public
String
getQuery
()
{
public
String
getQuery
()
{
return
query
;
return
query
;
...
@@ -15,27 +19,14 @@ public abstract class DatasourceProvider {
...
@@ -15,27 +19,14 @@ public abstract class DatasourceProvider {
this
.
query
=
query
;
this
.
query
=
query
;
}
}
protected
String
query
;
public
Datasource
getDatasource
()
{
private
int
resultLimit
=
30000
;
return
datasource
;
public
String
getDataSourceConfigration
()
{
return
dataSourceConfigration
;
}
}
public
void
setData
SourceConfigration
(
String
dataSourceConfigration
)
{
public
void
setData
source
(
Datasource
datasource
)
{
this
.
data
SourceConfigration
=
dataSourceConfigration
;
this
.
data
source
=
datasource
;
}
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
abstract
public
List
<
String
[]>
getData
()
throws
Exception
;
abstract
public
List
<
String
[]>
getData
()
throws
Exception
;
abstract
public
List
<
String
>
getTables
()
throws
Exception
;
abstract
public
List
<
String
>
getTables
()
throws
Exception
;
...
...
backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java
浏览文件 @
fa58f026
...
@@ -80,10 +80,10 @@ public class JdbcProvider extends DatasourceProvider{
...
@@ -80,10 +80,10 @@ public class JdbcProvider extends DatasourceProvider{
String
password
=
null
;
String
password
=
null
;
String
driver
=
null
;
String
driver
=
null
;
String
jdbcurl
=
null
;
String
jdbcurl
=
null
;
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
getType
());
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
get
Datasource
().
get
Type
());
switch
(
datasourceType
){
switch
(
datasourceType
){
case
mysql:
case
mysql:
MysqlConfigrationDTO
mysqlConfigrationDTO
=
new
Gson
().
fromJson
(
getData
SourceConfig
ration
(),
MysqlConfigrationDTO
.
class
);
MysqlConfigrationDTO
mysqlConfigrationDTO
=
new
Gson
().
fromJson
(
getData
source
().
getConfigu
ration
(),
MysqlConfigrationDTO
.
class
);
username
=
mysqlConfigrationDTO
.
getUsername
();
username
=
mysqlConfigrationDTO
.
getUsername
();
password
=
mysqlConfigrationDTO
.
getPassword
();
password
=
mysqlConfigrationDTO
.
getPassword
();
driver
=
mysqlConfigrationDTO
.
getDriver
();
driver
=
mysqlConfigrationDTO
.
getDriver
();
...
...
backend/src/main/java/io/dataease/datasource/provider/ProviderFactory.java
浏览文件 @
fa58f026
...
@@ -19,7 +19,9 @@ public class ProviderFactory implements ApplicationContextAware {
...
@@ -19,7 +19,9 @@ public class ProviderFactory implements ApplicationContextAware {
}
}
public
static
DatasourceProvider
getProvider
(
String
type
){
public
static
DatasourceProvider
getProvider
(
String
type
){
System
.
out
.
println
(
type
);
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
DatasourceTypes
datasourceType
=
DatasourceTypes
.
valueOf
(
type
);
System
.
out
.
println
(
datasourceType
.
name
());
switch
(
datasourceType
){
switch
(
datasourceType
){
case
mysql:
case
mysql:
return
context
.
getBean
(
"jdbc"
,
DatasourceProvider
.
class
);
return
context
.
getBean
(
"jdbc"
,
DatasourceProvider
.
class
);
...
...
backend/src/main/java/io/dataease/datasource/service/DatasourceService.java
浏览文件 @
fa58f026
...
@@ -3,10 +3,12 @@ package io.dataease.datasource.service;
...
@@ -3,10 +3,12 @@ package io.dataease.datasource.service;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.domain.*
;
import
io.dataease.base.mapper.*
;
import
io.dataease.base.mapper.*
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.datasource.dto.MysqlConfigrationDTO
;
import
io.dataease.datasource.dto.MysqlConfigrationDTO
;
import
io.dataease.datasource.provider.DatasourceProvider
;
import
io.dataease.datasource.provider.DatasourceProvider
;
import
io.dataease.datasource.provider.JdbcProvider
;
import
io.dataease.datasource.provider.JdbcProvider
;
import
io.dataease.datasource.provider.ProviderFactory
;
import
io.dataease.datasource.provider.ProviderFactory
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -25,6 +27,11 @@ public class DatasourceService {
...
@@ -25,6 +27,11 @@ public class DatasourceService {
private
DatasourceMapper
datasourceMapper
;
private
DatasourceMapper
datasourceMapper
;
public
Datasource
addDatasource
(
Datasource
datasource
)
{
public
Datasource
addDatasource
(
Datasource
datasource
)
{
DatasourceExample
example
=
new
DatasourceExample
();
example
.
createCriteria
().
andNameEqualTo
(
datasource
.
getName
());
if
(
CollectionUtils
.
isNotEmpty
(
datasourceMapper
.
selectByExample
(
example
))){
DEException
.
throwException
(
"Exist data connection with the same name "
);
}
long
currentTimeMillis
=
System
.
currentTimeMillis
();
long
currentTimeMillis
=
System
.
currentTimeMillis
();
datasource
.
setId
(
UUID
.
randomUUID
().
toString
());
datasource
.
setId
(
UUID
.
randomUUID
().
toString
());
datasource
.
setUpdateTime
(
currentTimeMillis
);
datasource
.
setUpdateTime
(
currentTimeMillis
);
...
@@ -43,7 +50,7 @@ public class DatasourceService {
...
@@ -43,7 +50,7 @@ public class DatasourceService {
criteria
.
andTypeEqualTo
(
request
.
getType
());
criteria
.
andTypeEqualTo
(
request
.
getType
());
}
}
example
.
setOrderByClause
(
"update_time desc"
);
example
.
setOrderByClause
(
"update_time desc"
);
return
datasourceMapper
.
selectByExample
(
example
);
return
datasourceMapper
.
selectByExample
WithBLOBs
(
example
);
}
}
public
void
deleteDatasource
(
String
datasourceId
)
{
public
void
deleteDatasource
(
String
datasourceId
)
{
...
@@ -58,7 +65,7 @@ public class DatasourceService {
...
@@ -58,7 +65,7 @@ public class DatasourceService {
public
void
validate
(
Datasource
datasource
)
throws
Exception
{
public
void
validate
(
Datasource
datasource
)
throws
Exception
{
DatasourceProvider
datasourceProvider
=
ProviderFactory
.
getProvider
(
datasource
.
getType
());
DatasourceProvider
datasourceProvider
=
ProviderFactory
.
getProvider
(
datasource
.
getType
());
datasourceProvider
.
setData
SourceConfigration
(
datasource
.
getConfiguration
()
);
datasourceProvider
.
setData
source
(
datasource
);
datasourceProvider
.
test
();
datasourceProvider
.
test
();
}
}
...
...
backend/src/main/java/io/dataease/security/UserModularRealmAuthenticator.java
浏览文件 @
fa58f026
package
io
.
dataease
.
security
;
package
io
.
dataease
.
security
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
org.apache.shiro.authc.AuthenticationException
;
import
org.apache.shiro.authc.AuthenticationException
;
import
org.apache.shiro.authc.AuthenticationInfo
;
import
org.apache.shiro.authc.AuthenticationInfo
;
import
org.apache.shiro.authc.AuthenticationToken
;
import
org.apache.shiro.authc.AuthenticationToken
;
...
@@ -35,7 +35,7 @@ public class UserModularRealmAuthenticator extends ModularRealmAuthenticator {
...
@@ -35,7 +35,7 @@ public class UserModularRealmAuthenticator extends ModularRealmAuthenticator {
}
}
if
(
typeRealms
.
size
()
==
0
)
{
if
(
typeRealms
.
size
()
==
0
)
{
MS
Exception
.
throwException
(
"No realm"
);
DE
Exception
.
throwException
(
"No realm"
);
}
}
// 判断是单Realm还是多Realm
// 判断是单Realm还是多Realm
if
(
typeRealms
.
size
()
==
1
)
{
if
(
typeRealms
.
size
()
==
1
)
{
...
...
backend/src/main/java/io/dataease/service/FileService.java
浏览文件 @
fa58f026
...
@@ -6,7 +6,7 @@ import io.dataease.base.mapper.FileMetadataMapper;
...
@@ -6,7 +6,7 @@ import io.dataease.base.mapper.FileMetadataMapper;
import
io.dataease.base.mapper.LoadTestFileMapper
;
import
io.dataease.base.mapper.LoadTestFileMapper
;
import
io.dataease.base.mapper.TestCaseFileMapper
;
import
io.dataease.base.mapper.TestCaseFileMapper
;
import
io.dataease.commons.constants.FileType
;
import
io.dataease.commons.constants.FileType
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -100,7 +100,7 @@ public class FileService {
...
@@ -100,7 +100,7 @@ public class FileService {
try
{
try
{
fileContent
.
setFile
(
file
.
getBytes
());
fileContent
.
setFile
(
file
.
getBytes
());
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
MS
Exception
.
throwException
(
e
);
DE
Exception
.
throwException
(
e
);
}
}
fileContentMapper
.
insert
(
fileContent
);
fileContentMapper
.
insert
(
fileContent
);
...
...
backend/src/main/java/io/dataease/service/NodeResourcePoolService.java
浏览文件 @
fa58f026
...
@@ -5,7 +5,7 @@ import io.dataease.base.domain.TestResource;
...
@@ -5,7 +5,7 @@ import io.dataease.base.domain.TestResource;
import
io.dataease.base.domain.TestResourceExample
;
import
io.dataease.base.domain.TestResourceExample
;
import
io.dataease.base.mapper.TestResourceMapper
;
import
io.dataease.base.mapper.TestResourceMapper
;
import
io.dataease.commons.constants.ResourceStatusEnum
;
import
io.dataease.commons.constants.ResourceStatusEnum
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.dto.NodeDTO
;
import
io.dataease.dto.NodeDTO
;
import
io.dataease.dto.TestResourcePoolDTO
;
import
io.dataease.dto.TestResourcePoolDTO
;
...
@@ -36,7 +36,7 @@ public class NodeResourcePoolService {
...
@@ -36,7 +36,7 @@ public class NodeResourcePoolService {
public
boolean
validate
(
TestResourcePoolDTO
testResourcePool
)
{
public
boolean
validate
(
TestResourcePoolDTO
testResourcePool
)
{
if
(
CollectionUtils
.
isEmpty
(
testResourcePool
.
getResources
()))
{
if
(
CollectionUtils
.
isEmpty
(
testResourcePool
.
getResources
()))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"no_nodes_message"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"no_nodes_message"
));
}
}
deleteTestResource
(
testResourcePool
.
getId
());
deleteTestResource
(
testResourcePool
.
getId
());
...
@@ -48,7 +48,7 @@ public class NodeResourcePoolService {
...
@@ -48,7 +48,7 @@ public class NodeResourcePoolService {
.
distinct
()
.
distinct
()
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
if
(
Ip_Port
.
size
()
<
testResourcePool
.
getResources
().
size
())
{
if
(
Ip_Port
.
size
()
<
testResourcePool
.
getResources
().
size
())
{
MS
Exception
.
throwException
(
Translator
.
get
(
"duplicate_node_ip_port"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"duplicate_node_ip_port"
));
}
}
testResourcePool
.
setStatus
(
VALID
.
name
());
testResourcePool
.
setStatus
(
VALID
.
name
());
boolean
isValid
=
true
;
boolean
isValid
=
true
;
...
...
backend/src/main/java/io/dataease/service/OrganizationService.java
浏览文件 @
fa58f026
...
@@ -8,7 +8,7 @@ import io.dataease.base.mapper.WorkspaceMapper;
...
@@ -8,7 +8,7 @@ import io.dataease.base.mapper.WorkspaceMapper;
import
io.dataease.base.mapper.ext.ExtOrganizationMapper
;
import
io.dataease.base.mapper.ext.ExtOrganizationMapper
;
import
io.dataease.base.mapper.ext.ExtUserRoleMapper
;
import
io.dataease.base.mapper.ext.ExtUserRoleMapper
;
import
io.dataease.commons.constants.RoleConstants
;
import
io.dataease.commons.constants.RoleConstants
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
io.dataease.commons.user.SessionUser
;
import
io.dataease.commons.user.SessionUser
;
import
io.dataease.commons.utils.SessionUtils
;
import
io.dataease.commons.utils.SessionUtils
;
import
io.dataease.controller.request.OrganizationRequest
;
import
io.dataease.controller.request.OrganizationRequest
;
...
@@ -69,7 +69,7 @@ public class OrganizationService {
...
@@ -69,7 +69,7 @@ public class OrganizationService {
private
void
checkOrganization
(
Organization
organization
)
{
private
void
checkOrganization
(
Organization
organization
)
{
if
(
StringUtils
.
isBlank
(
organization
.
getName
()))
{
if
(
StringUtils
.
isBlank
(
organization
.
getName
()))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"organization_name_is_null"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"organization_name_is_null"
));
}
}
OrganizationExample
example
=
new
OrganizationExample
();
OrganizationExample
example
=
new
OrganizationExample
();
...
@@ -80,7 +80,7 @@ public class OrganizationService {
...
@@ -80,7 +80,7 @@ public class OrganizationService {
}
}
if
(
organizationMapper
.
countByExample
(
example
)
>
0
)
{
if
(
organizationMapper
.
countByExample
(
example
)
>
0
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"organization_name_already_exists"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"organization_name_already_exists"
));
}
}
}
}
...
@@ -175,7 +175,7 @@ public class OrganizationService {
...
@@ -175,7 +175,7 @@ public class OrganizationService {
.
map
(
UserRole:
:
getSourceId
)
.
map
(
UserRole:
:
getSourceId
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
if
(!
collect
.
contains
(
organizationId
))
{
if
(!
collect
.
contains
(
organizationId
))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"organization_does_not_belong_to_user"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"organization_does_not_belong_to_user"
));
}
}
}
}
}
}
backend/src/main/java/io/dataease/service/UserKeyService.java
浏览文件 @
fa58f026
...
@@ -4,7 +4,7 @@ import io.dataease.base.domain.UserKey;
...
@@ -4,7 +4,7 @@ import io.dataease.base.domain.UserKey;
import
io.dataease.base.domain.UserKeyExample
;
import
io.dataease.base.domain.UserKeyExample
;
import
io.dataease.base.mapper.UserKeyMapper
;
import
io.dataease.base.mapper.UserKeyMapper
;
import
io.dataease.commons.constants.ApiKeyConstants
;
import
io.dataease.commons.constants.ApiKeyConstants
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
io.dataease.i18n.Translator
;
import
io.dataease.i18n.Translator
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -32,14 +32,14 @@ public class UserKeyService {
...
@@ -32,14 +32,14 @@ public class UserKeyService {
public
UserKey
generateUserKey
(
String
userId
)
{
public
UserKey
generateUserKey
(
String
userId
)
{
if
(
userService
.
getUserDTO
(
userId
)
==
null
)
{
if
(
userService
.
getUserDTO
(
userId
)
==
null
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_not_exist"
)
+
userId
);
DE
Exception
.
throwException
(
Translator
.
get
(
"user_not_exist"
)
+
userId
);
}
}
UserKeyExample
userKeysExample
=
new
UserKeyExample
();
UserKeyExample
userKeysExample
=
new
UserKeyExample
();
userKeysExample
.
createCriteria
().
andUserIdEqualTo
(
userId
);
userKeysExample
.
createCriteria
().
andUserIdEqualTo
(
userId
);
List
<
UserKey
>
userKeysList
=
userKeyMapper
.
selectByExample
(
userKeysExample
);
List
<
UserKey
>
userKeysList
=
userKeyMapper
.
selectByExample
(
userKeysExample
);
if
(!
CollectionUtils
.
isEmpty
(
userKeysList
)
&&
userKeysList
.
size
()
>=
5
)
{
if
(!
CollectionUtils
.
isEmpty
(
userKeysList
)
&&
userKeysList
.
size
()
>=
5
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_apikey_limit"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"user_apikey_limit"
));
}
}
UserKey
userKeys
=
new
UserKey
();
UserKey
userKeys
=
new
UserKey
();
...
...
backend/src/main/java/io/dataease/service/UserService.java
浏览文件 @
fa58f026
...
@@ -7,7 +7,7 @@ import io.dataease.base.mapper.ext.ExtUserRoleMapper;
...
@@ -7,7 +7,7 @@ import io.dataease.base.mapper.ext.ExtUserRoleMapper;
import
io.dataease.commons.constants.RoleConstants
;
import
io.dataease.commons.constants.RoleConstants
;
import
io.dataease.commons.constants.UserSource
;
import
io.dataease.commons.constants.UserSource
;
import
io.dataease.commons.constants.UserStatus
;
import
io.dataease.commons.constants.UserStatus
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
io.dataease.commons.user.SessionUser
;
import
io.dataease.commons.user.SessionUser
;
import
io.dataease.commons.utils.CodingUtil
;
import
io.dataease.commons.utils.CodingUtil
;
import
io.dataease.commons.utils.CommonBeanFactory
;
import
io.dataease.commons.utils.CommonBeanFactory
;
...
@@ -69,7 +69,7 @@ public class UserService {
...
@@ -69,7 +69,7 @@ public class UserService {
String
id
=
user
.
getId
();
String
id
=
user
.
getId
();
User
user1
=
userMapper
.
selectByPrimaryKey
(
id
);
User
user1
=
userMapper
.
selectByPrimaryKey
(
id
);
if
(
user1
!=
null
)
{
if
(
user1
!=
null
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_id_already_exists"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"user_id_already_exists"
));
}
else
{
}
else
{
createUser
(
user
);
createUser
(
user
);
}
}
...
@@ -130,15 +130,15 @@ public class UserService {
...
@@ -130,15 +130,15 @@ public class UserService {
private
void
checkUserParam
(
User
user
)
{
private
void
checkUserParam
(
User
user
)
{
if
(
StringUtils
.
isBlank
(
user
.
getId
()))
{
if
(
StringUtils
.
isBlank
(
user
.
getId
()))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_id_is_null"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"user_id_is_null"
));
}
}
if
(
StringUtils
.
isBlank
(
user
.
getName
()))
{
if
(
StringUtils
.
isBlank
(
user
.
getName
()))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_name_is_null"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"user_name_is_null"
));
}
}
if
(
StringUtils
.
isBlank
(
user
.
getEmail
()))
{
if
(
StringUtils
.
isBlank
(
user
.
getEmail
()))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_email_is_null"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"user_email_is_null"
));
}
}
// password
// password
}
}
...
@@ -182,7 +182,7 @@ public class UserService {
...
@@ -182,7 +182,7 @@ public class UserService {
criteria
.
andEmailEqualTo
(
email
);
criteria
.
andEmailEqualTo
(
email
);
List
<
User
>
userList
=
userMapper
.
selectByExample
(
userExample
);
List
<
User
>
userList
=
userMapper
.
selectByExample
(
userExample
);
if
(!
CollectionUtils
.
isEmpty
(
userList
))
{
if
(!
CollectionUtils
.
isEmpty
(
userList
))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_email_already_exists"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"user_email_already_exists"
));
}
}
}
}
...
@@ -267,7 +267,7 @@ public class UserService {
...
@@ -267,7 +267,7 @@ public class UserService {
public
void
deleteUser
(
String
userId
)
{
public
void
deleteUser
(
String
userId
)
{
SessionUser
user
=
SessionUtils
.
getUser
();
SessionUser
user
=
SessionUtils
.
getUser
();
if
(
StringUtils
.
equals
(
user
.
getId
(),
userId
))
{
if
(
StringUtils
.
equals
(
user
.
getId
(),
userId
))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"cannot_delete_current_user"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"cannot_delete_current_user"
));
}
}
UserRoleExample
example
=
new
UserRoleExample
();
UserRoleExample
example
=
new
UserRoleExample
();
...
@@ -303,7 +303,7 @@ public class UserService {
...
@@ -303,7 +303,7 @@ public class UserService {
criteria
.
andEmailEqualTo
(
user
.
getEmail
());
criteria
.
andEmailEqualTo
(
user
.
getEmail
());
criteria
.
andIdNotEqualTo
(
user
.
getId
());
criteria
.
andIdNotEqualTo
(
user
.
getId
());
if
(
userMapper
.
countByExample
(
example
)
>
0
)
{
if
(
userMapper
.
countByExample
(
example
)
>
0
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_email_already_exists"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"user_email_already_exists"
));
}
}
user
.
setUpdateTime
(
System
.
currentTimeMillis
());
user
.
setUpdateTime
(
System
.
currentTimeMillis
());
...
@@ -318,7 +318,7 @@ public class UserService {
...
@@ -318,7 +318,7 @@ public class UserService {
criteria
.
andEmailEqualTo
(
user
.
getEmail
());
criteria
.
andEmailEqualTo
(
user
.
getEmail
());
criteria
.
andIdNotEqualTo
(
user
.
getId
());
criteria
.
andIdNotEqualTo
(
user
.
getId
());
if
(
userMapper
.
countByExample
(
example
)
>
0
)
{
if
(
userMapper
.
countByExample
(
example
)
>
0
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_email_already_exists"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"user_email_already_exists"
));
}
}
}
}
user
.
setPassword
(
null
);
user
.
setPassword
(
null
);
...
@@ -371,7 +371,7 @@ public class UserService {
...
@@ -371,7 +371,7 @@ public class UserService {
userRoleExample
.
createCriteria
().
andUserIdEqualTo
(
userId
).
andSourceIdEqualTo
(
request
.
getWorkspaceId
());
userRoleExample
.
createCriteria
().
andUserIdEqualTo
(
userId
).
andSourceIdEqualTo
(
request
.
getWorkspaceId
());
List
<
UserRole
>
userRoles
=
userRoleMapper
.
selectByExample
(
userRoleExample
);
List
<
UserRole
>
userRoles
=
userRoleMapper
.
selectByExample
(
userRoleExample
);
if
(
userRoles
.
size
()
>
0
)
{
if
(
userRoles
.
size
()
>
0
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_already_exists"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"user_already_exists"
));
}
else
{
}
else
{
for
(
String
roleId
:
request
.
getRoleIds
())
{
for
(
String
roleId
:
request
.
getRoleIds
())
{
UserRole
userRole
=
new
UserRole
();
UserRole
userRole
=
new
UserRole
();
...
@@ -410,7 +410,7 @@ public class UserService {
...
@@ -410,7 +410,7 @@ public class UserService {
userRoleExample
.
createCriteria
().
andUserIdEqualTo
(
userId
).
andSourceIdEqualTo
(
request
.
getOrganizationId
());
userRoleExample
.
createCriteria
().
andUserIdEqualTo
(
userId
).
andSourceIdEqualTo
(
request
.
getOrganizationId
());
List
<
UserRole
>
userRoles
=
userRoleMapper
.
selectByExample
(
userRoleExample
);
List
<
UserRole
>
userRoles
=
userRoleMapper
.
selectByExample
(
userRoleExample
);
if
(
userRoles
.
size
()
>
0
)
{
if
(
userRoles
.
size
()
>
0
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_already_exists"
)
+
": "
+
userId
);
DE
Exception
.
throwException
(
Translator
.
get
(
"user_already_exists"
)
+
": "
+
userId
);
}
else
{
}
else
{
for
(
String
roleId
:
request
.
getRoleIds
())
{
for
(
String
roleId
:
request
.
getRoleIds
())
{
UserRole
userRole
=
new
UserRole
();
UserRole
userRole
=
new
UserRole
();
...
@@ -451,10 +451,10 @@ public class UserService {
...
@@ -451,10 +451,10 @@ public class UserService {
public
boolean
checkUserPassword
(
String
userId
,
String
password
)
{
public
boolean
checkUserPassword
(
String
userId
,
String
password
)
{
if
(
StringUtils
.
isBlank
(
userId
))
{
if
(
StringUtils
.
isBlank
(
userId
))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"user_name_is_null"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"user_name_is_null"
));
}
}
if
(
StringUtils
.
isBlank
(
password
))
{
if
(
StringUtils
.
isBlank
(
password
))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"password_is_null"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"password_is_null"
));
}
}
UserExample
example
=
new
UserExample
();
UserExample
example
=
new
UserExample
();
example
.
createCriteria
().
andIdEqualTo
(
userId
).
andPasswordEqualTo
(
CodingUtil
.
md5
(
password
));
example
.
createCriteria
().
andIdEqualTo
(
userId
).
andPasswordEqualTo
(
CodingUtil
.
md5
(
password
));
...
@@ -511,7 +511,7 @@ public class UserService {
...
@@ -511,7 +511,7 @@ public class UserService {
user
.
setUpdateTime
(
System
.
currentTimeMillis
());
user
.
setUpdateTime
(
System
.
currentTimeMillis
());
return
user
;
return
user
;
}
}
MS
Exception
.
throwException
(
Translator
.
get
(
"password_modification_failed"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"password_modification_failed"
));
return
null
;
return
null
;
}
}
...
...
backend/src/main/java/io/dataease/service/WorkspaceService.java
浏览文件 @
fa58f026
...
@@ -9,7 +9,7 @@ import io.dataease.base.mapper.ext.ExtOrganizationMapper;
...
@@ -9,7 +9,7 @@ import io.dataease.base.mapper.ext.ExtOrganizationMapper;
import
io.dataease.base.mapper.ext.ExtUserRoleMapper
;
import
io.dataease.base.mapper.ext.ExtUserRoleMapper
;
import
io.dataease.base.mapper.ext.ExtWorkspaceMapper
;
import
io.dataease.base.mapper.ext.ExtWorkspaceMapper
;
import
io.dataease.commons.constants.RoleConstants
;
import
io.dataease.commons.constants.RoleConstants
;
import
io.dataease.commons.exception.
MS
Exception
;
import
io.dataease.commons.exception.
DE
Exception
;
import
io.dataease.commons.user.SessionUser
;
import
io.dataease.commons.user.SessionUser
;
import
io.dataease.commons.utils.SessionUtils
;
import
io.dataease.commons.utils.SessionUtils
;
import
io.dataease.controller.request.WorkspaceRequest
;
import
io.dataease.controller.request.WorkspaceRequest
;
...
@@ -51,7 +51,7 @@ public class WorkspaceService {
...
@@ -51,7 +51,7 @@ public class WorkspaceService {
public
Workspace
saveWorkspace
(
Workspace
workspace
)
{
public
Workspace
saveWorkspace
(
Workspace
workspace
)
{
if
(
StringUtils
.
isBlank
(
workspace
.
getName
()))
{
if
(
StringUtils
.
isBlank
(
workspace
.
getName
()))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"workspace_name_is_null"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"workspace_name_is_null"
));
}
}
// set organization id
// set organization id
String
currentOrgId
=
SessionUtils
.
getCurrentOrganizationId
();
String
currentOrgId
=
SessionUtils
.
getCurrentOrganizationId
();
...
@@ -128,7 +128,7 @@ public class WorkspaceService {
...
@@ -128,7 +128,7 @@ public class WorkspaceService {
.
andOrganizationIdIn
(
orgIds
)
.
andOrganizationIdIn
(
orgIds
)
.
andIdEqualTo
(
workspaceId
);
.
andIdEqualTo
(
workspaceId
);
if
(
workspaceMapper
.
countByExample
(
example
)
==
0
)
{
if
(
workspaceMapper
.
countByExample
(
example
)
==
0
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"workspace_does_not_belong_to_user"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"workspace_does_not_belong_to_user"
));
}
}
}
}
...
@@ -154,7 +154,7 @@ public class WorkspaceService {
...
@@ -154,7 +154,7 @@ public class WorkspaceService {
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
boolean
contains
=
wsIds
.
contains
(
workspaceId
);
boolean
contains
=
wsIds
.
contains
(
workspaceId
);
if
(
size
==
0
&&
!
contains
)
{
if
(
size
==
0
&&
!
contains
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"workspace_does_not_belong_to_user"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"workspace_does_not_belong_to_user"
));
}
}
}
}
...
@@ -162,7 +162,7 @@ public class WorkspaceService {
...
@@ -162,7 +162,7 @@ public class WorkspaceService {
WorkspaceExample
example
=
new
WorkspaceExample
();
WorkspaceExample
example
=
new
WorkspaceExample
();
example
.
createCriteria
().
andIdEqualTo
(
workspaceId
);
example
.
createCriteria
().
andIdEqualTo
(
workspaceId
);
if
(
workspaceMapper
.
countByExample
(
example
)
==
0
)
{
if
(
workspaceMapper
.
countByExample
(
example
)
==
0
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"workspace_not_exists"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"workspace_not_exists"
));
}
}
}
}
...
@@ -257,10 +257,10 @@ public class WorkspaceService {
...
@@ -257,10 +257,10 @@ public class WorkspaceService {
private
void
checkWorkspace
(
Workspace
workspace
)
{
private
void
checkWorkspace
(
Workspace
workspace
)
{
if
(
StringUtils
.
isBlank
(
workspace
.
getName
()))
{
if
(
StringUtils
.
isBlank
(
workspace
.
getName
()))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"workspace_name_is_null"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"workspace_name_is_null"
));
}
}
if
(
StringUtils
.
isBlank
(
workspace
.
getOrganizationId
()))
{
if
(
StringUtils
.
isBlank
(
workspace
.
getOrganizationId
()))
{
MS
Exception
.
throwException
(
Translator
.
get
(
"organization_id_is_null"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"organization_id_is_null"
));
}
}
WorkspaceExample
example
=
new
WorkspaceExample
();
WorkspaceExample
example
=
new
WorkspaceExample
();
...
@@ -272,7 +272,7 @@ public class WorkspaceService {
...
@@ -272,7 +272,7 @@ public class WorkspaceService {
}
}
if
(
workspaceMapper
.
countByExample
(
example
)
>
0
)
{
if
(
workspaceMapper
.
countByExample
(
example
)
>
0
)
{
MS
Exception
.
throwException
(
Translator
.
get
(
"workspace_name_already_exists"
));
DE
Exception
.
throwException
(
Translator
.
get
(
"workspace_name_already_exists"
));
}
}
}
}
...
...
backend/src/main/java/io/dataease/service/sys/DeptService.java
0 → 100644
浏览文件 @
fa58f026
package
io
.
dataease
.
service
.
sys
;
import
io.dataease.base.domain.SysDept
;
import
io.dataease.base.domain.SysDeptExample
;
import
io.dataease.base.mapper.SysDeptMapper
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
@Service
public
class
DeptService
{
private
final
static
Integer
DEPT_ROOT_LEVEL
=
0
;
@Resource
private
SysDeptMapper
sysDeptMapper
;
public
List
<
SysDept
>
root
(){
SysDeptExample
example
=
new
SysDeptExample
();
example
.
createCriteria
().
andLevelEqualTo
(
DEPT_ROOT_LEVEL
);
example
.
setOrderByClause
(
"dept_sort"
);
List
<
SysDept
>
sysDepts
=
sysDeptMapper
.
selectByExample
(
example
);
return
sysDepts
;
}
public
boolean
add
(
SysDept
sysDept
){
if
(
ObjectUtils
.
isEmpty
(
sysDept
.
getLevel
())){
sysDept
.
setLevel
(
DEPT_ROOT_LEVEL
);
}
Date
now
=
new
Date
();
sysDept
.
setCreateTime
(
now
);
sysDept
.
setUpdateTime
(
now
);
sysDept
.
setCreateBy
(
null
);
sysDept
.
setUpdateBy
(
null
);
try
{
int
insert
=
sysDeptMapper
.
insert
(
sysDept
);
if
(
insert
==
1
){
return
true
;
}
}
catch
(
Exception
e
){
return
false
;
}
return
false
;
}
}
backend/src/main/resources/db/migration/V2__metersphere_ddl.sql
浏览文件 @
fa58f026
...
@@ -334,5 +334,25 @@ CREATE TABLE IF NOT EXISTS `test_case_report` (
...
@@ -334,5 +334,25 @@ CREATE TABLE IF NOT EXISTS `test_case_report` (
-- track end
-- track end
-- dataset start
CREATE
TABLE
IF
NOT
EXISTS
`dataset_group`
(
`id`
varchar
(
50
)
NOT
NULL
COMMENT
'ID'
,
`name`
varchar
(
64
)
NOT
NULL
COMMENT
'名称'
,
`pid`
varchar
(
50
)
COMMENT
'父级ID'
,
`level`
int
(
10
)
COMMENT
'当前分组处于第几级'
,
`create_by`
varchar
(
50
)
COMMENT
'创建人ID'
,
`create_time`
bigint
(
13
)
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
CREATE
TABLE
IF
NOT
EXISTS
`dataset_scene`
(
`id`
varchar
(
50
)
NOT
NULL
COMMENT
'ID'
,
`name`
varchar
(
64
)
NOT
NULL
COMMENT
'名称'
,
`group_id`
varchar
(
50
)
COMMENT
'DataSet Group ID'
,
`create_by`
varchar
(
50
)
COMMENT
'创建人ID'
,
`create_time`
bigint
(
13
)
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
-- dataset end
frontend/src/business/App.vue
浏览文件 @
fa58f026
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
import
MsTopMenus
from
"./components/common/head/HeaderTopMenus"
;
import
MsTopMenus
from
"./components/common/head/HeaderTopMenus"
;
import
MsView
from
"./components/common/router/View"
;
import
MsView
from
"./components/common/router/View"
;
import
MsUser
from
"./components/common/head/HeaderUser"
;
import
MsUser
from
"./components/common/head/HeaderUser"
;
import
MsHeaderOrgWs
from
"./components/common/head/HeaderOrgWs"
;
//
import MsHeaderOrgWs from "./components/common/head/HeaderOrgWs";
import
MsLanguageSwitch
from
"./components/common/head/LanguageSwitch"
;
import
MsLanguageSwitch
from
"./components/common/head/LanguageSwitch"
;
import
{
saveLocalStorage
}
from
"@/common/js/utils"
;
import
{
saveLocalStorage
}
from
"@/common/js/utils"
;
...
@@ -80,7 +80,7 @@ export default {
...
@@ -80,7 +80,7 @@ export default {
MsUser
,
MsUser
,
MsView
,
MsView
,
MsTopMenus
,
MsTopMenus
,
MsHeaderOrgWs
,
//
MsHeaderOrgWs,
"LicenseMessage"
:
header
.
default
"LicenseMessage"
:
header
.
default
}
}
}
}
...
...
frontend/src/business/components/common/components/MsDialogFooter.vue
浏览文件 @
fa58f026
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
<div
class=
"dialog-footer"
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
{{
$t
(
'commons.cancel'
)
}}
</el-button>
<el-button
@
click=
"cancel"
>
{{
$t
(
'commons.cancel'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"confirm"
@
keydown
.
enter
.
native
.
prevent
>
{{
$t
(
'commons.confirm'
)
}}
</el-button>
<el-button
type=
"warning"
v-if=
"isShowValidate"
@
click=
"validate"
@
keydown
.
enter
.
native
.
prevent
>
{{
$t
(
'commons.validate'
)
}}
</el-button>
<el-button
type=
"primary"
:disabled=
"disabled"
@
click=
"confirm"
@
keydown
.
enter
.
native
.
prevent
>
{{
$t
(
'commons.confirm'
)
}}
</el-button>
<el-button
type=
"primary"
v-if=
"isShow"
@
click=
"saveAsEdit"
@
keydown
.
enter
.
native
.
prevent
>
{{
title
}}
</el-button>
<el-button
type=
"primary"
v-if=
"isShow"
@
click=
"saveAsEdit"
@
keydown
.
enter
.
native
.
prevent
>
{{
title
}}
</el-button>
</div>
</div>
...
@@ -16,12 +17,23 @@
...
@@ -16,12 +17,23 @@
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
},
},
isShowValidate
:
{
type
:
Boolean
,
default
:
false
,
},
disabled
:
{
type
:
Boolean
,
default
:
false
,
},
title
:
String
,
title
:
String
,
},
},
methods
:
{
methods
:
{
cancel
()
{
cancel
()
{
this
.
$emit
(
"cancel"
);
this
.
$emit
(
"cancel"
);
},
},
validate
()
{
this
.
$emit
(
"validate"
);
},
confirm
()
{
confirm
()
{
this
.
$emit
(
"confirm"
);
this
.
$emit
(
"confirm"
);
},
},
...
...
frontend/src/business/components/common/head/AboutUs.vue
浏览文件 @
fa58f026
...
@@ -57,9 +57,10 @@
...
@@ -57,9 +57,10 @@
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
;
},
},
getVersion
()
{
getVersion
()
{
this
.
$get
(
'/system/version'
,
response
=>
{
// this.$get('/system/version', response => {
this
.
version
=
response
.
data
;
// this.version = response.data;
});
// });
this
.
version
=
"1.0"
}
}
}
}
}
}
...
...
frontend/src/business/components/common/head/HeaderTopMenus.vue
浏览文件 @
fa58f026
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
<el-menu-item
index=
"/api"
@
click=
"active()"
v-permission=
"['test_manager','test_user','test_viewer']"
>
<el-menu-item
index=
"/api"
@
click=
"active()"
v-permission=
"['test_manager','test_user','test_viewer']"
>
{{
$t
(
'commons.api'
)
}}
{{
$t
(
'commons.api'
)
}}
</el-menu-item>
</el-menu-item>
<el-menu-item
index=
"/
performance
"
onselectstart=
"return false"
<el-menu-item
index=
"/
dataset
"
onselectstart=
"return false"
v-permission=
"['test_manager','test_user','test_viewer']"
>
v-permission=
"['test_manager','test_user','test_viewer']"
>
{{
$t
(
'commons.
performance
'
)
}}
{{
$t
(
'commons.
dataset
'
)
}}
</el-menu-item>
</el-menu-item>
<el-menu-item
index=
"/setting"
onselectstart=
"return false"
>
<el-menu-item
index=
"/setting"
onselectstart=
"return false"
>
{{
$t
(
'commons.system_setting'
)
}}
{{
$t
(
'commons.system_setting'
)
}}
...
...
frontend/src/business/components/common/router/router.js
浏览文件 @
fa58f026
...
@@ -3,7 +3,8 @@ import VueRouter from 'vue-router'
...
@@ -3,7 +3,8 @@ import VueRouter from 'vue-router'
import
RouterSidebar
from
"./RouterSidebar"
;
import
RouterSidebar
from
"./RouterSidebar"
;
import
Setting
from
"@/business/components/settings/router"
;
import
Setting
from
"@/business/components/settings/router"
;
import
API
from
"@/business/components/api/router"
;
import
API
from
"@/business/components/api/router"
;
import
Performance
from
"@/business/components/performance/router"
;
// import Performance from "@/business/components/performance/router";
import
DataSet
from
"@/business/components/dataset/router"
;
import
Track
from
"@/business/components/track/router"
;
import
Track
from
"@/business/components/track/router"
;
Vue
.
use
(
VueRouter
);
Vue
.
use
(
VueRouter
);
...
@@ -19,7 +20,8 @@ const router = new VueRouter({
...
@@ -19,7 +20,8 @@ const router = new VueRouter({
},
},
Setting
,
Setting
,
API
,
API
,
Performance
,
// Performance,
DataSet
,
Track
,
Track
,
]
]
});
});
...
...
frontend/src/business/components/dataset/DataSet.vue
0 → 100644
浏览文件 @
fa58f026
<
template
>
<ms-container>
<ms-aside-container>
<group/>
</ms-aside-container>
<ms-main-container>
<keep-alive>
<router-view/>
</keep-alive>
</ms-main-container>
</ms-container>
</
template
>
<
script
>
import
MsMainContainer
from
"../common/components/MsMainContainer"
;
import
MsContainer
from
"../common/components/MsContainer"
;
import
MsAsideContainer
from
"../common/components/MsAsideContainer"
;
import
MsSettingMenu
from
"../settings/SettingMenu"
;
import
MsCurrentUser
from
"../settings/CurrentUser"
;
import
Group
from
"./group/Group"
;
export
default
{
name
:
"DataSet"
,
components
:
{
MsMainContainer
,
MsContainer
,
MsAsideContainer
,
MsSettingMenu
,
MsCurrentUser
,
Group
},
data
()
{
return
{}
}
}
</
script
>
<
style
scoped
>
.ms-aside-container
{
height
:
calc
(
100vh
-
40px
);
padding
:
20px
;
min-width
:
260px
;
max-width
:
460px
;
}
.ms-main-container
{
height
:
calc
(
100vh
-
40px
);
}
</
style
>
frontend/src/business/components/dataset/group/Group.vue
0 → 100644
浏览文件 @
fa58f026
<
template
xmlns:el-col=
"http://www.w3.org/1999/html"
>
<el-col>
<span>
{{
$t
(
'dataset.datalist'
)
}}
</span>
<el-divider/>
<el-row>
<el-button
icon=
"el-icon-circle-plus"
type=
"primary"
size=
"mini"
@
click=
"addGroup"
>
{{
$t
(
'dataset.add_group'
)
}}
</el-button>
<el-button
icon=
"el-icon-document"
type=
"primary"
size=
"mini"
@
click=
"addScene"
>
{{
$t
(
'dataset.add_scene'
)
}}
</el-button>
</el-row>
<el-row
style=
"margin: 12px 0"
>
<el-input
size=
"mini"
placeholder=
"Search"
prefix-icon=
"el-icon-search"
v-model=
"search"
clearable
>
</el-input>
</el-row>
<el-col
class=
"custom-tree-container"
>
<div
class=
"block"
>
<el-tree
:data=
"data"
node-key=
"id"
:expand-on-click-node=
"true"
@
node-click=
"nodeClick"
>
<span
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<span>
<span
v-if=
"data.show"
>
<el-button
icon=
"el-icon-document"
type=
"text"
size=
"mini"
>
</el-button>
</span>
<span>
{{
data
.
label
}}
</span>
</span>
<span>
<el-button
icon=
"el-icon-plus"
type=
"text"
size=
"mini"
@
click
.
stop=
"() => append(data)"
>
</el-button>
<el-button
icon=
"el-icon-more"
type=
"text"
size=
"mini"
@
click
.
stop=
"() => remove(node, data)"
>
</el-button>
</span>
</span>
</el-tree>
</div>
</el-col>
</el-col>
</
template
>
<
script
>
let
id
=
1000
;
export
default
{
name
:
"Group"
,
data
()
{
const
data
=
[{
id
:
1
,
label
:
'一级 1'
,
children
:
[{
id
:
4
,
label
:
'二级 1-1'
,
children
:
[{
id
:
9
,
label
:
'三级 1-1-1'
},
{
id
:
10
,
label
:
'三级 1-1-2'
}]
}]
},
{
id
:
2
,
label
:
'一级 2'
,
children
:
[{
id
:
5
,
label
:
'二级 2-1'
},
{
id
:
6
,
label
:
'二级 2-2'
}]
},
{
id
:
3
,
label
:
'一级 3'
,
children
:
[{
id
:
7
,
label
:
'二级 3-1'
},
{
id
:
8
,
label
:
'二级 3-2'
}]
}];
return
{
search
:
''
,
data
:
JSON
.
parse
(
JSON
.
stringify
(
data
))
}
},
mounted
()
{
},
activated
()
{
},
methods
:
{
addGroup
()
{
this
.
$message
(
{
message
:
'添加分组'
,
type
:
'success'
}
);
},
addScene
()
{
this
.
$message
(
{
message
:
'添加场景'
,
type
:
'success'
}
)
},
nodeClick
(
data
,
node
){
console
.
log
(
data
);
console
.
log
(
node
);
},
append
(
data
)
{
const
newChild
=
{
id
:
id
++
,
label
:
'testtest'
,
children
:
[],
show
:
true
};
if
(
!
data
.
children
)
{
this
.
$set
(
data
,
'children'
,
[]);
}
data
.
children
.
push
(
newChild
);
},
remove
(
node
,
data
)
{
const
parent
=
node
.
parent
;
const
children
=
parent
.
data
.
children
||
parent
.
data
;
const
index
=
children
.
findIndex
(
d
=>
d
.
id
===
data
.
id
);
children
.
splice
(
index
,
1
);
},
}
}
</
script
>
<
style
scoped
>
.el-divider--horizontal
{
margin
:
12px
0
}
.search-input
{
padding
:
12px
0
;
}
.custom-tree-node
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding-right
:
8px
;
}
</
style
>
frontend/src/business/components/dataset/router.js
0 → 100644
浏览文件 @
fa58f026
const
DataSet
=
()
=>
import
(
'@/business/components/dataset/DataSet'
);
// const PerformanceTestHome = () => import('@/business/components/performance/home/PerformanceTestHome')
// const EditPerformanceTest = () => import('@/business/components/performance/test/EditPerformanceTest')
// const PerformanceTestList = () => import('@/business/components/performance/test/PerformanceTestList')
// const PerformanceTestReport = () => import('@/business/components/performance/report/PerformanceTestReport')
// const PerformanceChart = () => import('@/business/components/performance/report/components/PerformanceChart')
// const PerformanceReportView = () => import('@/business/components/performance/report/PerformanceReportView')
export
default
{
path
:
"/dataset"
,
name
:
"dataset"
,
// redirect: "/dataset/home",
components
:
{
content
:
DataSet
},
children
:
[
// {
// path: 'home',
// name: 'datasetHome',
// component: PerformanceTestHome,
// },
// {
// path: 'test/create',
// name: "createPerTest",
// component: EditPerformanceTest,
// },
// {
// path: "test/edit/:testId",
// name: "editPerTest",
// component: EditPerformanceTest,
// props: {
// content: (route) => {
// return {
// ...route.params
// }
// }
// }
// },
// {
// path: "test/:projectId",
// name: "perPlan",
// component: PerformanceTestList
// },
// {
// path: "project/:type",
// name: "perProject",
// component: MsProject
// },
// {
// path: "report/:type",
// name: "perReport",
// component: PerformanceTestReport
// },
// {
// path: "chart",
// name: "perChart",
// component: PerformanceChart
// },
// {
// path: "report/view/:reportId",
// name: "perReportView",
// component: PerformanceReportView
// }
]
}
frontend/src/business/components/settings/SettingMenu.vue
浏览文件 @
fa58f026
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
</el-menu-item>
</el-menu-item>
</el-submenu>
</el-submenu>
<el-submenu
index=
"2"
v-permission=
"['org_admin']"
v-if=
"isCurrentOrganizationAdmin"
>
<
!-- <
el-submenu index="2" v-permission="['org_admin']" v-if="isCurrentOrganizationAdmin">
<template v-slot:title>
<template v-slot:title>
<font-awesome-icon class="icon organization" :icon="['far', 'building']" size="lg"/>
<font-awesome-icon class="icon organization" :icon="['far', 'building']" size="lg"/>
<span>{{ $t('commons.organization') }}</span>
<span>{{ $t('commons.organization') }}</span>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<font-awesome-icon class="icon" :icon="['fa', 'bars']" size="lg"/>
<font-awesome-icon class="icon" :icon="['fa', 'bars']" size="lg"/>
<span>{{ $t(menu.title) }}</span>
<span>{{ $t(menu.title) }}</span>
</template>
</template>
</el-menu-item>
</el-menu-item>
-->
<el-submenu
index=
"4"
>
<el-submenu
index=
"4"
>
<
template
v-slot:title
>
<
template
v-slot:title
>
...
...
frontend/src/business/components/settings/router.js
浏览文件 @
fa58f026
...
@@ -22,21 +22,21 @@ export default {
...
@@ -22,21 +22,21 @@ export default {
component
:
()
=>
import
(
'@/business/components/settings/system/Organization'
),
component
:
()
=>
import
(
'@/business/components/settings/system/Organization'
),
meta
:
{
system
:
true
,
title
:
'commons.organization'
}
meta
:
{
system
:
true
,
title
:
'commons.organization'
}
},
},
{
//
{
path
:
'systemworkspace'
,
//
path: 'systemworkspace',
component
:
()
=>
import
(
'@/business/components/settings/system/SystemWorkspace'
),
//
component: () => import('@/business/components/settings/system/SystemWorkspace'),
meta
:
{
system
:
true
,
title
:
'commons.workspace'
}
//
meta: {system: true, title: 'commons.workspace'}
},
//
},
{
//
{
path
:
'testresourcepool'
,
//
path: 'testresourcepool',
component
:
()
=>
import
(
'@/business/components/settings/system/TestResourcePool'
),
//
component: () => import('@/business/components/settings/system/TestResourcePool'),
meta
:
{
system
:
true
,
title
:
'commons.test_resource_pool'
}
//
meta: {system: true, title: 'commons.test_resource_pool'}
},
//
},
{
//
{
path
:
'systemparametersetting'
,
//
path: 'systemparametersetting',
component
:
()
=>
import
(
'@/business/components/settings/system/SystemParameterSetting'
),
//
component: () => import('@/business/components/settings/system/SystemParameterSetting'),
meta
:
{
system
:
true
,
title
:
'commons.system_parameter_setting'
}
//
meta: {system: true, title: 'commons.system_parameter_setting'}
},
//
},
...
requireContext
.
keys
().
map
(
key
=>
requireContext
(
key
).
system
),
...
requireContext
.
keys
().
map
(
key
=>
requireContext
(
key
).
system
),
...
requireContext
.
keys
().
map
(
key
=>
requireContext
(
key
).
license
),
...
requireContext
.
keys
().
map
(
key
=>
requireContext
(
key
).
license
),
{
{
...
...
frontend/src/business/components/settings/system/Datasource.vue
浏览文件 @
fa58f026
差异被折叠。
点击展开。
frontend/src/i18n/en-US.js
浏览文件 @
fa58f026
...
@@ -60,7 +60,7 @@ export default {
...
@@ -60,7 +60,7 @@ export default {
test_resource_pool
:
'Resource Pool'
,
test_resource_pool
:
'Resource Pool'
,
system_setting
:
'Settings'
,
system_setting
:
'Settings'
,
api
:
'API'
,
api
:
'API'
,
performance
:
'Performance
'
,
dataset
:
'DataSet
'
,
functional
:
'Functional test'
,
functional
:
'Functional test'
,
input_content
:
'Please enter content'
,
input_content
:
'Please enter content'
,
create
:
'Create'
,
create
:
'Create'
,
...
@@ -1518,5 +1518,10 @@ export default {
...
@@ -1518,5 +1518,10 @@ export default {
delete_prompt
:
'This operation will delete the authentication source, do you want to continue? '
,
delete_prompt
:
'This operation will delete the authentication source, do you want to continue? '
,
title
:
'Auth Source'
,
title
:
'Auth Source'
,
auth_name_valid
:
'Name does not support special characters'
,
auth_name_valid
:
'Name does not support special characters'
,
},
dataset
:{
datalist
:
'Data List'
,
add_group
:
'Add Group'
,
add_scene
:
'Add Scene'
}
}
};
};
frontend/src/i18n/zh-TW.js
浏览文件 @
fa58f026
...
@@ -61,7 +61,7 @@ export default {
...
@@ -61,7 +61,7 @@ export default {
test_resource_pool
:
'測試資源池'
,
test_resource_pool
:
'測試資源池'
,
system_setting
:
'系統設置'
,
system_setting
:
'系統設置'
,
api
:
'接口測試'
,
api
:
'接口測試'
,
performance
:
'性能測試
'
,
dataset
:
'數據
'
,
functional
:
'功能測試'
,
functional
:
'功能測試'
,
input_content
:
'請輸入內容'
,
input_content
:
'請輸入內容'
,
create
:
'新建'
,
create
:
'新建'
,
...
@@ -1519,5 +1519,10 @@ export default {
...
@@ -1519,5 +1519,10 @@ export default {
delete_prompt
:
'此操作會刪除認證源,是否繼續? '
,
delete_prompt
:
'此操作會刪除認證源,是否繼續? '
,
title
:
'認證設置'
,
title
:
'認證設置'
,
auth_name_valid
:
'名稱不支持特殊字符'
,
auth_name_valid
:
'名稱不支持特殊字符'
,
},
dataset
:{
datalist
:
'數據列表'
,
add_group
:
'添加分組'
,
add_scene
:
'添加場景'
}
}
};
};
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论