diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-04-13 17:03:16 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-04-13 17:03:16 +0100 |
commit | 89a67770e66d11740948e90a41db6cee0482cf8e (patch) | |
tree | be858515fb789a89d68f94975690ab019813726c /views |
new version.
Diffstat (limited to 'views')
-rw-r--r-- | views/_acknowledge.haml | 6 | ||||
-rw-r--r-- | views/_alert_counts.haml | 16 | ||||
-rw-r--r-- | views/_alert_strips_group.haml | 37 | ||||
-rw-r--r-- | views/_alert_summary.haml | 7 | ||||
-rw-r--r-- | views/_event_list.haml | 22 | ||||
-rw-r--r-- | views/_get_alerts.haml | 43 | ||||
-rw-r--r-- | views/_get_list.haml | 40 | ||||
-rw-r--r-- | views/_head.haml | 22 | ||||
-rw-r--r-- | views/_head2.haml | 20 | ||||
-rw-r--r-- | views/_head3.haml | 17 | ||||
-rw-r--r-- | views/_jqChangeStatus.haml | 21 | ||||
-rw-r--r-- | views/_jqModalScript.haml | 22 | ||||
-rw-r--r-- | views/_navigation.haml | 14 | ||||
-rw-r--r-- | views/_treecontrol.haml | 9 | ||||
-rw-r--r-- | views/_unacknowledged.haml | 6 | ||||
-rw-r--r-- | views/alert.haml | 56 | ||||
-rw-r--r-- | views/alerts.haml | 24 | ||||
-rw-r--r-- | views/alerts2.haml | 18 | ||||
-rw-r--r-- | views/events.haml | 22 | ||||
-rw-r--r-- | views/please_authenticate.haml | 25 | ||||
-rw-r--r-- | views/preferences.haml | 24 |
21 files changed, 471 insertions, 0 deletions
diff --git a/views/_acknowledge.haml b/views/_acknowledge.haml new file mode 100644 index 0000000..cc0ea71 --- /dev/null +++ b/views/_acknowledge.haml @@ -0,0 +1,6 @@ +%h4 Acknowledged alerts +#treecontrolAck= partial("treecontrol") +%ul{:id => "blackAck", :class => "treeview-black-ack"} + = partial("get_list", :locals => {:level => "urgent", :alertsList => @grouped_ack_urgent}) + = partial("get_list", :locals => {:level => "normal", :alertsList => @grouped_ack_normal}) + = partial("get_list", :locals => {:level => "low", :alertsList => @grouped_ack_low}) diff --git a/views/_alert_counts.haml b/views/_alert_counts.haml new file mode 100644 index 0000000..6dcecc0 --- /dev/null +++ b/views/_alert_counts.haml @@ -0,0 +1,16 @@ +.colmask.threecol + .colmid + .colleft + .urgent.col1 + Urgent + .unacknowledged{:title=>"Urgent alert unacknowledged"} #{@urgent.length - @count_ack[:urgent]} + .acknowledged{:title=>"Urgent alert acknowledged"} #{@count_ack[:urgent]} + .normal.col2 + Normal + .unacknowledged{:title=>"Normal alert unacknowledged"} #{@normal.length - @count_ack[:normal]} + .acknowledged{:title=>"Normal alert acknowledged"} #{@count_ack[:normal]} + .low.col3 + Low + .unacknowledged{:title=>"Low alert unacknowledged"} #{@low.length - @count_ack[:low]} + .acknowledged{:title=>"Low alert acknowledged"} #{@count_ack[:low]} + diff --git a/views/_alert_strips_group.haml b/views/_alert_strips_group.haml new file mode 100644 index 0000000..0a6f3bf --- /dev/null +++ b/views/_alert_strips_group.haml @@ -0,0 +1,37 @@ +//- alerts.each_pair do |subject, alerts| +// .grouped_folder{:id=>subject} +// - lst = Array.new() +// - count = 0 +// - alerts.sort.each do |alert| +// - if count > 0 +// - displayFolding = (false == session[:display_folding][subject])? 'display:none' : '' +// - else +// - count += 1 +// - lst.push("whole_alert_#{alert.id}") +// .alert_whole{:id=>"whole_alert_#{alert.id}", :style => "#{displayFolding}"} +// .alert_strip{:id => "alert_#{alert.id}"} +// %a.acknowledge{:href => "javascript:toggleAcknowledge(#{alert.id});", :onClick => "toggleDetailView(#{alert.id});"} +// - if alert.acknowledged? +// //%img.acknowledged.auto_hover{:src => "/images/acknowledge_acknowledged.png" :title=>"Unacknowledge alert"} +// %img.acknowledged{:src => "/images/acknowledge_acknowledged.png" :title=>"Unacknowledge alert"} +// - else +// //%img.unacknowledged.auto_hover{:src => "/images/acknowledge_unacknowledged.png" :title=>"Acknowledge alert"} +// %img.unacknowledged{:src => "/images/acknowledge_unacknowledged.png" :title=>"Acknowledge alert"} +// - if alert.source != alert.subject +// .source= alert.source +// .subject= alert.subject + ": " +// .summary= alert.summary +// //- if alert.detail +// %a.expand{:href => "javascript:", :onClick => "toggleDetailView(#{alert.id}); $('alert_#{alert.id}').next().toggle();"} +// %img.zoom{:src => "/images/zoom.png" :title => "Show details"} +// %a.full{:href => "/alert/#{alert.id}"} +// %img.hourglass{:src => "/images/hourglass.png" :title => "Show history"} +// - displayDetails = (false == session[:display_alerts][alert.id])? 'display:none' : '' +// .detail_strip{:id => "detail_#{alert.id}", :style => "#{displayDetails}"} +// = alert.detail +// - lst.shift() +// - displaySummary = (1 > lst.size())? 'display:none' : '' +// .control{:id=>subject, :style=>"#{displaySummary}"} +// There are #{lst.size() + 1} alarms in this block... +// %a.expand{:href => "javascript:", :onClick => "toggleFoldingView('#{subject}'); [$('#{lst.join("'), $('")}')].invoke('toggle');"} +// %img.toggle{:src => "/images/toggle_alerts.png" :title => "toggle display of alerts"} diff --git a/views/_alert_summary.haml b/views/_alert_summary.haml new file mode 100644 index 0000000..1798ec1 --- /dev/null +++ b/views/_alert_summary.haml @@ -0,0 +1,7 @@ +// See feature #1051: UI sorting order. +.urgent= partial("alert_strips_group", :locals => {:alerts => @grouped_new_urgent}) +.normal= partial("alert_strips_group", :locals => {:alerts => @grouped_new_normal}) +.low= partial("alert_strips_group", :locals => {:alerts => @grouped_new_low}) +.urgent= partial("alert_strips_group", :locals => {:alerts => @grouped_ack_urgent}) +.normal= partial("alert_strips_group", :locals => {:alerts => @grouped_ack_normal}) +.low= partial("alert_strips_group", :locals => {:alerts => @grouped_ack_low}) diff --git a/views/_event_list.haml b/views/_event_list.haml new file mode 100644 index 0000000..73b9193 --- /dev/null +++ b/views/_event_list.haml @@ -0,0 +1,22 @@ +.alert_full_list + .row + %h2 + %h2 Subject + %h2 Summary + %h2 Raised + %h2 Acknowledged + %h2 Cleared + - alerts.each do |alert| + .row{:id => alert.id, :class => cycle('alt','')} + .more + %a{:href => "/alert/#{alert.id}"} [details] + .subject= alert.subject + .summary= alert.summary + .raised{:class => "up"+alert.update_type}= alert.raised_at ? alert.time_relative(Time.now - alert.raised_at.to_time) : "" + .acknowledged{:class => "up"+alert.update_type} + - if alert.acknowledged_at + = alert.time_relative(Time.now - alert.acknowledged_at.to_time) + by + = alert.acknowledged_by + .cleared{:class => "up"+alert.update_type}= alert.cleared? ? alert.time_relative(Time.now - alert.cleared_at.to_time) : "" + diff --git a/views/_get_alerts.haml b/views/_get_alerts.haml new file mode 100644 index 0000000..8abff2e --- /dev/null +++ b/views/_get_alerts.haml @@ -0,0 +1,43 @@ +- alerts.each do |alert| + %li{:id=>"alert#{alert.id}"} + .alert + - if "urgent" == level + .levelUrgent + %a{:href=>"javascript:", :onClick=>"showAcknowledgeStatus(event, #{alert.id}, #{alert.get_default_acknowledge_time()});"} + Urgent + - elsif "normal" == level + .levelNormal + %a{:href=>"javascript:", :onClick=>"showAcknowledgeStatus(event, #{alert.id}, #{alert.get_default_acknowledge_time()});"} + Normal + -else + .levelLow + %a{:href=>"javascript:", :onClick=>"showAcknowledgeStatus(event, #{alert.id}, #{alert.get_default_acknowledge_time()});"} + Low + .subject= alert.get_safe_html_subject + .summary= alert.get_safe_html_summary + %a{:href=>"/alert/#{alert.id}"} + History + //%a{:href=>"javascript:", :onClick=>"$(furtherInformation#{alert.id}).toggle();"} + %a{:href=>"javascript:", :onClick=>"$(\"#furtherInformation#{alert.id}.furtherInformation\").toggle();"} + Extra + //%a{:href=>"javascript:", :onClick=>"$(inlineDetails#{alert.id}).toggle();"} + %a{:href=>"javascript:", :onClick=>"$(\"#inlineDetails#{alert.id}.inlineDetails\").toggle();"} + Details + .inlineDetails{:id=>"inlineDetails#{alert.id}", :style=>"display: none"} + %h5 Alert details + #{alert.get_details} + //.furtherInformation{:id=>"furtherInformation#{alert.id}"} + .furtherInformation{:id=>"furtherInformation#{alert.id}", :style=>"display: none"} + Alert group is '#{AlertGroup.matches(alert)[0].name}'. + - if alert.source != alert.subject + .source= "Source is '#{alert.get_safe_html_source}'." + - if alert.acknowledged? + .ackDetails + Acknowledged by user + %strong= "#{alert.get_acknowledged_by()} " + and will #{alert.get_unacknowledge_at_string()}. + - else + .time + Last updated on + %em= "#{alert.get_updated_at()}." + diff --git a/views/_get_list.haml b/views/_get_list.haml new file mode 100644 index 0000000..cc8fb9b --- /dev/null +++ b/views/_get_list.haml @@ -0,0 +1,40 @@ +//- alerts.each_pair do |subject, alerts| +- alertsList.keys.sort.each do |subject| + - alerts = alertsList[subject] + - if 1 < alerts.length() + %li{:id=>"firstAlert#{alerts[0].id}"} + - if "urgent" == level + %span.levelUrgent Urgent + - elsif "normal" == level + %span.levelNormal Normal + -else + %span.levelLow Low + .conglomerate + %span.subject= alerts[0].subject + - if alerts[0].acknowledged? + There are <strong>#{alerts.length}</strong> alerts in this conglomerate. + - else + - shortestAckTime = 9223372036854775807 + - lst = Array.new + - alerts.each do |alert| + - shortestAckTime = alert.get_default_acknowledge_time() if alert.get_default_acknowledge_time() < shortestAckTime + - lst << alert.id + %a{:href=>"javascript:", :onClick=>"showBulkAcknowledgeStatus(event, #{"['#{lst.join('\',\'')}']"}, #{shortestAckTime});"} + [Bulk acknowledge <strong>#{alerts.length}</strong> alerts for + - hrs = shortestAckTime / 3600 + - if 1 == hrs + one hour. + - elsif 24 > hrs and 1 > hrs + #{hrs} hours + - elsif 24 == hrs + one day. + - elsif 24 < hrs and 168 > hrs + #{hrs/24} days. + - elsif 168 == hrs + one week + - else + #{hrs/168} weeks + ] + %ul= partial("get_alerts", :locals => {:level => level, :alerts => alerts}) + - else + = partial("get_alerts", :locals => {:level => level, :alerts => alerts}) diff --git a/views/_head.haml b/views/_head.haml new file mode 100644 index 0000000..db2125e --- /dev/null +++ b/views/_head.haml @@ -0,0 +1,22 @@ +.colmask.threecol + .colmid + .colleft + .col1 + .countdown{:id=>"reloadPage"} + %span.count + %span.urgent + Urgent + %span.nbrUnacknowledged{:title=>"Urgent alert unacknowledged"} #{@urgent.length - @count_ack[:urgent]} + %span.nbrAcknowledged{:title=>"Urgent alert acknowledged"} (Seen #{@count_ack[:urgent]}) + %span.normal + Normal + %span.nbrUnacknowledged{:title=>"Normal alert unacknowledged"} #{@normal.length - @count_ack[:normal]} + %span.nbrAcknowledged{:title=>"Normal alert acknowledged"} (Seen #{@count_ack[:normal]}) + %span.low + Low + %span.nbrUnacknowledged{:title=>"Low alert unacknowledged"} #{@low.length - @count_ack[:low]} + %span.nbrAcknowledged{:title=>"Low alert acknowledged"} (Seen #{@count_ack[:low]}) + .col2 + .title #{@title} + .col3 + %img{:src => "/images/logo.png"} diff --git a/views/_head2.haml b/views/_head2.haml new file mode 100644 index 0000000..a37d6c4 --- /dev/null +++ b/views/_head2.haml @@ -0,0 +1,20 @@ +#main + #mainleft + .title #{@title} + #maincenter + .countdown{:id=>"reloadPage"} + %span.count + %span.urgent + Urgent + %span.nbrUnacknowledged{:title=>"Urgent alert unacknowledged"} #{@urgent.length - @count_ack[:urgent]} + %span.nbrAcknowledged{:title=>"Urgent alert acknowledged"} (Seen #{@count_ack[:urgent]}) + %span.normal + Normal + %span.nbrUnacknowledged{:title=>"Normal alert unacknowledged"} #{@normal.length - @count_ack[:normal]} + %span.nbrAcknowledged{:title=>"Normal alert acknowledged"} (Seen #{@count_ack[:normal]}) + %span.low + Low + %span.nbrUnacknowledged{:title=>"Low alert unacknowledged"} #{@low.length - @count_ack[:low]} + %span.nbrAcknowledged{:title=>"Low alert acknowledged"} (Seen #{@count_ack[:low]}) + #mainright + %img{:src => "/images/logo.png"} diff --git a/views/_head3.haml b/views/_head3.haml new file mode 100644 index 0000000..1a2b00f --- /dev/null +++ b/views/_head3.haml @@ -0,0 +1,17 @@ +%h1 + Mauve Alert Panel +.alertsSummary + %span.urgent + Urgent + %span.nbrUnacknowledged{:title=>"Urgent alert unacknowledged"} #{@urgent.length - @count_ack[:urgent]} + %span.nbrAcknowledged{:title=>"Urgent alert acknowledged"} (Seen #{@count_ack[:urgent]}) + %span.normal + Normal + %span.nbrUnacknowledged{:title=>"Normal alert unacknowledged"} #{@normal.length - @count_ack[:normal]} + %span.nbrAcknowledged{:title=>"Normal alert acknowledged"} (Seen #{@count_ack[:normal]}) + %span.low + Low + %span.nbrUnacknowledged{:title=>"Low alert unacknowledged"} #{@low.length - @count_ack[:low]} + %span.nbrAcknowledged{:title=>"Low alert acknowledged"} (Seen #{@count_ack[:low]}) + %a{:href=>"/logout"} + [Logout] diff --git a/views/_jqChangeStatus.haml b/views/_jqChangeStatus.haml new file mode 100644 index 0000000..1b00c17 --- /dev/null +++ b/views/_jqChangeStatus.haml @@ -0,0 +1,21 @@ +%form{:name=>"changeAlertStatusForm", :action=>"html_form_action", :method=>"post"} + %input{:type=>"hidden", :name=>"AlertID", :value=>"Null"} + %input{:type=>"hidden", :name=>"AlertDefaultAcknowledgeTime", :value=>"Null"} + %input{:type=>"button", :name=>"statusAcknowledgedFor", :value=>"Acknowledge this alert for", + :onclick=>"changeAcknowledgeStatus(this.form.AlertID.value, this.form.timeStamp.value)", + :class=>"buttonAcknowledgeAlert"} + %select{:name=>"timeStamp", :id=>"sample", :class=>"timeList"} + %option{:value=>"0"}default... + %option{:value=>"3600"}1 hour + %option{:value=>"7200"}2 hours + %option{:value=>"7560"}3 hours + %option{:value=>"18000"}5 hours + %option{:value=>"25200"}7 hours + %option{:value=>"86400"}1 day + %option{:value=>"172800"}2 days + %option{:value=>"604800"}1 week + %option{:value=>"0"}Forever + %input{:type=>"button", :name=>"raise", :value=>"Unacknowledged", :onClick=>"raiseAlert(this.form.AlertID.value);", :class=>"raiseAlert"} + %input{:type=>"button", :name=>"clear", :value=>"Trash alert", :onClick=>"clearAlert(this.form.AlertID.value);", :class=>"trashAlert"} +%em + Please be careful what you chose and err on the side of shorter times scales. diff --git a/views/_jqModalScript.haml b/views/_jqModalScript.haml new file mode 100644 index 0000000..00cc298 --- /dev/null +++ b/views/_jqModalScript.haml @@ -0,0 +1,22 @@ +.jdHandle.jqDrag +%strong + Acknowledge alert! +%em + Please be careful what you chose and err on the side of shorter times scales. +%form{:name=>"input", :action=>"html_form_action", :method=>"post"} + //%a{:href=>"javascript:toogleAcknowledge(#{alert.id})"} + %a{:href=>"javascript:toogleAcknowledge"} + Acknowledge this alert for + %select + %option{:value=>"1"}1 hour + %option{:value=>"2"}2 hour + %option{:value=>"3"}3 hours + %option{:value=>"5"}5 hours + %option{:value=>"7"}7 hours + %option{:value=>"24"}1 day + %option{:value=>"48"}2 days + %option{:value=>"168"}1 week + %option{:value=>"0"}Forever +%a{:href=>"#", :class=>"jqmClose"} + Close +.jqHandle.jqResize diff --git a/views/_navigation.haml b/views/_navigation.haml new file mode 100644 index 0000000..6c47b28 --- /dev/null +++ b/views/_navigation.haml @@ -0,0 +1,14 @@ +- if @person + %a{:href => "/alerts"} Current alerts + %a{:href => "/events"} Last day + %a{:href => "/preferences"} My preferences + %a{:href => "/logout"} Logout <strong>(#{@person.username})</strong> +- else + %form{:action => '/login', :method => :POST} + Username + %input{:name => 'username', :type => 'text', :size => 10} + Password + %input{:name => 'password', :type => 'password', :size => 10} + %input{:type => 'submit', :value => 'Log in'} +- if flash['error'] + .error= flash['error'] diff --git a/views/_treecontrol.haml b/views/_treecontrol.haml new file mode 100644 index 0000000..caf3a89 --- /dev/null +++ b/views/_treecontrol.haml @@ -0,0 +1,9 @@ +%a{:title=>"Collapse the entire tree below", :href=>"#"} + %img{:src=>"/images/minus.png"} + Collapse All +%a{:title=>"Expand the entire tree below", :href=>"#"} + %img{:src=>"/images/plus.png"} + Expand All +%a{:title=>"Toggle collapse/expand of tree below", :href=>"#"} + %img{:src=>"/images/toggle.png"} + Toggle All diff --git a/views/_unacknowledged.haml b/views/_unacknowledged.haml new file mode 100644 index 0000000..77ed657 --- /dev/null +++ b/views/_unacknowledged.haml @@ -0,0 +1,6 @@ +%h4 Unacknowledged alerts +#treecontrolNew= partial("treecontrol") +%ul{:id => "blackNew", :class => "treeview-black"} + = partial("get_list", :locals => {:level => "urgent", :alertsList => @grouped_new_urgent}) + = partial("get_list", :locals => {:level => "normal", :alertsList => @grouped_new_normal}) + = partial("get_list", :locals => {:level => "low", :alertsList => @grouped_new_low}) diff --git a/views/alert.haml b/views/alert.haml new file mode 100644 index 0000000..4310ddc --- /dev/null +++ b/views/alert.haml @@ -0,0 +1,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 + .detail= @alert.get_details + - 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"} + diff --git a/views/alerts.haml b/views/alerts.haml new file mode 100644 index 0000000..af65dea --- /dev/null +++ b/views/alerts.haml @@ -0,0 +1,24 @@ +!!! +%html + %head + %title #{@title}: Current alerts (logged in as #{@person.username}) + %link{:rel => "stylesheet", :href => "/alerts.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();"} + #header + %h1= @title + #errors{:style => "display: none;"} + %h1 + Trouble! + ( + %a{:href=>"#", :onClick => "clearErrors();"} hide + ) + %ul#errors_list + %p Either the alert server or your internet connection is malfunctioning, so you may want to try refreshing the page. + #alert_counts= partial("alert_counts") + #navigation= partial("navigation") + #alert_summary= partial("alert_summary") + //%p The session is #{session.inspect()} diff --git a/views/alerts2.haml b/views/alerts2.haml new file mode 100644 index 0000000..ad0f0d3 --- /dev/null +++ b/views/alerts2.haml @@ -0,0 +1,18 @@ +!!! +%html + %head + %meta{:name=>"viewport", :content=>"width=device-width"} + %title Current alerts (logged in as #{@person.username}) + %link{:rel => "stylesheet", :href => "/alerts2.css"} + %script{:type => "text/javascript", :src => "/jquery-1.4.2.min.js"} + %script{:type => "text/javascript", :src => "/jquery.treeview.pack.js"} + %script{:type => "text/javascript", :src => "/jquery.cookie.js"} + %script{:type => "text/javascript", :src => "/jquery.pop.js"} + //%script{:type => "text/javascript", :src => "/jquery.countdown.js"} + %script{:type => "text/javascript", :src => "/mauve.js"} + %body + .darkMask + .head= partial("head3") + .unacknowledged= partial("unacknowledged") + .acknowledge= partial("acknowledge") + .updateAlertStatus= partial("jqChangeStatus") diff --git a/views/events.haml b/views/events.haml new file mode 100644 index 0000000..324e3b5 --- /dev/null +++ b/views/events.haml @@ -0,0 +1,22 @@ +!!! +%html + %head + %title #{@title}: Last events (logged in as #{@person.username}) + %link{:rel => "stylesheet", :href => "/alerts.css"} + %script{:type => "text/javascript", :src => "/prototype.js"} + %script{:type => "text/javascript", :src => "/mauve_utils.js"} + %body{:onLoad => "addAutoHover(); addRefresh();"} + #header + %h1= @title + #errors{:style => "display: none;"} + %h1 + Trouble! + ( + %a{:href=>"#", :onClick => "clearErrors();"} hide + ) + %ul#errors_list + %p Either the alert server or your internet connection is malfunctioning, so you may want to try refreshing the page. + #alert_counts= partial("alert_counts") + #navigation= partial("navigation") + #event_list= partial("event_list", :locals => {:alerts => @alerts}) + diff --git a/views/please_authenticate.haml b/views/please_authenticate.haml new file mode 100644 index 0000000..9416c8e --- /dev/null +++ b/views/please_authenticate.haml @@ -0,0 +1,25 @@ +!!! +%html + %head + %meta{:name=>"viewport", :content=>"width=device-width"} + %title #{@title}: Authentication required + %link{:rel => "stylesheet", :href => "/alerts2.css"} + %body + .loginForm + %form{:action => '/login', :method => :POST} + Username + %input{:name => 'username', :type => 'text'} + %br + Password + %input{:name => 'password', :type => 'password'} + %br + %input{:type => 'submit', :value => 'Log into the Mauve alert panel', :class=>"submitLoginButton"} + .loginNotes + This is either your single sign on or a PIN. + %br + You + %strong + must + be logged in to view alerts. + + diff --git a/views/preferences.haml b/views/preferences.haml new file mode 100644 index 0000000..c39c108 --- /dev/null +++ b/views/preferences.haml @@ -0,0 +1,24 @@ +!!! +%html + %head + %title #{@title}: My preferences (logged in as #{@person.username}) + %link{:rel => "stylesheet", :href => "/alerts.css"} + %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();"} + #header + %h1= @title + #errors{:style => "display: none;"} + %h1 + Trouble! + ( + %a{:href=>"#", :onClick => "clearErrors();"} hide + ) + %ul#errors_list + %p Either the alert server or your internet connection is malfunctioning, so you may want to try refreshing the page. + #alert_counts= partial("alert_counts") + #navigation= partial("navigation") + %h1 Not implemented yet + + |