Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
5ec09567
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 大约 3 年
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5ec09567
编写于
8月 17, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(接口测试): 前后置脚本页面
上级
0f92569e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
64 addition
and
4 deletion
+64
-4
backend/src/main/java/io/metersphere/xpack
backend/src/main/java/io/metersphere/xpack
+1
-1
frontend/src/business/components/api/test/components/processor/BeanShellProcessor.vue
...ents/api/test/components/processor/BeanShellProcessor.vue
+45
-0
frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue
...onents/api/test/components/request/ApiHttpRequestForm.vue
+10
-1
frontend/src/business/components/common/components/MsCodeEdit.vue
.../src/business/components/common/components/MsCodeEdit.vue
+8
-2
未找到文件。
xpack
@
8de0d4e4
比较
356bb744
...
8de0d4e4
Subproject commit
356bb744a72304067b9222cb0cb2be01d4ebff2a
Subproject commit
8de0d4e47675bd1a5a8ea4c99e1a2b76e53ebc08
frontend/src/business/components/api/test/components/processor/BeanShellProcessor.vue
0 → 100644
浏览文件 @
5ec09567
<
template
>
<div
class=
"script-content"
>
<ms-code-edit
mode=
"java"
:read-only=
"isReadOnly"
:data.sync=
"beanShellProcessor.script"
theme=
"eclipse"
:modes=
"['java']"
ref=
"codeEdit"
/>
</div>
</
template
>
<
script
>
import
MsCodeEdit
from
"
../../../../common/components/MsCodeEdit
"
;
export
default
{
name
:
"
MsBeanShellProcessor
"
,
components
:
{
MsCodeEdit
},
data
()
{
return
{
}
},
props
:
{
type
:
{
type
:
String
,
},
isReadOnly
:
{
type
:
Boolean
,
default
:
false
},
beanShellProcessor
:
{
type
:
Object
,
default
()
{
return
{}
}
}
},
}
</
script
>
<
style
scoped
>
.ace_editor
{
border-radius
:
5px
;
}
.script-content
{
padding
:
15px
0
;
height
:
300px
;
}
</
style
>
frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue
浏览文件 @
5ec09567
...
...
@@ -68,6 +68,12 @@
<el-tab-pane
:label=
"$t('api_test.request.extract.label')"
name=
"extract"
>
<ms-api-extract
:is-read-only=
"isReadOnly"
:extract=
"request.extract"
/>
</el-tab-pane>
<el-tab-pane
:label=
"'预执行脚本'"
name=
"beanShellPreProcessor"
>
<ms-bean-shell-processor
:is-read-only=
"isReadOnly"
:bean-shell-processor=
"request.beanShellPreProcessor"
/>
</el-tab-pane>
<el-tab-pane
:label=
"'后执行脚本'"
name=
"beanShellPostProcessor"
>
<ms-bean-shell-processor
:is-read-only=
"isReadOnly"
:bean-shell-processor=
"request.beanShellPostProcessor"
/>
</el-tab-pane>
</el-tabs>
</el-form>
</template>
...
...
@@ -81,10 +87,13 @@ import MsApiExtract from "../extract/ApiExtract";
import
ApiRequestMethodSelect
from
"
../collapse/ApiRequestMethodSelect
"
;
import
{
REQUEST_HEADERS
}
from
"
@/common/js/constants
"
;
import
MsApiVariable
from
"
@/business/components/api/test/components/ApiVariable
"
;
import
MsBeanShellProcessor
from
"
../processor/BeanShellProcessor
"
;
export
default
{
name
:
"
MsApiHttpRequestForm
"
,
components
:
{
MsApiVariable
,
ApiRequestMethodSelect
,
MsApiExtract
,
MsApiAssertions
,
MsApiBody
,
MsApiKeyValue
},
components
:
{
MsBeanShellProcessor
,
MsApiVariable
,
ApiRequestMethodSelect
,
MsApiExtract
,
MsApiAssertions
,
MsApiBody
,
MsApiKeyValue
},
props
:
{
request
:
HttpRequest
,
scenario
:
Scenario
,
...
...
frontend/src/business/components/common/components/MsCodeEdit.vue
浏览文件 @
5ec09567
<
template
>
<editor
v-model=
"formatData"
:lang=
"mode"
@
init=
"editorInit"
theme=
"chro
me"
/>
<editor
v-model=
"formatData"
:lang=
"mode"
@
init=
"editorInit"
:theme=
"the
me"
/>
</
template
>
<
script
>
...
...
@@ -15,6 +15,12 @@
data
:
{
type
:
String
},
theme
:
{
type
:
String
,
default
()
{
return
'
chrome
'
}
},
init
:
{
type
:
Function
},
...
...
@@ -54,7 +60,7 @@
this
.
modes
.
forEach
(
mode
=>
{
require
(
'
brace/mode/
'
+
mode
);
//language
});
require
(
'
brace/theme/
chrome
'
)
require
(
'
brace/theme/
'
+
this
.
theme
)
require
(
'
brace/snippets/javascript
'
)
//snippet
if
(
this
.
readOnly
)
{
editor
.
setReadOnly
(
true
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录