blob: 9d25c47562f3764912aa9359560f86f7370cc97f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
!!!
%html
%head
%title #{@title}: Alert #{@alert.id}: #{@alert.get_safe_html_summary}
%link{:rel => "stylesheet", :href => "/alerts2.css"}/
%link{:rel => "stylesheet", :href => "/alerts-mobil.css", :media => "handheld"} /
%script{:type => "text/javascript", :src => "/prototype.js"}/
%script{:type => "text/javascript", :src => "/mauve_utils.js"}/
%script{:type => "text/javascript", :src => "/datadumper.js"}/
%body{:onLoad => "addAutoHover(); addRefresh();"}
.head= partial("head3")
#about_alert
%h1.summary #{@alert.get_safe_html_subject}: #{@alert.get_safe_html_summary}
%h2.details Alert Details
- if @alert.detail
.arse= partial("detail")
- if @alert.source != @alert.subject
%h2.source Source
.source= @alert.get_safe_html_source
%h2.external Alert ID external
= @alert.get_safe_html_alert_id
%h2.internal Alert ID internal
= @alert.id
%h2.raised_at Last raised
= @alert.raised? ? @alert.raised_at : "Not yet raised"
%h2.acknowledged_at Acknowledged
= @alert.acknowledged? ? @alert.acknowledged_at : "Not acknowledged"
%h2.cleared_at Cleared
= @alert.cleared? ? @alert.cleared_at : "Not cleared"
%h2.alert_group Alert group
The first matching one is used:
= AlertGroup.matches(@alert).map{|g| g.name}.join("; ")
%h2.changes Notifications sent out
.changes
%ul
- @alert.changes.each do |change|
- if change.was_relevant?
%li
%strong= change.level
= change.update_type
notification to
= change.person
at
= change.at
%h2.actions Actions (ugly)
- if !@alert.acknowledged?
%form{:method => :post, :action => "/alert/#{@alert.id}/acknowledge"}
%input{:type => :submit, :value => "Acknowledge this alert"}
%h2.actions_dangerous Dangerous actions (also ugly)
- if @alert.raised?
%form{:method => :post, :action => "/alert/#{@alert.id}/clear"}
%input.dangerous{:type => :submit, :value => "Clear this alert"}
- if @alert.cleared?
%form{:method => :post, :action => "/alert/#{@alert.id}/raise"}
%input.dangerous{:type => :submit, :value => "Raise this alert"}
|