Commit 4c015ec4 by lepdou

细节优化

parent 8639abd0
......@@ -33,7 +33,7 @@ public class ServiceLocator {
private static final int RETRY_TIMES = 3;
private static final int CALL_META_SERVER_THRESHOLD = 10;
private static final int CALL_META_SERVER_THRESHOLD = 2;
private static final String ADMIN_SERVICE_URL_PATH = "/services/admin";
......@@ -91,6 +91,8 @@ public class ServiceLocator {
logger.warn(String.format("can not get %s admin service address at %d time", env, i));
}
}
//clear cache
serviceAddressCache.remove(env);
logger.error(String.format("can not get %s admin service address", env));
throw new ServiceException("No available admin service");
}
......
......@@ -611,6 +611,8 @@
<script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="scripts/services/ConfigService.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<!--directive-->
......
......@@ -6,7 +6,8 @@
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
<link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
<link href="//cdn.bootcss.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media='all' href="vendor/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="styles/common-style.css">
<title>apollo</title>
</head>
......
......@@ -2,6 +2,9 @@ appUtil.service('AppUtil', ['toastr', function (toastr) {
return {
errorMsg: function (response) {
if (response.status == -1) {
return "您的登录信息已过期,请重新登录";
}
var msg = "Code:" + response.status;
if (response.data.message != null) {
msg += " Msg:" + response.data.message;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment