Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ops
/
monitor-ui
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
qinchao
7 years ago
Commit
8d280ec682d56691882acc59a8a48d467e873787
1 parent
f5ab27f5
dns提供新的接口
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
monitor-ui-ctrl/src/main/java/com/ui/ctrl/OuterIntfCtrl.java
monitor-ui-ctrl/src/main/java/com/ui/ctrl/OuterIntfCtrl.java
View file @
8d280ec
...
...
@@ -6,6 +6,7 @@ import com.ui.model.BaseResponse;
import
com.ui.model.MonitAlarmInfo
;
import
com.ui.model.req.ZkDetailReq
;
import
com.ui.model.req.ZkTreeReq
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -83,4 +84,40 @@ public class OuterIntfCtrl {
httpClient
.
defaultPostJson
(
"/maliciousIp/writeMipsInfoToOpsDb"
,
ipsObjs
,
String
.
class
);
}
/***
* DNS 更新接口
*/
@RequestMapping
(
"/dnsJustForShell"
)
@ResponseBody
public
String
dnsJustForShell
(
String
domain
,
String
cloud
,
String
type
,
String
operate
,
String
record
,
String
value
)
{
if
(
StringUtils
.
isBlank
(
domain
)
||
StringUtils
.
isBlank
(
cloud
)
||
StringUtils
.
isBlank
(
operate
))
{
return
"param error"
;
}
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"domain"
,
domain
);
map
.
put
(
"cloud"
,
cloud
);
map
.
put
(
"type"
,
type
);
map
.
put
(
"operate"
,
operate
);
map
.
put
(
"record"
,
record
);
map
.
put
(
"value"
,
value
);
return
httpClient
.
defaultGet
(
"/internalDns/justForShell"
,
String
.
class
,
map
);
}
@RequestMapping
(
"/dnsJustForShellUpdate"
)
@ResponseBody
public
String
dnsJustForShellUpdate
(
String
cloud
,
String
record
,
String
value
)
{
String
domain
=
"yohoops.org"
;
String
operate
=
"update"
;
String
type
=
null
;
return
this
.
dnsJustForShell
(
domain
,
cloud
,
type
,
operate
,
record
,
value
);
}
@RequestMapping
(
"/dnsJustForShellCommit"
)
@ResponseBody
public
String
dnsJustForShellCommit
(
String
cloud
)
{
String
domain
=
"yohoops.org"
;
String
operate
=
"commit"
;
return
this
.
dnsJustForShell
(
domain
,
cloud
,
null
,
operate
,
null
,
null
);
}
}
...
...
Please
register
or
login
to post a comment