Merge branch 'v1.7' of https://github.com/metersphere/metersphere into v1.7
This commit is contained in:
commit
bd12a36af5
|
@ -11,6 +11,7 @@
|
|||
@edit="edit"
|
||||
@drag="drag"
|
||||
@remove="remove"
|
||||
@refresh="list"
|
||||
@nodeSelectEvent="nodeChange"
|
||||
ref="nodeTree">
|
||||
|
||||
|
@ -34,24 +35,24 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import SelectMenu from "../../../track/common/SelectMenu";
|
||||
import MsAddBasisScenario from "@/business/components/api/automation/scenario/AddBasisScenario";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsNodeTree from "../../../track/common/NodeTree";
|
||||
import {buildNodePath} from "../../definition/model/NodeTree";
|
||||
import ModuleTrashButton from "../../definition/components/module/ModuleTrashButton";
|
||||
import SelectMenu from "../../../track/common/SelectMenu";
|
||||
import MsAddBasisScenario from "@/business/components/api/automation/scenario/AddBasisScenario";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsNodeTree from "../../../track/common/NodeTree";
|
||||
import {buildNodePath} from "../../definition/model/NodeTree";
|
||||
import ModuleTrashButton from "../../definition/components/module/ModuleTrashButton";
|
||||
|
||||
export default {
|
||||
name: 'MsApiScenarioModule',
|
||||
components: {
|
||||
ModuleTrashButton,
|
||||
MsNodeTree,
|
||||
MsAddBasisScenario,
|
||||
SelectMenu,
|
||||
},
|
||||
props: {
|
||||
isReadOnly: {
|
||||
type: Boolean,
|
||||
export default {
|
||||
name: 'MsApiScenarioModule',
|
||||
components: {
|
||||
ModuleTrashButton,
|
||||
MsNodeTree,
|
||||
MsAddBasisScenario,
|
||||
SelectMenu,
|
||||
},
|
||||
props: {
|
||||
isReadOnly: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
@edit="edit"
|
||||
@drag="drag"
|
||||
@remove="remove"
|
||||
@refresh="list"
|
||||
@nodeSelectEvent="nodeChange"
|
||||
ref="nodeTree">
|
||||
|
||||
|
@ -33,26 +34,26 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import MsAddBasisApi from "../basis/AddBasisApi";
|
||||
import SelectMenu from "../../../../track/common/SelectMenu";
|
||||
import {OPTIONS} from "../../model/JsonData";
|
||||
import ApiImport from "../import/ApiImport";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsNodeTree from "../../../../track/common/NodeTree";
|
||||
import ApiModuleHeader from "./ApiModuleHeader";
|
||||
import {buildNodePath} from "../../model/NodeTree";
|
||||
import MsAddBasisApi from "../basis/AddBasisApi";
|
||||
import SelectMenu from "../../../../track/common/SelectMenu";
|
||||
import {OPTIONS} from "../../model/JsonData";
|
||||
import ApiImport from "../import/ApiImport";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsNodeTree from "../../../../track/common/NodeTree";
|
||||
import ApiModuleHeader from "./ApiModuleHeader";
|
||||
import {buildNodePath} from "../../model/NodeTree";
|
||||
|
||||
export default {
|
||||
name: 'MsApiModule',
|
||||
components: {
|
||||
ApiModuleHeader,
|
||||
MsNodeTree,
|
||||
MsAddBasisApi,
|
||||
SelectMenu,
|
||||
ApiImport
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
export default {
|
||||
name: 'MsApiModule',
|
||||
components: {
|
||||
ApiModuleHeader,
|
||||
MsNodeTree,
|
||||
MsAddBasisApi,
|
||||
SelectMenu,
|
||||
ApiImport
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
condition: {
|
||||
protocol: OPTIONS[0].value,
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
<el-form :inline="true">
|
||||
<el-form-item :label="$t('load_test.thread_num')">
|
||||
<el-input-number
|
||||
:disabled="true"
|
||||
:placeholder="$t('load_test.input_thread_num')"
|
||||
v-model="threadGroup.threadNumber"
|
||||
:min="1"
|
||||
size="mini"/>
|
||||
:disabled="true"
|
||||
:placeholder="$t('load_test.input_thread_num')"
|
||||
v-model="threadGroup.threadNumber"
|
||||
:min="1"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<el-form-item>
|
||||
|
@ -31,72 +31,72 @@
|
|||
<div v-if="threadGroup.threadType === 'DURATION'">
|
||||
<el-form-item :label="$t('load_test.duration')">
|
||||
<el-input-number
|
||||
:disabled="true"
|
||||
v-model="threadGroup.duration"
|
||||
:min="1"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
:disabled="true"
|
||||
v-model="threadGroup.duration"
|
||||
:min="1"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<el-form-item :label="$t('load_test.rps_limit')">
|
||||
<el-switch v-model="threadGroup.rpsLimitEnable" @change="calculateTotalChart()"/>
|
||||
|
||||
<el-input-number
|
||||
:disabled="true "
|
||||
v-model="threadGroup.rpsLimit"
|
||||
@change="calculateChart(threadGroup)"
|
||||
:min="1"
|
||||
size="mini"/>
|
||||
:disabled="true "
|
||||
v-model="threadGroup.rpsLimit"
|
||||
@change="calculateChart(threadGroup)"
|
||||
:min="1"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<el-form-item :label="$t('load_test.ramp_up_time_within')">
|
||||
<el-input-number
|
||||
:disabled="true"
|
||||
:min="1"
|
||||
:max="threadGroup.duration"
|
||||
v-model="threadGroup.rampUpTime"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
:disabled="true"
|
||||
:min="1"
|
||||
:max="threadGroup.duration"
|
||||
v-model="threadGroup.rampUpTime"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('load_test.ramp_up_time_minutes')">
|
||||
<el-input-number
|
||||
:disabled="true"
|
||||
:min="1"
|
||||
:max="Math.min(threadGroup.threadNumber, threadGroup.rampUpTime)"
|
||||
v-model="threadGroup.step"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
:disabled="true"
|
||||
:min="1"
|
||||
:max="Math.min(threadGroup.threadNumber, threadGroup.rampUpTime)"
|
||||
v-model="threadGroup.step"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('load_test.ramp_up_time_times')"/>
|
||||
</div>
|
||||
<div v-if="threadGroup.threadType === 'ITERATION'">
|
||||
<el-form-item :label="$t('load_test.iterate_num')">
|
||||
<el-input-number
|
||||
:disabled="true"
|
||||
v-model="threadGroup.iterateNum"
|
||||
:min="1"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
:disabled="true"
|
||||
v-model="threadGroup.iterateNum"
|
||||
:min="1"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<el-form-item :label="$t('load_test.rps_limit')">
|
||||
<el-switch v-model="threadGroup.rpsLimitEnable" @change="calculateTotalChart()"/>
|
||||
|
||||
<el-input-number
|
||||
:disabled="true || !threadGroup.rpsLimitEnable"
|
||||
v-model="threadGroup.rpsLimit"
|
||||
@change="calculateChart(threadGroup)"
|
||||
:min="1"
|
||||
size="mini"/>
|
||||
:disabled="true || !threadGroup.rpsLimitEnable"
|
||||
v-model="threadGroup.rpsLimit"
|
||||
@change="calculateChart(threadGroup)"
|
||||
:min="1"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<el-form-item :label="$t('load_test.ramp_up_time_within')">
|
||||
<el-input-number
|
||||
:disabled="true"
|
||||
:min="1"
|
||||
v-model="threadGroup.iterateRampUp"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
:disabled="true"
|
||||
:min="1"
|
||||
v-model="threadGroup.iterateRampUp"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('load_test.ramp_up_time_seconds')"/>
|
||||
</div>
|
||||
|
@ -129,11 +129,11 @@ const ITERATE_RAMP_UP = "iterateRampUpTime";
|
|||
|
||||
const hexToRgba = function (hex, opacity) {
|
||||
return 'rgba(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5)) + ','
|
||||
+ parseInt('0x' + hex.slice(5, 7)) + ',' + opacity + ')';
|
||||
+ parseInt('0x' + hex.slice(5, 7)) + ',' + opacity + ')';
|
||||
}
|
||||
const hexToRgb = function (hex) {
|
||||
return 'rgb(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5))
|
||||
+ ',' + parseInt('0x' + hex.slice(5, 7)) + ')';
|
||||
+ ',' + parseInt('0x' + hex.slice(5, 7)) + ')';
|
||||
}
|
||||
|
||||
export default {
|
||||
|
@ -469,11 +469,12 @@ export default {
|
|||
},
|
||||
},
|
||||
watch: {
|
||||
'report.testId': {
|
||||
report: {
|
||||
handler() {
|
||||
this.getJmxContent();
|
||||
},
|
||||
}
|
||||
deep: true
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -220,6 +220,10 @@ export default {
|
|||
if (dropType === "none" || dropType === undefined) {
|
||||
return;
|
||||
}
|
||||
if (dropNode.data.id === 'root' && dropType === 'before') {
|
||||
this.$emit('refresh');
|
||||
return false;
|
||||
}
|
||||
let param = this.buildParam(draggingNode, dropNode, dropType);
|
||||
let list = [];
|
||||
this.getNodeTree(this.treeNodes, draggingNode.data.id, list);
|
||||
|
|
|
@ -8,25 +8,26 @@
|
|||
@drag="drag"
|
||||
@remove="remove"
|
||||
@nodeSelectEvent="nodeChange"
|
||||
@refresh="list"
|
||||
ref="nodeTree"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NodeEdit from "./NodeEdit";
|
||||
import {getCurrentProjectID} from "../../../../common/js/utils";
|
||||
import MsNodeTree from "./NodeTree";
|
||||
import NodeEdit from "./NodeEdit";
|
||||
import {getCurrentProjectID} from "../../../../common/js/utils";
|
||||
import MsNodeTree from "./NodeTree";
|
||||
|
||||
export default {
|
||||
name: "TestCaseNodeTree",
|
||||
components: {MsNodeTree, NodeEdit },
|
||||
data() {
|
||||
return {
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
result: {},
|
||||
treeNodes: [],
|
||||
export default {
|
||||
name: "TestCaseNodeTree",
|
||||
components: {MsNodeTree, NodeEdit},
|
||||
data() {
|
||||
return {
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
result: {},
|
||||
treeNodes: [],
|
||||
projectId: ""
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue