| | |
| | | <div class="batt-state">
|
| | |
|
| | | <div class="list">
|
| | | <div class="list-contain"><s:text name='Computer_room'/><s:text name='Power_cut'/><s:text name='Num'/>:<a href="batt-state-manage.jsp?station_state=2" class="badge default" id="poweroff_num">0</a></div> <!-- 机房停电数 -->
|
| | | <div class="list-contain"><s:text name='Power_cut'/><s:text name='Computer_room'/><s:text name='Num'/>:<a href="batt-state-manage.jsp?station_state=2" class="badge default" id="poweroff_num">0</a></div> <!-- 机房停电数 -->
|
| | | </div>
|
| | | <div class="list">
|
| | | <div class="list-contain"><s:text name="Batt"/><s:text name="Alarm"/><s:text name="Num"/>:<a href="elewarn.jsp" class="badge danger" id="batt_alarm_num">0</a></div> <!-- 电池告警数 -->
|
| | |
| | | <div class="cell-list plan-ele">
|
| | | <img src="image/webStatus/plan_normal.gif" alt="放电计划监测线程" title="放电计划监测线程:正常">
|
| | | </div>
|
| | | <!-- <div class="cell-list break-ele">
|
| | | <div class="cell-list break-ele" style="display: none;">
|
| | | <img src="image/webStatus/break_ele_normal.gif" alt="机房停电监测线程" title="机房停电监测线程:正常">
|
| | | </div> -->
|
| | | </div> |
| | | <div class="cell-list control">
|
| | | <img src="image/webStatus/control_normal.gif" alt="线程监控程序" title="线程监控程序运行:正常">
|
| | | </div>
|
| | |
| | | return str;
|
| | | }
|
| | | });
|
| | | |
| | | /**
|
| | | 检测服务器连接是否正常
|
| | | 程序功能: 通过请求后台程序如果三次都请求失败认为服务器挂掉,跳转到登陆页面
|
| | | */
|
| | | ;(function ($) {
|
| | | var url = window.location.href;
|
| | | var loginPatt = /\/login.jsp/;
|
| | | |
| | | // 判断当前页面不是登陆页面开始执行检测服务器状态
|
| | | if(!loginPatt.test(url)) {
|
| | | checkServer();
|
| | | }
|
| | | |
| | | var linkNum = 0; // 测试服务器连接计数 =3 跳转到登陆页面
|
| | | function checkServer() {
|
| | | $.ajax({
|
| | | url:'User_infAction!checkService',
|
| | | type: 'post',
|
| | | async: true,
|
| | | success: function(rs) {
|
| | | linkNum = 0; // 初始化测试连接
|
| | | setTimeout(checkServer, 200);
|
| | | },
|
| | | error:function() {
|
| | | // 网络连接不正常
|
| | | if(!navigator.onLine) {
|
| | | linkNum = 0;
|
| | | setTimeout(checkServer, 200);
|
| | | }else{
|
| | | linkNum++;
|
| | | // 服务器连接不正常
|
| | | if(linkNum == 3) {
|
| | | console.info('出现第'+linkNum+"次测试服务器连接失败!跳转到登陆");
|
| | | // 网络正常但服务器连续多次检测不正常跳转到登陆页面
|
| | | alert('网络连接异常,请检查网络连接是否正常!');
|
| | | window.location.replace("login.jsp");
|
| | | }else {
|
| | | console.info('出现第'+linkNum+"次测试服务器连接失败!");
|
| | | checkServer();
|
| | | }
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | })(jQuery);
|
| | | </script>
|
| | | </html>
|