Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
6745d8b5
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,发现更多精彩内容 >>
提交
6745d8b5
编写于
5月 08, 2020
作者:
Q
q4speed
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复key value不能正确显示的问题
上级
b5e7b746
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
23 deletion
+34
-23
frontend/src/business/components/api/test/ApiTestConfig.vue
frontend/src/business/components/api/test/ApiTestConfig.vue
+17
-11
frontend/src/business/components/api/test/components/ApiScenarioConfig.vue
...ness/components/api/test/components/ApiScenarioConfig.vue
+14
-10
frontend/src/common/js/message.js
frontend/src/common/js/message.js
+2
-2
frontend/src/i18n/zh-CN.js
frontend/src/i18n/zh-CN.js
+1
-0
未找到文件。
frontend/src/business/components/api/test/ApiTestConfig.vue
浏览文件 @
6745d8b5
...
...
@@ -16,9 +16,13 @@
{{
$t
(
'
commons.save
'
)
}}
</el-button>
<el-button
type=
"primary"
plain
@
click=
"r
unTest"
>
<el-button
type=
"primary"
plain
v-if=
"!isDisabled"
@
click=
"saveR
unTest"
>
{{
$t
(
'
load_test.save_and_run
'
)
}}
</el-button>
<el-button
type=
"primary"
plain
v-if=
"isDisabled"
@
click=
"runTest"
>
{{
$t
(
'
api_test.run
'
)
}}
</el-button>
<el-button
type=
"warning"
plain
@
click=
"cancel"
>
{{
$t
(
'
commons.cancel
'
)
}}
</el-button>
</el-row>
</el-header>
...
...
@@ -91,29 +95,31 @@
}
});
},
saveTest
:
function
()
{
this
.
save
(()
=>
{
this
.
$success
(
this
.
$t
(
'
commons.save_success
'
));
})
},
save
:
function
(
callback
)
{
this
.
change
=
false
;
let
url
=
this
.
create
?
"
/api/create
"
:
"
/api/update
"
;
this
.
result
=
this
.
$request
(
this
.
getOptions
(
url
),
response
=>
{
this
.
result
=
this
.
$request
(
this
.
getOptions
(
url
),
()
=>
{
this
.
create
=
false
;
if
(
callback
)
callback
();
});
},
saveTest
:
function
()
{
this
.
save
(()
=>
{
this
.
$success
(
this
.
$t
(
'
commons.save_success
'
));
})
},
runTest
:
function
()
{
this
.
result
=
this
.
$post
(
"
/api/run
"
,
{
id
:
this
.
test
.
id
},
()
=>
{
this
.
$success
(
this
.
$t
(
'
api_test.running
'
));
});
},
saveRunTest
:
function
()
{
this
.
change
=
false
;
this
.
save
(()
=>
{
this
.
$success
(
this
.
$t
(
'
commons.save_success
'
));
this
.
result
=
this
.
$post
(
"
/api/run
"
,
{
id
:
this
.
test
.
id
},
response
=>
{
this
.
$success
(
this
.
$t
(
'
api_test.running
'
));
});
this
.
runTest
();
})
},
cancel
:
function
()
{
this
.
$router
.
push
(
'
/api/test/list/all
'
);
...
...
frontend/src/business/components/api/test/components/ApiScenarioConfig.vue
浏览文件 @
6745d8b5
...
...
@@ -12,20 +12,20 @@
{{
$t
(
'
api_test.scenario.config
'
)
}}
</span>
</div>
<!-- 暂时去掉,将来再加-->
<!--
<el-dropdown
trigger=
"click"
@
command=
"handleCommand"
>
-->
<!--
<span
class=
"el-dropdown-link el-icon-more scenario-btn"
/>
-->
<!--
<el-dropdown-menu
slot=
"dropdown"
>
-->
<!--
<el-dropdown-item
:command=
"
{type:'delete', index:index}">删除场景
</el-dropdown-item>
-->
<!--
</el-dropdown-menu>
-->
<!--
</el-dropdown>
-->
<!-- 暂时去掉,将来再加-->
<!--
<el-dropdown
trigger=
"click"
@
command=
"handleCommand"
>
-->
<!--
<span
class=
"el-dropdown-link el-icon-more scenario-btn"
/>
-->
<!--
<el-dropdown-menu
slot=
"dropdown"
>
-->
<!--
<el-dropdown-item
:command=
"
{type:'delete', index:index}">删除场景
</el-dropdown-item>
-->
<!--
</el-dropdown-menu>
-->
<!--
</el-dropdown>
-->
</
template
>
<ms-api-request-config
:requests=
"scenario.requests"
:open=
"select"
/>
</ms-api-collapse-item>
</ms-api-collapse>
</div>
<!-- 暂时去掉,将来再加-->
<!-- <el-button class="scenario-create" type="primary" size="mini" icon="el-icon-plus" plain @click="createScenario"/>-->
<!-- 暂时去掉,将来再加-->
<!-- <el-button class="scenario-create" type="primary" size="mini" icon="el-icon-plus" plain @click="createScenario"/>-->
</el-aside>
<el-main
class=
"scenario-main"
>
...
...
@@ -90,9 +90,13 @@
}
},
select
:
function
(
obj
)
{
this
.
selected
=
obj
;
this
.
selected
=
null
;
this
.
$nextTick
(
function
()
{
this
.
selected
=
obj
;
});
},
reset
:
function
()
{
this
.
selected
=
null
;
this
.
$nextTick
(
function
()
{
this
.
activeName
=
0
;
this
.
select
(
this
.
scenarios
[
0
]);
...
...
frontend/src/common/js/message.js
浏览文件 @
6745d8b5
...
...
@@ -12,7 +12,7 @@ export default {
message
:
message
,
type
:
"
success
"
,
showClose
:
true
,
duration
:
1
0
00
duration
:
1
5
00
})
};
...
...
@@ -30,7 +30,7 @@ export default {
message
:
message
,
type
:
"
warning
"
,
showClose
:
true
,
duration
:
2
000
duration
:
5
000
})
};
...
...
frontend/src/i18n/zh-CN.js
浏览文件 @
6745d8b5
...
...
@@ -187,6 +187,7 @@ export default {
},
api_test
:
{
save_and_run
:
"
保存并执行
"
,
run
:
"
执行
"
,
running
:
"
正在执行
"
,
reset
:
"
重置
"
,
input_name
:
"
请输入测试名称
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录