Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
5340c115
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
5340c115
编写于
2月 23, 2022
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update ui
上级
b96165eb
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
31 addition
and
138 deletion
+31
-138
internal/command/ui/page/main.go
internal/command/ui/page/main.go
+0
-49
internal/pkg/lib/common/utils.go
internal/pkg/lib/common/utils.go
+1
-1
ui/package.json
ui/package.json
+2
-1
ui/src/composables/useEcharts.ts
ui/src/composables/useEcharts.ts
+0
-35
ui/src/composables/useI18nAntdFormVaildateInfos.ts
ui/src/composables/useI18nAntdFormVaildateInfos.ts
+0
-24
ui/src/layouts/IndexLayout/components/RightTop.vue
ui/src/layouts/IndexLayout/components/RightTop.vue
+0
-1
ui/src/layouts/IndexLayout/index.vue
ui/src/layouts/IndexLayout/index.vue
+1
-1
ui/src/locales/en-US.ts
ui/src/locales/en-US.ts
+1
-0
ui/src/locales/zh-CN.ts
ui/src/locales/zh-CN.ts
+1
-0
ui/src/views/config/index.vue
ui/src/views/config/index.vue
+1
-1
ui/src/views/exec/exec/case.vue
ui/src/views/exec/exec/case.vue
+1
-1
ui/src/views/exec/exec/module.vue
ui/src/views/exec/exec/module.vue
+0
-1
ui/src/views/exec/exec/suite.vue
ui/src/views/exec/exec/suite.vue
+0
-1
ui/src/views/exec/exec/task.vue
ui/src/views/exec/exec/task.vue
+0
-1
ui/src/views/exec/exec/unit.vue
ui/src/views/exec/exec/unit.vue
+0
-1
ui/src/views/exec/history/index.vue
ui/src/views/exec/history/index.vue
+3
-9
ui/src/views/script/index/main.vue
ui/src/views/script/index/main.vue
+19
-10
ui/src/views/sync/index.vue
ui/src/views/sync/index.vue
+1
-1
未找到文件。
internal/command/ui/page/main.go
已删除
100644 → 0
浏览文件 @
b96165eb
package
page
import
(
commConsts
"github.com/aaronchen2k/deeptest/internal/comm/consts"
"github.com/aaronchen2k/deeptest/internal/command/ui"
"github.com/aaronchen2k/deeptest/internal/command/ui/widget"
"github.com/aaronchen2k/deeptest/internal/pkg/consts"
"github.com/awesome-gocui/gocui"
"log"
)
func
InitMainPage
()
error
{
maxX
,
maxY
:=
commConsts
.
Cui
.
Size
()
if
maxX
<
consts
.
MinWidth
{
maxX
=
consts
.
MinWidth
}
if
maxY
<
consts
.
MinHeight
{
maxY
=
consts
.
MinHeight
}
commConsts
.
MainViewHeight
=
maxY
-
consts
.
CmdViewHeight
mainView
:=
widget
.
NewPanelWidget
(
"main"
,
0
,
0
,
maxX
-
2
,
commConsts
.
MainViewHeight
,
""
)
ui
.
ViewMap
[
"root"
]
=
append
(
ui
.
ViewMap
[
"root"
],
mainView
.
Name
())
cmdView
:=
widget
.
NewPanelWidget
(
"cmd"
,
0
,
commConsts
.
MainViewHeight
,
maxX
-
2
,
consts
.
CmdViewHeight
-
1
,
""
)
ui
.
ViewMap
[
"root"
]
=
append
(
ui
.
ViewMap
[
"root"
],
cmdView
.
Name
())
widget
.
NewHelpWidget
()
MainPageKeyBindings
()
return
nil
}
func
MainPageKeyBindings
()
error
{
if
err
:=
commConsts
.
Cui
.
SetKeybinding
(
""
,
gocui
.
KeyCtrlH
,
gocui
.
ModNone
,
widget
.
ShowHelpFromView
);
err
!=
nil
{
log
.
Panicln
(
err
)
}
if
err
:=
commConsts
.
Cui
.
SetKeybinding
(
""
,
gocui
.
KeyCtrlC
,
gocui
.
ModNone
,
ui
.
Quit
);
err
!=
nil
{
return
err
}
ui
.
SupportScroll
(
"cmd"
)
v
,
_
:=
commConsts
.
Cui
.
View
(
"cmd"
)
v
.
Autoscroll
=
true
return
nil
}
internal/pkg/lib/common/utils.go
浏览文件 @
5340c115
...
...
@@ -122,7 +122,7 @@ func IgnoreFile(path string) bool {
if
strings
.
Index
(
path
,
"."
)
==
0
||
path
==
"bin"
||
path
==
"release"
||
path
==
"logs"
||
path
==
"xdoc"
||
path
==
"log"
||
path
==
"conf"
{
path
==
"log"
||
path
==
"
logbak"
||
path
==
"
conf"
{
return
true
}
else
{
return
false
...
...
ui/package.json
浏览文件 @
5340c115
...
...
@@ -11,7 +11,7 @@
"svgo"
:
"svgo -f src/assets/iconsvg --config=src/assets/iconsvg/svgo.yml"
},
"dependencies"
:
{
"@highlightjs/vue-plugin"
:
"
^2.1.0
"
,
"@highlightjs/vue-plugin"
:
"
2.0.1
"
,
"@toast-ui/editor"
:
"^2.5.3"
,
"ant-design-vue"
:
"^2.2.8"
,
"axios"
:
"^0.21.4"
,
...
...
@@ -19,6 +19,7 @@
"echarts"
:
"^4.9.0"
,
"localforage"
:
"^1.10.0"
,
"lodash.debounce"
:
"^4.0.8"
,
"lodash.throttle"
:
"^4.1.1"
,
"neffos.js"
:
"^0.1.25"
,
"nprogress"
:
"^0.2.0"
,
"vue"
:
"^3.2.18"
,
...
...
ui/src/composables/useEcharts.ts
已删除
100644 → 0
浏览文件 @
b96165eb
import
{
onMounted
,
onBeforeUnmount
,
Ref
,
ref
}
from
'
vue
'
;
import
debounce
from
'
lodash.debounce
'
;
import
echarts
,
{
ECharts
,
EChartOption
}
from
'
echarts
'
;
import
'
echarts/theme/macarons
'
;
export
default
function
useEcharts
(
labRef
:
Ref
<
HTMLDivElement
|
HTMLCanvasElement
|
undefined
>
,
initOption
:
EChartOption
,
theme
=
'
macarons
'
):
Ref
<
echarts
.
ECharts
|
undefined
>
{
let
ec
:
ECharts
;
const
chart
=
ref
<
ECharts
>
();
const
resizeHandler
=
debounce
(()
=>
{
ec
.
resize
();
},
100
);
onMounted
(()
=>
{
if
(
labRef
.
value
)
{
ec
=
echarts
.
init
(
labRef
.
value
,
theme
);
ec
.
setOption
(
initOption
);
chart
.
value
=
ec
;
}
window
.
addEventListener
(
'
resize
'
,
resizeHandler
);
})
onBeforeUnmount
(()
=>
{
ec
.
dispose
();
window
.
removeEventListener
(
'
resize
'
,
resizeHandler
);
});
return
chart
;
}
\ No newline at end of file
ui/src/composables/useI18nAntdFormVaildateInfos.ts
已删除
100644 → 0
浏览文件 @
b96165eb
/**
* 重置 Antd Form VaildateInfos 为 I18n
* @author LiQingSong
*/
import
{
computed
,
ComputedRef
}
from
'
vue
'
;
import
{
useI18n
}
from
'
vue-i18n
'
;
import
{
validateInfos
}
from
'
ant-design-vue/lib/form/useForm
'
;
export
default
function
useI18nAntdFormVaildateInfos
(
infos
:
validateInfos
):
ComputedRef
<
validateInfos
>
{
const
{
t
}
=
useI18n
();
const
infosNew
=
computed
<
validateInfos
>
(()
=>
{
const
vInfos
:
validateInfos
=
{};
for
(
const
index
in
infos
)
{
vInfos
[
index
]
=
JSON
.
parse
(
JSON
.
stringify
(
infos
[
index
]));
if
(
vInfos
[
index
]
&&
vInfos
[
index
][
'
help
'
])
{
vInfos
[
index
][
'
help
'
]
=
vInfos
[
index
][
'
help
'
].
map
((
item
:
any
)
=>
typeof
(
item
)
==
'
string
'
?
t
(
item
)
:
item
.
map
((
item2
:
any
)
=>
item2
?
t
(
item2
):
''
));
}
}
return
vInfos
;
});
return
infosNew
;
}
\ No newline at end of file
ui/src/layouts/IndexLayout/components/RightTop.vue
浏览文件 @
5340c115
...
...
@@ -35,7 +35,6 @@ import { computed, ComputedRef, defineComponent, onMounted, PropType, Ref, toRef
import
{
useI18n
}
from
"
vue-i18n
"
;
import
{
BreadcrumbType
,
RoutesDataItem
}
from
'
@/utils/routes
'
;
import
BreadCrumbs
from
'
@/components/BreadCrumbs/index.vue
'
;
import
SelectLang
from
'
@/components/SelectLang/index.vue
'
;
import
ALink
from
'
@/components/ALink/index.vue
'
;
import
useTopMenuWidth
from
"
../composables/useTopMenuWidth
"
;
...
...
ui/src/layouts/IndexLayout/index.vue
浏览文件 @
5340c115
...
...
@@ -145,7 +145,7 @@ export default defineComponent({
#indexlayout-right {
position: relative;
flex: 1;
overflow:
auto
;
overflow:
hidden
;
background-color: @mainBgColor;
&.fiexd-header {
display: flex;
...
...
ui/src/locales/en-US.ts
浏览文件 @
5340c115
...
...
@@ -5,6 +5,7 @@ export default {
'
ztf_name_full
'
:
'
ZTF Automated Tool
'
,
'
no
'
:
'
NO.
'
,
'
scope
'
:
'
Scope
'
,
//
'
name
'
:
'
Name
'
,
//
'
path
'
:
'
Path
'
,
...
...
ui/src/locales/zh-CN.ts
浏览文件 @
5340c115
...
...
@@ -5,6 +5,7 @@ export default {
'
ztf_name_full
'
:
'
ZTF自动化测试工具
'
,
'
no
'
:
'
编号
'
,
'
scope
'
:
'
范围
'
,
//
'
name
'
:
'
名称
'
,
//
'
path
'
:
'
路径
'
,
...
...
ui/src/views/config/index.vue
浏览文件 @
5340c115
...
...
@@ -92,7 +92,7 @@ import {
setInterpreter
,
}
from
"
@/utils/testing
"
;
import
IconSvg
from
"
@/components/IconSvg/index
"
;
import
throttle
from
"
lodash.
debounc
e
"
;
import
throttle
from
"
lodash.
throttl
e
"
;
interface
ConfigFormSetupData
{
t
:
(
key
:
string
|
number
)
=>
string
;
...
...
ui/src/views/exec/exec/case.vue
浏览文件 @
5340c115
...
...
@@ -89,7 +89,7 @@ import {WebSocket, WsEventName} from "@/services/websocket";
import
{
PrefixSpace
,
resizeWidth
,
scroll
}
from
"
@/utils/dom
"
;
import
{
genExecInfo
,
get
,
getCaseIdsFromReport
}
from
"
@/views/exec/service
"
;
import
{
WsMsg
}
from
"
@/views/exec/data
"
;
import
throttle
from
"
lodash.
debounc
e
"
;
import
throttle
from
"
lodash.
throttl
e
"
;
import
{
useI18n
}
from
"
vue-i18n
"
;
const
useForm
=
Form
.
useForm
;
...
...
ui/src/views/exec/exec/module.vue
浏览文件 @
5340c115
...
...
@@ -81,7 +81,6 @@ import settings from "@/config/settings";
import
{
WebSocket
,
WsEventName
}
from
"
@/services/websocket
"
;
import
{
resizeWidth
,
scroll
}
from
"
@/utils/dom
"
;
import
{
genExecInfo
}
from
"
@/views/exec/service
"
;
import
throttle
from
"
lodash.debounce
"
;
import
{
useI18n
}
from
"
vue-i18n
"
;
import
IconSvg
from
"
@/components/IconSvg/index
"
;
...
...
ui/src/views/exec/exec/suite.vue
浏览文件 @
5340c115
...
...
@@ -81,7 +81,6 @@ import settings from "@/config/settings";
import
{
WebSocket
,
WsEventName
}
from
"
@/services/websocket
"
;
import
{
resizeWidth
,
scroll
}
from
"
@/utils/dom
"
;
import
{
genExecInfo
}
from
"
@/views/exec/service
"
;
import
throttle
from
"
lodash.debounce
"
;
import
{
useI18n
}
from
"
vue-i18n
"
;
import
IconSvg
from
"
@/components/IconSvg/index
"
;
...
...
ui/src/views/exec/exec/task.vue
浏览文件 @
5340c115
...
...
@@ -80,7 +80,6 @@ import settings from "@/config/settings";
import
{
WebSocket
,
WsEventName
}
from
"
@/services/websocket
"
;
import
{
resizeWidth
,
scroll
}
from
"
@/utils/dom
"
;
import
{
genExecInfo
}
from
"
@/views/exec/service
"
;
import
throttle
from
"
lodash.debounce
"
;
import
{
useI18n
}
from
"
vue-i18n
"
;
import
IconSvg
from
"
@/components/IconSvg/index
"
;
...
...
ui/src/views/exec/exec/unit.vue
浏览文件 @
5340c115
...
...
@@ -96,7 +96,6 @@ import {WebSocket, WsEventName} from "@/services/websocket";
import
{
resizeWidth
,
scroll
}
from
"
@/utils/dom
"
;
import
{
genExecInfo
}
from
"
@/views/exec/service
"
;
import
{
getUnitTestFrameworks
,
getUnitTestTools
}
from
"
@/utils/testing
"
;
import
throttle
from
"
lodash.debounce
"
;
import
{
useI18n
}
from
"
vue-i18n
"
;
import
IconSvg
from
"
@/components/IconSvg/index
"
;
...
...
ui/src/views/exec/history/index.vue
浏览文件 @
5340c115
...
...
@@ -110,7 +110,7 @@ import {momentTimeDef, percentDef} from "@/utils/datetime";
import
{
execByDef
}
from
"
@/utils/testing
"
;
import
{
ProjectData
}
from
"
@/store/project
"
;
import
{
hideMenu
}
from
"
@/utils/dom
"
;
import
throttle
from
"
lodash.
debounc
e
"
;
import
throttle
from
"
lodash.
throttl
e
"
;
import
{
useI18n
}
from
"
vue-i18n
"
;
import
IconSvg
from
"
@/components/IconSvg/index
"
;
...
...
@@ -158,20 +158,14 @@ export default defineComponent({
const
columns
=
[
{
title
:
t
(
'
index
'
),
dataIndex
:
'
index
'
,
width
:
150
,
customRender
:
({
text
,
index
}:
{
text
:
any
;
index
:
number
})
=>
index
+
1
,
title
:
t
(
'
no
'
),
dataIndex
:
'
seq
'
,
},
{
title
:
t
(
'
exec_type
'
),
dataIndex
:
'
execBy
'
,
slots
:
{
customRender
:
'
execBy
'
},
},
{
title
:
t
(
'
exec_type
'
),
dataIndex
:
'
seq
'
,
},
{
title
:
t
(
'
start_time
'
),
dataIndex
:
'
startTime
'
,
...
...
ui/src/views/script/index/main.vue
浏览文件 @
5340c115
...
...
@@ -45,7 +45,7 @@
<a-button
@
click=
"extract"
type=
"primary"
>
{{ t('extract_step') }}
</a-button>
</div>
<div
class=
"panel"
>
<
pre><code>
{{ script.code }}
</code></pre
>
<
highlightjs
v-if=
"scriptCode"
autodetect
:code=
"scriptCode"
/
>
</div>
</div>
</div>
...
...
@@ -59,9 +59,11 @@ import IconSvg from "@/components/IconSvg";
import
{
ProjectData
}
from
"
@/store/project
"
;
import
{
ScriptData
}
from
"
../store
"
;
import
{
resizeWidth
}
from
"
@/utils/dom
"
;
import
throttle
from
"
lodash.debounce
"
;
import
{
Empty
,
message
,
notification
}
from
"
ant-design-vue
"
;
import
{
useI18n
}
from
"
vue-i18n
"
;
import
'
highlight.js/lib/common
'
;
import
hljsVuePlugin
from
"
@highlightjs/vue-plugin
"
;
import
'
highlight.js/styles/googlecode.css
'
interface
ListScriptPageSetupData
{
t
:
(
key
:
string
|
number
)
=>
string
;
...
...
@@ -69,7 +71,8 @@ interface ListScriptPageSetupData {
treeData
:
ComputedRef
<
any
[]
>
;
replaceFields
:
any
,
tree
:
Ref
;
script
:
any
script
:
ComputedRef
scriptCode
:
Ref
<
string
>
;
isExpand
:
Ref
<
boolean
>
;
expandNode
:
(
expandedKeys
:
string
[],
e
:
any
)
=>
void
;
...
...
@@ -84,7 +87,8 @@ interface ListScriptPageSetupData {
export
default
defineComponent
({
name
:
'
ScriptListPage
'
,
components
:
{
IconSvg
IconSvg
,
highlightjs
:
hljsVuePlugin
.
component
},
setup
():
ListScriptPageSetupData
{
const
{
t
}
=
useI18n
();
...
...
@@ -100,16 +104,15 @@ export default defineComponent({
const
treeData
=
computed
<
any
>
(()
=>
store
.
state
.
project
.
scriptTree
);
const
expandedKeys
=
ref
<
string
[]
>
([]);
const
getOpenKeys
=
throttle
(
(
treeNode
,
isAll
)
=>
{
const
getOpenKeys
=
(
treeNode
,
isAll
)
=>
{
if
(
!
treeNode
)
return
expandedKeys
.
value
.
push
(
treeNode
.
path
)
if
(
treeNode
.
children
&&
isAll
)
{
treeNode
.
children
.
forEach
((
item
,
index
)
=>
{
getOpenKeys
(
item
,
isAll
)
})
}
}
,
600
)
}
expandedKeys
.
value
=
[]
getOpenKeys
(
treeData
.
value
[
0
],
false
)
...
...
@@ -121,7 +124,8 @@ export default defineComponent({
let
tree
=
ref
(
null
)
const
storeScript
=
useStore
<
{
script
:
ScriptData
}
>
();
const
script
=
computed
<
any
>
(()
=>
storeScript
.
state
.
script
.
detail
);
let
script
=
computed
<
any
>
(()
=>
storeScript
.
state
.
script
.
detail
);
let
scriptCode
=
ref
(
''
)
onMounted
(()
=>
{
console
.
log
(
'
onMounted
'
,
tree
)
...
...
@@ -137,7 +141,11 @@ export default defineComponent({
if
(
e
.
selectedNodes
.
length
===
0
)
return
selectedNode
=
e
.
selectedNodes
[
0
]
storeScript
.
dispatch
(
'
script/getScript
'
,
selectedNode
.
props
)
scriptCode
.
value
=
''
storeScript
.
dispatch
(
'
script/getScript
'
,
selectedNode
.
props
).
then
(()
=>
{
console
.
log
(
'
===
'
,
script
)
scriptCode
.
value
=
script
.
value
.
code
})
}
const
expandAll
=
(
e
)
=>
{
...
...
@@ -175,6 +183,7 @@ export default defineComponent({
tree
,
expandedKeys
,
script
,
scriptCode
,
simpleImage
:
Empty
.
PRESENTED_IMAGE_SIMPLE
,
}
}
...
...
@@ -254,7 +263,7 @@ export default defineComponent({
}
.panel {
padding:
16
px;
padding:
0 16px 0 12
px;
height: calc(100% - 46px);
overflow: auto;
}
...
...
ui/src/views/sync/index.vue
浏览文件 @
5340c115
...
...
@@ -87,7 +87,7 @@ import {useStore} from "vuex";
import
{
ProjectData
}
from
"
@/store/project
"
;
import
{
ZentaoData
}
from
"
@/store/zentao
"
;
import
{
syncFromZentao
,
syncToZentao
}
from
"
@/views/sync/service
"
;
import
throttle
from
"
lodash.
debounc
e
"
;
import
throttle
from
"
lodash.
throttl
e
"
;
import
{
useRouter
}
from
"
vue-router
"
;
const
useForm
=
Form
.
useForm
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录