提交 2eaa93b9 编写于 作者: C Captain.B

Merge remote-tracking branch 'origin/master'

......@@ -187,6 +187,12 @@ v1.1.0 是 v1.0.0 之后的功能版本。
- 基础设施: [Docker](https://www.docker.com/), [Kubernetes](https://kubernetes.io/)
- 测试引擎: [JMeter](https://jmeter.apache.org/)
## 致谢
- [BlazeMeter](https://www.blazemeter.com/):感谢 BlazeMeter 提供的设计思路
- [JMeter](https://jmeter.apache.org/):MeterSphere 使用了 JMeter 作为测试引擎
- [Element](https://element.eleme.cn/#/):感谢 Element 提供的优秀组件库
## 加入 MeterSphere 团队
我们正在招聘 MeterSphere 技术布道师,一起打造开源明星项目,请发简历到 metersphere@fit2cloud.com
......
package io.metersphere.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class Issues implements Serializable {
private String id;
private String title;
private String status;
private Long createTime;
private Long updateTime;
private String reporter;
private String lastmodify;
private String platform;
private String description;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.metersphere.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class Quota implements Serializable {
private String id;
private Integer api;
private Integer performance;
private Integer maxThreads;
private Integer duration;
private String resourcePool;
private String organizationId;
private String workspaceId;
private Boolean useDefault;
private Long updateTime;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.metersphere.base.domain;
import lombok.Data;
import java.io.Serializable;
import lombok.Data;
@Data
public class Schedule implements Serializable {
......
......@@ -11,7 +11,5 @@ public class TestCaseIssues implements Serializable {
private String issuesId;
private String platform;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -313,76 +313,6 @@ public class TestCaseIssuesExample {
addCriterion("issues_id not between", value1, value2, "issuesId");
return (Criteria) this;
}
public Criteria andPlatformIsNull() {
addCriterion("platform is null");
return (Criteria) this;
}
public Criteria andPlatformIsNotNull() {
addCriterion("platform is not null");
return (Criteria) this;
}
public Criteria andPlatformEqualTo(String value) {
addCriterion("platform =", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformNotEqualTo(String value) {
addCriterion("platform <>", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformGreaterThan(String value) {
addCriterion("platform >", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformGreaterThanOrEqualTo(String value) {
addCriterion("platform >=", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformLessThan(String value) {
addCriterion("platform <", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformLessThanOrEqualTo(String value) {
addCriterion("platform <=", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformLike(String value) {
addCriterion("platform like", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformNotLike(String value) {
addCriterion("platform not like", value, "platform");
return (Criteria) this;
}
public Criteria andPlatformIn(List<String> values) {
addCriterion("platform in", values, "platform");
return (Criteria) this;
}
public Criteria andPlatformNotIn(List<String> values) {
addCriterion("platform not in", values, "platform");
return (Criteria) this;
}
public Criteria andPlatformBetween(String value1, String value2) {
addCriterion("platform between", value1, value2, "platform");
return (Criteria) this;
}
public Criteria andPlatformNotBetween(String value1, String value2) {
addCriterion("platform not between", value1, value2, "platform");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
......
package io.metersphere.base.mapper;
import io.metersphere.base.domain.Issues;
import io.metersphere.base.domain.IssuesExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface IssuesMapper {
long countByExample(IssuesExample example);
int deleteByExample(IssuesExample example);
int deleteByPrimaryKey(String id);
int insert(Issues record);
int insertSelective(Issues record);
List<Issues> selectByExampleWithBLOBs(IssuesExample example);
List<Issues> selectByExample(IssuesExample example);
Issues selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") Issues record, @Param("example") IssuesExample example);
int updateByExampleWithBLOBs(@Param("record") Issues record, @Param("example") IssuesExample example);
int updateByExample(@Param("record") Issues record, @Param("example") IssuesExample example);
int updateByPrimaryKeySelective(Issues record);
int updateByPrimaryKeyWithBLOBs(Issues record);
int updateByPrimaryKey(Issues record);
}
\ No newline at end of file
<?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.metersphere.base.mapper.IssuesMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.Issues">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
<result column="reporter" jdbcType="VARCHAR" property="reporter" />
<result column="lastmodify" jdbcType="VARCHAR" property="lastmodify" />
<result column="platform" jdbcType="VARCHAR" property="platform" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.Issues">
<result column="description" jdbcType="LONGVARCHAR" property="description" />
</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, title, `status`, create_time, update_time, reporter, lastmodify, platform
</sql>
<sql id="Blob_Column_List">
description
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.IssuesExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from issues
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="io.metersphere.base.domain.IssuesExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from issues
<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="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from issues
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from issues
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.IssuesExample">
delete from issues
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.Issues">
insert into issues (id, title, `status`,
create_time, update_time, reporter,
lastmodify, platform, description
)
values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{reporter,jdbcType=VARCHAR},
#{lastmodify,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.Issues">
insert into issues
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="title != null">
title,
</if>
<if test="status != null">
`status`,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="reporter != null">
reporter,
</if>
<if test="lastmodify != null">
lastmodify,
</if>
<if test="platform != null">
platform,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
<if test="reporter != null">
#{reporter,jdbcType=VARCHAR},
</if>
<if test="lastmodify != null">
#{lastmodify,jdbcType=VARCHAR},
</if>
<if test="platform != null">
#{platform,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.IssuesExample" resultType="java.lang.Long">
select count(*) from issues
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update issues
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
`status` = #{record.status,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.reporter != null">
reporter = #{record.reporter,jdbcType=VARCHAR},
</if>
<if test="record.lastmodify != null">
lastmodify = #{record.lastmodify,jdbcType=VARCHAR},
</if>
<if test="record.platform != null">
platform = #{record.platform,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" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update issues
set id = #{record.id,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
reporter = #{record.reporter,jdbcType=VARCHAR},
lastmodify = #{record.lastmodify,jdbcType=VARCHAR},
platform = #{record.platform,jdbcType=VARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update issues
set id = #{record.id,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
reporter = #{record.reporter,jdbcType=VARCHAR},
lastmodify = #{record.lastmodify,jdbcType=VARCHAR},
platform = #{record.platform,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.Issues">
update issues
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
<if test="reporter != null">
reporter = #{reporter,jdbcType=VARCHAR},
</if>
<if test="lastmodify != null">
lastmodify = #{lastmodify,jdbcType=VARCHAR},
</if>
<if test="platform != null">
platform = #{platform,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.Issues">
update issues
set title = #{title,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
reporter = #{reporter,jdbcType=VARCHAR},
lastmodify = #{lastmodify,jdbcType=VARCHAR},
platform = #{platform,jdbcType=VARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.Issues">
update issues
set title = #{title,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
reporter = #{reporter,jdbcType=VARCHAR},
lastmodify = #{lastmodify,jdbcType=VARCHAR},
platform = #{platform,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
package io.metersphere.base.mapper;
import io.metersphere.base.domain.Quota;
import io.metersphere.base.domain.QuotaExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface QuotaMapper {
long countByExample(QuotaExample example);
int deleteByExample(QuotaExample example);
int deleteByPrimaryKey(String id);
int insert(Quota record);
int insertSelective(Quota record);
List<Quota> selectByExample(QuotaExample example);
Quota selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") Quota record, @Param("example") QuotaExample example);
int updateByExample(@Param("record") Quota record, @Param("example") QuotaExample example);
int updateByPrimaryKeySelective(Quota record);
int updateByPrimaryKey(Quota record);
}
\ No newline at end of file
<?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.metersphere.base.mapper.QuotaMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.Quota">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="api" jdbcType="INTEGER" property="api" />
<result column="performance" jdbcType="INTEGER" property="performance" />
<result column="max_threads" jdbcType="INTEGER" property="maxThreads" />
<result column="duration" jdbcType="INTEGER" property="duration" />
<result column="resource_pool" jdbcType="VARCHAR" property="resourcePool" />
<result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
<result column="use_default" jdbcType="BIT" property="useDefault" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
</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, api, performance, max_threads, duration, resource_pool, organization_id, workspace_id,
use_default, update_time
</sql>
<select id="selectByExample" parameterType="io.metersphere.base.domain.QuotaExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from quota
<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 quota
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from quota
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.QuotaExample">
delete from quota
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.Quota">
insert into quota (id, api, performance,
max_threads, duration, resource_pool,
organization_id, workspace_id, use_default,
update_time)
values (#{id,jdbcType=VARCHAR}, #{api,jdbcType=INTEGER}, #{performance,jdbcType=INTEGER},
#{maxThreads,jdbcType=INTEGER}, #{duration,jdbcType=INTEGER}, #{resourcePool,jdbcType=VARCHAR},
#{organizationId,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{useDefault,jdbcType=BIT},
#{updateTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.Quota">
insert into quota
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="api != null">
api,
</if>
<if test="performance != null">
performance,
</if>
<if test="maxThreads != null">
max_threads,
</if>
<if test="duration != null">
duration,
</if>
<if test="resourcePool != null">
resource_pool,
</if>
<if test="organizationId != null">
organization_id,
</if>
<if test="workspaceId != null">
workspace_id,
</if>
<if test="useDefault != null">
use_default,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="api != null">
#{api,jdbcType=INTEGER},
</if>
<if test="performance != null">
#{performance,jdbcType=INTEGER},
</if>
<if test="maxThreads != null">
#{maxThreads,jdbcType=INTEGER},
</if>
<if test="duration != null">
#{duration,jdbcType=INTEGER},
</if>
<if test="resourcePool != null">
#{resourcePool,jdbcType=VARCHAR},
</if>
<if test="organizationId != null">
#{organizationId,jdbcType=VARCHAR},
</if>
<if test="workspaceId != null">
#{workspaceId,jdbcType=VARCHAR},
</if>
<if test="useDefault != null">
#{useDefault,jdbcType=BIT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.QuotaExample" resultType="java.lang.Long">
select count(*) from quota
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update quota
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.api != null">
api = #{record.api,jdbcType=INTEGER},
</if>
<if test="record.performance != null">
performance = #{record.performance,jdbcType=INTEGER},
</if>
<if test="record.maxThreads != null">
max_threads = #{record.maxThreads,jdbcType=INTEGER},
</if>
<if test="record.duration != null">
duration = #{record.duration,jdbcType=INTEGER},
</if>
<if test="record.resourcePool != null">
resource_pool = #{record.resourcePool,jdbcType=VARCHAR},
</if>
<if test="record.organizationId != null">
organization_id = #{record.organizationId,jdbcType=VARCHAR},
</if>
<if test="record.workspaceId != null">
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
</if>
<if test="record.useDefault != null">
use_default = #{record.useDefault,jdbcType=BIT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update quota
set id = #{record.id,jdbcType=VARCHAR},
api = #{record.api,jdbcType=INTEGER},
performance = #{record.performance,jdbcType=INTEGER},
max_threads = #{record.maxThreads,jdbcType=INTEGER},
duration = #{record.duration,jdbcType=INTEGER},
resource_pool = #{record.resourcePool,jdbcType=VARCHAR},
organization_id = #{record.organizationId,jdbcType=VARCHAR},
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
use_default = #{record.useDefault,jdbcType=BIT},
update_time = #{record.updateTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.Quota">
update quota
<set>
<if test="api != null">
api = #{api,jdbcType=INTEGER},
</if>
<if test="performance != null">
performance = #{performance,jdbcType=INTEGER},
</if>
<if test="maxThreads != null">
max_threads = #{maxThreads,jdbcType=INTEGER},
</if>
<if test="duration != null">
duration = #{duration,jdbcType=INTEGER},
</if>
<if test="resourcePool != null">
resource_pool = #{resourcePool,jdbcType=VARCHAR},
</if>
<if test="organizationId != null">
organization_id = #{organizationId,jdbcType=VARCHAR},
</if>
<if test="workspaceId != null">
workspace_id = #{workspaceId,jdbcType=VARCHAR},
</if>
<if test="useDefault != null">
use_default = #{useDefault,jdbcType=BIT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.Quota">
update quota
set api = #{api,jdbcType=INTEGER},
performance = #{performance,jdbcType=INTEGER},
max_threads = #{maxThreads,jdbcType=INTEGER},
duration = #{duration,jdbcType=INTEGER},
resource_pool = #{resourcePool,jdbcType=VARCHAR},
organization_id = #{organizationId,jdbcType=VARCHAR},
workspace_id = #{workspaceId,jdbcType=VARCHAR},
use_default = #{useDefault,jdbcType=BIT},
update_time = #{updateTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
......@@ -2,18 +2,18 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.base.mapper.ScheduleMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.Schedule">
<id column="id" jdbcType="VARCHAR" property="id"/>
<result column="key" jdbcType="VARCHAR" property="key"/>
<result column="type" jdbcType="VARCHAR" property="type"/>
<result column="value" jdbcType="VARCHAR" property="value"/>
<result column="group" jdbcType="VARCHAR" property="group"/>
<result column="job" jdbcType="VARCHAR" property="job"/>
<result column="enable" jdbcType="BIT" property="enable"/>
<result column="resource_id" jdbcType="VARCHAR" property="resourceId"/>
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId"/>
<result column="create_time" jdbcType="BIGINT" property="createTime"/>
<result column="update_time" jdbcType="BIGINT" property="updateTime"/>
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="key" jdbcType="VARCHAR" property="key" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="group" jdbcType="VARCHAR" property="group" />
<result column="job" jdbcType="VARCHAR" property="job" />
<result column="enable" jdbcType="BIT" property="enable" />
<result column="resource_id" jdbcType="VARCHAR" property="resourceId" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.Schedule">
<result column="custom_data" jdbcType="LONGVARCHAR" property="customData" />
......@@ -284,18 +284,18 @@
<update id="updateByExampleWithBLOBs" parameterType="map">
update schedule
set id = #{record.id,jdbcType=VARCHAR},
`key` = #{record.key,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
`value` = #{record.value,jdbcType=VARCHAR},
`group` = #{record.group,jdbcType=VARCHAR},
job = #{record.job,jdbcType=VARCHAR},
`enable` = #{record.enable,jdbcType=BIT},
resource_id = #{record.resourceId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR},
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
custom_data = #{record.customData,jdbcType=LONGVARCHAR}
`key` = #{record.key,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
`value` = #{record.value,jdbcType=VARCHAR},
`group` = #{record.group,jdbcType=VARCHAR},
job = #{record.job,jdbcType=VARCHAR},
`enable` = #{record.enable,jdbcType=BIT},
resource_id = #{record.resourceId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR},
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
custom_data = #{record.customData,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -303,17 +303,17 @@
<update id="updateByExample" parameterType="map">
update schedule
set id = #{record.id,jdbcType=VARCHAR},
`key` = #{record.key,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
`value` = #{record.value,jdbcType=VARCHAR},
`group` = #{record.group,jdbcType=VARCHAR},
job = #{record.job,jdbcType=VARCHAR},
`enable` = #{record.enable,jdbcType=BIT},
resource_id = #{record.resourceId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR},
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}
`key` = #{record.key,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
`value` = #{record.value,jdbcType=VARCHAR},
`group` = #{record.group,jdbcType=VARCHAR},
job = #{record.job,jdbcType=VARCHAR},
`enable` = #{record.enable,jdbcType=BIT},
resource_id = #{record.resourceId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR},
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......
......@@ -5,7 +5,6 @@
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="test_case_id" jdbcType="VARCHAR" property="testCaseId" />
<result column="issues_id" jdbcType="VARCHAR" property="issuesId" />
<result column="platform" jdbcType="VARCHAR" property="platform" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
......@@ -66,7 +65,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, test_case_id, issues_id, platform
id, test_case_id, issues_id
</sql>
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseIssuesExample" resultMap="BaseResultMap">
select
......@@ -99,10 +98,10 @@
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseIssues">
insert into test_case_issues (id, test_case_id, issues_id,
platform)
values (#{id,jdbcType=VARCHAR}, #{testCaseId,jdbcType=VARCHAR}, #{issuesId,jdbcType=VARCHAR},
#{platform,jdbcType=VARCHAR})
insert into test_case_issues (id, test_case_id, issues_id
)
values (#{id,jdbcType=VARCHAR}, #{testCaseId,jdbcType=VARCHAR}, #{issuesId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseIssues">
insert into test_case_issues
......@@ -116,9 +115,6 @@
<if test="issuesId != null">
issues_id,
</if>
<if test="platform != null">
platform,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -130,9 +126,6 @@
<if test="issuesId != null">
#{issuesId,jdbcType=VARCHAR},
</if>
<if test="platform != null">
#{platform,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseIssuesExample" resultType="java.lang.Long">
......@@ -153,9 +146,6 @@
<if test="record.issuesId != null">
issues_id = #{record.issuesId,jdbcType=VARCHAR},
</if>
<if test="record.platform != null">
platform = #{record.platform,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -165,8 +155,7 @@
update test_case_issues
set id = #{record.id,jdbcType=VARCHAR},
test_case_id = #{record.testCaseId,jdbcType=VARCHAR},
issues_id = #{record.issuesId,jdbcType=VARCHAR},
platform = #{record.platform,jdbcType=VARCHAR}
issues_id = #{record.issuesId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -180,17 +169,13 @@
<if test="issuesId != null">
issues_id = #{issuesId,jdbcType=VARCHAR},
</if>
<if test="platform != null">
platform = #{platform,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseIssues">
update test_case_issues
set test_case_id = #{testCaseId,jdbcType=VARCHAR},
issues_id = #{issuesId,jdbcType=VARCHAR},
platform = #{platform,jdbcType=VARCHAR}
issues_id = #{issuesId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
......@@ -91,7 +91,7 @@
</if>
</sql>
<select id="list" resultMap="BaseResultMap" parameterType="io.metersphere.api.dto.APITestResult">
<select id="list" resultMap="BaseResultMap">
select api_test.*, project.name as project_name, user.name as user_name
from api_test
left join project on api_test.project_id = project.id
......
......@@ -18,7 +18,7 @@ import java.util.List;
import java.util.Properties;
@Configuration
@MapperScan(basePackages = "io.metersphere.base.mapper", sqlSessionFactoryRef = "sqlSessionFactory")
@MapperScan(basePackages = {"io.metersphere.base.mapper", "io.metersphere.xpack.mapper"}, sqlSessionFactoryRef = "sqlSessionFactory")
@EnableTransactionManagement
public class MybatisConfig {
......
......@@ -86,12 +86,32 @@ public class ReportResultComponent extends ReportComponent {
moduleResult.setCaseCount(0);
moduleResult.setPassCount(0);
moduleResult.setIssuesCount(0);
moduleResult.setFailureCount(0);
moduleResult.setBlockingCount(0);
moduleResult.setPrepareCount(0);
moduleResult.setSkipCount(0);
moduleResult.setUnderwayCount(0);
moduleResult.setModuleId(rootNodeId);
}
moduleResult.setCaseCount(moduleResult.getCaseCount() + 1);
if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Pass.name())) {
moduleResult.setPassCount(moduleResult.getPassCount() + 1);
}
if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Prepare.name())) {
moduleResult.setPrepareCount(moduleResult.getPrepareCount() + 1);
}
if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Underway.name())) {
moduleResult.setUnderwayCount(moduleResult.getUnderwayCount() + 1);
}
if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Failure.name())) {
moduleResult.setFailureCount(moduleResult.getFailureCount() + 1);
}
if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Skip.name())) {
moduleResult.setSkipCount(moduleResult.getSkipCount() + 1);
}
if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Blocking.name())) {
moduleResult.setBlockingCount(moduleResult.getBlockingCount() + 1);
}
if (StringUtils.isNotBlank(testCase.getIssues())) {
if (JSON.parseObject(testCase.getIssues()).getBoolean("hasIssues")) {
moduleResult.setIssuesCount(moduleResult.getIssuesCount() + 1);
......
......@@ -12,4 +12,9 @@ public class TestCaseReportModuleResultDTO {
private Integer passCount;
private Double passRate;
private Integer issuesCount;
private Integer prepareCount;
private Integer skipCount;
private Integer failureCount;
private Integer blockingCount;
private Integer underwayCount;
}
Subproject commit 85f7879c49d2d3b2444d8dc250fa007da4fc8181
Subproject commit fadab72bb656a3a2644e43bf46783c1f6cd96d4f
......@@ -13,6 +13,19 @@ create table if not exists test_case_issues
id varchar(50) not null
primary key,
test_case_id varchar(50) not null,
issues_id varchar(100) not null,
platform varchar(50) not null
issues_id varchar(100) not null
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
create table if not exists issues
(
id varchar(50) not null
primary key,
title varchar(50) null,
description text null,
status varchar(50) null,
create_time bigint(13) null,
update_time bigint(13) null,
reporter varchar(50) null comment 'case issues creator',
lastmodify varchar(50) null,
platform varchar(50) null
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
\ No newline at end of file
CREATE TABLE IF NOT EXISTS `quota`
(
`id` varchar(50) NOT NULL,
`api` int(10) DEFAULT NULL,
`performance` int(10) DEFAULT NULL,
`max_threads` int(10) DEFAULT NULL,
`duration` int(10) DEFAULT NULL,
`resource_pool` varchar(1000) DEFAULT NULL,
`organization_id` varchar(50) DEFAULT NULL,
`workspace_id` varchar(50) DEFAULT NULL,
`use_default` tinyint(1) DEFAULT NULL,
`update_time` bigint(13) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
\ No newline at end of file
import Vue from "vue";
import VueRouter from 'vue-router'
import RouterSidebar from "./RouterSidebar";
import Setting from "../../settings/Setting";
import User from "../../settings/system/User";
import EditPerformanceTestPlan from "../../performance/test/EditPerformanceTestPlan";
import PerformanceTestPlan from "../../performance/test/PerformanceTestPlan";
import Organization from "../../settings/system/Organization";
import OrganizationMember from "../../settings/organization/OrganizationMember";
import Member from "../../settings/workspace/WorkspaceMember";
import TestCaseReportTemplate from "../../settings/workspace/TestCaseReportTemplate";
import TestResourcePool from "../../settings/system/TestResourcePool";
import SystemParameterSetting from "../../settings/system/SystemParameterSetting";
import MsProject from "../../project/MsProject";
import OrganizationWorkspace from "../../settings/organization/OrganizationWorkspace";
import PersonSetting from "../../settings/personal/PersonSetting";
import SystemWorkspace from "../../settings/system/SystemWorkspace";
import PerformanceChart from "../../performance/report/components/PerformanceChart";
import PerformanceTestReport from "../../performance/report/PerformanceTestReport";
import ApiTest from "../../api/ApiTest";
......@@ -32,10 +21,7 @@ import TestCase from "../../track/case/TestCase";
import TestTrack from "../../track/TestTrack";
import ApiReportList from "../../api/report/ApiReportList";
import axios from "axios";
import ApiKeys from "../../settings/personal/ApiKeys";
import ServiceIntegration from "../../settings/organization/ServiceIntegration";
const requireContext = require.context('@/business/components/xpack/', true, /router\.js$/)
import Setting from "@/business/components/settings/router";
Vue.use(VueRouter);
......@@ -48,65 +34,7 @@ const router = new VueRouter({
sidebar: RouterSidebar
}
},
...requireContext.keys().map(key => requireContext(key).default),
{
path: "/setting",
components: {
content: Setting
},
children: [
{
path: 'user',
component: User,
},
{
path: 'organization',
component: Organization,
},
{
path: 'organizationmember',
component: OrganizationMember,
},
{
path: 'organizationworkspace',
component: OrganizationWorkspace,
},
{
path: 'serviceintegration',
component: ServiceIntegration,
},
{
path: 'personsetting',
component: PersonSetting
},
{
path: 'apikeys',
component: ApiKeys
},
{
path: 'member',
component: Member
},
{
path: 'systemworkspace',
component: SystemWorkspace
},
{
path: 'testresourcepool',
component: TestResourcePool
},
{
path: 'systemparametersetting',
component: SystemParameterSetting
},
{
path: 'testcase/report/template',
name: 'testCaseReportTemplate',
component: TestCaseReportTemplate
},
]
},
Setting,
{
path: "/api",
name: "api",
......
<template>
<el-menu menu-trigger="click" :default-active="$route.path" router>
<el-menu menu-trigger="click" :default-active="$route.path" router class="setting">
<el-submenu index="1" v-permission="['admin']">
<template v-slot:title>
<font-awesome-icon class="icon account" :icon="['far', 'address-card']" size="lg"/>
<span>{{$t('commons.system')}}</span>
<span>{{ $t('commons.system') }}</span>
</template>
<el-menu-item index="/setting/user">{{$t('commons.user')}}</el-menu-item>
<el-menu-item index="/setting/organization">{{$t('commons.organization')}}</el-menu-item>
<el-menu-item index="/setting/systemworkspace">{{$t('commons.workspace')}}</el-menu-item>
<el-menu-item index="/setting/testresourcepool">{{$t('commons.test_resource_pool')}}</el-menu-item>
<el-menu-item index="/setting/systemparametersetting">{{$t('commons.system_parameter_setting')}}</el-menu-item>
<el-menu-item v-for="menu in systems" :key="menu.index" :index="menu.index" class="setting-item">
{{ $t(menu.title) }}
</el-menu-item>
</el-submenu>
<el-submenu index="2" v-permission="['org_admin']" v-if="isCurrentOrganizationAdmin">
<template v-slot:title>
<font-awesome-icon class="icon organization" :icon="['far', 'building']" size="lg"/>
<span>{{$t('commons.organization')}}</span>
<span>{{ $t('commons.organization') }}</span>
</template>
<el-menu-item index="/setting/organizationmember" v-permission="['org_admin']">{{$t('commons.member')}}
</el-menu-item>
<el-menu-item index="/setting/organizationworkspace" v-permission="['org_admin']">{{$t('commons.workspace')}}
</el-menu-item>
<el-menu-item index="/setting/serviceintegration" v-permission="['org_admin']">{{$t('organization.service_integration')}}
<el-menu-item v-for="menu in organizations" :key="menu.index" :index="menu.index" class="setting-item">
{{ $t(menu.title) }}
</el-menu-item>
</el-submenu>
<el-submenu index="3" v-permission="['test_manager']" v-if="isCurrentWorkspaceUser">
<template v-slot:title>
<font-awesome-icon class="icon workspace" :icon="['far', 'list-alt']" size="lg"/>
<span>{{$t('commons.workspace')}}</span>
<span>{{ $t('commons.workspace') }}</span>
</template>
<el-menu-item index="/setting/member">{{$t('commons.member')}}</el-menu-item>
<el-menu-item index="/setting/testcase/report/template">{{$t('test_track.plan_view.report_template')}}
<el-menu-item v-for="menu in workspaces" :key="menu.index" :index="menu.index" class="setting-item">
{{ $t(menu.title) }}
</el-menu-item>
</el-submenu>
<el-submenu index="4">
<template v-slot:title>
<font-awesome-icon class="icon" :icon="['far', 'user']" size="lg"/>
<span>{{$t('commons.personal_info')}}</span>
<span>{{ $t('commons.personal_info') }}</span>
</template>
<el-menu-item index="/setting/personsetting">{{$t('commons.personal_setting')}}</el-menu-item>
<el-menu-item v-permission="['admin', 'org_admin', 'test_manager', 'test_user', 'test_viewer']"
index="/setting/apikeys">API Keys
<el-menu-item v-for="menu in persons" :key="menu.index" :index="menu.index" class="setting-item">
{{ $t(menu.title) }}
</el-menu-item>
</el-submenu>
......@@ -50,47 +44,63 @@
</template>
<script>
import {checkoutCurrentOrganization, checkoutCurrentWorkspace} from "../../../common/js/utils";
import {checkoutCurrentOrganization, checkoutCurrentWorkspace} from "@/common/js/utils";
import Setting from "@/business/components/settings/router";
export default {
name: "MsSettingMenu",
data() {
return {
isCurrentOrganizationAdmin: false,
isCurrentWorkspaceUser: false,
}
},
mounted() {
this.isCurrentOrganizationAdmin = checkoutCurrentOrganization();
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
},
export default {
name: "MsSettingMenu",
data() {
let getMenus = function (group) {
let menus = [];
Setting.children.forEach(child => {
if (child.meta[group] === true) {
let menu = {index: Setting.path + "/" + child.path}
menu.title = child.meta.title;
menus.push(menu);
}
})
return menus;
}
return {
systems: getMenus('system'),
organizations: getMenus('organization'),
workspaces: getMenus('workspace'),
persons: getMenus('person'),
isCurrentOrganizationAdmin: false,
isCurrentWorkspaceUser: false,
}
},
mounted() {
this.isCurrentOrganizationAdmin = checkoutCurrentOrganization();
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
}
}
</script>
<style scoped>
.el-menu {
border-right: 0;
}
.setting {
border-right: 0;
}
.el-menu-item {
height: 40px;
line-height: 40px;
}
.setting .setting-item {
height: 40px;
line-height: 40px;
}
.icon {
width: 24px;
margin-right: 10px;
}
.icon {
width: 24px;
margin-right: 10px;
}
.account {
color: #5a78f0;
}
.account {
color: #5a78f0;
}
.organization {
color: #b33a5b;
}
.organization {
color: #b33a5b;
}
.workspace {
color: #44b349;
}
.workspace {
color: #44b349;
}
</style>
<template>
<el-menu menu-trigger="click" :default-active="$route.path" router>
<el-submenu index="1" v-permission="['admin']">
<template v-slot:title>
<font-awesome-icon class="icon account" :icon="['far', 'address-card']" size="lg"/>
<span>{{$t('commons.system')}}</span>
</template>
<el-menu-item index="/setting/user">{{$t('commons.user')}}</el-menu-item>
<el-menu-item index="/setting/organization">{{$t('commons.organization')}}</el-menu-item>
<el-menu-item index="/setting/systemworkspace">{{$t('commons.workspace')}}</el-menu-item>
<el-menu-item index="/setting/testresourcepool">{{$t('commons.test_resource_pool')}}</el-menu-item>
<el-menu-item index="/setting/systemparametersetting">{{$t('commons.system_parameter_setting')}}</el-menu-item>
</el-submenu>
<el-submenu index="2" v-permission="['org_admin']" v-if="isCurrentOrganizationAdmin">
<template v-slot:title>
<font-awesome-icon class="icon organization" :icon="['far', 'building']" size="lg"/>
<span>{{$t('commons.organization')}}</span>
</template>
<el-menu-item index="/setting/organizationmember" v-permission="['org_admin']">{{$t('commons.member')}}
</el-menu-item>
<el-menu-item index="/setting/organizationworkspace" v-permission="['org_admin']">{{$t('commons.workspace')}}
</el-menu-item>
<el-menu-item index="/setting/serviceintegration" v-permission="['org_admin']">{{$t('organization.service_integration')}}
</el-menu-item>
</el-submenu>
<el-submenu index="3" v-permission="['test_manager']" v-if="isCurrentWorkspaceUser">
<template v-slot:title>
<font-awesome-icon class="icon workspace" :icon="['far', 'list-alt']" size="lg"/>
<span>{{$t('commons.workspace')}}</span>
</template>
<el-menu-item index="/setting/member">{{$t('commons.member')}}</el-menu-item>
<el-menu-item index="/setting/testcase/report/template">{{$t('test_track.plan_view.report_template')}}
</el-menu-item>
</el-submenu>
<el-submenu index="4">
<template v-slot:title>
<font-awesome-icon class="icon" :icon="['far', 'user']" size="lg"/>
<span>{{$t('commons.personal_info')}}</span>
</template>
<el-menu-item index="/setting/personsetting">{{$t('commons.personal_setting')}}</el-menu-item>
<el-menu-item v-permission="['admin', 'org_admin', 'test_manager', 'test_user', 'test_viewer']"
index="/setting/apikeys">API Keys
</el-menu-item>
</el-submenu>
</el-menu>
</template>
<script>
import {checkoutCurrentOrganization, checkoutCurrentWorkspace} from "../../../common/js/utils";
export default {
name: "MsSettingMenuBackup",
data() {
return {
isCurrentOrganizationAdmin: false,
isCurrentWorkspaceUser: false,
}
},
mounted() {
this.isCurrentOrganizationAdmin = checkoutCurrentOrganization();
this.isCurrentWorkspaceUser = checkoutCurrentWorkspace();
},
}
</script>
<style scoped>
.el-menu {
border-right: 0;
}
.el-menu-item {
height: 40px;
line-height: 40px;
}
.icon {
width: 24px;
margin-right: 10px;
}
.account {
color: #5a78f0;
}
.organization {
color: #b33a5b;
}
.workspace {
color: #44b349;
}
</style>
import Setting from "@/business/components/settings/Setting";
import User from "@/business/components/settings/system/User";
import Organization from "@/business/components/settings/system/Organization";
import OrganizationMember from "@/business/components/settings/organization/OrganizationMember";
import OrganizationWorkspace from "@/business/components/settings/organization/OrganizationWorkspace";
import ServiceIntegration from "@/business/components/settings/organization/ServiceIntegration";
import PersonSetting from "@/business/components/settings/personal/PersonSetting";
import ApiKeys from "@/business/components/settings/personal/ApiKeys";
import Member from "@/business/components/settings/workspace/WorkspaceMember";
import SystemWorkspace from "@/business/components/settings/system/SystemWorkspace";
import TestResourcePool from "@/business/components/settings/system/TestResourcePool";
import SystemParameterSetting from "@/business/components/settings/system/SystemParameterSetting";
import TestCaseReportTemplate from "@/business/components/settings/workspace/TestCaseReportTemplate";
const requireContext = require.context('@/business/components/xpack/', true, /router\.js$/)
export default {
path: "/setting",
name: "Setting",
components: {
content: Setting
},
children: [
{
path: 'user',
component: User,
meta: {system: true, title: 'commons.user'}
},
{
path: 'organization',
component: Organization,
meta: {system: true, title: 'commons.organization'}
},
{
path: 'systemworkspace',
component: SystemWorkspace,
meta: {system: true, title: 'commons.workspace'}
},
{
path: 'testresourcepool',
component: TestResourcePool,
meta: {system: true, title: 'commons.test_resource_pool'}
},
{
path: 'systemparametersetting',
component: SystemParameterSetting,
meta: {system: true, title: 'commons.system_parameter_setting'}
},
...requireContext.keys().map(key => requireContext(key).system),
{
path: 'organizationmember',
component: OrganizationMember,
meta: {organization: true, title: 'commons.member'}
},
{
path: 'organizationworkspace',
component: OrganizationWorkspace,
meta: {organization: true, title: 'commons.workspace'}
},
{
path: 'serviceintegration',
component: ServiceIntegration,
meta: {organization: true, title: 'organization.service_integration'}
},
{
path: 'member',
component: Member,
meta: {workspace: true, title: 'commons.member'}
},
{
path: 'testcase/report/template',
name: 'testCaseReportTemplate',
component: TestCaseReportTemplate,
meta: {workspace: true, title: 'test_track.plan_view.report_template'}
},
{
path: 'personsetting',
component: PersonSetting,
meta: {person: true, title: 'commons.personal_setting'}
},
{
path: 'apikeys',
component: ApiKeys,
meta: {person: true, title: 'commons.api_keys'}
},
]
}
......@@ -173,7 +173,7 @@
<el-input v-model="form.name" autocomplete="off"/>
</el-form-item>
<el-form-item :label="$t('commons.email')" prop="email">
<el-input v-model="form.email" autocomplete="off" :disabled="form.source === 'LDAP' ? true : false"/>
<el-input v-model="form.email" autocomplete="off" :disabled="form.source === 'LDAP'"/>
</el-form-item>
<el-form-item :label="$t('commons.phone')" prop="phone">
<el-input v-model="form.phone" autocomplete="off"/>
......@@ -296,7 +296,7 @@
import MsTableOperator from "../../common/components/MsTableOperator";
import MsDialogFooter from "../../common/components/MsDialogFooter";
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
import {getCurrentUser, listenGoBack, removeGoBackListener} from "../../../../common/js/utils";
import {listenGoBack, removeGoBackListener} from "@/common/js/utils";
import MsRolesTag from "../../common/components/MsRolesTag";
export default {
......@@ -469,7 +469,7 @@
editUserPassword(editPasswordForm) {
this.$refs[editPasswordForm].validate(valid => {
if (valid) {
this.result = this.$post(this.editPasswordPath, this.ruleForm, response => {
this.result = this.$post(this.editPasswordPath, this.ruleForm, () => {
this.$success(this.$t('commons.modify_success'));
this.editPasswordVisible = false;
this.search();
......@@ -492,7 +492,7 @@
let roles = data.roles;
// let userRoles = result.userRoles;
this.$set(this.tableData[i], "roles", roles);
this.$set(this.tableData[i], "isLdapUser", this.tableData[i].source === 'LDAP' ? true : false);
this.$set(this.tableData[i], "isLdapUser", this.tableData[i].source === 'LDAP');
});
}
})
......
<template>
<common-component :title="$t('test_track.plan_view.defect_list')">
<template>
<el-table
row-key="id"
:data="defectList"
>
<el-table-column
prop="id"
:label="$t('commons.id')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="module"
:label="$t('test_track.module.module')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="title"
:label="$t('test_track.module.title')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="description"
:label="$t('test_track.module.describe')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="status"
:label="$t('test_track.module.status')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="currentOwner"
:label="$t('test_track.module.current_owner')"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="created"
:label="$t('test_track.module.creation_time')">
</el-table-column>
</el-table>
</template>
</common-component>
</template>
<script>
import CommonComponent from "./CommonComponent";
import PriorityTableItem from "../../../../../common/tableItems/planview/PriorityTableItem";
import TypeTableItem from "../../../../../common/tableItems/planview/TypeTableItem";
import MethodTableItem from "../../../../../common/tableItems/planview/MethodTableItem";
import StatusTableItem from "../../../../../common/tableItems/planview/StatusTableItem";
export default {
name: "DefectListComponent",
components: {StatusTableItem, MethodTableItem, TypeTableItem, PriorityTableItem, CommonComponent},
props: {
defectList: {
type: Array,
default() {
return [
{
id: "1023",
module: "模块e",
title: 'testCase1',
description: "第一个模块测试",
status: "接受/处理",
currentOwner: "Andy",
created: "2010.3.3",
},
]
}
}
}
}
</script>
<style scoped>
</style>
......@@ -7,6 +7,7 @@
<test-result-component v-if="preview.id == 2"/>
<test-result-chart-component v-if="preview.id == 3"/>
<failure-result-component v-if="preview.id == 4"/>
<defect-list-component v-if="preview.id == 5"/>
<rich-text-component :preview="preview" v-if="preview.type != 'system'"/>
</div>
......@@ -16,6 +17,7 @@
<test-result-component :test-results="metric.moduleExecuteResult" v-if="preview.id == 2"/>
<test-result-chart-component :execute-result="metric.executeResult" v-if="preview.id == 3"/>
<failure-result-component :failure-test-cases="metric.failureTestCases" v-if="preview.id == 4"/>
<defect-list-component :defect-list="metric.defectList" v-if="preview.id == 5"/>
<rich-text-component :is-report-view="isReportView" :preview="preview" v-if="preview.type != 'system'"/>
</div>
......@@ -28,10 +30,11 @@
import TestResultChartComponent from "./TestResultChartComponent";
import RichTextComponent from "./RichTextComponent";
import FailureResultComponent from "./FailureResultComponent";
import DefectListComponent from "./DefectListComponent";
export default {
name: "TemplateComponent",
components: {
FailureResultComponent,
FailureResultComponent,DefectListComponent,
RichTextComponent, TestResultChartComponent, TestResultComponent, BaseInfoComponent},
props: {
preview: {
......
......@@ -18,6 +18,36 @@
:label="$t('test_track.plan_view.case_count')"
width="180">
</el-table-column>
<el-table-column
prop="passCount"
:label="$t('test_track.plan_view.pass')"
width="180">
</el-table-column>
<el-table-column
prop="failureCount"
:label="$t('test_track.plan_view.failure')"
width="180">
</el-table-column>
<el-table-column
prop="blockingCount"
:label="$t('test_track.plan_view.blocking')"
width="180">
</el-table-column>
<el-table-column
prop="skipCount"
:label="$t('test_track.plan_view.skip')"
width="180">
</el-table-column>
<el-table-column
prop="underwayCount"
:label="$t('test_track.plan.plan_status_running')"
width="180">
</el-table-column>
<el-table-column
prop="prepareCount"
:label="$t('test_track.plan.plan_status_prepare')"
width="180">
</el-table-column>
<el-table-column
prop="passRate"
:label="$t('test_track.pass_rate')">
......@@ -50,19 +80,37 @@
moduleName: this.$t('test_track.module.module') + '1',
caseCount: '14',
passRate: 10.8,
issuesCount: 3
issuesCount: 3,
passCount:0,
failureCount:0,
blockingCount:0,
skipCount:0,
underwayCount:0,
prepareCount:0
},
{
moduleName: this.$t('test_track.module.module') + '2',
caseCount: '24',
passRate: 40,
issuesCount: 6
moduleName: this.$t('test_track.module.module') + '1',
caseCount: '14',
passRate: 10.8,
issuesCount: 3,
passCount:0,
failureCount:0,
blockingCount:0,
skipCount:0,
underwayCount:0,
prepareCount:0
},
{
moduleName: this.$t('test_track.module.module') + '3',
caseCount: '50',
passRate: 76.9,
issuesCount: 8
moduleName: this.$t('test_track.module.module') + '1',
caseCount: '14',
passRate: 10.8,
issuesCount: 3,
passCount:0,
failureCount:0,
blockingCount:0,
skipCount:0,
underwayCount:0,
prepareCount:0
}
]
}
......
......@@ -77,10 +77,11 @@
[2, { name: this.$t('test_track.plan_view.test_result'), id: 2 , type: 'system'}],
[3, { name: this.$t('test_track.plan_view.result_distribution'), id: 3 ,type: 'system'}],
[4, { name: this.$t('test_track.plan_view.failure_case'), id: 4 ,type: 'system'}],
[5, { name: this.$t('test_track.plan_view.custom_component'), id: 5 ,type: 'custom'}]
[5, { name: this.$t('test_track.plan_view.defect_list'), id: 5 ,type: 'system'}],
[6, { name: this.$t('test_track.plan_view.custom_component'), id:6,type: 'custom'}]
]
),
components: [5],
components: [6],
previews: [],
template: {},
isReport: false
......@@ -109,12 +110,12 @@
this.template = {
name: '',
content: {
components: [1,2,3,4,5],
components: [1,2,3,4,5,6],
customComponent: new Map()
}
};
this.previews = [];
this.components = [5];
this.components = [6];
if (id) {
this.type = 'edit';
this.getTemplateById(id);
......@@ -144,6 +145,7 @@
}
}
});
},
handleClose() {
window.removeEventListener('popstate', this.goBack, false);
......
......@@ -69,7 +69,8 @@
[2, { name: this.$t('test_track.plan_view.test_result'), id: 2 , type: 'system'}],
[3, { name: this.$t('test_track.plan_view.result_distribution'), id: 3 ,type: 'system'}],
[4, { name: this.$t('test_track.plan_view.failure_case'), id: 4 ,type: 'system'}],
[5, { name: this.$t('test_track.plan_view.custom_component'), id: 5 ,type: 'custom'}]
[5, { name: this.$t('test_track.plan_view.defect_list'), id: 5 ,type: 'system'}],
[6, { name: this.$t('test_track.plan_view.custom_component'), id: 6 ,type: 'custom'}]
]
),
isTestManagerOrTestUser: false
......@@ -175,6 +176,9 @@
if (!this.metric.moduleExecuteResult) {
this.metric.moduleExecuteResult = [];
}
/*缺陷列表*/
this.metric.defectList = [];
if (this.report.startTime) {
this.metric.startTime = new Date(this.report.startTime);
}
......
Subproject commit 52adadce7eb781fcab20c5e1ab7e83bd03b24b4e
Subproject commit 7e4d80cc2b870a8cac6dbb9fe6711ab6041faf6d
......@@ -64,6 +64,20 @@ export default {
}
}
Vue.prototype.$$get = function (url, data, success) {
let result = {loading: true};
if (!success) {
return axios.get(url, {params: data});
} else {
axios.get(url, {params: data}).then(response => {
then(success, response, result);
}).catch(error => {
exception(error, result);
});
return result;
}
};
Vue.prototype.$get = function (url, success) {
let result = {loading: true};
if (!success) {
......@@ -117,7 +131,7 @@ export default {
axios.all(array).then(axios.spread(callback));
};
Vue.prototype.$fileDownload = function(url) {
Vue.prototype.$fileDownload = function (url) {
axios.get(url, {responseType: 'blob'})
.then(response => {
let fileName = window.decodeURI(response.headers['content-disposition'].split('=')[1]);
......@@ -128,11 +142,11 @@ export default {
});
};
Vue.prototype.$fileUpload = function(url, file, param, success, failure) {
Vue.prototype.$fileUpload = function (url, file, param, success, failure) {
let formData = new FormData();
formData.append("file", file);
formData.append('request', new Blob([JSON.stringify(param)], {type: "application/json"}));
let axiosRequestConfig = {
let axiosRequestConfig = {
method: 'POST',
url: url,
data: formData,
......@@ -140,7 +154,7 @@ export default {
'Content-Type': undefined
}
};
return Vue.prototype.$request(axiosRequestConfig, success, failure);
return Vue.prototype.$request(axiosRequestConfig, success, failure);
}
}
......
......@@ -43,6 +43,8 @@ export default {
user: 'User',
system: 'System',
personal_setting: 'Personal Setting',
api_keys: 'API Keys',
quota: 'Quota',
test_resource_pool: 'Resource Pool',
system_setting: 'Settings',
api: 'API',
......@@ -608,6 +610,11 @@ export default {
delete_confirm: "Confirm delete module:",
delete_all_resource: "and all submodules and test cases under the module",
module: "Module",
title: "Title",
describe: "Describe",
status: "Status",
current_owner: "Current Owner",
creation_time: "Creation time"
},
home: {
recent_test: "Recent test",
......@@ -647,6 +654,7 @@ export default {
result_distribution: "Result distribution",
custom_component: "Custom",
create_report: "Create report",
defect_list:"Defect list",
view_report: "View report",
component_library: "Component library",
component_library_tip: "Drag and drop the component from the component library, add to the right, preview the report effect, only one can be added per system component.",
......@@ -775,4 +783,23 @@ export default {
no_qualifying_results: "No Qualifying Results",
}
},
quota: {
default: {
organization: "Organization Default Quota",
workspace: "Workspace Default Quota",
},
api: "Number of interface tests",
performance: "Number of performance tests",
resource_pool: "Available test resource pool",
max_threads: "Maximum Concurrency",
duration: "Stress test duration",
use_default: "Use default quota",
yes: "Yes",
no: "No",
edit: "Edit",
list: "Quota List",
modify: "Modify Quota",
edit_quota_title: "{0} quota",
workspace_quota_list: "Workspace quota list of {0}",
}
};
......@@ -36,6 +36,8 @@ export default {
phone: '电话',
role: '角色',
personal_info: '个人信息',
api_keys: 'API Keys',
quota: '配额管理',
status: '状态',
show_all: '显示全部',
show: '显示',
......@@ -613,6 +615,11 @@ export default {
delete_confirm: "确认删除模块: ",
delete_all_resource: "以及模块下所有子模块和测试用例",
module: "模块",
title: "标题",
status: "状态",
describe: "描述",
current_owner: "处理人",
creation_time: "创建时间"
},
home: {
recent_test: "最近测试",
......@@ -651,6 +658,7 @@ export default {
test_result: "测试结果",
result_distribution: "测试结果分布",
custom_component: "自定义模块",
defect_list:"缺陷列表",
create_report: "创建测试报告",
view_report: "查看测试报告",
component_library: "组件库",
......@@ -779,4 +787,23 @@ export default {
no_qualifying_results: "没有达到条件的结果",
}
},
quota: {
default: {
organization: "组织默认配额",
workspace: "工作空间默认配额",
},
api: "接口测试数量",
performance: "性能测试数量",
resource_pool: "可用测试资源池",
max_threads: "最大并发数",
duration: "压测时长",
use_default: "使用默认配额",
yes: "",
no: "",
edit: "编辑",
list: "配额列表",
modify: "修改配额",
edit_quota_title: "{0}的配额",
workspace_quota_list: "{0}的工作空间配额列表",
}
};
......@@ -43,6 +43,8 @@ export default {
user: '用戶',
system: '系統',
personal_setting: '個人設置',
api_keys: 'API Keys',
quota: '配額管理',
test_resource_pool: '測試資源池',
system_setting: '系統設置',
api: '接口測試',
......@@ -608,6 +610,11 @@ export default {
delete_confirm: "確認刪除模塊: ",
delete_all_resource: "以及模塊下所有子模塊和測試用例",
module: "模塊",
title: "標題",
status: "狀態",
describe: "描述",
current_owner: "處理人",
creation_time: "創建時間"
},
home: {
recent_test: "最近測試",
......@@ -647,6 +654,7 @@ export default {
result_distribution: "測試結果分布",
custom_component: "自定義模塊",
create_report: "創建測試報告",
defect_list:"缺陷清單",
view_report: "查看測試報告",
component_library: "組件庫",
component_library_tip: "拖拽組件庫中組件,添加至右側,預覽報告效果,每個系統組件只能添加壹個。",
......@@ -774,4 +782,23 @@ export default {
no_qualifying_results: "沒有達到條件的結果",
}
},
quota: {
default: {
organization: "組織默認配額",
workspace: "工作空間默認配額",
},
api: "接口測試數量",
performance: "性能測試數量",
resource_pool: "可用測試資源池",
max_threads: "最大並發數",
duration: "壓測時長",
use_default: "使用默認配額",
yes: "",
no: "",
edit: "編輯",
list: "配額列表",
modify: "修改配額",
edit_quota_title: "{0}的配額",
workspace_quota_list: "{0}的工作空間配額列表",
}
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册