mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 13:09:28 +08:00
feat(接口自动化): 统一样式风格
This commit is contained in:
parent
db0fa8a810
commit
a812d83c76
@ -17,16 +17,17 @@
|
||||
{{$t('api_test.automation.customize_req')}}
|
||||
</el-button>
|
||||
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': request.active}"
|
||||
@click="active(request)" v-if="request.referenced!=undefined && request.referenced!='Deleted' && request.referenced!='REF'"/>
|
||||
<span v-if="request.referenced!=undefined && request.referenced==='Deleted' || request.referenced=='REF'">{{request.name}} </span>
|
||||
<el-input size="small" v-model="request.name" style="width: 40%;margin-left: 20px" :placeholder="$t('commons.input_name')" v-else/>
|
||||
<el-input size="small" v-model="request.name" style="width: 40%;" :placeholder="$t('commons.input_name')" v-else/>
|
||||
|
||||
<el-tag size="mini" style="margin-left: 20px" v-if="request.referenced==='Deleted'" type="danger">{{$t('api_test.automation.reference_deleted')}}</el-tag>
|
||||
<el-tag size="mini" style="margin-left: 20px" v-if="request.referenced ==='REF'">{{ $t('api_test.scenario.reference') }}</el-tag>
|
||||
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-right: 20px; float: right"/>
|
||||
|
||||
<div style="margin-right: 20px; float: right">
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': request.active}"
|
||||
@click="active(request)" v-if="request.referenced!=undefined && request.referenced!='Deleted' && request.referenced!='REF'"/>
|
||||
<el-switch v-model="request.enable" style="margin-left: 10px"/>
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-left: 10px"/>
|
||||
</div>
|
||||
</el-row>
|
||||
<!-- 请求参数-->
|
||||
<el-collapse-transition>
|
||||
|
@ -5,11 +5,14 @@
|
||||
<div class="el-step__icon is-text ms-api-col">
|
||||
<div class="el-step__icon-inner">{{scenario.index}}</div>
|
||||
</div>
|
||||
<el-button class="ms-title-buttion" size="small">{{$t('api_test.automation.wait_controller')}}</el-button>
|
||||
<el-button class="ms-title-buttion" size="small">{{$t('api_test.automation.scenario_import')}}</el-button>
|
||||
{{scenario.name}}
|
||||
<el-tag size="mini" style="margin-left: 20px" v-if="scenario.referenced==='Deleted'" type="danger">{{$t('api_test.automation.reference_deleted')}}</el-tag>
|
||||
<el-tag size="mini" style="margin-left: 20px" v-if="scenario.referenced==='REF'">{{ $t('api_test.scenario.reference') }}</el-tag>
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-right: 20px; float: right"/>
|
||||
<div style="margin-right: 20px; float: right">
|
||||
<el-switch v-model="scenario.enable" style="margin-left: 10px"/>
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-left: 10px"/>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
|
@ -8,8 +8,10 @@
|
||||
<el-button class="ms-title-buttion" size="small">{{$t('api_test.automation.wait_controller')}}</el-button>
|
||||
<el-input-number class="width-100" size="small" v-model="timer.delay" :min="0" :step="1000"/>
|
||||
ms
|
||||
<!--<el-switch v-model="timer.enable" :inactive-text="$t('api_test.scenario.enable_disable')" style="margin-left: 20px"/>-->
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-right: 20px; float: right"/>
|
||||
<div style="margin-right: 20px; float: right">
|
||||
<el-switch v-model="timer.enable" style="margin-left: 10px"/>
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-left: 10px;"/>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
|
@ -438,6 +438,7 @@
|
||||
},
|
||||
addCustomizeApi(request) {
|
||||
this.customizeVisible = false;
|
||||
request.enable === undefined ? request.enable = true : request.enable;
|
||||
if (this.selectedTreeNode != undefined) {
|
||||
this.selectedTreeNode.hashTree.push(request);
|
||||
} else {
|
||||
@ -450,6 +451,7 @@
|
||||
addScenario(arr) {
|
||||
if (arr.length > 0) {
|
||||
arr.forEach(item => {
|
||||
item.enable === undefined ? item.enable = true : item.enable;
|
||||
this.scenarioDefinition.push(item);
|
||||
})
|
||||
}
|
||||
@ -470,6 +472,7 @@
|
||||
request = item.request;
|
||||
}
|
||||
request.referenced = referenced;
|
||||
request.enable === undefined ? request.enable = true : request.enable;
|
||||
request.active = false;
|
||||
request.resourceId = getUUID();
|
||||
if (referenced === 'REF') {
|
||||
@ -489,6 +492,7 @@
|
||||
request = item.request;
|
||||
}
|
||||
request.referenced = referenced;
|
||||
request.enable === undefined ? request.enable = true : request.enable;
|
||||
request.active = false;
|
||||
request.resourceId = getUUID();
|
||||
if (referenced === 'REF') {
|
||||
|
@ -14,10 +14,10 @@
|
||||
</el-select>
|
||||
|
||||
<el-input size="small" v-model="controller.value" :placeholder="$t('api_test.value')" v-if="!hasEmptyOperator" style="width: 20%;margin-left: 20px"/>
|
||||
|
||||
<!--<el-switch v-model="controller.enable" :inactive-text="$t('api_test.scenario.enable_disable')" style="margin-left: 10px"/>-->
|
||||
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-right: 20px; float: right"/>
|
||||
<div style="margin-right: 20px; float: right">
|
||||
<el-switch v-model="controller.enable" style="margin-left: 10px"/>
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-left: 10px;"/>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
@ -6,10 +6,12 @@
|
||||
<div class="el-step__icon-inner">{{jsr223ProcessorData.index}}</div>
|
||||
</div>
|
||||
<el-button class="ms-left-buttion" size="small" :style="styleType" style="color: #B8741A;background-color: #F9F1EA">{{title}}</el-button>
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': this.jsr223ProcessorData.active}" @click="changeActive" style="margin-left: 20px"/>
|
||||
<el-input size="small" v-model="jsr223ProcessorData.name" :placeholder="$t('commons.input_name')" class="ms-api-header-select" style="width: 40%"/>
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-right: 20px; float: right"/>
|
||||
|
||||
<div style="margin-right: 20px; float: right">
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': this.jsr223ProcessorData.active}" @click="changeActive" style="margin-left: 20px"/>
|
||||
<el-switch v-model="jsr223ProcessorData.enable" style="margin-left: 10px"/>
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-left: 10px;"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-collapse-transition>
|
||||
|
@ -7,10 +7,12 @@
|
||||
</div>
|
||||
<el-button class="ms-left-buttion" size="small" style="color: #A30014;background-color: #F7E6E9">{{$t('api_test.definition.request.assertions_rule')}}</el-button>
|
||||
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': assertions.active}" @click="active(assertions)" style="margin-left: 20px"/>
|
||||
<el-input size="small" v-model="assertions.name" style="width: 40%;margin-left: 20px" :placeholder="$t('commons.input_name')"/>
|
||||
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-right: 20px; float: right"/>
|
||||
<div style="margin-right: 20px; float: right">
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': assertions.active}" @click="active(assertions)" style="margin-left: 20px"/>
|
||||
<el-switch v-model="assertions.enable" style="margin-left: 10px"/>
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-left: 10px;"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 请求参数-->
|
||||
<el-collapse-transition>
|
||||
@ -158,6 +160,7 @@
|
||||
.icon.is-active {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
/deep/ .el-card__body {
|
||||
padding: 15px;
|
||||
}
|
||||
|
@ -5,10 +5,12 @@
|
||||
<div class="el-step__icon-inner">{{extract.index}}</div>
|
||||
</div>
|
||||
<el-button class="ms-left-buttion" size="small" style="color: #015478;background-color: #E6EEF2">{{$t('api_test.definition.request.extract_param')}}</el-button>
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': extract.active}" @click="active(extract)" style="margin-left: 20px"/>
|
||||
<el-input size="small" v-model="extract.name" style="width: 40%;margin-left: 20px" :placeholder="$t('commons.input_name')"/>
|
||||
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-right: 20px; float: right"/>
|
||||
<div style="margin-right: 20px; float: right">
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': extract.active}" @click="active(extract)" style="margin-left: 20px"/>
|
||||
<el-switch v-model="extract.enable" style="margin-left: 10px"/>
|
||||
<el-button size="mini" icon="el-icon-delete" circle @click="remove" style="margin-left: 10px;"/>
|
||||
</div>
|
||||
<!-- 请求参数-->
|
||||
<el-collapse-transition>
|
||||
<div v-if="extract.active">
|
||||
|
@ -776,7 +776,7 @@ export class Assertions extends BaseConfig {
|
||||
this.jsr223 = [];
|
||||
this.xpath2 = [];
|
||||
this.duration = undefined;
|
||||
|
||||
this.enable = true;
|
||||
this.set(options);
|
||||
this.sets({text: Text, regex: Regex, jsonPath: JSONPath, jsr223: AssertionJSR223, xpath2: XPath2}, options);
|
||||
}
|
||||
@ -843,6 +843,7 @@ export class JSR223Processor extends BaseConfig {
|
||||
this.type = "JSR223Processor";
|
||||
this.script = undefined;
|
||||
this.language = "beanshell";
|
||||
this.enable = true;
|
||||
this.set(options);
|
||||
}
|
||||
}
|
||||
@ -917,7 +918,7 @@ export class Extract extends BaseConfig {
|
||||
this.regex = [];
|
||||
this.json = [];
|
||||
this.xpath = [];
|
||||
|
||||
this.enable = true;
|
||||
this.set(options);
|
||||
let types = {
|
||||
json: ExtractJSONPath,
|
||||
|
Loading…
Reference in New Issue
Block a user