Unverified Commit fd3e2e58 by Jason Song Committed by GitHub

Merge pull request #973 from lepdou/refresh_session

Refresh session & add admin pages entry point
parents 5823daa6 c21c746a
......@@ -11,6 +11,7 @@ import javax.servlet.http.HttpServletResponse;
* @author Jason Song(song_s@ctrip.com)
*/
public class CtripSsoHeartbeatHandler implements SsoHeartbeatHandler {
@Override
public void doHeartbeat(HttpServletRequest request, HttpServletResponse response) {
try {
......@@ -18,4 +19,5 @@ public class CtripSsoHeartbeatHandler implements SsoHeartbeatHandler {
} catch (IOException e) {
}
}
}
......@@ -11,12 +11,13 @@ import javax.servlet.http.HttpServletResponse;
* @author Jason Song(song_s@ctrip.com)
*/
public class DefaultSsoHeartbeatHandler implements SsoHeartbeatHandler {
@Override
public void doHeartbeat(HttpServletRequest request, HttpServletResponse response) {
try {
response.setContentType("text/plain;charset=utf-8");
response.getWriter().write("default sso heartbeat handler");
response.sendRedirect("default_sso_heartbeat.html");
} catch (IOException e) {
}
}
}
......@@ -119,10 +119,11 @@
<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/CommonService.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="scripts/services/OrganizationService.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="scripts/controller/AppController.js"></script>
<script src="scripts/valdr.js" type="text/javascript"></script>
......
......@@ -189,6 +189,7 @@
<script type="application/javascript" src="../scripts/services/CommonService.js"></script>
<script type="application/javascript" src="../scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="../scripts/services/OrganizationService.js"></script>
<script type="application/javascript" src="../scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="../scripts/AppUtils.js"></script>
......
......@@ -131,6 +131,7 @@
<script type="application/javascript" src="scripts/services/ClusterService.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="scripts/controller/ClusterController.js"></script>
......
......@@ -270,6 +270,7 @@
<script type="application/javascript" src="../scripts/services/CommonService.js"></script>
<script type="application/javascript" src="../scripts/services/ReleaseHistoryService.js"></script>
<script type="application/javascript" src="../scripts/services/ConfigService.js"></script>
<script type="application/javascript" src="../scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="../scripts/AppUtils.js"></script>
<script type="application/javascript" src="../scripts/controller/config/ReleaseHistoryController.js"></script>
......
......@@ -235,6 +235,8 @@
<script type="application/javascript" src="../scripts/services/ConfigService.js"></script>
<script type="application/javascript" src="../scripts/services/UserService.js"></script>
<script type="application/javascript" src="../scripts/services/CommonService.js"></script>
<script type="application/javascript" src="../scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="../scripts/AppUtils.js"></script>
<script type="application/javascript" src="../scripts/controller/config/SyncConfigController.js"></script>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SSO Heartbeat</title>
<script type="text/javascript">
var reloading = false;
setInterval(function () {
if (reloading) {
return;
}
reloading = true;
location.reload(true);
}, 60000);
</script>
</head>
<body>
</body>
</html>
......@@ -81,7 +81,7 @@
</div>
</div>
<div class="no-favorites text-center" ng-show="!favorites || favorites.length == 0">
<h4>您还没有收藏过任何项目,在项目主页可以收藏项目哟~</h4>
<h4>您还没有收藏过任何项目在项目主页可以收藏项目哟~</h4>
</div>
</aside>
......@@ -128,6 +128,7 @@
<script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="scripts/services/FavoriteService.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
......
/** navbar */
directive_module.directive('apollonav',
function ($compile, $window, toastr, AppUtil, AppService, EnvService, UserService, CommonService) {
function ($compile, $window, toastr, AppUtil, AppService, EnvService,
UserService, CommonService, PermissionService) {
return {
restrict: 'E',
templateUrl: '../../views/common/nav.html',
......@@ -82,7 +83,7 @@ directive_module.directive('apollonav',
}
//强制刷新
scope.$apply(function () {
scope.copyedApps = scope.copyedApps;
scope.copiedApps = scope.copiedApps;
});
});
......@@ -97,7 +98,7 @@ directive_module.directive('apollonav',
});
function clearAppsSelectedStatus() {
scope.copyedApps.forEach(function (app) {
scope.copiedApps.forEach(function (app) {
app.selected = false;
})
......@@ -117,6 +118,10 @@ directive_module.directive('apollonav',
}, function (result) {
});
PermissionService.has_root_permission().then(function(result) {
scope.hasRootPermission = result.hasPermission;
})
}
}
......
......@@ -21,6 +21,7 @@
<div class="panel">
<header class="panel-heading">
应用配置
<small>(维护ServerConfig表数据,如果已存在配置项则会覆盖,否则会创建配置项。配置更新后,一分钟后自动生效)</small>
</header>
<div class="panel-body">
......@@ -53,7 +54,7 @@
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">提交</button>
<button type="submit" class="btn btn-primary">提交</button>
</div>
</div>
</form>
......@@ -86,6 +87,7 @@
<script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="scripts/services/ServerConfigService.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="scripts/controller/ServerConfigController.js"></script>
</body>
......
......@@ -95,6 +95,7 @@
<script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="scripts/services/OrganizationService.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="scripts/controller/UserController.js"></script>
......
......@@ -25,6 +25,16 @@
<span class="glyphicon glyphicon-question-sign"></span> 帮助
</a>
</li>
<li class="dropdown" ng-if="hasRootPermission">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-cog"></span>&nbsp;管理员工具
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/user-manage.html" target="_blank">用户管理</a></li>
<li><a href="/open/manage.html" target="_blank">开放平台授权管理</a></li>
<li><a href="/server_config.html" target="_blank">系统参数</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-user"></span>&nbsp;{{userName}}
......
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