业务配置添加日志趋势图

js国际化添加日志趋势
This commit is contained in:
leijun
2019-01-15 18:49:28 +08:00
parent d0d2eb9e2a
commit 90a56b5e83
7 changed files with 546 additions and 6 deletions

View File

@@ -112,11 +112,15 @@ var getTotalLog=function(){
data.compileIds=[];
data.serviceIds=[];
data.objs=[];
// data.url=null;
$("td[compileId]").each(function(){
var audit=$(this).attr("audit");
var compileId=$(this).attr("compileId");
var serviceId=$(this).attr("serviceId");
var functionId=$(this).attr("functionId");
/* if(data.url==null){
data.url=$(this).attr("url");
}*/
if(audit&&compileId&&functionId&&serviceId){
if(audit != 0){
var has=false;
@@ -169,7 +173,8 @@ var GetLogTotal=function(_data){
for(var i=0;i<data.length;i++){
if($(this).attr("compileId")==data[i].compileId){
$(this).attr("id",i+"logTotal");
$(this).html(data[i].sum);
//$(this).html(data[i].sum);
$(this).html("<a href='javascript:;' onclick='logSearch(\""+data[i].compileId+"\")'>"+data[i].sum+"<a>");
$(this).parent("tr").find("td:eq(1)").html("<a href='javascript:;' onclick='toLogSearch("+i+")'>"+data[i].compileId+"<a>");
hasLog=true;
}
@@ -646,4 +651,18 @@ function setStartTimeByFormat(startTimeSelector,endTimeSelector,granule,unit,for
$(startTimeSelector).val(dateFtt(formatParm,startTime)+endStr);
$(endTimeSelector).val(dateFtt(formatParm,endTime)+endStr);
}
function logSearch(cfgId){
var title=$.validator.messages.log_trend;
var url=$("#jbox_cfg_url",parent.document).val();
url=url+"?cfgId="+cfgId;
top.$.jBox("iframe:"+url, {
title: title,
width: $(document).width()*0.8,
height: $(document).height()*0.8,
buttons: { close : true }
});
//alert(cfgId+'======'+url);
}
/*======================新增按照需求指定时间范围如取到天、小时等end=====================================*/