Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
event-analysis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
崔义雄
event-analysis
Commits
16f4706f
Commit
16f4706f
authored
May 09, 2020
by
Kerwin_Cui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
412cc534
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
10 deletions
+49
-10
event_analysis/views.py
event_analysis/views.py
+1
-0
templates/event_analysis/error_alarm.html
templates/event_analysis/error_alarm.html
+48
-10
No files found.
event_analysis/views.py
View file @
16f4706f
...
...
@@ -2259,6 +2259,7 @@ def del_alarm(request):
)
def
search_alarm
(
request
):
try
:
req
=
json
.
loads
(
request
.
body
)
...
...
templates/event_analysis/error_alarm.html
View file @
16f4706f
...
...
@@ -27,7 +27,7 @@
<el-col
align=
"left"
>
<span
style=
"font-weight:600;font-size:15.6px;"
>
预警新建:
</span>
<el-button
type=
"primary"
size=
"medium"
style=
"float:right"
@
click=
"createNewTask()"
>
批量
新建
@
click=
"createNewTask()"
>
通过告警
新建
</el-button>
<el-button
type=
"primary"
size=
"medium"
@
click=
"createNewAlarm()"
style=
" float:right;margin-right:12px"
>
新建
...
...
@@ -219,7 +219,7 @@
<el-form-item
style=
"display:inline-block"
label=
""
label-width=
"325px"
>
<el-row>
<el-button
type=
"primary"
>
查 询
</el-button>
<el-button
type=
"primary"
@
click=
"searchAlarm()"
>
查 询
</el-button>
</el-row>
</el-form-item>
<el-form-item
label=
""
label-width=
"30px"
...
...
@@ -236,16 +236,14 @@
<el-row>
<div
style=
"line-height: 50px ;"
>
<template>
<el-table
:data=
"
alarmDisplay
"
style=
"width:100%"
<el-table
:data=
"
gridData
"
style=
"width:100%"
max-height=
"300"
>
<el-table-column
fixed
prop=
"alarm_title"
label=
"告警标题"
width=
"300"
<el-table-column
type=
"selection"
width=
"30"
></el-table-column>
<el-table-column
fixed
prop=
"alarm_title"
label=
"告警标题"
width=
"300"
align=
"center"
></el-table-column>
<el-table-column
fixed
prop=
"alarm_info"
label=
"告警内容"
width=
"300"
<el-table-column
fixed
prop=
"alarm_info"
label=
"告警内容"
width=
"300"
align=
"center"
></el-table-column>
<el-table-column
fixed
prop=
"alarm_time"
label=
"告警时间"
width=
"300"
<el-table-column
fixed
prop=
"alarm_time"
label=
"告警时间"
width=
"300"
align=
"center"
></el-table-column>
</el-table>
</template>
...
...
@@ -253,7 +251,7 @@
</el-row>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"batchNewVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"batchNewVisible = false"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"batchNewVisible = false"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -310,6 +308,11 @@
{
label
:
'
主要
'
,
value
:
'
2
'
,},
{
label
:
'
次要
'
,
value
:
'
3
'
,},
],
alarmType
:
[
{
label
:
'
日志告警
'
,
value
:
'
2
'
},
{
label
:
'
指标告警
'
,
value
:
'
1
'
},
{
label
:
'
日志和指标告警
'
,
value
:
'
0
'
},
],
};
var
formatToId
=
function
(
item
,
itemArray
)
{
for
(
let
i
of
itemArray
)
{
...
...
@@ -335,6 +338,7 @@
dateoutflag
:
false
,
dateoutinfo
:
""
,
user
:
''
,
gridData
:
[],
priorityOp
:
keyArray
.
priority
,
eventStateOp
:
keyArray
.
eventState
,
relateOp
:
keyArray
.
relateJudge
,
...
...
@@ -394,9 +398,43 @@
this
.
systemList
=
res
})
},
searchAlarm
(){
if
(
this
.
formLine
.
failure_analysis
.
alarm_type
&&
this
.
formLine
.
failure_analysis
.
start_time
&&
this
.
formLine
.
failure_analysis
.
end_time
)
{
let
vm
=
this
;
let
data
=
this
.
formLine
;
vm
.
popshow
=
true
;
axios
.
post
(
'
${SITE_URL}search/
'
,
data
).
then
(
res
=>
{
vm
.
gridData
=
[];
vm
.
gridData
=
res
.
data
;
if
(
res
.
result
)
{
this
.
$message
({
type
:
"
success
"
,
message
:
'
查询成功
'
});
}
else
{
this
.
$message
({
type
:
"
error
"
,
message
:
'
查询失败
'
+
res
.
message
});
this
.
formLine
=
data
}
})
}
else
{
vm
.
$message
({
type
:
'
error
'
,
message
:
'
查询失败,请完善必填项
'
});
}
},
createNewAlarm
(){
window
.
location
.
href
=
"
${SITE_URL}alarm_edit
"
},
createNewTask
()
{
// window.localStorage.removeItem("event_number")
// window.location.href = "${SITE_URL}event_edit"
this
.
batchNewVisible
=
true
},
delAlarm
(){
this
.
$confirm
(
'
此操作将永久删除该记录, 是否继续?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
...
...
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