Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cmszMonitorAnalysis
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuna
cmszMonitorAnalysis
Commits
7df04dec
Commit
7df04dec
authored
7 years ago
by
胡斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能分析平台备份提交
parent
9a7aad19
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
158 additions
and
88 deletions
+158
-88
TSWBAnalysisService.java
.../hp/cmsz/service/analysissupport/TSWBAnalysisService.java
+0
-0
TaskManageController.java
...va/com/hp/cmsz/web/commonmanage/TaskManageController.java
+30
-7
FilterRuleResult.jsp
...webapp/WEB-INF/views/AnalysisSupport/FilterRuleResult.jsp
+2
-19
ModelParameterConfiguration.jsp
...WEB-INF/views/ModelManage/ModelParameterConfiguration.jsp
+27
-0
ModelMonitorHome.jsp
...main/webapp/WEB-INF/views/TaskManage/ModelMonitorHome.jsp
+12
-8
RunTaskList.jsp
src/main/webapp/WEB-INF/views/TaskManage/RunTaskList.jsp
+60
-28
RunTaskListTable.jsp
...main/webapp/WEB-INF/views/TaskManage/RunTaskListTable.jsp
+2
-1
filterResultDetailTable.js
src/main/webapp/static/js/filterResultDetailTable.js
+18
-18
ruleResultDetailTable.js
src/main/webapp/static/js/ruleResultDetailTable.js
+7
-7
No files found.
src/main/java/com/hp/cmsz/service/analysissupport/TSWBAnalysisService.java
View file @
7df04dec
This diff is collapsed.
Click to expand it.
src/main/java/com/hp/cmsz/web/commonmanage/TaskManageController.java
View file @
7df04dec
...
...
@@ -309,9 +309,6 @@ public class TaskManageController {
}
@RequestMapping
(
value
=
"/taskDeleteFrame"
)
public
String
taskDeleteFrame
(
Long
taskId
,
@RequestParam
(
required
=
false
)
String
defaultTaskType
)
{
runTaskService
.
deleteRunTask
(
taskId
);
...
...
@@ -336,10 +333,6 @@ public class TaskManageController {
return
runTaskService
.
checkNameAndCode
(
java
.
net
.
URLDecoder
.
decode
(
name
,
"UTF-8"
),
code
,
id
,
defaultTaskType
);
}
@RequestMapping
(
value
=
"/modelPreview"
)
@ResponseBody
public
APPEWarningDetail
ModelPreview
(
String
id
){
...
...
@@ -386,6 +379,7 @@ public class TaskManageController {
}
return
app
;
};
@RequestMapping
(
value
=
"/modelPreviewImg"
)
public
void
ModelPreview
(
HttpServletResponse
response
,
String
path
){
// System.out.println("fileName:"+path);
...
...
@@ -417,4 +411,32 @@ public class TaskManageController {
public
String
ImgDisplay
(
Map
model
)
throws
ParseException
{
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
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/AnalysisSupport/FilterRuleResult.jsp
View file @
7df04dec
...
...
@@ -191,28 +191,12 @@
$
(
"#createFilter"
).
click
(
function
(){
$
.
dialog
({
title
:
"提醒"
,
content
:
"确定新建过滤规则?"
,
ok
:
function
(){
location
.
href
=
"${ctx}/AnalysisSupport/FilterRuleMaintain"
;},
okValue
:
"确定"
,
cancel
:
function
(){},
cancelValue
:
"取消"
,
lock
:
true
});
location
.
href
=
"${ctx}/AnalysisSupport/FilterRuleMaintain"
;
});
$
(
"#updateFilter"
).
click
(
function
(){
var
filterRuleId
=
$
(
"input[name='update']:checked"
).
val
();
$
.
dialog
({
title
:
"提醒"
,
content
:
"确定修改过滤规则?"
,
ok
:
function
(){
location
.
href
=
"${ctx}/AnalysisSupport/FilterRuleConfiguration?filterRuleId="
+
filterRuleId
;},
okValue
:
"确定"
,
cancel
:
function
(){},
cancelValue
:
"取消"
,
lock
:
true
});
location
.
href
=
"${ctx}/AnalysisSupport/FilterRuleConfiguration?filterRuleId="
+
filterRuleId
;
});
$
(
"#deleteFilter"
).
click
(
function
(){
...
...
@@ -229,7 +213,6 @@
async
:
false
,
dataType
:
"json"
,
success
:
function
(
data
){
console
.
log
(
data
)
if
(
data
.
status
===
"success"
){
location
.
href
=
"${ctx}/AnalysisSupport/FilterRuleResult"
}
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/ModelManage/ModelParameterConfiguration.jsp
View file @
7df04dec
...
...
@@ -244,6 +244,11 @@
//删除一条参数
function
deleteRow
(
elementTag
,
parameterId
){
$
.
dialog
({
title
:
"提醒"
,
content
:
"确定要删除该条参数吗<span style='color: red'>(该操作不可恢复)</span>?"
,
ok
:
function
(){
if
(
parameterId
==
""
){
$
(
elementTag
).
parent
().
parent
().
remove
();
}
else
{
...
...
@@ -259,10 +264,25 @@
});
}
},
okValue
:
"确定"
,
cancel
:
function
(){},
cancelValue
:
"取消"
,
lock
:
true
});
}
//删除所有参数
function
deleteAllTr
(){
$
.
dialog
({
title
:
"提醒"
,
content
:
"确定要删除所有参数吗<span style='color: red'>(该操作不可恢复)</span>?"
,
ok
:
function
(){
$
.
ajax
({
type
:
"GET"
,
contentType
:
"application/json"
,
...
...
@@ -273,6 +293,13 @@
$
(
"#addTr"
).
empty
();
}
});
},
okValue
:
"确定"
,
cancel
:
function
(){},
cancelValue
:
"取消"
,
lock
:
true
});
};
//修改/增加一条参数
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/TaskManage/ModelMonitorHome.jsp
View file @
7df04dec
...
...
@@ -127,28 +127,32 @@
" <td>"
+
data
.
kpiName
+
"</td>"
+
" </tr>"
+
" <tr>"
+
" <td>预测开始时间</td>"
+
" <td>"
+
df
.
format
(
new
Date
(
data
.
busdatabegTime
))
+
"</td>"
+
" <td>预测结束时间</td>"
+
" <td>"
+
df
.
format
(
new
Date
(
data
.
busdataendTime
))
+
"</td>"
+
" <td>阈值1</td>"
+
" <td>"
+
removeNull
(
data
.
threshold1Val
)
+
"</td>"
+
" <td>预测开始</td>"
+
" <td colspan='3'>"
+
df
.
format
(
new
Date
(
data
.
busdatabegTime
))
+
"</td>"
+
" <td>预测结束</td>"
+
" <td colspan='3'>"
+
df
.
format
(
new
Date
(
data
.
busdataendTime
))
+
"</td>"
+
" </tr>"
+
" <tr>"
+
" <td>阈值1</td>"
+
" <td>"
+
removeNull
(
data
.
threshold1Val
)
+
"</td>"
+
" <td>阈值2</td>"
+
" <td>"
+
removeNull
(
data
.
threshold2Val
)
+
"</td>"
+
" <td>阈值3</td>"
+
" <td>"
+
removeNull
(
data
.
threshold3Val
)
+
"</td>"
+
" <td>阈值告警1</td>"
+
" <td>"
+
removeNull
(
data
.
warn1Val
)
+
"</td>"
+
" </tr>"
+
" <tr>"
+
" <td>阈值告警1</td>"
+
" <td>"
+
removeNull
(
data
.
warn1Val
)
+
"</td>"
+
" <td>阈值告警2</td>"
+
" <td>"
+
removeNull
(
data
.
warn2Val
)
+
"</td>"
+
" <td>阈值告警3</td>"
+
" <td>"
+
removeNull
(
data
.
warn3Val
)
+
"</td>"
+
" </tr>"
+
" <tr>"
+
" <td>模型评价</td>"
+
" <td colspan='6' align='center'>"
+
data
.
evaluationResult
+
"</td>"
+
" </tr>"
+
" <tr>"
+
" <td colspan='8' align='center'>图表展示</td>"
+
" </tr>"
+
" <tr>"
+
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/TaskManage/RunTaskList.jsp
View file @
7df04dec
...
...
@@ -26,15 +26,7 @@ taskName = "沙盒任务";
taskName
=
"自定义任务"
;
<
/c:if
>
function
addTask
()
{
$
.
dialog
({
title
:
"提醒"
,
content
:
"确定新增"
+
taskName
+
"?"
,
ok
:
function
(){
window
.
location
.
href
=
'${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}'
+
"&type=new"
},
okValue
:
"确定"
,
cancel
:
function
(){},
cancelValue
:
"取消"
,
lock
:
true
});
window
.
location
.
href
=
'${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}'
+
"&type=new"
}
function
editTask
()
{
...
...
@@ -43,15 +35,8 @@ taskName = "自定义任务";
alert
(
"请选择一条记录"
);
return
;
}
$
.
dialog
({
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
});
window
.
location
.
href
=
'${ctx}/BaseManage/TaskManage/taskFormFrame?defaultTaskType=${queryCondition.defaultTaskType}&taskId='
+
id
+
"&type=modify"
;
}
function
deleteTask
()
{
...
...
@@ -104,10 +89,7 @@ taskName = "自定义任务";
}
else
if
(
status
==
'2'
)
{
action
=
'暂停'
;
}
$
.
dialog
({
title
:
"提醒"
,
content
:
"确定"
+
action
+
taskName
+
"?"
,
ok
:
function
(){
$
.
ajax
({
type
:
'post'
,
'url'
:
'${ctx}/BaseManage/TaskManage/updateStatusFrame'
,
...
...
@@ -115,11 +97,6 @@ taskName = "自定义任务";
success
:
function
(
data
)
{
queryResult
(
$
(
'#currentPage'
).
val
()?
$
(
'#currentPage'
).
val
()
:
1
);
}
});},
okValue
:
"确定"
,
cancel
:
function
(){},
cancelValue
:
"取消"
,
lock
:
true
});
}
...
...
@@ -134,7 +111,7 @@ taskName = "自定义任务";
}
});
}
function
preview
(
e
){
function
preview
(){
var
id
=
$
(
'input[name="taskId"]:checked'
).
val
();
var
taskType
=
'${queryCondition.defaultTaskType}'
;
<%--
$
{
ctx
}
/static/im
ages
/
loading
.
gif
--%>
...
...
@@ -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
+
"¶meterVal="
+
paramVal
,
type
:
'get'
,
success
:
function
(
data
)
{
}
})
}
function
choseTask
(){
$
(
"#ModelPreview"
).
attr
(
"disabled"
,
false
);
$
(
"#parameterChange"
).
attr
(
"disabled"
,
false
);
}
$
(
document
).
ready
(
function
(){
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/TaskManage/RunTaskListTable.jsp
View file @
7df04dec
...
...
@@ -6,7 +6,7 @@
<div class="table-header">任务列表
<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="editTask();">修改</button>
<button class="btn-sm btn btn-warning btn-sm btn-group btn-group-cog" onclick="deleteTask();">删除</button>
...
...
@@ -14,6 +14,7 @@
<%--create by afe 2017-10-26--%>
<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="parameterChange" onclick="parameterChange()" disabled>参数修改</button>
</c:if>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/static/js/filterResultDetailTable.js
View file @
7df04dec
...
...
@@ -127,16 +127,16 @@ function filterResultDetailTable(){
var
header
=
new
Array
();
header
[
0
]
=
[
""
,
"radio"
,
"1%"
,
""
];
header
[
1
]
=
[
"过滤规则ID"
,
"warningFilteringRuleId"
,
"7%"
,
"15"
];
header
[
2
]
=
[
"省份"
,
"provinceId"
,
"7%"
,
"15"
];
header
[
3
]
=
[
"渠道"
,
"channel"
,
"7%"
,
"15"
];
header
[
4
]
=
[
"业务"
,
"business"
,
"7%"
,
"15"
];
header
[
5
]
=
[
"数据来源"
,
"datasource"
,
"7%"
,
"15"
];
header
[
6
]
=
[
"影响开始时间"
,
"filteringStartTime"
,
"7%"
,
"15"
];
header
[
7
]
=
[
"影响结束时间"
,
"filteringEndTime"
,
"7%"
,
"15"
];
header
[
8
]
=
[
"是否重复"
,
"ifRepeat"
,
"7%"
,
"15"
];
header
[
9
]
=
[
"过滤周期"
,
"frequency"
,
"7%"
,
"15"
];
header
[
10
]
=
[
"过滤原因"
,
"filteringReason"
,
"7%"
,
"15"
];
//
header[1] = ["过滤规则ID","warningFilteringRuleId","7%","15"];
header
[
1
]
=
[
"省份"
,
"provinceId"
,
"7%"
,
"15"
];
header
[
2
]
=
[
"渠道"
,
"channel"
,
"7%"
,
"15"
];
header
[
3
]
=
[
"业务"
,
"business"
,
"7%"
,
"15"
];
header
[
4
]
=
[
"数据来源"
,
"datasource"
,
"7%"
,
"15"
];
header
[
5
]
=
[
"影响开始时间"
,
"filteringStartTime"
,
"7%"
,
"15"
];
header
[
6
]
=
[
"影响结束时间"
,
"filteringEndTime"
,
"7%"
,
"15"
];
header
[
7
]
=
[
"是否重复"
,
"ifRepeat"
,
"7%"
,
"15"
];
header
[
8
]
=
[
"过滤周期"
,
"frequency"
,
"7%"
,
"15"
];
header
[
9
]
=
[
"过滤原因"
,
"filteringReason"
,
"7%"
,
"15"
];
window
.
pagging
=
new
table_pagging
({
limit
:
12
,
tableId
:
'filterResultTable'
,
header
:
header
});
pagging
.
pagging
(
jsonData
);
}
...
...
@@ -295,29 +295,29 @@ table_pagging.prototype = {
if
(
tdContext
==
null
){
tdContext
=
" "
;
}
if
(
k
===
2
){
if
(
k
===
1
){
tdContext
=
this
.
getProvinceName
(
tdContext
)
}
if
(
k
===
3
){
if
(
k
===
2
){
tdContext
=
this
.
getChannel
(
this
.
getData
(
this
.
objectlist
[
i
],
"kpiId"
))
}
if
(
k
===
4
){
if
(
k
===
3
){
tdContext
=
this
.
getBusiness
(
this
.
getData
(
this
.
objectlist
[
i
],
"kpiId"
))
}
if
(
k
===
5
){
if
(
k
===
4
){
tdContext
=
this
.
getDataSource
(
this
.
getData
(
this
.
objectlist
[
i
],
"kpiId"
))
}
if
(
k
===
6
){
if
(
k
===
5
){
tdContext
=
df
.
format
(
new
Date
(
tdContext
))
}
if
(
k
===
7
){
if
(
k
===
6
){
tdContext
=
df
.
format
(
new
Date
(
tdContext
))
}
if
(
k
===
8
){
if
(
k
===
7
){
tdContext
=
(
tdContext
==
1
)?
"是"
:
"否"
;
}
if
(
k
===
9
){
if
(
k
===
8
){
if
(
tdContext
.
indexOf
(
"/"
)
!==-
1
){
var
unit
=
tdContext
.
split
(
"/"
)[
1
];
var
value
=
tdContext
.
split
(
"/"
)[
0
];
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/static/js/ruleResultDetailTable.js
View file @
7df04dec
...
...
@@ -134,11 +134,11 @@ function ruleResultDetailTable(){
header
[
2
]
=
[
"业务"
,
"businessName"
,
"7%"
,
"15"
];
header
[
3
]
=
[
"指标名称"
,
"kpiName"
,
"7%"
,
"15"
];
header
[
4
]
=
[
"指标编码"
,
"kpiCode"
,
"7%"
,
"15"
];
header
[
5
]
=
[
"数据类型"
,
"kpiTypeName"
,
"7%"
,
"15"
];
header
[
6
]
=
[
"数据采集频率"
,
"calCycle"
,
"7%"
,
"15"
];
header
[
7
]
=
[
"监控延迟时间"
,
"kpiMonitorTime"
,
"7%"
,
"15"
];
// head
e
r[11] = ["指标采集时间","businessTime","7%","15"];
header
[
8
]
=
[
"准确性规则"
,
"accuracyRuleId"
,
"7%"
,
"15"
];
//
header[5] = ["数据类型","kpiTypeName","7%","15"];
header
[
5
]
=
[
"数据采集频率"
,
"calCycle"
,
"7%"
,
"15"
];
header
[
6
]
=
[
"监控延迟时间"
,
"kpiMonitorTime"
,
"7%"
,
"15"
];
// headr[11] = ["指标采集时间","businessTime","7%","15"];
header
[
7
]
=
[
"准确性规则"
,
"accuracyRuleId"
,
"7%"
,
"15"
];
window
.
pagging
=
new
table_pagging
({
limit
:
12
,
tableId
:
'ruleResultTable'
,
header
:
header
});
pagging
.
pagging
(
jsonData
);
...
...
@@ -301,7 +301,7 @@ table_pagging.prototype = {
tdContext
=
" "
;
}
if
(
k
==
7
){
if
(
k
==
6
){
if
(
tdContext
.
indexOf
(
"/"
)
!=-
1
){
var
a
=
new
Array
();
a
=
tdContext
.
split
(
"/"
);
...
...
@@ -325,7 +325,7 @@ table_pagging.prototype = {
// 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>"
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment