Commit 7df04dec authored by 胡斌's avatar 胡斌

智能分析平台备份提交

parent 9a7aad19
...@@ -309,9 +309,6 @@ public class TaskManageController { ...@@ -309,9 +309,6 @@ public class TaskManageController {
} }
@RequestMapping(value = "/taskDeleteFrame") @RequestMapping(value = "/taskDeleteFrame")
public String taskDeleteFrame(Long taskId, @RequestParam(required = false) String defaultTaskType) { public String taskDeleteFrame(Long taskId, @RequestParam(required = false) String defaultTaskType) {
runTaskService.deleteRunTask(taskId); runTaskService.deleteRunTask(taskId);
...@@ -336,10 +333,6 @@ public class TaskManageController { ...@@ -336,10 +333,6 @@ public class TaskManageController {
return runTaskService.checkNameAndCode(java.net.URLDecoder.decode(name, "UTF-8"), code, id, defaultTaskType); return runTaskService.checkNameAndCode(java.net.URLDecoder.decode(name, "UTF-8"), code, id, defaultTaskType);
} }
@RequestMapping(value = "/modelPreview") @RequestMapping(value = "/modelPreview")
@ResponseBody @ResponseBody
public APPEWarningDetail ModelPreview(String id){ public APPEWarningDetail ModelPreview(String id){
...@@ -386,6 +379,7 @@ public class TaskManageController { ...@@ -386,6 +379,7 @@ public class TaskManageController {
} }
return app; return app;
}; };
@RequestMapping(value = "/modelPreviewImg") @RequestMapping(value = "/modelPreviewImg")
public void ModelPreview(HttpServletResponse response,String path){ public void ModelPreview(HttpServletResponse response,String path){
// System.out.println("fileName:"+path); // System.out.println("fileName:"+path);
...@@ -417,4 +411,32 @@ public class TaskManageController { ...@@ -417,4 +411,32 @@ public class TaskManageController {
public String ImgDisplay(Map model) throws ParseException { public String ImgDisplay(Map model) throws ParseException {
return PageURLController.RunTaskImgDisplay; return PageURLController.RunTaskImgDisplay;
} }
@RequestMapping(value = "/getParameterByTaskId*", method = RequestMethod.GET)
@ResponseBody
public List<ModelParameter> getParameter(String taskId ,Map model) throws ParseException {
List<ModelParameter> mpl = modelParameterDao.findByTaskIdAndIfSystemDefault(Long.parseLong(taskId),1L);
return mpl;
}
@RequestMapping(value = "/updateParameter*", method = RequestMethod.GET)
@ResponseBody
public String updateParameter(String parameterId,String parameterVal ,Map model) throws ParseException {
String [] paramIdArr = null;
String [] paramValArr = null;
if(",".contains(parameterId)){
paramIdArr = parameterId.split(",");
paramValArr = parameterVal.split(",");
}else{
if(StringUtils.isNotEmpty(parameterId)){
paramIdArr = new String[]{parameterId};
paramValArr = new String[]{parameterVal};
}
}
return "success";
}
} }
\ No newline at end of file
...@@ -191,28 +191,12 @@ ...@@ -191,28 +191,12 @@
$("#createFilter").click(function(){ $("#createFilter").click(function(){
$.dialog({ location.href="${ctx}/AnalysisSupport/FilterRuleMaintain";
title: "提醒",
content:"确定新建过滤规则?",
ok: function(){location.href="${ctx}/AnalysisSupport/FilterRuleMaintain";},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
lock:true
});
}); });
$("#updateFilter").click(function(){ $("#updateFilter").click(function(){
var filterRuleId = $("input[name='update']:checked").val(); var filterRuleId = $("input[name='update']:checked").val();
$.dialog({ location.href="${ctx}/AnalysisSupport/FilterRuleConfiguration?filterRuleId="+filterRuleId;
title: "提醒",
content:"确定修改过滤规则?",
ok: function(){location.href="${ctx}/AnalysisSupport/FilterRuleConfiguration?filterRuleId="+filterRuleId;},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
lock:true
});
}); });
$("#deleteFilter").click(function(){ $("#deleteFilter").click(function(){
...@@ -229,7 +213,6 @@ ...@@ -229,7 +213,6 @@
async: false, async: false,
dataType : "json", dataType : "json",
success: function(data){ success: function(data){
console.log(data)
if(data.status === "success"){ if(data.status === "success"){
location.href = "${ctx}/AnalysisSupport/FilterRuleResult" location.href = "${ctx}/AnalysisSupport/FilterRuleResult"
} }
......
...@@ -244,6 +244,11 @@ ...@@ -244,6 +244,11 @@
//删除一条参数 //删除一条参数
function deleteRow(elementTag, parameterId){ function deleteRow(elementTag, parameterId){
$.dialog({
title: "提醒",
content:"确定要删除该条参数吗<span style='color: red'>(该操作不可恢复)</span>?",
ok: function(){
if(parameterId==""){ if(parameterId==""){
$(elementTag).parent().parent().remove(); $(elementTag).parent().parent().remove();
}else{ }else{
...@@ -259,10 +264,25 @@ ...@@ -259,10 +264,25 @@
}); });
} }
},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
lock:true
});
} }
//删除所有参数 //删除所有参数
function deleteAllTr(){ function deleteAllTr(){
$.dialog({
title: "提醒",
content:"确定要删除所有参数吗<span style='color: red'>(该操作不可恢复)</span>?",
ok: function(){
$.ajax({ $.ajax({
type : "GET", type : "GET",
contentType : "application/json", contentType : "application/json",
...@@ -273,6 +293,13 @@ ...@@ -273,6 +293,13 @@
$("#addTr").empty(); $("#addTr").empty();
} }
}); });
},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
lock:true
});
}; };
//修改/增加一条参数 //修改/增加一条参数
......
...@@ -127,28 +127,32 @@ ...@@ -127,28 +127,32 @@
" <td>"+data.kpiName+"</td>" + " <td>"+data.kpiName+"</td>" +
" </tr>" + " </tr>" +
" <tr>" + " <tr>" +
" <td>预测开始时间</td>" + " <td>预测开始</td>" +
" <td>"+df.format(new Date(data.busdatabegTime))+"</td>" + " <td colspan='3'>"+df.format(new Date(data.busdatabegTime))+"</td>" +
" <td>预测结束时间</td>" + " <td>预测结束</td>" +
" <td>"+df.format(new Date(data.busdataendTime))+"</td>" + " <td colspan='3'>"+df.format(new Date(data.busdataendTime))+"</td>" +
" <td>阈值1</td>" +
" <td>"+removeNull(data.threshold1Val)+"</td>" +
" </tr>" + " </tr>" +
" <tr>" + " <tr>" +
" <td>阈值1</td>" +
" <td>"+removeNull(data.threshold1Val)+"</td>" +
" <td>阈值2</td>" + " <td>阈值2</td>" +
" <td>"+removeNull(data.threshold2Val)+"</td>" + " <td>"+removeNull(data.threshold2Val)+"</td>" +
" <td>阈值3</td>" + " <td>阈值3</td>" +
" <td>"+removeNull(data.threshold3Val)+"</td>" + " <td>"+removeNull(data.threshold3Val)+"</td>" +
" <td>阈值告警1</td>" +
" <td>"+removeNull(data.warn1Val)+"</td>" +
" </tr>" + " </tr>" +
" <tr>" + " <tr>" +
" <td>阈值告警1</td>" +
" <td>"+removeNull(data.warn1Val)+"</td>" +
" <td>阈值告警2</td>" + " <td>阈值告警2</td>" +
" <td>"+removeNull(data.warn2Val)+"</td>" + " <td>"+removeNull(data.warn2Val)+"</td>" +
" <td>阈值告警3</td>" + " <td>阈值告警3</td>" +
" <td>"+removeNull(data.warn3Val)+"</td>" + " <td>"+removeNull(data.warn3Val)+"</td>" +
" </tr>" + " </tr>" +
" <tr>" + " <tr>" +
" <td>模型评价</td>" +
" <td colspan='6' align='center'>"+data.evaluationResult+"</td>" +
" </tr>" +
" <tr>" +
" <td colspan='8' align='center'>图表展示</td>" + " <td colspan='8' align='center'>图表展示</td>" +
" </tr>" + " </tr>" +
" <tr>" + " <tr>" +
......
...@@ -26,15 +26,7 @@ taskName = "沙盒任务"; ...@@ -26,15 +26,7 @@ taskName = "沙盒任务";
taskName = "自定义任务"; taskName = "自定义任务";
</c:if> </c:if>
function addTask() { function addTask() {
$.dialog({ window.location.href='${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}'+"&type=new"
title: "提醒",
content:"确定新增" + taskName + "?",
ok: function(){window.location.href='${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}'+"&type=new"},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
lock:true
});
} }
function editTask() { function editTask() {
...@@ -43,15 +35,8 @@ taskName = "自定义任务"; ...@@ -43,15 +35,8 @@ taskName = "自定义任务";
alert("请选择一条记录"); alert("请选择一条记录");
return; return;
} }
$.dialog({ window.location.href = '${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}&taskId=' + id+"&type=modify";
title: "提醒",
content:"确定修改" + taskName + "?",
ok: function(){window.location.href = '${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}&taskId=' + id+"&type=modify";},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
lock:true
});
} }
function deleteTask() { function deleteTask() {
...@@ -104,10 +89,7 @@ taskName = "自定义任务"; ...@@ -104,10 +89,7 @@ taskName = "自定义任务";
} else if(status == '2') { } else if(status == '2') {
action = '暂停'; action = '暂停';
} }
$.dialog({
title: "提醒",
content:"确定" + action + taskName + "?",
ok: function(){
$.ajax({ $.ajax({
type : 'post', type : 'post',
'url' : '${ctx}/BaseManage/TaskManage/updateStatusFrame', 'url' : '${ctx}/BaseManage/TaskManage/updateStatusFrame',
...@@ -115,11 +97,6 @@ taskName = "自定义任务"; ...@@ -115,11 +97,6 @@ taskName = "自定义任务";
success : function(data) { success : function(data) {
queryResult($('#currentPage').val()? $('#currentPage').val() : 1); queryResult($('#currentPage').val()? $('#currentPage').val() : 1);
} }
});},
okValue:"确定",
cancel: function(){},
cancelValue:"取消",
lock:true
}); });
} }
...@@ -134,7 +111,7 @@ taskName = "自定义任务"; ...@@ -134,7 +111,7 @@ taskName = "自定义任务";
} }
}); });
} }
function preview(e){ function preview(){
var id = $('input[name="taskId"]:checked').val(); var id = $('input[name="taskId"]:checked').val();
var taskType = '${queryCondition.defaultTaskType}'; var taskType = '${queryCondition.defaultTaskType}';
<%--${ctx}/static/images/loading.gif--%> <%--${ctx}/static/images/loading.gif--%>
...@@ -154,8 +131,63 @@ taskName = "自定义任务"; ...@@ -154,8 +131,63 @@ taskName = "自定义任务";
} }
function parameterChange() {
var id = $('input[name="taskId"]:checked').val();
$.ajax({
url:'${ctx}/BaseManage/TaskManage/getParameterByTaskId?taskId='+id,
type:'get',
success:function (data) {
var context = "<div style='width:420px;height: 130px;overflow: auto'>" +
"<table class='table table-hover table-striped' id='displayParam' >" +
"<thead>" +
"<tr><th>参数名</th><th>参数值</th><th>参数类型</th></tr>" +
"</thead>" +
"<tbody id='addTr'>";
data.forEach(function (t) {
context +='<tr class="parameterTr" id='+t.parameterId+'><td>'+t.parameterName+'</td><td><input type="text" class="parameterValue" value="'+t.parameterValue+'"/></td><td>'+t.parameterDataType+'</td></tr>';
});
context = context+
"</tbody>" +
"</table>" +
"<div><button class='btn-sm btn btn-success btn-sm btn-group btn-group-cog' onclick='changeParameter();'>确认</button></div>"+
"</div>";
$.dialog({
title:'参数修改',
content:context,
lock: true
});
}
})
}
function changeParameter() {
var paramId = "";
var paramVal = "";
var trL = $('tr[class="parameterTr"]').each(function(){
paramId+= $(this).context.id+",";
paramVal+= $(this).find("input").val()+",";
});
paramId = paramId.substring(0,paramId.length-1)
paramVal = paramVal.substring(0,paramVal.length-1)
$.ajax({
url:'${ctx}/BaseManage/TaskManage/updateParameter?parameterId='+paramId+"&parameterVal="+paramVal,
type:'get',
success:function (data) {
}
})
}
function choseTask(){ function choseTask(){
$("#ModelPreview").attr("disabled", false); $("#ModelPreview").attr("disabled", false);
$("#parameterChange").attr("disabled", false);
} }
$(document).ready(function(){ $(document).ready(function(){
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="table-header">任务列表 <div class="table-header">任务列表
<div id="time_div" style="top: -6px;float: right;height: 0px;position: relative;"> <div id="time_div" style="top: -6px;float: right;height: 0px;position: relative;">
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="changeTaskStatus('1')">运行</button> <button class="btn-sm btn btn-success btn-sm btn-group btn-group-cog" onclick="changeTaskStatus('1')">运行</button>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="changeTaskStatus('2')">暂停</button> <button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="changeTaskStatus('2')">暂停</button>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="editTask();">修改</button> <button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" onclick="editTask();">修改</button>
<button class="btn-sm btn btn-warning btn-sm btn-group btn-group-cog" onclick="deleteTask();">删除</button> <button class="btn-sm btn btn-warning btn-sm btn-group btn-group-cog" onclick="deleteTask();">删除</button>
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<%--create by afe 2017-10-26--%> <%--create by afe 2017-10-26--%>
<c:if test="${runTask.defaultTaskType == '1' || runTask.defaultTaskType == '5' }"> <c:if test="${runTask.defaultTaskType == '1' || runTask.defaultTaskType == '5' }">
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" id="ModelPreview" onclick="preview()" disabled>模型预览</button> <button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" id="ModelPreview" onclick="preview()" disabled>模型预览</button>
<button class="btn-sm btn btn-primary btn-sm btn-group btn-group-cog" id="parameterChange" onclick="parameterChange()" disabled>参数修改</button>
</c:if> </c:if>
</div> </div>
</div> </div>
......
...@@ -127,16 +127,16 @@ function filterResultDetailTable(){ ...@@ -127,16 +127,16 @@ function filterResultDetailTable(){
var header = new Array(); var header = new Array();
header[0] = ["","radio","1%",""]; header[0] = ["","radio","1%",""];
header[1] = ["过滤规则ID","warningFilteringRuleId","7%","15"]; // header[1] = ["过滤规则ID","warningFilteringRuleId","7%","15"];
header[2] = ["省份","provinceId","7%","15"]; header[1] = ["省份","provinceId","7%","15"];
header[3] = ["渠道","channel","7%","15"]; header[2] = ["渠道","channel","7%","15"];
header[4] = ["业务","business","7%","15"]; header[3] = ["业务","business","7%","15"];
header[5] = ["数据来源","datasource","7%","15"]; header[4] = ["数据来源","datasource","7%","15"];
header[6] = ["影响开始时间","filteringStartTime","7%","15"]; header[5] = ["影响开始时间","filteringStartTime","7%","15"];
header[7] = ["影响结束时间","filteringEndTime","7%","15"]; header[6] = ["影响结束时间","filteringEndTime","7%","15"];
header[8] = ["是否重复","ifRepeat","7%","15"]; header[7] = ["是否重复","ifRepeat","7%","15"];
header[9] = ["过滤周期","frequency","7%","15"]; header[8] = ["过滤周期","frequency","7%","15"];
header[10] = ["过滤原因","filteringReason","7%","15"]; header[9] = ["过滤原因","filteringReason","7%","15"];
window.pagging = new table_pagging({limit:12,tableId:'filterResultTable',header:header}); window.pagging = new table_pagging({limit:12,tableId:'filterResultTable',header:header});
pagging.pagging(jsonData); pagging.pagging(jsonData);
} }
...@@ -295,29 +295,29 @@ table_pagging.prototype = { ...@@ -295,29 +295,29 @@ table_pagging.prototype = {
if(tdContext==null){ if(tdContext==null){
tdContext = "&nbsp;"; tdContext = "&nbsp;";
} }
if(k===2){ if(k===1){
tdContext = this.getProvinceName(tdContext) tdContext = this.getProvinceName(tdContext)
} }
if(k===3){ if(k===2){
tdContext = this.getChannel(this.getData(this.objectlist[i],"kpiId")) tdContext = this.getChannel(this.getData(this.objectlist[i],"kpiId"))
} }
if(k===4){ if(k===3){
tdContext = this.getBusiness(this.getData(this.objectlist[i],"kpiId")) tdContext = this.getBusiness(this.getData(this.objectlist[i],"kpiId"))
} }
if(k===5){ if(k===4){
tdContext = this.getDataSource(this.getData(this.objectlist[i],"kpiId")) tdContext = this.getDataSource(this.getData(this.objectlist[i],"kpiId"))
} }
if(k===6){ if(k===5){
tdContext = df.format(new Date(tdContext)) tdContext = df.format(new Date(tdContext))
} }
if(k===7){ if(k===6){
tdContext = df.format(new Date(tdContext)) tdContext = df.format(new Date(tdContext))
} }
if(k===8){ if(k===7){
tdContext = (tdContext==1)?"是":"否"; tdContext = (tdContext==1)?"是":"否";
} }
if(k===9){ if(k===8){
if(tdContext.indexOf("/")!==-1){ if(tdContext.indexOf("/")!==-1){
var unit = tdContext.split("/")[1]; var unit = tdContext.split("/")[1];
var value = tdContext.split("/")[0]; var value = tdContext.split("/")[0];
......
...@@ -134,11 +134,11 @@ function ruleResultDetailTable(){ ...@@ -134,11 +134,11 @@ function ruleResultDetailTable(){
header[2] = ["业务","businessName","7%","15"]; header[2] = ["业务","businessName","7%","15"];
header[3] = ["指标名称","kpiName","7%","15"]; header[3] = ["指标名称","kpiName","7%","15"];
header[4] = ["指标编码","kpiCode","7%","15"]; header[4] = ["指标编码","kpiCode","7%","15"];
header[5] = ["数据类型","kpiTypeName","7%","15"]; // header[5] = ["数据类型","kpiTypeName","7%","15"];
header[6] = ["数据采集频率","calCycle","7%","15"]; header[5] = ["数据采集频率","calCycle","7%","15"];
header[7] = ["监控延迟时间","kpiMonitorTime","7%","15"]; header[6] = ["监控延迟时间","kpiMonitorTime","7%","15"];
// header[11] = ["指标采集时间","businessTime","7%","15"]; // headr[11] = ["指标采集时间","businessTime","7%","15"];
header[8] = ["准确性规则","accuracyRuleId","7%","15"]; header[7] = ["准确性规则","accuracyRuleId","7%","15"];
window.pagging = new table_pagging({limit:12,tableId:'ruleResultTable',header:header}); window.pagging = new table_pagging({limit:12,tableId:'ruleResultTable',header:header});
pagging.pagging(jsonData); pagging.pagging(jsonData);
...@@ -301,7 +301,7 @@ table_pagging.prototype = { ...@@ -301,7 +301,7 @@ table_pagging.prototype = {
tdContext = "&nbsp;"; tdContext = "&nbsp;";
} }
if(k==7){ if(k==6){
if(tdContext.indexOf("/")!=-1){ if(tdContext.indexOf("/")!=-1){
var a = new Array(); var a = new Array();
a = tdContext.split("/"); a = tdContext.split("/");
...@@ -325,7 +325,7 @@ table_pagging.prototype = { ...@@ -325,7 +325,7 @@ table_pagging.prototype = {
// tdContext = df.format(new Date(tdContext)); // tdContext = df.format(new Date(tdContext));
// } // }
// } // }
if(k==8){ if(k==7){
tdContext = "<a href='javascript:;' onclick='selectRule(\""+this.getData(this.objectlist[i],"qualityRuleId")+"\")'>查看规则</a>"; tdContext = "<a href='javascript:;' onclick='selectRule(\""+this.getData(this.objectlist[i],"qualityRuleId")+"\")'>查看规则</a>";
} }
......
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