Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
765cfea2
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
9 个月 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
765cfea2
编写于
6月 13, 2022
作者:
Z
zhaoke
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* Fix issues.
上级
8523c5ef
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
8 addition
and
77 deletion
+8
-77
ui/src/components/Navbar.vue
ui/src/components/Navbar.vue
+0
-2
ui/src/locales/en-US.ts
ui/src/locales/en-US.ts
+2
-1
ui/src/locales/zh-CN.ts
ui/src/locales/zh-CN.ts
+2
-1
ui/src/views/exec/LastTestInfo.vue
ui/src/views/exec/LastTestInfo.vue
+0
-43
ui/src/views/result/store.ts
ui/src/views/result/store.ts
+0
-22
ui/src/views/site/SiteNav.vue
ui/src/views/site/SiteNav.vue
+3
-2
ui/src/views/site/TabPageSites.vue
ui/src/views/site/TabPageSites.vue
+1
-6
未找到文件。
ui/src/components/Navbar.vue
浏览文件 @
765cfea2
...
...
@@ -4,7 +4,6 @@
<SiteNav
/>
<BatchRunButton
/>
<LastTestInfo
/>
<div
class=
"gap flex-auto"
></div>
<AppToolbar
/>
...
...
@@ -18,7 +17,6 @@ import WindowToolbar from './WindowToolbar.vue';
import
AppToolbar
from
'
./AppToolbar.vue
'
;
import
SiteNav
from
'
@/views/site/SiteNav.vue
'
;
import
BatchRunButton
from
'
@/views/exec/BatchRunButton.vue
'
;
import
LastTestInfo
from
'
@/views/exec/LastTestInfo.vue
'
;
</
script
>
<
style
>
...
...
ui/src/locales/en-US.ts
浏览文件 @
765cfea2
...
...
@@ -38,7 +38,8 @@ export default {
'
only_failed
'
:
'
Only Failed
'
,
'
zentao_site
'
:
'
Zentao Site
'
,
'
site_management
'
:
'
Site management
'
,
'
local
'
:
'
Local
'
,
'
site_management
'
:
'
Zentao Site Management
'
,
'
site_num
'
:
'
{count} sites
'
,
'
create_site
'
:
'
Create Site
'
,
'
edit_site
'
:
'
Edit Site
'
,
...
...
ui/src/locales/zh-CN.ts
浏览文件 @
765cfea2
...
...
@@ -41,7 +41,8 @@ export default {
'
only_failed
'
:
'
仅失败用例
'
,
'
zentao_site
'
:
'
禅道站点
'
,
'
site_management
'
:
'
站点管理
'
,
'
local
'
:
'
本地
'
,
'
site_management
'
:
'
禅道站点管理
'
,
'
site_num
'
:
'
{count} 个站点
'
,
'
create_site
'
:
'
新建站点
'
,
'
edit_site
'
:
'
编辑站点
'
,
...
...
ui/src/views/exec/LastTestInfo.vue
已删除
100644 → 0
浏览文件 @
8523c5ef
<
template
>
<Button
v-if=
"model!=undefined"
class=
"rounded border-light canvas gap-sm"
:hint=
"t('view_test_result')"
@
click=
"showDetail(model)"
>
<small
class=
"text-muted"
>
{{
t
(
'
previous_result
'
)
}}
</small>
<small
class=
"text-yellow"
:key=
"model"
>
{{
model
.
duration
}}
s
</small>
<Icon
icon=
"close-circle"
class=
"text-red space-left"
/>
<small
class=
"text-red"
>
{{
model
.
fail
}}
</small>
<Icon
icon=
"checkmark-circle"
class=
"text-green space-left"
/>
<small
class=
"text-green"
>
{{
model
.
pass
}}
</small>
</Button>
</
template
>
<
script
setup
lang=
"ts"
>
import
Button
from
'
@/components/Button.vue
'
;
import
Icon
from
'
@/components/Icon.vue
'
;
import
{
StateType
}
from
"
@/views/result/store
"
;
import
{
useStore
}
from
"
vuex
"
;
import
{
computed
,
onMounted
}
from
"
vue
"
;
import
{
useI18n
}
from
"
vue-i18n
"
;
const
{
t
}
=
useI18n
();
const
store
=
useStore
<
{
Result
:
StateType
}
>
();
const
model
=
computed
<
any
[]
>
(()
=>
store
.
state
.
Result
.
lastResult
)
const
latest
=
()
=>
{
store
.
dispatch
(
'
Result/latest
'
,
{});
}
latest
();
const
showDetail
=
(
item
)
=>
{
store
.
dispatch
(
'
tabs/open
'
,
{
id
:
'
result-
'
+
item
.
no
,
title
:
item
.
total
!=
1
?
item
.
workspaceName
+
'
(
'
+
item
.
total
+
'
)
'
:
item
.
testScriptName
,
type
:
'
result
'
,
data
:
{
seq
:
item
.
seq
,
workspaceId
:
item
.
workspaceId
}
});
}
onMounted
(()
=>
{
console
.
log
(
"
onMounted
"
)
})
</
script
>
ui/src/views/result/store.ts
浏览文件 @
765cfea2
...
...
@@ -9,7 +9,6 @@ import {
export
interface
StateType
{
queryResult
:
QueryResult
;
detailResult
:
any
;
lastResult
:
any
;
}
export
interface
ModuleType
extends
StoreModuleType
<
StateType
>
{
...
...
@@ -17,13 +16,11 @@ export interface ModuleType extends StoreModuleType<StateType> {
mutations
:
{
setQueryResult
:
Mutation
<
StateType
>
;
setDetailResult
:
Mutation
<
StateType
>
;
setLastResult
:
Mutation
<
StateType
>
;
};
actions
:
{
list
:
Action
<
StateType
,
StateType
>
;
get
:
Action
<
StateType
,
StateType
>
;
delete
:
Action
<
StateType
,
StateType
>
;
latest
:
Action
<
StateType
,
StateType
>
;
};
}
const
initState
:
StateType
=
{
...
...
@@ -38,7 +35,6 @@ const initState: StateType = {
},
},
detailResult
:
{},
lastResult
:
{},
};
const
StoreModel
:
ModuleType
=
{
...
...
@@ -54,9 +50,6 @@ const StoreModel: ModuleType = {
setDetailResult
(
state
,
payload
)
{
state
.
detailResult
=
payload
;
},
setLastResult
(
state
,
payload
)
{
state
.
lastResult
=
payload
;
},
},
actions
:
{
async
list
({
commit
},
params
:
QueryParams
)
{
...
...
@@ -67,7 +60,6 @@ const StoreModel: ModuleType = {
}
const
data
=
response
.
data
;
commit
(
'
setQueryResult
'
,
data
);
commit
(
'
setLastResult
'
,
data
.
result
[
0
]);
return
true
;
}
catch
(
error
)
{
...
...
@@ -87,20 +79,6 @@ const StoreModel: ModuleType = {
await
remove
(
data
);
dispatch
(
'
list
'
,
{})
return
true
;
}
catch
(
error
)
{
return
false
;
}
},
async
latest
({
commit
},
params
:
QueryParams
)
{
try
{
const
response
:
ResponseData
=
await
getLastest
(
params
);
if
(
response
.
code
!=
0
)
{
return
;
}
const
data
=
response
.
data
;
commit
(
'
setLastResult
'
,
data
);
return
true
;
}
catch
(
error
)
{
return
false
;
...
...
ui/src/views/site/SiteNav.vue
浏览文件 @
765cfea2
<
template
>
<ButtonGroup
class=
"space-left"
>
<Button
id=
"siteMenuToggle"
:label=
"currSite.name"
:label=
"currSite.
id == 1 ? t('local') : currSite.
name"
:icon=
"currSite.username ? 'zentao' : 'hard-drive-filled'"
class=
"rounded border lighten-16"
:iconClass=
"currSite.username ? 'text-blue' : 'text-secondary'"
...
...
@@ -67,7 +67,8 @@ const currSite = computed<any>(() => store.state.Zentao.currSite);
const
sites
=
computed
<
any
[]
>
(()
=>
store
.
state
.
Zentao
.
sites
.
map
(
site
=>
({
icon
:
site
.
username
?
'
zentao
'
:
'
hard-drive-filled
'
,
iconClass
:
'
muted
'
,
...
site
...
site
,
name
:
site
.
id
==
1
?
t
(
'
local
'
)
:
site
.
name
,
})));
const
currProduct
=
computed
<
any
>
(()
=>
store
.
state
.
Zentao
.
currProduct
);
...
...
ui/src/views/site/TabPageSites.vue
浏览文件 @
765cfea2
...
...
@@ -27,14 +27,9 @@
<
div
class
=
"
row single align-center gap space-xs-v
"
>
<
span
class
=
"
text-primary
"
>
{{
site
.
name
}}
<
/span
>
<
div
class
=
"
row single align-center gap-sm small muted
"
><
Icon
icon
=
"
link
"
size
=
"
1em
"
/>
{{
site
.
url
}}
<
/div
>
<
/div
>
<
div
class
=
"
row single align-center gap muted
"
>
<
div
class
=
"
row single align-center gap-sm small
"
>
<
div
class
=
"
row single align-center gap muted
"
>
<
Icon
icon
=
"
person
"
size
=
"
1em
"
/>
{{
site
.
username
}}
<
/div
>
<
div
class
=
"
row single align-center gap-sm small
"
>
<
Icon
icon
=
"
clock
"
size
=
"
1em
"
/>
{{
t
(
'
create_time
'
)
}}
:
{{
momentUtc
(
site
.
createdAt
)
}}
<
/div
>
<
/div
>
<
template
#
trailing
>
<
Button
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录