diff --git a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue
index 0bc65d7c09..792834af8e 100644
--- a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue
+++ b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue
@@ -275,7 +275,7 @@
node-key="id"
height="calc(100vh - 170px)"
:minItemSize="43"
- :sizeDependencies="['expanded']"
+ :sizeDependencies="['expanded', 'checked']"
:props="props"
:data="scenarioDefinition"
:buffer="300"
@@ -293,11 +293,12 @@
ref="stepTree"
:key="reloadTree">
-
+
+
+ {{ hideNode(node) }}
+
@@ -2393,39 +2390,51 @@ export default {
},
changeNodeStatus(resourceIds, nodes) {
for (let i in nodes) {
- if (nodes[i] && !(nodes[i].type === 'scenario' && nodes[i].referenced === 'REF')) {
- if (resourceIds.indexOf(nodes[i].resourceId) !== -1) {
- nodes[i].active = this.expandedStatus;
+ const node = nodes[i];
+ if (node && !(node.type === 'scenario' && node.referenced === 'REF')) {
+ if (
+ resourceIds.indexOf(node.resourceId) !== -1 &&
+ this.stepFilter.get('ALlSamplerStep').indexOf(node.type) === -1
+ ) {
+ node.active = this.expandedStatus;
}
- if (nodes[i].hashTree && nodes[i].hashTree.length > 0 && !this.expandedStatus) {
- this.changeNodeStatus(resourceIds, nodes[i].hashTree);
+ if (node.hashTree && node.hashTree.length > 0 && !this.expandedStatus) {
+ this.changeNodeStatus(resourceIds, node.hashTree);
}
}
}
},
+ isNodeShow(node, data) {
+ const res =
+ this.stepFilter.get('ALlSamplerStep').indexOf(data.type) === -1 ||
+ !node.parent ||
+ !node.parent.data ||
+ this.stepFilter.get('AllSamplerProxy').indexOf(node.parent.data.type) === -1;
+ return res;
+ },
getAllResourceIds() {
let selectNodes = [];
let selectIds = [];
if (this.$refs.stepTree) {
selectNodes = this.$refs.stepTree.getCheckedNodes();
- selectNodes.forEach(item => {
- selectIds.push(item.resourceId)
+ selectNodes.forEach((item) => {
+ selectIds.push(item.resourceId);
});
}
let resourceIds = [];
this.filterAllStep(this.scenarioDefinition, resourceIds, selectIds);
return resourceIds;
},
- filterAllStep(stepArray, resourceIds,selectIds) {
+ filterAllStep(stepArray, resourceIds, selectIds) {
if (stepArray) {
- stepArray.forEach(item =>{
+ stepArray.forEach((item) => {
if (selectIds && selectIds.includes(item.resourceId)) {
resourceIds.push(item.resourceId);
}
- if(item.referenced !== 'REF' && item.hashTree){
- this.filterAllStep(item.hashTree,resourceIds, selectIds);
+ if (item.referenced !== 'REF' && item.hashTree) {
+ this.filterAllStep(item.hashTree, resourceIds, selectIds);
}
- })
+ });
}
},
getAllCheckedNodes() {
diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue
index 18c0f493d4..b95243af29 100644
--- a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue
+++ b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue
@@ -72,7 +72,9 @@
+ v-permission="['PROJECT_API_SCENARIO:READ+DEBUG', 'PROJECT_API_SCENARIO:READ+RUN']" />
+ v-permission="['PROJECT_API_SCENARIO:READ+DEBUG', 'PROJECT_API_SCENARIO:READ+RUN']">
STOP
@@ -171,7 +167,7 @@