日志总量th动态替换
This commit is contained in:
@@ -151,6 +151,9 @@ public class LoginController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model.addAttribute("adminPath", adminPath);
|
model.addAttribute("adminPath", adminPath);
|
||||||
|
model.addAttribute("log_time_start",Constants.LOG_TIME_START);
|
||||||
|
model.addAttribute("log_time_range",Constants.LOG_TIME_RANGE);
|
||||||
|
model.addAttribute("log_total",this.getMsgProp().getProperty("log_total"));
|
||||||
return "/home";
|
return "/home";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
sessionStorage.setItem("log_total","${log_total}");
|
||||||
|
sessionStorage.setItem("log_time_start","${log_time_start}");
|
||||||
|
sessionStorage.setItem("log_time_range","${log_time_range}");
|
||||||
window.frames['mainFrame'].location="${ctx}/configure/statistics/configureStateStatistics";
|
window.frames['mainFrame'].location="${ctx}/configure/statistics/configureStateStatistics";
|
||||||
//国际化切换
|
//国际化切换
|
||||||
var lang = "${cookie.Language.value }".toLowerCase();
|
var lang = "${cookie.Language.value }".toLowerCase();
|
||||||
|
|||||||
@@ -67,6 +67,8 @@
|
|||||||
haveInvisibleChar:"The tags {0} have invisible character",
|
haveInvisibleChar:"The tags {0} have invisible character",
|
||||||
httpCheck:"Please enter a correct url(http[s]://xxx.xx)",
|
httpCheck:"Please enter a correct url(http[s]://xxx.xx)",
|
||||||
failed:"Failed",
|
failed:"Failed",
|
||||||
go_back:"Go Back Policies"
|
go_back:"Go Back Policies",
|
||||||
|
log_5_minutes:"Log Five Minutes' Amount",
|
||||||
|
log_1_hour:"Log One Hour's Amount"
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|||||||
@@ -67,6 +67,8 @@
|
|||||||
haveInvisibleChar:"标签{0}包含不可见字符",
|
haveInvisibleChar:"标签{0}包含不可见字符",
|
||||||
httpCheck:"请输入正确的url(http[s]://xxx.xx)",
|
httpCheck:"请输入正确的url(http[s]://xxx.xx)",
|
||||||
failed:"获取失败",
|
failed:"获取失败",
|
||||||
go_back:"返回配置界面"
|
go_back:"返回配置界面",
|
||||||
|
log_5_minutes:"5分钟日志量",
|
||||||
|
log_1_hour:"1小时日志量"
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
//扩展jquery,增加全局函数
|
//扩展jquery,增加全局函数
|
||||||
$.ipcommon=function(){
|
$.ipcommon=function(){
|
||||||
return {};
|
return {};
|
||||||
@@ -438,6 +439,35 @@ $(function(){
|
|||||||
var val=$(this).val();
|
var val=$(this).val();
|
||||||
$(this).val(val.trim());
|
$(this).val(val.trim());
|
||||||
});
|
});
|
||||||
|
var log_total=sessionStorage.getItem("log_total");
|
||||||
|
var log_time_start=sessionStorage.getItem("log_time_start");
|
||||||
|
var log_time_range=sessionStorage.getItem("log_time_range");
|
||||||
|
var log_5_minutes=$.validator.messages.log_5_minutes;
|
||||||
|
var log_1_hour=$.validator.messages.log_1_hour;
|
||||||
|
$('th').each(function(){
|
||||||
|
if(log_time_start){
|
||||||
|
if($(this).text()==log_5_minutes){
|
||||||
|
$(this).text(log_total);
|
||||||
|
}else if($(this).text()==log_1_hour){
|
||||||
|
$(this).text(log_total);
|
||||||
|
}
|
||||||
|
}else if(log_time_range){
|
||||||
|
if(log_time_range==300000){
|
||||||
|
if($(this).text()==log_total){
|
||||||
|
$(this).text(log_5_minutes);
|
||||||
|
}else if($(this).text()==log_1_hour){
|
||||||
|
$(this).text(log_5_minutes);
|
||||||
|
}
|
||||||
|
}else if(log_time_range=3600000){
|
||||||
|
if($(this).text()==log_total){
|
||||||
|
$(this).text(log_1_hour);
|
||||||
|
}else if($(this).text()==log_5_minutes){
|
||||||
|
$(this).text(log_1_hour);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
});
|
});
|
||||||
window.onload=function(){
|
window.onload=function(){
|
||||||
// 配置id的搜索下拉框选择切换
|
// 配置id的搜索下拉框选择切换
|
||||||
|
|||||||
Reference in New Issue
Block a user