Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
541534d4
Z
zendata
项目概览
易企天创
/
zendata
9 个月 前同步成功
通知
17
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zendata
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
541534d4
编写于
12月 02, 2022
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix issues
上级
9a0e2f44
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
27 addition
and
23 deletion
+27
-23
.zd.conf
.zd.conf
+1
-1
cmd/command/main.go
cmd/command/main.go
+0
-4
cmd/server/main.go
cmd/server/main.go
+3
-3
internal/pkg/gen/parser.go
internal/pkg/gen/parser.go
+16
-12
internal/server/utils/const/const.go
internal/server/utils/const/const.go
+1
-1
pkg/utils/log/print.go
pkg/utils/log/print.go
+1
-1
ui/src/views/data/mine/List.vue
ui/src/views/data/mine/List.vue
+5
-1
未找到文件。
.zd.conf
浏览文件 @
541534d4
Version
=
3
.
0
Version
=
3
Language
=
zh
cmd/command/main.go
浏览文件 @
541534d4
...
...
@@ -95,10 +95,6 @@ func main() {
flagSet
.
BoolVar
(
&
decode
,
"D"
,
false
,
""
)
flagSet
.
BoolVar
(
&
decode
,
"decode"
,
false
,
""
)
flagSet
.
StringVar
(
&
vari
.
Ip
,
"b"
,
""
,
""
)
flagSet
.
StringVar
(
&
vari
.
Ip
,
"bind"
,
""
,
""
)
flagSet
.
IntVar
(
&
vari
.
Port
,
"p"
,
0
,
""
)
flagSet
.
IntVar
(
&
vari
.
Port
,
"port"
,
0
,
""
)
flagSet
.
StringVar
(
&
root
,
"R"
,
""
,
""
)
flagSet
.
StringVar
(
&
root
,
"root"
,
""
,
""
)
...
...
cmd/server/main.go
浏览文件 @
541534d4
...
...
@@ -41,10 +41,10 @@ func main() {
flagSet
=
flag
.
NewFlagSet
(
"zd"
,
flag
.
ContinueOnError
)
flag
.
StringVar
(
&
uuid
,
"uuid"
,
""
,
"区分服务进程的唯一ID"
)
flag
Set
.
StringVar
(
&
uuid
,
"uuid"
,
""
,
"区分服务进程的唯一ID"
)
flagSet
.
StringVar
(
&
vari
.
Ip
,
"
b
"
,
""
,
""
)
flagSet
.
StringVar
(
&
vari
.
Ip
,
"
bind
"
,
""
,
""
)
flagSet
.
StringVar
(
&
vari
.
Ip
,
"
i
"
,
""
,
""
)
flagSet
.
StringVar
(
&
vari
.
Ip
,
"
ip
"
,
""
,
""
)
flagSet
.
IntVar
(
&
vari
.
Port
,
"p"
,
0
,
""
)
flagSet
.
IntVar
(
&
vari
.
Port
,
"port"
,
0
,
""
)
flagSet
.
BoolVar
(
&
vari
.
Verbose
,
"verbose"
,
false
,
""
)
...
...
internal/pkg/gen/parser.go
浏览文件 @
541534d4
...
...
@@ -78,11 +78,13 @@ func ParseDesc(desc string) (items []string) {
return
}
/**
convert range item to entity, step, repeat
[user1,user2]{2} -> entry =>[user1,user2]
step =>1
repeat =>2
/*
*
convert range item to entity, step, repeat
[user1,user2]{2} -> entry =>[user1,user2]
step =>1
repeat =>2
*/
func
ParseRangeSection
(
rang
string
)
(
entry
string
,
step
string
,
repeat
int
,
repeatTag
string
)
{
rang
=
strings
.
TrimSpace
(
rang
)
...
...
@@ -127,12 +129,14 @@ func ParseRangeSection(rang string) (entry string, step string, repeat int, repe
return
entry
,
step
,
repeat
,
repeatTag
}
/**
get range item entity's type and desc
1-9 or [1-9] -> type => interval
desc => 1-9 or [1-9]
[user1,user2] -> type => literal
desc => user2,user3
/*
*
get range item entity's type and desc
1-9 or [1-9] -> type => interval
desc => 1-9 or [1-9]
[user1,user2] -> type => literal
desc => user2,user3
*/
func
ParseRangeSectionDesc
(
str
string
)
(
typ
string
,
desc
string
)
{
desc
=
strings
.
TrimSpace
(
str
)
...
...
@@ -200,7 +204,7 @@ func removeBoundary(str string) string {
func
isScopeStr
(
str
string
)
bool
{
arr
:=
strings
.
Split
(
str
,
"-"
)
if
len
(
arr
)
<
2
{
if
len
(
arr
)
<
2
||
strings
.
TrimSpace
(
str
)
==
"-"
{
return
false
}
...
...
internal/server/utils/const/const.go
浏览文件 @
541534d4
...
...
@@ -7,7 +7,7 @@ const (
CheckUpgradeInterval
=
30
AgentRunTime
=
30
*
60
AgentLogDir
=
"log
-zd
"
AgentLogDir
=
"log"
QiNiuURL
=
"https://dl.cnezsoft.com/"
+
constant
.
AppName
+
"/"
AgentVersionURL
=
QiNiuURL
+
"version.txt"
...
...
pkg/utils/log/print.go
浏览文件 @
541534d4
...
...
@@ -51,7 +51,7 @@ func PrintUsage() {
regx
,
_
=
regexp
.
Compile
(
`zd.exe`
)
usage
=
regx
.
ReplaceAllString
(
usage
,
"zd"
)
regx
,
_
=
regexp
.
Compile
(
`d:\
zd
\config `
)
regx
,
_
=
regexp
.
Compile
(
`d:\
\zd\
\config `
)
usage
=
regx
.
ReplaceAllString
(
usage
,
"/home/user/zd/config"
)
}
fmt
.
Printf
(
"%s
\n
"
,
usage
)
...
...
ui/src/views/data/mine/List.vue
浏览文件 @
541534d4
...
...
@@ -136,10 +136,14 @@ export default {
},
computed
:
{
hasSelected
:
function
()
{
if
(
!
this
.
defs
)
return
false
return
this
.
defs
.
some
(
x
=>
x
.
id
==
this
.
selected
);
},
selectedRecord
:
function
()
{
return
this
.
defs
.
find
(
x
=>
x
.
id
==
this
.
selected
);
if
(
!
this
.
defs
)
return
null
return
this
.
defs
?.
find
(
x
=>
x
.
id
==
this
.
selected
);
}
},
created
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录