Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
4fd5bce705
|
@ -238,7 +238,7 @@
|
||||||
<select id="listSimple" resultType="io.metersphere.api.dto.definition.ApiTestCaseDTO">
|
<select id="listSimple" resultType="io.metersphere.api.dto.definition.ApiTestCaseDTO">
|
||||||
select
|
select
|
||||||
atc.id, atc.project_id, atc.name, atc.api_definition_id, atc.priority, atc.description, atc.create_user_id, atc.update_user_id, atc.create_time, atc.update_time, atc.num,
|
atc.id, atc.project_id, atc.name, atc.api_definition_id, atc.priority, atc.description, atc.create_user_id, atc.update_user_id, atc.create_time, atc.update_time, atc.num,
|
||||||
a.module_id, a.path, a.protocol
|
a.module_id, a.path, a.protocol, atc.tags
|
||||||
from
|
from
|
||||||
api_test_case atc
|
api_test_case atc
|
||||||
inner join
|
inner join
|
||||||
|
@ -279,7 +279,7 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.name != null and request.name!=''">
|
<if test="request.name != null and request.name!=''">
|
||||||
and atc.name like CONCAT('%', #{request.name},'%')
|
and (atc.name like CONCAT('%', #{request.name},'%') or atc.tags like CONCAT('%', #{request.name},'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="request.createTime > 0">
|
<if test="request.createTime > 0">
|
||||||
and atc.create_time >= #{request.createTime}
|
and atc.create_time >= #{request.createTime}
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.name != null and request.name!=''">
|
<if test="request.name != null and request.name!=''">
|
||||||
and c.name like CONCAT('%', #{request.name},'%')
|
and (c.name like CONCAT('%', #{request.name},'%') or c.tags like CONCAT('%', #{request.name},'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="request.moduleIds != null and request.moduleIds.size() > 0">
|
<if test="request.moduleIds != null and request.moduleIds.size() > 0">
|
||||||
and a.module_id in
|
and a.module_id in
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class ShiroDBRealm extends AuthorizingRealm {
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
msg = "The user does not exist: " + userId;
|
msg = "The user does not exist: " + userId;
|
||||||
logger.warn(msg);
|
logger.warn(msg);
|
||||||
throw new UnknownAccountException(Translator.get("password_is_incorrect") + userId);
|
throw new UnknownAccountException(Translator.get("password_is_incorrect"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
|
@ -119,7 +119,7 @@ public class ShiroDBRealm extends AuthorizingRealm {
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
msg = "The user does not exist: " + userId;
|
msg = "The user does not exist: " + userId;
|
||||||
logger.warn(msg);
|
logger.warn(msg);
|
||||||
throw new UnknownAccountException(Translator.get("password_is_incorrect") + userId);
|
throw new UnknownAccountException(Translator.get("password_is_incorrect"));
|
||||||
}
|
}
|
||||||
userId = user.getId();
|
userId = user.getId();
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,14 @@
|
||||||
:label="$t('api_test.definition.api_path')"
|
:label="$t('api_test.definition.api_path')"
|
||||||
show-overflow-tooltip/>
|
show-overflow-tooltip/>
|
||||||
|
|
||||||
|
<el-table-column prop="tags" :label="$t('commons.tag')">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<div v-for="(itemName,index) in scope.row.tags" :key="index">
|
||||||
|
<ms-tag type="success" effect="plain" :content="itemName"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="createUser"
|
prop="createUser"
|
||||||
:label="'创建人'"
|
:label="'创建人'"
|
||||||
|
@ -100,35 +108,34 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import MsTableOperator from "../../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../../common/components/MsTableOperator";
|
||||||
import MsTableOperatorButton from "../../../../common/components/MsTableOperatorButton";
|
import MsTableOperatorButton from "../../../../common/components/MsTableOperatorButton";
|
||||||
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
|
import MsTablePagination from "../../../../common/pagination/TablePagination";
|
||||||
import MsTablePagination from "../../../../common/pagination/TablePagination";
|
import MsTag from "../../../../common/components/MsTag";
|
||||||
import MsTag from "../../../../common/components/MsTag";
|
import MsApiCaseList from "../case/ApiCaseList";
|
||||||
import MsApiCaseList from "../case/ApiCaseList";
|
import ApiCaseList from "../case/ApiCaseList";
|
||||||
import MsContainer from "../../../../common/components/MsContainer";
|
import MsContainer from "../../../../common/components/MsContainer";
|
||||||
import MsBottomContainer from "../BottomContainer";
|
import MsBottomContainer from "../BottomContainer";
|
||||||
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
|
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
|
||||||
import MsBatchEdit from "../basis/BatchEdit";
|
import MsBatchEdit from "../basis/BatchEdit";
|
||||||
import {API_METHOD_COLOUR, CASE_PRIORITY, REQ_METHOD} from "../../model/JsonData";
|
import {API_METHOD_COLOUR, CASE_PRIORITY, REQ_METHOD} from "../../model/JsonData";
|
||||||
|
|
||||||
import {getBodyUploadFiles, getCurrentProjectID} from "@/common/js/utils";
|
import {getBodyUploadFiles, getCurrentProjectID} from "@/common/js/utils";
|
||||||
import ApiListContainer from "./ApiListContainer";
|
import ApiListContainer from "./ApiListContainer";
|
||||||
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
|
||||||
import ApiCaseList from "../case/ApiCaseList";
|
import {_filter, _sort} from "../../../../../../common/js/utils";
|
||||||
import {_filter, _sort} from "../../../../../../common/js/utils";
|
import {_handleSelect, _handleSelectAll} from "../../../../../../common/js/tableUtils";
|
||||||
import {_handleSelect, _handleSelectAll} from "../../../../../../common/js/tableUtils";
|
import MsApiCaseTableExtendBtns from "../reference/ApiCaseTableExtendBtns";
|
||||||
import MsApiCaseTableExtendBtns from "../reference/ApiCaseTableExtendBtns";
|
import MsReferenceView from "../reference/ReferenceView";
|
||||||
import MsReferenceView from "../reference/ReferenceView";
|
import MsSetEnvironment from "@/business/components/api/definition/components/basis/SetEnvironment";
|
||||||
import MsSetEnvironment from "@/business/components/api/definition/components/basis/SetEnvironment";
|
import TestPlan from "@/business/components/api/definition/components/jmeter/components/test-plan";
|
||||||
import TestPlan from "@/business/components/api/definition/components/jmeter/components/test-plan";
|
import ThreadGroup from "@/business/components/api/definition/components/jmeter/components/thread-group";
|
||||||
import ThreadGroup from "@/business/components/api/definition/components/jmeter/components/thread-group";
|
import {parseEnvironment} from "@/business/components/api/test/model/EnvironmentModel";
|
||||||
import {parseEnvironment} from "@/business/components/api/test/model/EnvironmentModel";
|
import MsTableSelectAll from "../../../../common/components/table/MsTableSelectAll";
|
||||||
import MsTableSelectAll from "../../../../common/components/table/MsTableSelectAll";
|
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
||||||
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||||
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ApiCaseSimpleList",
|
name: "ApiCaseSimpleList",
|
||||||
components: {
|
components: {
|
||||||
MsTableSelectAll,
|
MsTableSelectAll,
|
||||||
|
@ -290,6 +297,12 @@
|
||||||
this.total = response.data.itemCount;
|
this.total = response.data.itemCount;
|
||||||
this.tableData = response.data.listObject;
|
this.tableData = response.data.listObject;
|
||||||
this.unSelection = response.data.listObject.map(s => s.id);
|
this.unSelection = response.data.listObject.map(s => s.id);
|
||||||
|
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.tags && item.tags.length > 0) {
|
||||||
|
item.tags = JSON.parse(item.tags);
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
<el-button-group v-if="isShowChangeButton">
|
<el-button-group v-if="isShowChangeButton">
|
||||||
|
|
||||||
<el-tooltip class="item" effect="dark" content="接口列表" placement="left">
|
<el-tooltip class="item" effect="dark" content="接口列表" placement="left">
|
||||||
<el-button plain size="small" icon="el-icon-tickets" :class="{active: isApiListEnable}" @click="apiChange('api')"></el-button>
|
<el-button plain style="width: 44px;height: 32px;padding: 5px 8px;" :class="{active: isApiListEnable}" @click="apiChange('api')">API</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<el-tooltip class="item" effect="dark" content="用例列表" placement="right">
|
<el-tooltip class="item" effect="dark" content="用例列表" placement="right">
|
||||||
<el-button plain class="case-button" size="small" icon="el-icon-paperclip" :class="{active: !isApiListEnable}" @click="caseChange('case')"></el-button>
|
<el-button plain class="case-button" style="width: 44px;height: 32px;padding: 1px;" :class="{active: !isApiListEnable}" @click="caseChange('case')">CASE</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
Loading…
Reference in New Issue