walkor 11 år sedan
förälder
incheckning
d9026413a2

+ 7 - 2
applications/Statistics/Modules/statistic.php

@@ -2,7 +2,7 @@
 namespace Statistics\Modules;
 function statistic($module, $interface, $date, $start_time, $offset)
 {
-    
+    $err_msg = '';
     $today = date('Y-m-d');
     $time_now = time();
     multiRequestStAndModules($module, $interface, $date);
@@ -129,7 +129,12 @@ function statistic($module, $interface, $date, $start_time, $offset)
                         $module_str .= '<li>&nbsp;&nbsp;<a href="/?fn=statistic&module='.$mod.'&interface='.$if.'">'.$if.'</a></li>';
                     }
                 }
-        } 
+        }
+        
+        if( \Statistics\Lib\Cache::$lastFailedIpArray)
+        {
+            $err_msg = '<strong>无法从以下节点获取数据:</strong>'.implode(',',  \Statistics\Lib\Cache::$lastFailedIpArray);
+        }
 
         include ST_ROOT . '/Views/header.tpl.php';
         include ST_ROOT . '/Views/statistic.tpl.php';

+ 1 - 1
applications/Statistics/Views/admin.tpl.php

@@ -57,7 +57,7 @@
 		
 			<form action="/?fn=admin&act=<?php echo $action;?>" method="post">
 			<textarea rows="22" cols="30" name="ip_list"><?php echo $ip_list_str;?></textarea>
-			<button type="submit" class="btn btn-default"><?php echo $act == 'detect_server' ? '添加到节点列表' : '保存'?></button>
+			<div class='text-right' ><button type="submit" class="btn btn-default"><?php echo $act == 'detect_server' ? '添加到节点列表' : '保存'?></button></div>
 			</form>
 		</div>
 	</div>

+ 2 - 2
applications/Statistics/Views/log.tpl.php

@@ -8,8 +8,8 @@
 				<li>
 					<a href="/?fn=statistic">监控</a>
 				</li>
-				<li>
-					<a class="active" href="/?fn=logger">日志</a>
+				<li class="active" >
+					<a href="/?fn=logger">日志</a>
 				</li>
 				<li class="disabled">
 					<a href="#">告警</a>

+ 8 - 2
applications/Statistics/Views/statistic.tpl.php

@@ -5,8 +5,8 @@
 				<li>
 					<a href="/">概述</a>
 				</li>
-				<li>
-					<a class="active" href="/?fn=statistic">监控</a>
+				<li class="active" >
+					<a href="/?fn=statistic">监控</a>
 				</li>
 				<li>
 					<a href="/?fn=logger">日志</a>
@@ -33,6 +33,12 @@
 			<ul><?php echo $module_str;?></ul>
 		</div>
 		<div class="col-md-9 column">
+		<?php if($err_msg){?>
+			<div class="alert alert-dismissable alert-danger">
+				 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
+				<strong><?php echo $err_msg;?></strong> 
+			</div>
+		<?php }?>
 		<?php if($module && $interface){?>
 			<div class="row clearfix">
 				<div class="col-md-12 column text-center">