Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
3f8ff44b
Unverified
Commit
3f8ff44b
authored
May 21, 2022
by
aiwenmo
Committed by
GitHub
May 21, 2022
Browse files
Options
Browse Files
Download
Plain Diff
[Feature-525][dlink-alert-dingtalk,web] Add @mobile mode of dingTalk Alert
[Feature-525][dlink-alert-dingtalk,web] Add @mobile mode of dingTalk Alert
parents
55e50632
c9fe01bb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
DingTalkSender.java
...rc/main/java/com/dlink/alert/dingtalk/DingTalkSender.java
+6
-1
DingTalkForm.tsx
...k-web/src/pages/AlertInstance/components/DingTalkForm.tsx
+12
-0
No files found.
dlink-alert/dlink-alert-dingtalk/src/main/java/com/dlink/alert/dingtalk/DingTalkSender.java
View file @
3f8ff44b
...
@@ -168,6 +168,7 @@ public class DingTalkSender {
...
@@ -168,6 +168,7 @@ public class DingTalkSender {
builder
.
append
(
" "
);
builder
.
append
(
" "
);
});
});
}
}
builder
.
append
(
"\n\n"
);
String
txt
=
genrateResultMsg
(
title
,
content
,
builder
);
String
txt
=
genrateResultMsg
(
title
,
content
,
builder
);
text
.
put
(
"title"
,
title
);
text
.
put
(
"title"
,
title
);
text
.
put
(
"text"
,
txt
);
text
.
put
(
"text"
,
txt
);
...
@@ -226,9 +227,13 @@ public class DingTalkSender {
...
@@ -226,9 +227,13 @@ public class DingTalkSender {
String
[]
atMobileArray
=
Asserts
.
isNotNullString
(
atMobiles
)
?
atMobiles
.
split
(
","
)
:
new
String
[
0
];
String
[]
atMobileArray
=
Asserts
.
isNotNullString
(
atMobiles
)
?
atMobiles
.
split
(
","
)
:
new
String
[
0
];
String
[]
atUserArray
=
Asserts
.
isNotNullString
(
atUserIds
)
?
atUserIds
.
split
(
","
)
:
new
String
[
0
];
String
[]
atUserArray
=
Asserts
.
isNotNullString
(
atUserIds
)
?
atUserIds
.
split
(
","
)
:
new
String
[
0
];
boolean
isAtAll
=
Objects
.
isNull
(
atAll
)
?
false
:
atAll
;
boolean
isAtAll
=
Objects
.
isNull
(
atAll
)
?
false
:
atAll
;
at
.
put
(
"isAtAll"
,
isAtAll
);
if
(
atMobileArray
.
length
>
0
){
at
.
put
(
"atMobiles"
,
atMobileArray
);
at
.
put
(
"atMobiles"
,
atMobileArray
);
}
if
(
atMobileArray
.
length
>
0
){
at
.
put
(
"atUserIds"
,
atUserArray
);
at
.
put
(
"atUserIds"
,
atUserArray
);
at
.
put
(
"isAtAll"
,
isAtAll
);
}
items
.
put
(
"at"
,
at
);
items
.
put
(
"at"
,
at
);
}
}
...
...
dlink-web/src/pages/AlertInstance/components/DingTalkForm.tsx
View file @
3f8ff44b
...
@@ -119,6 +119,18 @@ const DingTalkForm: React.FC<AlertInstanceFormProps> = (props) => {
...
@@ -119,6 +119,18 @@ const DingTalkForm: React.FC<AlertInstanceFormProps> = (props) => {
<
Switch
checkedChildren=
"启用"
unCheckedChildren=
"禁用"
<
Switch
checkedChildren=
"启用"
unCheckedChildren=
"禁用"
defaultChecked=
{
vals
.
isAtAll
}
/>
defaultChecked=
{
vals
.
isAtAll
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
{
vals
.
isAtAll
?
undefined
:
<>
<
Form
.
Item
name=
"atMobiles"
label=
"@手机号"
rules=
{
[{
required
:
true
,
message
:
'请输入@手机号!'
}]
}
>
<
Input
placeholder=
"请输入@手机号 多个使用英文逗号分开 "
/>
</
Form
.
Item
>
</>
}
<
Form
.
Item
<
Form
.
Item
name=
"enabled"
name=
"enabled"
label=
"是否启用"
>
label=
"是否启用"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment