Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
4896115c1c
|
@ -22,5 +22,7 @@ public class LoadTest implements Serializable {
|
|||
|
||||
private String testResourcePoolId;
|
||||
|
||||
private String user;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -643,6 +643,76 @@ public class LoadTestExample {
|
|||
addCriterion("test_resource_pool_id not between", value1, value2, "testResourcePoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIsNull() {
|
||||
addCriterion("user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIsNotNull() {
|
||||
addCriterion("user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserEqualTo(String value) {
|
||||
addCriterion("user =", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotEqualTo(String value) {
|
||||
addCriterion("user <>", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserGreaterThan(String value) {
|
||||
addCriterion("user >", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("user >=", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLessThan(String value) {
|
||||
addCriterion("user <", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("user <=", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLike(String value) {
|
||||
addCriterion("user like", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotLike(String value) {
|
||||
addCriterion("user not like", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIn(List<String> values) {
|
||||
addCriterion("user in", values, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotIn(List<String> values) {
|
||||
addCriterion("user not in", values, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserBetween(String value1, String value2) {
|
||||
addCriterion("user between", value1, value2, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotBetween(String value1, String value2) {
|
||||
addCriterion("user not between", value1, value2, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -18,6 +18,8 @@ public class LoadTestReport implements Serializable {
|
|||
|
||||
private String status;
|
||||
|
||||
private String user;
|
||||
|
||||
private String description;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -503,6 +503,76 @@ public class LoadTestReportExample {
|
|||
addCriterion("status not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIsNull() {
|
||||
addCriterion("user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIsNotNull() {
|
||||
addCriterion("user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserEqualTo(String value) {
|
||||
addCriterion("user =", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotEqualTo(String value) {
|
||||
addCriterion("user <>", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserGreaterThan(String value) {
|
||||
addCriterion("user >", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("user >=", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLessThan(String value) {
|
||||
addCriterion("user <", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("user <=", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserLike(String value) {
|
||||
addCriterion("user like", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotLike(String value) {
|
||||
addCriterion("user not like", value, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserIn(List<String> values) {
|
||||
addCriterion("user in", values, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotIn(List<String> values) {
|
||||
addCriterion("user not in", values, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserBetween(String value1, String value2) {
|
||||
addCriterion("user between", value1, value2, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNotBetween(String value1, String value2) {
|
||||
addCriterion("user not between", value1, value2, "user");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="test_resource_pool_id" jdbcType="VARCHAR" property="testResourcePoolId" />
|
||||
<result column="user" jdbcType="VARCHAR" property="user"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.LoadTestWithBLOBs">
|
||||
<result column="load_configuration" jdbcType="LONGVARCHAR" property="loadConfiguration" />
|
||||
|
@ -75,7 +76,15 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, project_id, name, description, create_time, update_time, status, test_resource_pool_id
|
||||
id,
|
||||
project_id,
|
||||
name,
|
||||
description,
|
||||
create_time,
|
||||
update_time,
|
||||
status,
|
||||
test_resource_pool_id,
|
||||
user
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
load_configuration, advanced_configuration, schedule
|
||||
|
@ -129,16 +138,16 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.LoadTestWithBLOBs">
|
||||
insert into load_test (id, project_id, name,
|
||||
description, create_time, update_time,
|
||||
status, test_resource_pool_id, load_configuration,
|
||||
advanced_configuration, schedule
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{status,jdbcType=VARCHAR}, #{testResourcePoolId,jdbcType=VARCHAR}, #{loadConfiguration,jdbcType=LONGVARCHAR},
|
||||
#{advancedConfiguration,jdbcType=LONGVARCHAR}, #{schedule,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
insert into load_test (id, project_id, name,
|
||||
description, create_time, update_time,
|
||||
status, test_resource_pool_id, user,
|
||||
load_configuration, advanced_configuration,
|
||||
schedule)
|
||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{status,jdbcType=VARCHAR}, #{testResourcePoolId,jdbcType=VARCHAR}, #{user,jdbcType=VARCHAR},
|
||||
#{loadConfiguration,jdbcType=LONGVARCHAR}, #{advancedConfiguration,jdbcType=LONGVARCHAR},
|
||||
#{schedule,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.LoadTestWithBLOBs">
|
||||
insert into load_test
|
||||
|
@ -156,26 +165,29 @@
|
|||
description,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="testResourcePoolId != null">
|
||||
test_resource_pool_id,
|
||||
</if>
|
||||
<if test="loadConfiguration != null">
|
||||
load_configuration,
|
||||
</if>
|
||||
<if test="advancedConfiguration != null">
|
||||
advanced_configuration,
|
||||
</if>
|
||||
<if test="schedule != null">
|
||||
schedule,
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="testResourcePoolId != null">
|
||||
test_resource_pool_id,
|
||||
</if>
|
||||
<if test="user != null">
|
||||
user,
|
||||
</if>
|
||||
<if test="loadConfiguration != null">
|
||||
load_configuration,
|
||||
</if>
|
||||
<if test="advancedConfiguration != null">
|
||||
advanced_configuration,
|
||||
</if>
|
||||
<if test="schedule != null">
|
||||
schedule,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
@ -193,24 +205,27 @@
|
|||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="testResourcePoolId != null">
|
||||
#{testResourcePoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="loadConfiguration != null">
|
||||
#{loadConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="advancedConfiguration != null">
|
||||
#{advancedConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="schedule != null">
|
||||
#{schedule,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="testResourcePoolId != null">
|
||||
#{testResourcePoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="user != null">
|
||||
#{user,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="loadConfiguration != null">
|
||||
#{loadConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="advancedConfiguration != null">
|
||||
#{advancedConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="schedule != null">
|
||||
#{schedule,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.LoadTestExample" resultType="java.lang.Long">
|
||||
|
@ -235,34 +250,37 @@
|
|||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.testResourcePoolId != null">
|
||||
test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.loadConfiguration != null">
|
||||
load_configuration = #{record.loadConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.advancedConfiguration != null">
|
||||
advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.schedule != null">
|
||||
schedule = #{record.schedule,jdbcType=LONGVARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.testResourcePoolId != null">
|
||||
test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.user != null">
|
||||
user = #{record.user,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.loadConfiguration != null">
|
||||
load_configuration = #{record.loadConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.advancedConfiguration != null">
|
||||
advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.schedule != null">
|
||||
schedule = #{record.schedule,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update load_test
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
update load_test
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
|
@ -270,24 +288,26 @@
|
|||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR},
|
||||
user = #{record.user,jdbcType=VARCHAR},
|
||||
load_configuration = #{record.loadConfiguration,jdbcType=LONGVARCHAR},
|
||||
advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARCHAR},
|
||||
schedule = #{record.schedule,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update load_test
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
update load_test
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR},
|
||||
user = #{record.user,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
|
@ -306,50 +326,55 @@
|
|||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="testResourcePoolId != null">
|
||||
test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="loadConfiguration != null">
|
||||
load_configuration = #{loadConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="advancedConfiguration != null">
|
||||
advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="schedule != null">
|
||||
schedule = #{schedule,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="testResourcePoolId != null">
|
||||
test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="user != null">
|
||||
user = #{user,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="loadConfiguration != null">
|
||||
load_configuration = #{loadConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="advancedConfiguration != null">
|
||||
advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="schedule != null">
|
||||
schedule = #{schedule,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.LoadTestWithBLOBs">
|
||||
update load_test
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
update load_test
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR},
|
||||
user = #{user,jdbcType=VARCHAR},
|
||||
load_configuration = #{loadConfiguration,jdbcType=LONGVARCHAR},
|
||||
advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARCHAR},
|
||||
schedule = #{schedule,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.LoadTest">
|
||||
update load_test
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
update load_test
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR},
|
||||
user = #{user,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -8,6 +8,7 @@
|
|||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="user" jdbcType="VARCHAR" property="user"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.LoadTestReport">
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description"/>
|
||||
|
@ -71,7 +72,13 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, test_id, name, create_time, update_time, status
|
||||
id,
|
||||
test_id,
|
||||
name,
|
||||
create_time,
|
||||
update_time,
|
||||
status,
|
||||
user
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
description
|
||||
|
@ -114,23 +121,23 @@
|
|||
from load_test_report
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from load_test_report
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.LoadTestReportExample">
|
||||
delete from load_test_report
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
DELETE FROM load_test_report
|
||||
WHERE id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.LoadTestReportExample">
|
||||
DELETE FROM load_test_report
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.LoadTestReport">
|
||||
INSERT INTO load_test_report (id, test_id, name,
|
||||
create_time, update_time, status,
|
||||
description)
|
||||
user, description)
|
||||
VALUES (#{id,jdbcType=VARCHAR}, #{testId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=LONGVARCHAR})
|
||||
#{user,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.LoadTestReport">
|
||||
insert into load_test_report
|
||||
|
@ -143,20 +150,23 @@
|
|||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
</trim>
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="user != null">
|
||||
user,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
|
@ -167,18 +177,21 @@
|
|||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="user != null">
|
||||
#{user,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.LoadTestReportExample" resultType="java.lang.Long">
|
||||
|
@ -199,18 +212,21 @@
|
|||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.user != null">
|
||||
user = #{record.user,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -224,25 +240,27 @@
|
|||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
user = #{record.user,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update load_test_report
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
UPDATE load_test_report
|
||||
SET id = #{record.id,jdbcType=VARCHAR},
|
||||
test_id = #{record.testId,jdbcType=VARCHAR},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
status = #{record.status,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
user = #{record.user,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.LoadTestReport">
|
||||
update load_test_report
|
||||
UPDATE load_test_report
|
||||
<set>
|
||||
<if test="testId != null">
|
||||
test_id = #{testId,jdbcType=VARCHAR},
|
||||
|
@ -252,19 +270,22 @@
|
|||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="user != null">
|
||||
user = #{user,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.LoadTestReport">
|
||||
UPDATE load_test_report
|
||||
SET test_id = #{testId,jdbcType=VARCHAR},
|
||||
|
@ -272,16 +293,18 @@
|
|||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
user = #{user,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=LONGVARCHAR}
|
||||
WHERE id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.LoadTestReport">
|
||||
update load_test_report
|
||||
set test_id = #{testId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
status = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.LoadTestReport">
|
||||
UPDATE load_test_report
|
||||
SET test_id = #{testId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
user = #{user,jdbcType=VARCHAR}
|
||||
WHERE id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -48,6 +48,7 @@ public class OrganizationService {
|
|||
private UserService userService;
|
||||
|
||||
public Organization addOrganization(Organization organization) {
|
||||
checkOrgNameRepeat(organization);
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
organization.setId(UUID.randomUUID().toString());
|
||||
organization.setCreateTime(currentTimeMillis);
|
||||
|
@ -65,6 +66,17 @@ public class OrganizationService {
|
|||
return organizationMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
private void checkOrgNameRepeat(Organization organization) {
|
||||
if (StringUtils.isBlank(organization.getName())) {
|
||||
MSException.throwException(Translator.get("organization_name_is_null"));
|
||||
}
|
||||
OrganizationExample organizationExample = new OrganizationExample();
|
||||
organizationExample.createCriteria().andNameEqualTo(organization.getName());
|
||||
if (organizationMapper.countByExample(organizationExample) > 0) {
|
||||
MSException.throwException(Translator.get("organization_name_already_exists"));
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteOrganization(String organizationId) {
|
||||
WorkspaceExample example = new WorkspaceExample();
|
||||
WorkspaceExample.Criteria criteria = example.createCriteria();
|
||||
|
@ -87,6 +99,7 @@ public class OrganizationService {
|
|||
}
|
||||
|
||||
public void updateOrganization(Organization organization) {
|
||||
checkOrgNameRepeat(organization);
|
||||
organization.setCreateTime(null);
|
||||
organization.setUpdateTime(System.currentTimeMillis());
|
||||
organizationMapper.updateByPrimaryKeySelective(organization);
|
||||
|
|
|
@ -78,6 +78,9 @@ public class UserService {
|
|||
userRole.setSourceId("adminSourceId");
|
||||
userRoleMapper.insertSelective(userRole);
|
||||
} else {
|
||||
// if (!map.keySet().contains("Ids")) {
|
||||
// MSException.throwException(role + " no source id");
|
||||
// }
|
||||
List<String> list = (List<String>) map.get("Ids");
|
||||
for (int j = 0; j < list.size(); j++) {
|
||||
UserRole userRole1 = new UserRole();
|
||||
|
@ -316,7 +319,7 @@ public class UserService {
|
|||
|
||||
public void setLanguage(String lang) {
|
||||
if (SessionUtils.getUser() != null) {
|
||||
UserRequest user = new UserRequest();
|
||||
User user = new User();
|
||||
user.setId(SessionUtils.getUser().getId());
|
||||
user.setLanguage(lang);
|
||||
updateUser(user);
|
||||
|
|
|
@ -58,14 +58,16 @@ public class WorkspaceService {
|
|||
workspace.setOrganizationId(SessionUtils.getCurrentOrganizationId());
|
||||
|
||||
long currentTime = System.currentTimeMillis();
|
||||
|
||||
WorkspaceExample example = new WorkspaceExample();
|
||||
example.createCriteria()
|
||||
.andOrganizationIdEqualTo(SessionUtils.getCurrentOrganizationId())
|
||||
.andNameEqualTo(workspace.getName());
|
||||
if (workspaceMapper.countByExample(example) > 0) {
|
||||
MSException.throwException(Translator.get("workspace_name_already_exists"));
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(workspace.getId())) {
|
||||
WorkspaceExample example = new WorkspaceExample();
|
||||
example.createCriteria()
|
||||
.andOrganizationIdEqualTo(SessionUtils.getCurrentOrganizationId())
|
||||
.andNameEqualTo(workspace.getName());
|
||||
if (workspaceMapper.countByExample(example) > 0) {
|
||||
MSException.throwException(Translator.get("workspace_name_already_exists"));
|
||||
}
|
||||
workspace.setId(UUID.randomUUID().toString());
|
||||
workspace.setCreateTime(currentTime);
|
||||
workspace.setUpdateTime(currentTime);
|
||||
|
@ -235,12 +237,21 @@ public class WorkspaceService {
|
|||
}
|
||||
|
||||
public void updateWorkspaceByAdmin(Workspace workspace) {
|
||||
checkWorkspace(workspace);
|
||||
workspace.setCreateTime(null);
|
||||
workspace.setUpdateTime(System.currentTimeMillis());
|
||||
workspaceMapper.updateByPrimaryKeySelective(workspace);
|
||||
}
|
||||
|
||||
public void addWorkspaceByAdmin(Workspace workspace) {
|
||||
checkWorkspace(workspace);
|
||||
workspace.setId(UUID.randomUUID().toString());
|
||||
workspace.setCreateTime(System.currentTimeMillis());
|
||||
workspace.setUpdateTime(System.currentTimeMillis());
|
||||
workspaceMapper.insertSelective(workspace);
|
||||
}
|
||||
|
||||
private void checkWorkspace(Workspace workspace) {
|
||||
if (StringUtils.isBlank(workspace.getName())) {
|
||||
MSException.throwException(Translator.get("workspace_name_is_null"));
|
||||
}
|
||||
|
@ -254,9 +265,5 @@ public class WorkspaceService {
|
|||
if (workspaceMapper.countByExample(example) > 0) {
|
||||
MSException.throwException(Translator.get("workspace_name_already_exists"));
|
||||
}
|
||||
workspace.setId(UUID.randomUUID().toString());
|
||||
workspace.setCreateTime(System.currentTimeMillis());
|
||||
workspace.setUpdateTime(System.currentTimeMillis());
|
||||
workspaceMapper.insertSelective(workspace);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.metersphere.base.domain.TestCaseReportTemplateExample;
|
|||
import io.metersphere.base.mapper.TestCaseReportTemplateMapper;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.track.request.testCaseReport.QueryTemplateRequest;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -61,7 +62,7 @@ public class TestCaseReportTemplateService {
|
|||
.andWorkspaceIdEqualTo(SessionUtils.getCurrentWorkspaceId())
|
||||
.andIdNotEqualTo(testCaseReportTemplate.getId());
|
||||
if (testCaseReportTemplateMapper.selectByExample(example).size() > 0) {
|
||||
MSException.throwException("同一工作空间下不能存在同名模版");
|
||||
MSException.throwException(Translator.get("test_case_report_template_repeat"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `file_content` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `file_metadata` (
|
||||
`id` varchar(64) NOT NULL COMMENT 'File ID',
|
||||
|
@ -18,25 +18,23 @@ CREATE TABLE IF NOT EXISTS `file_metadata` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `load_test` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'Test ID',
|
||||
`project_id` varchar(50) NOT NULL COMMENT 'Project ID this test belongs to',
|
||||
`name` varchar(64) NOT NULL COMMENT 'Test name',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT 'Test description',
|
||||
`load_configuration` longtext COMMENT 'Load configuration (JSON format)',
|
||||
`advanced_configuration` longtext COMMENT 'Load configuration (JSON format)',
|
||||
`schedule` longtext COMMENT 'Test schedule (cron list)',
|
||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||
`status` varchar(64) DEFAULT NULL COMMENT 'Test Status Running, Completed, Error, etc.',
|
||||
`test_resource_pool_id` varchar(50) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
CREATE TABLE `load_test` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'Test ID',
|
||||
`project_id` varchar(50) NOT NULL COMMENT 'Project ID this test belongs to',
|
||||
`name` varchar(64) NOT NULL COMMENT 'Test name',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT 'Test description',
|
||||
`load_configuration` longtext COMMENT 'Load configuration (JSON format)',
|
||||
`advanced_configuration` longtext COMMENT 'Load configuration (JSON format)',
|
||||
`schedule` longtext COMMENT 'Test schedule (cron list)',
|
||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||
`status` varchar(64) DEFAULT NULL COMMENT 'Test Status Running, Completed, Error, etc.',
|
||||
`test_resource_pool_id` varchar(50) DEFAULT NULL,
|
||||
`user` varchar(64) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `load_test_file` (
|
||||
`test_id` varchar(64) DEFAULT NULL,
|
||||
|
@ -46,26 +44,24 @@ CREATE TABLE IF NOT EXISTS `load_test_file` (
|
|||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='测试和文件的关联表';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `load_test_report` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'Test report ID',
|
||||
`test_id` varchar(50) NOT NULL COMMENT 'Test ID this test report belongs to',
|
||||
`name` varchar(64) NOT NULL COMMENT 'Test report name',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT 'Test report name',
|
||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||
`status` varchar(64) NOT NULL COMMENT 'Status of this test run',
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
CREATE TABLE `load_test_report` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'Test report ID',
|
||||
`test_id` varchar(50) NOT NULL COMMENT 'Test ID this test report belongs to',
|
||||
`name` varchar(64) NOT NULL COMMENT 'Test report name',
|
||||
`description` text COMMENT 'Test report message',
|
||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||
`status` varchar(64) NOT NULL COMMENT 'Status of this test run',
|
||||
`user` varchar(64) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `load_test_report_detail` (
|
||||
`report_id` varchar(50) NOT NULL,
|
||||
`content` longtext,
|
||||
`part` bigint(11) NOT NULL,
|
||||
PRIMARY KEY (`report_id`,`part`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `load_test_report_log` (
|
||||
`id` varchar(50) NOT NULL,
|
||||
|
@ -75,7 +71,7 @@ CREATE TABLE IF NOT EXISTS `load_test_report_log` (
|
|||
`part` bigint(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `load_test_report_log_report_id_resource_name_index` (`report_id`,`resource_id`,`part`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `load_test_report_result` (
|
||||
`id` varchar(50) NOT NULL,
|
||||
|
@ -84,7 +80,7 @@ CREATE TABLE IF NOT EXISTS `load_test_report_result` (
|
|||
`report_value` text ,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `load_test_report_result_report_id_report_key_index` (`report_id`,`report_key`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `organization` (
|
||||
|
@ -97,7 +93,7 @@ CREATE TABLE IF NOT EXISTS `organization` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `project` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'Project ID',
|
||||
|
@ -110,7 +106,7 @@ CREATE TABLE IF NOT EXISTS `project` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `role` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'Role ID',
|
||||
|
@ -123,7 +119,7 @@ CREATE TABLE IF NOT EXISTS `role` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `system_parameter` (
|
||||
`param_key` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT 'Parameter name',
|
||||
|
@ -134,7 +130,7 @@ CREATE TABLE IF NOT EXISTS `system_parameter` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `test_resource` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'Test resource ID',
|
||||
|
@ -147,7 +143,7 @@ CREATE TABLE IF NOT EXISTS `test_resource` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `test_resource_pool` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'Test resource pool ID',
|
||||
|
@ -161,13 +157,13 @@ CREATE TABLE IF NOT EXISTS `test_resource_pool` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `user` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'User ID',
|
||||
`id` varchar(50) COLLATE utf8mb4_bin NOT NULL COMMENT 'User ID',
|
||||
`name` varchar(64) NOT NULL COMMENT 'User name',
|
||||
`email` varchar(64) NOT NULL COMMENT 'E-Mail address',
|
||||
`password` varchar(256) DEFAULT NULL,
|
||||
`password` varchar(256) COLLATE utf8mb4_bin DEFAULT NULL,
|
||||
`status` varchar(50) NOT NULL COMMENT 'User status',
|
||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||
|
@ -179,7 +175,7 @@ CREATE TABLE IF NOT EXISTS `user` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `user_role` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'ID of user''s role info',
|
||||
|
@ -192,7 +188,7 @@ CREATE TABLE IF NOT EXISTS `user_role` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `workspace` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'Workspace ID ',
|
||||
|
@ -205,7 +201,7 @@ CREATE TABLE IF NOT EXISTS `workspace` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
-- api start
|
||||
|
||||
|
@ -221,7 +217,7 @@ CREATE TABLE IF NOT EXISTS `api_test` (
|
|||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `api_test_file` (
|
||||
`test_id` varchar(64) DEFAULT NULL,
|
||||
|
@ -245,7 +241,7 @@ CREATE TABLE IF NOT EXISTS `api_test_report` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
-- api end
|
||||
|
||||
|
@ -270,7 +266,7 @@ CREATE TABLE IF NOT EXISTS `test_plan` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `test_case_node` (
|
||||
|
@ -285,7 +281,7 @@ CREATE TABLE IF NOT EXISTS `test_case_node` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `test_case` (
|
||||
|
@ -307,7 +303,7 @@ CREATE TABLE IF NOT EXISTS `test_case` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `test_plan_test_case` (
|
||||
|
@ -325,7 +321,7 @@ CREATE TABLE IF NOT EXISTS `test_plan_test_case` (
|
|||
)
|
||||
ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_bin;
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `test_case_report_template` (
|
||||
`id` varchar(50) NOT NULL,
|
||||
|
@ -336,7 +332,7 @@ CREATE TABLE IF NOT EXISTS `test_case_report_template` (
|
|||
)
|
||||
ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb4
|
||||
COLLATE=utf8mb4_bin;
|
||||
COLLATE=utf8mb4_general_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `test_case_report` (
|
||||
`id` varchar(50) NOT NULL,
|
||||
|
@ -348,7 +344,7 @@ CREATE TABLE IF NOT EXISTS `test_case_report` (
|
|||
)
|
||||
ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb4
|
||||
COLLATE=utf8mb4_bin;
|
||||
COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- track end
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
<!--要生成的数据库表 -->
|
||||
|
||||
<table tableName="load_test_report"/>
|
||||
<table tableName="load_test"/>
|
||||
|
||||
</context>
|
||||
</generatorConfiguration>
|
|
@ -41,4 +41,5 @@ remark_optional=
|
|||
do_not_modify_header_order=
|
||||
module_created_automatically=
|
||||
options=
|
||||
please_input_workspace_member=
|
||||
please_input_workspace_member=
|
||||
test_case_report_template_repeat=
|
|
@ -33,6 +33,8 @@ workspace_not_exists=Workspace is not exists
|
|||
project_name_is_null=Project name cannot be null
|
||||
project_name_already_exists=The project name already exists
|
||||
#organization
|
||||
organization_name_is_null=organization name cannot be null
|
||||
organization_name_already_exists=The organization name already exists
|
||||
organization_does_not_belong_to_user=The current organization does not belong to the current user
|
||||
organization_id_is_null=Organization ID cannot be null
|
||||
#api
|
||||
|
@ -83,4 +85,5 @@ remark_optional=Remark optional
|
|||
do_not_modify_header_order=Do not modify the header order
|
||||
module_created_automatically=If there is no such module, will be created automatically
|
||||
options=options
|
||||
please_input_workspace_member=Please input workspace merber
|
||||
please_input_workspace_member=Please input workspace merber
|
||||
test_case_report_template_repeat=The workspace has the same name template
|
|
@ -33,6 +33,8 @@ workspace_not_exists=工作空间不存在
|
|||
project_name_is_null=项目名称不能为空
|
||||
project_name_already_exists=项目名称已存在
|
||||
#organization
|
||||
organization_name_is_null=组织名不能为空
|
||||
organization_name_already_exists=组织名已存在
|
||||
organization_does_not_belong_to_user=当前组织不属于当前用户
|
||||
organization_id_is_null=组织 ID 不能为空
|
||||
#api
|
||||
|
@ -84,3 +86,4 @@ do_not_modify_header_order=请勿修改表头顺序
|
|||
module_created_automatically=若无该模块将自动创建
|
||||
options=选项
|
||||
please_input_workspace_member=请填写该工作空间相关人员
|
||||
test_case_report_template_repeat=同一工作空间下不能存在同名模版
|
||||
|
|
|
@ -33,6 +33,8 @@ workspace_not_exists=工作空間不存在
|
|||
project_name_is_null=項目名稱不能為空
|
||||
project_name_already_exists=項目名稱已存在
|
||||
#organization
|
||||
organization_name_is_null=組織名不能為空
|
||||
organization_name_already_exists=組織名已存在
|
||||
organization_does_not_belong_to_user=當前組織不屬於當前用戶
|
||||
organization_id_is_null=組織 ID 不能為空
|
||||
#api
|
||||
|
@ -83,4 +85,5 @@ remark_optional=備註選填
|
|||
do_not_modify_header_order=請勿修改表頭順序
|
||||
module_created_automatically=若無該模塊將自動創建
|
||||
options=選項
|
||||
please_input_workspace_member=請填寫該工作空間相關人員
|
||||
please_input_workspace_member=請填寫該工作空間相關人員
|
||||
test_case_report_template_repeat=同壹工作空間下不能存在同名模版
|
|
@ -68,20 +68,28 @@
|
|||
<el-input v-model="form.password" autocomplete="off" show-password/>
|
||||
</el-form-item>
|
||||
<div v-for="(role, index) in form.roles" :key="index">
|
||||
<el-form-item :label="'角色'+index" :required="true">
|
||||
<el-form-item :label="'角色'+index"
|
||||
:prop="'roles.' + index + '.id'"
|
||||
:rules="{required: true, message: '请选择角色', trigger: 'change'}"
|
||||
>
|
||||
<el-select v-model="role.id" placeholder="选择角色类型">
|
||||
<el-option
|
||||
v-for="item in userRole"
|
||||
v-for="item in activeRole(role)"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
:value="item.id"
|
||||
>
|
||||
{{item.name}}
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button @click.prevent="removeRole(role)" style="margin-left: 20px;" v-if="form.roles.length > 1">删除
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<div v-if="role.id === 'org_admin'">
|
||||
<el-form-item label="选择组织" :required="true">
|
||||
<el-form-item label="选择组织"
|
||||
:prop="'roles.' + index + '.Ids'"
|
||||
:rules="{required: true, message: '请选择组织', trigger: 'change'}"
|
||||
>
|
||||
<el-select v-model="role.Ids" placeholder="选择组织" multiple>
|
||||
<el-option
|
||||
v-for="item in form.orgList"
|
||||
|
@ -93,7 +101,10 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="role.id === 'test_manager'">
|
||||
<el-form-item label="选择工作空间" :required="true">
|
||||
<el-form-item label="选择工作空间"
|
||||
:prop="'roles.' + index + '.Ids'"
|
||||
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
|
||||
>
|
||||
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple>
|
||||
<el-option
|
||||
v-for="item in form.wsList"
|
||||
|
@ -105,7 +116,10 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="role.id ==='test_user'">
|
||||
<el-form-item label="选择工作空间" :required="true">
|
||||
<el-form-item label="选择工作空间"
|
||||
:prop="'roles.' + index + '.Ids'"
|
||||
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
|
||||
>
|
||||
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple>
|
||||
<el-option
|
||||
v-for="item in form.wsList"
|
||||
|
@ -117,7 +131,10 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="role.id ==='test_viewer'">
|
||||
<el-form-item label="选择工作空间" :required="true">
|
||||
<el-form-item label="选择工作空间"
|
||||
:prop="'roles.' + index + '.Ids'"
|
||||
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
|
||||
>
|
||||
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple>
|
||||
<el-option
|
||||
v-for="item in form.wsList"
|
||||
|
@ -132,7 +149,7 @@
|
|||
|
||||
<el-form-item>
|
||||
<template>
|
||||
<el-button type="success" style="width: 100%;" @click="addRole()">添加角色</el-button>
|
||||
<el-button type="success" style="width: 100%;" @click="addRole('createUserForm')" :disabled="btnAddRole">添加角色</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -160,10 +177,13 @@
|
|||
<el-input v-model="form.phone" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<div v-for="(role, index) in form.roles" :key="index">
|
||||
<el-form-item :label="'角色'+index" :required="true">
|
||||
<el-form-item :label="'角色'+index"
|
||||
:prop="'roles.' + index + '.id'"
|
||||
:rules="{required: true, message: '请选择角色', trigger: 'change'}"
|
||||
>
|
||||
<el-select v-model="role.id" placeholder="选择角色类型">
|
||||
<el-option
|
||||
v-for="item in userRole"
|
||||
v-for="item in activeRole(role)"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
|
@ -173,7 +193,10 @@
|
|||
</el-button>
|
||||
</el-form-item>
|
||||
<div v-if="role.id === 'org_admin'">
|
||||
<el-form-item label="选择组织" :required="true">
|
||||
<el-form-item label="选择组织"
|
||||
:prop="'roles.' + index + '.Ids'"
|
||||
:rules="{required: true, message: '请选择组织', trigger: 'change'}"
|
||||
>
|
||||
<el-select v-model="role.Ids" placeholder="选择组织" multiple>
|
||||
<el-option
|
||||
v-for="item in form.orgList"
|
||||
|
@ -185,7 +208,10 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="role.id === 'test_manager'">
|
||||
<el-form-item label="选择工作空间" :required="true">
|
||||
<el-form-item label="选择工作空间"
|
||||
:prop="'roles.' + index + '.Ids'"
|
||||
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
|
||||
>
|
||||
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple>
|
||||
<el-option
|
||||
v-for="item in form.wsList"
|
||||
|
@ -197,7 +223,10 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="role.id ==='test_user'">
|
||||
<el-form-item label="选择工作空间" :required="true">
|
||||
<el-form-item label="选择工作空间"
|
||||
:prop="'roles.' + index + '.Ids'"
|
||||
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
|
||||
>
|
||||
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple>
|
||||
<el-option
|
||||
v-for="item in form.wsList"
|
||||
|
@ -209,7 +238,10 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="role.id ==='test_viewer'">
|
||||
<el-form-item label="选择工作空间" :required="true">
|
||||
<el-form-item label="选择工作空间"
|
||||
:prop="'roles.' + index + '.Ids'"
|
||||
:rules="{required: true, message: '请选择工作空间', trigger: 'change'}"
|
||||
>
|
||||
<el-select v-model="role.Ids" placeholder="选择工作空间" multiple>
|
||||
<el-option
|
||||
v-for="item in form.wsList"
|
||||
|
@ -223,7 +255,7 @@
|
|||
</div>
|
||||
<el-form-item>
|
||||
<template>
|
||||
<el-button type="success" style="width: 100%;" @click="addRole()">添加角色</el-button>
|
||||
<el-button type="success" style="width: 100%;" @click="addRole('updateUserForm')" :disabled="btnAddRole">添加角色</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -286,6 +318,7 @@
|
|||
createVisible: false,
|
||||
updateVisible: false,
|
||||
editPasswordVisible: false,
|
||||
btnAddRole: false,
|
||||
multipleSelection: [],
|
||||
userRole: [],
|
||||
currentPage: 1,
|
||||
|
@ -294,11 +327,12 @@
|
|||
condition: {},
|
||||
tableData: [],
|
||||
form: {
|
||||
roles: [{}]
|
||||
roles: [{
|
||||
id: ''
|
||||
}]
|
||||
},
|
||||
checkPasswordForm: {},
|
||||
ruleForm: {},
|
||||
setAdminParam: {},
|
||||
rule: {
|
||||
id: [
|
||||
{required: true, message: this.$t('user.input_id'), trigger: 'blur'},
|
||||
|
@ -451,7 +485,8 @@
|
|||
})
|
||||
},
|
||||
handleClose() {
|
||||
this.form = {roles: [{value: ''}]};
|
||||
this.form = {roles: [{id: ''}]};
|
||||
this.btnAddRole = false;
|
||||
},
|
||||
changeSwitch(row) {
|
||||
this.$post(this.updatePath, row, () => {
|
||||
|
@ -479,16 +514,51 @@
|
|||
this.userRole = response.data;
|
||||
})
|
||||
},
|
||||
addRole() {
|
||||
let roles = this.form.roles;
|
||||
roles.push({});
|
||||
addRole(validForm) {
|
||||
this.$refs[validForm].validate(valid => {
|
||||
if (valid) {
|
||||
let roleInfo = {};
|
||||
roleInfo.selects = [];
|
||||
let ids = this.form.roles.map(r => r.id);
|
||||
ids.forEach(id => {
|
||||
roleInfo.selects.push(id);
|
||||
})
|
||||
let roles = this.form.roles;
|
||||
roles.push(roleInfo);
|
||||
if (this.form.roles.length > this.userRole.length - 1) {
|
||||
this.btnAddRole = true;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
removeRole(item) {
|
||||
let index = this.form.roles.indexOf(item)
|
||||
let index = this.form.roles.indexOf(item);
|
||||
if (index !== -1) {
|
||||
this.form.roles.splice(index, 1)
|
||||
}
|
||||
if (this.form.roles.length < this.userRole.length) {
|
||||
this.btnAddRole = false;
|
||||
}
|
||||
},
|
||||
activeRole(roleInfo) {
|
||||
return this.userRole.filter(function (role) {
|
||||
let value = true;
|
||||
if (!roleInfo.selects) {
|
||||
return true;
|
||||
}
|
||||
if (roleInfo.selects.length === 0) {
|
||||
value = true;
|
||||
}
|
||||
for (let i = 0; i < roleInfo.selects.length; i++) {
|
||||
if (role.id === roleInfo.selects[i]) {
|
||||
value = false;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
:draggable="true"
|
||||
:select-node.sync="selectNode"
|
||||
@refreshTable="refreshTable"
|
||||
:current-project="currentProject"
|
||||
ref="nodeTree"/>
|
||||
</ms-aside-container>
|
||||
|
||||
|
@ -35,10 +36,11 @@
|
|||
</ms-main-container>
|
||||
|
||||
<test-case-edit
|
||||
@refresh="refresh"
|
||||
@refresh="refreshTable"
|
||||
:read-only="testCaseReadOnly"
|
||||
:tree-nodes="treeNodes"
|
||||
:select-node="selectNode"
|
||||
:current-project="currentProject"
|
||||
ref="testCaseEditDialog">
|
||||
</test-case-edit>
|
||||
|
||||
|
|
|
@ -175,12 +175,12 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<template v-slot:footer>
|
||||
<template v-slot:footer v-if="!readOnly">
|
||||
<el-switch
|
||||
v-model="isCreateContinue"
|
||||
:active-text="$t('test_track.case.save_create_continue')">
|
||||
</el-switch>
|
||||
<ms-dialog-footer v-if="!readOnly"
|
||||
<ms-dialog-footer
|
||||
@cancel="dialogFormVisible = false"
|
||||
@confirm="saveCase"/>
|
||||
</template>
|
||||
|
@ -250,6 +250,9 @@
|
|||
},
|
||||
selectNode: {
|
||||
type: Object
|
||||
},
|
||||
currentProject: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -330,9 +333,11 @@
|
|||
param.nodePath = item.path;
|
||||
}
|
||||
});
|
||||
if(localStorage.getItem(CURRENT_PROJECT)) {
|
||||
param.projectId = JSON.parse(localStorage.getItem(CURRENT_PROJECT)).id;
|
||||
|
||||
if (this.currentProject) {
|
||||
param.projectId = this.currentProject.id;
|
||||
}
|
||||
|
||||
param.name = param.name.trim();
|
||||
if (param.name == '') {
|
||||
this.$warning(this.$t('test_track.case.input_name'));
|
||||
|
|
|
@ -57,6 +57,9 @@
|
|||
props: {
|
||||
treeNodes: {
|
||||
type: Array
|
||||
},
|
||||
currentProject: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -73,6 +76,10 @@
|
|||
this.$refs['nodeForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
let param = {};
|
||||
if (!this.currentProject) {
|
||||
this.$warning(this.$t('test_track.case.please_create_project'));
|
||||
return;
|
||||
}
|
||||
let url = this.buildParam(param);
|
||||
if (param.name.trim() == '') {
|
||||
this.$warning(this.$t('test_track.case.input_name'));
|
||||
|
@ -106,9 +113,7 @@
|
|||
}
|
||||
param.name = this.form.name.trim();
|
||||
param.label = this.form.name;
|
||||
if (localStorage.getItem(CURRENT_PROJECT)) {
|
||||
param.projectId = JSON.parse(localStorage.getItem(CURRENT_PROJECT)).id;
|
||||
}
|
||||
param.projectId = this.currentProject.id;
|
||||
return url;
|
||||
},
|
||||
close() {
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
<node-edit ref="nodeEdit" :tree-nodes="treeNodes" @refresh="refreshNode" />
|
||||
<node-edit ref="nodeEdit" :current-project="currentProject" :tree-nodes="treeNodes" @refresh="refreshNode" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -83,6 +83,9 @@ export default {
|
|||
draggable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
currentProject: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -190,6 +190,7 @@
|
|||
{text: this.$t('test_track.plan_view.failure'), value: 'Failure'},
|
||||
{text: this.$t('test_track.plan_view.blocking'), value: 'Blocking'},
|
||||
{text: this.$t('test_track.plan_view.skip'), value: 'Skip'},
|
||||
{text: this.$t('test_track.plan.plan_status_running'), value: 'Underway'},
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
type: Object,
|
||||
default() {
|
||||
return {
|
||||
projectName: this.$t('test_track.project.name'),
|
||||
projectName: this.$t('test_track.project'),
|
||||
principal: 'Michael',
|
||||
executors: ['Michael','Tom','Jiessie'],
|
||||
startTime: '2020-6-18',
|
||||
|
|
|
@ -377,6 +377,7 @@ export default {
|
|||
delete_confirm: "Confirm delete test case",
|
||||
delete: "Delete case",
|
||||
save_create_continue: "Save and create continue",
|
||||
please_create_project: "No project available, please create the project first",
|
||||
import: {
|
||||
import: "Import test case",
|
||||
case_import: "Import test case",
|
||||
|
|
|
@ -374,6 +374,7 @@ export default {
|
|||
delete_confirm: "确认删除测试用例",
|
||||
delete: "删除用例",
|
||||
save_create_continue: "保存并继续创建",
|
||||
please_create_project: "暂无项目,请先创建项目",
|
||||
import: {
|
||||
import: "导入用例",
|
||||
case_import: "导入测试用例",
|
||||
|
|
|
@ -368,6 +368,7 @@ export default {
|
|||
delete_confirm: "確認刪除測試用例: ",
|
||||
delete: "删除用例",
|
||||
save_create_continue: "保存並繼續創建",
|
||||
please_create_project: "暫無項目,請先創建項目",
|
||||
import: {
|
||||
import: "導入用例",
|
||||
case_import: "導入測試用例",
|
||||
|
|
Loading…
Reference in New Issue