fix (接口定义): 优化前端生成接口数据一些无效字段
This commit is contained in:
parent
af785a1d4e
commit
78e5c5942c
|
@ -4,9 +4,6 @@ import {ConfigCenter, ConsumerAndService, RegistryCenter} from "../../../../../m
|
||||||
const DEFAULT_OPTIONS = {
|
const DEFAULT_OPTIONS = {
|
||||||
options: {
|
options: {
|
||||||
attributes: {
|
attributes: {
|
||||||
guiclass: "DubboSampleGui",
|
|
||||||
testclass: "DubboSampler",
|
|
||||||
testname: "DubboSampler",
|
|
||||||
enabled: "true"
|
enabled: "true"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,6 @@ import {Body} from "../../../../../model/ApiTestModel";
|
||||||
const DEFAULT_OPTIONS = {
|
const DEFAULT_OPTIONS = {
|
||||||
options: {
|
options: {
|
||||||
attributes: {
|
attributes: {
|
||||||
guiclass: "HttpTestSampleGui",
|
|
||||||
testclass: "HTTPSamplerProxy",
|
|
||||||
testname: "HTTPSamplerProxy",
|
|
||||||
enabled: "true"
|
enabled: "true"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,15 +14,6 @@ export default class TestPlan extends HashTreeElement {
|
||||||
super(options);
|
super(options);
|
||||||
this.type = TYPE;
|
this.type = TYPE;
|
||||||
this.hashTree = [];
|
this.hashTree = [];
|
||||||
this.userDefinedVariables = [];
|
|
||||||
|
|
||||||
let elementProp = this.initElementProp('TestPlan.user_defined_variables', 'Arguments');
|
|
||||||
let collectionProp = elementProp.initCollectionProp('Arguments.arguments');
|
|
||||||
collectionProp.forEach(ep => {
|
|
||||||
let name = ep.initStringProp('Argument.name').value;
|
|
||||||
let value = ep.initStringProp('Argument.value').value;
|
|
||||||
this.userDefinedVariables.push({name: name, value: value, enable: true});
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateProps() {
|
updateProps() {
|
||||||
|
|
|
@ -10,10 +10,6 @@ export default class Element {
|
||||||
this.name = options.name
|
this.name = options.name
|
||||||
|
|
||||||
if (options.attributes) {
|
if (options.attributes) {
|
||||||
this.attributes = options.attributes;
|
|
||||||
if (options.attributes.testname) {
|
|
||||||
this.label = options.attributes.testname;
|
|
||||||
}
|
|
||||||
if (options.attributes.testclass && this.name === undefined) {
|
if (options.attributes.testclass && this.name === undefined) {
|
||||||
this.name = options.attributes.testclass;
|
this.name = options.attributes.testclass;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,6 @@ import {loadHashTree, loadComponent} from "./components";
|
||||||
export default class HashTreeElement extends Element {
|
export default class HashTreeElement extends Element {
|
||||||
constructor({options: options, hashTree: hashTree}) {
|
constructor({options: options, hashTree: hashTree}) {
|
||||||
super(options);
|
super(options);
|
||||||
this.props = getProps(options.elements);
|
|
||||||
this.comments = this.initStringProp('TestPlan.comments');
|
|
||||||
|
|
||||||
if (hashTree) {
|
if (hashTree) {
|
||||||
this.hashTree = loadHashTree(hashTree);
|
this.hashTree = loadHashTree(hashTree);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue