Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
cb2b71b3
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
10 个月 前同步成功
通知
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 搜索 >>
提交
cb2b71b3
编写于
1月 27, 2022
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hide tabs for unit test
上级
2bf9cba5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
55 addition
and
8 deletion
+55
-8
internal/server/modules/v1/utils/exec/unit.go
internal/server/modules/v1/utils/exec/unit.go
+2
-2
ui/src/assets/css/custom.less
ui/src/assets/css/custom.less
+3
-0
ui/src/layouts/IndexLayout/components/RightTop.vue
ui/src/layouts/IndexLayout/components/RightTop.vue
+6
-0
ui/src/layouts/IndexLayout/components/RightTopProject.vue
ui/src/layouts/IndexLayout/components/RightTopProject.vue
+18
-1
ui/src/utils/dom.ts
ui/src/utils/dom.ts
+19
-0
ui/src/views/exec/history/index.vue
ui/src/views/exec/history/index.vue
+7
-5
未找到文件。
internal/server/modules/v1/utils/exec/unit.go
浏览文件 @
cb2b71b3
...
...
@@ -89,7 +89,7 @@ func RunUnitTest(ch chan int, sendOutputMsg, sendExecMsg func(info, isRunning st
isTerminal
:=
false
reader1
:=
bufio
.
NewReader
(
stdout
)
for
{
line
,
err
2
:=
reader1
.
ReadString
(
'\n'
)
line
,
err
3
:=
reader1
.
ReadString
(
'\n'
)
if
line
!=
""
{
sendOutputMsg
(
line
,
""
,
wsMsg
)
logUtils
.
ExecConsole
(
1
,
line
)
...
...
@@ -98,7 +98,7 @@ func RunUnitTest(ch chan int, sendOutputMsg, sendExecMsg func(info, isRunning st
isTerminal
=
true
}
if
err
2
!=
nil
||
io
.
EOF
==
err2
{
if
err
3
!=
nil
||
io
.
EOF
==
err3
{
break
}
...
...
ui/src/assets/css/custom.less
浏览文件 @
cb2b71b3
...
...
@@ -3,6 +3,9 @@
@import './variables.less';
@import './mixin.less';
.t-hidden {
display: none !important;
}
.t-icon {
cursor: pointer;
}
...
...
ui/src/layouts/IndexLayout/components/RightTop.vue
浏览文件 @
cb2b71b3
...
...
@@ -12,6 +12,7 @@
v-if=
"!item.hidden"
:to=
"item.path"
:class=
"
{'active': belongTopMenu === item.path }"
:id="pathToId(item.path)"
class="indexlayout-top-menu-li"
>
{{
t
(
item
.
title
)
}}
...
...
@@ -40,6 +41,7 @@ import RightTopProject from './RightTopProject.vue';
interface
RightTopSetupData
{
t
:
(
key
:
string
|
number
)
=>
string
;
topMenuCon
:
Ref
;
pathToId
:
(
val
)
=>
void
}
export
default
defineComponent
({
...
...
@@ -87,10 +89,14 @@ export default defineComponent({
const
{
topNavEnable
}
=
toRefs
(
props
);
const
{
topMenuCon
}
=
useTopMenuWidth
(
topNavEnable
);
const
pathToId
=
(
path
)
=>
{
return
path
.
replaceAll
(
'
/
'
,
'
menu-
'
)
}
return
{
t
,
topMenuCon
,
pathToId
,
}
}
})
...
...
ui/src/layouts/IndexLayout/components/RightTopProject.vue
浏览文件 @
cb2b71b3
...
...
@@ -20,12 +20,13 @@
</
template
>
<
script
lang=
"ts"
>
import
{
computed
,
ComputedRef
,
defineComponent
,
onMounted
,
Ref
,
ref
}
from
"
vue
"
;
import
{
computed
,
ComputedRef
,
defineComponent
,
onMounted
,
Ref
,
ref
,
watch
}
from
"
vue
"
;
import
{
useStore
}
from
"
vuex
"
;
import
{
ProjectData
}
from
"
@/store/project
"
;
import
ProjectCreateForm
from
"
@/views/component/project/create.vue
"
;
import
{
createProject
}
from
"
@/services/project
"
;
import
{
addClass
,
removeClass
}
from
"
@/utils/dom
"
;
interface
RightTopProject
{
projects
:
ComputedRef
<
any
[]
>
;
...
...
@@ -48,8 +49,24 @@ export default defineComponent({
const
currProject
=
computed
<
any
>
(()
=>
store
.
state
.
project
.
currProject
);
store
.
dispatch
(
'
project/fetchProject
'
,
''
);
const
hideMenu
=
()
=>
{
const
scriptMenu
=
document
.
getElementById
(
'
menu-script
'
)
if
(
currProject
.
value
.
type
===
'
unit
'
)
addClass
(
scriptMenu
,
'
t-hidden
'
)
else
removeClass
(
scriptMenu
,
'
t-hidden
'
)
const
scriptSync
=
document
.
getElementById
(
'
menu-sync
'
)
if
(
currProject
.
value
.
type
===
'
unit
'
)
addClass
(
scriptSync
,
'
t-hidden
'
)
else
removeClass
(
scriptSync
,
'
t-hidden
'
)
}
watch
(
currProject
,()
=>
{
console
.
log
(
'
watch currProject
'
,
currProject
)
hideMenu
()
},
{
deep
:
true
})
onMounted
(()
=>
{
console
.
log
(
'
onMounted
'
)
hideMenu
()
})
const
selectProject
=
(
value
):
void
=>
{
...
...
ui/src/utils/dom.ts
浏览文件 @
cb2b71b3
...
...
@@ -58,4 +58,23 @@ export function scroll(id: string): void {
elem
.
scrollTop
=
elem
.
scrollHeight
+
100
;
},
300
);
}
}
export
function
hasClass
(
elements
,
cName
){
if
(
!
elements
)
return
false
return
!!
elements
.
className
.
match
(
new
RegExp
(
"
(
\\
s|^)
"
+
cName
+
"
(
\\
s|$)
"
)
)
}
export
function
addClass
(
elements
,
cName
){
console
.
log
(
elements
)
if
(
!
elements
)
return
if
(
!
hasClass
(
elements
,
cName
)
){
elements
.
className
+=
"
"
+
cName
}
}
export
function
removeClass
(
elements
,
cName
){
if
(
!
elements
)
return
if
(
hasClass
(
elements
,
cName
)
){
elements
.
className
=
elements
.
className
.
replace
(
new
RegExp
(
"
(
\\
s|^)
"
+
cName
+
"
(
\\
s|$)
"
),
"
"
)
}
}
\ No newline at end of file
ui/src/views/exec/history/index.vue
浏览文件 @
cb2b71b3
...
...
@@ -58,7 +58,7 @@
</template>
<
script
lang=
"ts"
>
import
{
ComputedRef
,
defineComponent
,
ref
,
Ref
,
reactive
,
computed
,
onMounted
}
from
"
vue
"
;
import
{
ComputedRef
,
defineComponent
,
ref
,
Ref
,
reactive
,
computed
,
onMounted
,
watch
}
from
"
vue
"
;
import
{
Execution
}
from
'
../data.d
'
;
import
{
useStore
}
from
"
vuex
"
;
...
...
@@ -155,6 +155,12 @@ export default defineComponent({
await
store
.
dispatch
(
'
History/list
'
,
{});
loading
.
value
=
false
;
}
list
();
watch
(
currProject
,()
=>
{
console
.
log
(
'
watch currProject
'
,
currProject
)
list
()
},
{
deep
:
true
})
// 查看
const
viewResult
=
(
item
)
=>
{
...
...
@@ -182,10 +188,6 @@ export default defineComponent({
});
}
onMounted
(()
=>
{
list
();
})
const
execCase
=
()
=>
{
console
.
log
(
"
execCase
"
)
router
.
push
(
`/exec/run/case/-/-`
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录