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
ddcc1d591e9603a7bd262ae03763ae90e14aa095
1 parent
a3e8b670
去掉不用dnsspot信息
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
48 deletions
monitor-ui-common/src/main/java/com/ui/contants/HttpUriContants.java
monitor-ui-ctrl/src/main/java/com/ui/ctrl/TopoSwitchCtrl.java
monitor-ui-ctrl/src/main/java/com/ui/ctrl/app/AppTopoSwitchCtrl.java
monitor-ui-common/src/main/java/com/ui/contants/HttpUriContants.java
View file @
ddcc1d5
...
...
@@ -243,6 +243,7 @@ public class HttpUriContants {
public
static
final
String
CENTERSWITCH_SWITCH_SMS_CHECK
=
"/centerSwitch/checkSmsCode"
;
//只是查看状态
public
static
final
String
CENTERSWITCH_STATUS
=
"/centerSwitch/checkStatus"
;
public
static
final
String
CENTERSWITCH_DEFAULT_DNS
=
"/centerSwitch/defaultDns"
;
//java监控信息
public
static
final
String
JAVA_MONITOR_GET
=
"/newJavaApiInfo/queryByServiceType"
;
...
...
monitor-ui-ctrl/src/main/java/com/ui/ctrl/TopoSwitchCtrl.java
View file @
ddcc1d5
...
...
@@ -145,30 +145,8 @@ public class TopoSwitchCtrl {
}
//dns
String
defaultDns
=
""
;
MultiValueMap
<
String
,
String
>
requestEntity
=
new
LinkedMultiValueMap
<>();
requestEntity
.
add
(
"login_token"
,
"31578,5f5402160468dc375159e2e94eeef1da"
);
requestEntity
.
add
(
"format"
,
"json"
);
requestEntity
.
add
(
"domain_id"
,
"16862974"
);
requestEntity
.
add
(
"record_id"
,
"293178513"
);
try
{
String
requestResponse
=
httpRestClient
.
post
(
"https://dnsapi.cn/Record.Info"
,
requestEntity
,
String
.
class
);
JSONObject
responseJSON
=
JSONObject
.
parseObject
(
requestResponse
);
JSONObject
responseStatus
=
JSONObject
.
parseObject
(
responseJSON
.
getString
(
"status"
));
if
(
"1"
.
equals
(
responseStatus
.
getString
(
"code"
))){
if
(
requestResponse
.
indexOf
(
"amazonaws"
)
==
-
1
){
defaultDns
=
"qq"
;
}
else
{
defaultDns
=
"aws"
;
}
}
else
{
logger
.
error
(
" TopoSwitchCtrl - getNgixnStatus - JSON - err:"
+
responseJSON
.
getString
(
"message"
));
}
}
catch
(
Exception
e
){
logger
.
error
(
" TopoSwitchCtrl - getNgixnStatus - https://dnsapi.cn/Record.Info - err"
,
e
);
}
String
defaultDns
=
httpRestClient
.
defaultGet
(
HttpUriContants
.
CENTERSWITCH_DEFAULT_DNS
,
String
.
class
);
resultMap
.
put
(
"luaType"
,
luaType
);
resultMap
.
put
(
"awsApiNginx"
,
awsApiNginx
);
resultMap
.
put
(
"awsGrayNginx"
,
awsGrayNginx
);
...
...
monitor-ui-ctrl/src/main/java/com/ui/ctrl/app/AppTopoSwitchCtrl.java
View file @
ddcc1d5
...
...
@@ -114,30 +114,7 @@ public class AppTopoSwitchCtrl {
}
//dns
String
defaultDns
=
""
;
MultiValueMap
<
String
,
String
>
requestEntity
=
new
LinkedMultiValueMap
<>();
requestEntity
.
add
(
"login_token"
,
"31578,5f5402160468dc375159e2e94eeef1da"
);
requestEntity
.
add
(
"format"
,
"json"
);
requestEntity
.
add
(
"domain_id"
,
"16862974"
);
requestEntity
.
add
(
"record_id"
,
"293178513"
);
try
{
String
requestResponse
=
httpRestClient
.
post
(
"https://dnsapi.cn/Record.Info"
,
requestEntity
,
String
.
class
);
JSONObject
responseJSON
=
JSONObject
.
parseObject
(
requestResponse
);
JSONObject
responseStatus
=
JSONObject
.
parseObject
(
responseJSON
.
getString
(
"status"
));
if
(
"1"
.
equals
(
responseStatus
.
getString
(
"code"
))){
if
(
requestResponse
.
indexOf
(
"amazonaws"
)
==
-
1
){
defaultDns
=
"qq"
;
}
else
{
defaultDns
=
"aws"
;
}
}
else
{
logger
.
error
(
" TopoSwitchCtrl - getNgixnStatus - JSON - err:"
+
responseJSON
.
getString
(
"message"
));
}
}
catch
(
Exception
e
){
logger
.
error
(
" TopoSwitchCtrl - getNgixnStatus - https://dnsapi.cn/Record.Info - err"
,
e
);
}
String
defaultDns
=
httpRestClient
.
defaultGet
(
HttpUriContants
.
CENTERSWITCH_DEFAULT_DNS
,
String
.
class
);
logger
.
info
(
"getNgixnStatus 3..."
);
...
...
Please
register
or
login
to post a comment