aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-08-02 16:54:13 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-08-02 16:54:13 +0100
commit048f420510370b6276db27da5c4f55620badf6b4 (patch)
treef47ba83136adc904293ba7c8151d93595e8acea9
parent44716daaf1eb940b33b0459941f29881ae09aa3a (diff)
More interface tweaks.
--HG-- rename : mauveserver.conf => etc/mauveserver.conf rename : test/ts_mauve.rb => test/test_mauve.rb
-rw-r--r--[-rwxr-xr-x]bin/mauveconsole2
-rw-r--r--[-rwxr-xr-x]bin/mauvesend0
-rw-r--r--[-rwxr-xr-x]bin/mauveserver0
-rw-r--r--debian/control2
-rw-r--r--debian/mauvealert-server.install2
-rw-r--r--etc/mauveserver.conf (renamed from mauveserver.conf)0
-rw-r--r--lib/mauve/sender.rb2
-rw-r--r--static/javascript/mauve_utils.js2
-rw-r--r--static/stylesheets/bytemark.css9
-rw-r--r--static/stylesheets/mauve.css20
-rw-r--r--test/tc_mauve_configuration_builders_server.rb16
-rw-r--r--test/test_mauve.rb (renamed from test/ts_mauve.rb)5
-rw-r--r--views/_navbar.haml2
13 files changed, 27 insertions, 35 deletions
diff --git a/bin/mauveconsole b/bin/mauveconsole
index c2d145f..b1f9e65 100755..100644
--- a/bin/mauveconsole
+++ b/bin/mauveconsole
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby1.8
+#! /usr/bin/ruby1.8
# NAME
# mauveconsole -- Ruby console to query the mauvealert server directly
#
diff --git a/bin/mauvesend b/bin/mauvesend
index 42229eb..42229eb 100755..100644
--- a/bin/mauvesend
+++ b/bin/mauvesend
diff --git a/bin/mauveserver b/bin/mauveserver
index 0f9ebac..0f9ebac 100755..100644
--- a/bin/mauveserver
+++ b/bin/mauveserver
diff --git a/debian/control b/debian/control
index 8044acf..5be6038 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Maintainer: Matthew Bloch <matthew@bytemark.co.uk>
Uploaders: Patrick J Cherry <patrick@bytemark.co.uk>
Section: ruby
Priority: optional
-Build-Depends: ruby1.8, debhelper, cdbs, rdoc, txt2man, cdbs
+Build-Depends: ruby1.8, debhelper, cdbs, rdoc, txt2man, cdbs, libsetup-ruby1.8
Standards-Version: 3.8.0
Package: mauvealert-client
diff --git a/debian/mauvealert-server.install b/debian/mauvealert-server.install
index bc3f0f8..1449c30 100644
--- a/debian/mauvealert-server.install
+++ b/debian/mauvealert-server.install
@@ -32,5 +32,5 @@ lib/rack-flash.rb usr/lib/ruby/1.8/
lib/sinatra-partials.rb usr/lib/ruby/1.8/
static usr/share/mauvealert
views usr/share/mauvealert
-mauveserver.conf etc/mauvealert/
+etc/mauveserver.conf etc/mauvealert/
diff --git a/mauveserver.conf b/etc/mauveserver.conf
index 4baec0a..4baec0a 100644
--- a/mauveserver.conf
+++ b/etc/mauveserver.conf
diff --git a/lib/mauve/sender.rb b/lib/mauve/sender.rb
index 8194180..ef06d0f 100644
--- a/lib/mauve/sender.rb
+++ b/lib/mauve/sender.rb
@@ -108,7 +108,7 @@ module Mauve
#
# Must have a source, so default to hostname if user doesn't care
- update.source ||= `hostname -f`.chomp
+ update.source ||= Socket.gethostname
#
# Make sure all alerts default to "-r now"
diff --git a/static/javascript/mauve_utils.js b/static/javascript/mauve_utils.js
index 674a3a9..cd0d52b 100644
--- a/static/javascript/mauve_utils.js
+++ b/static/javascript/mauve_utils.js
@@ -226,7 +226,7 @@ function clearError(func) {
}
if ( $('div.flash.error').contents().length == 0 ) {
- $('div.flash.error').fadeOut(2000);
+ $('div.flash.error').hide();
}
return false;
diff --git a/static/stylesheets/bytemark.css b/static/stylesheets/bytemark.css
index e4a14cb..365d3aa 100644
--- a/static/stylesheets/bytemark.css
+++ b/static/stylesheets/bytemark.css
@@ -64,10 +64,15 @@ h2 a {
h3, th {
font-weight: bold;
- font-size: small;
+ font-size: normal;
background-color: #E4E4E4;
color: black;
}
+
+th {
+ font-size: small;
+}
+
h3 {
padding: 3px 5px;
margin: 5px 5px 0px 5px;
@@ -96,7 +101,7 @@ div#navbar {
margin: -5px -5px 5px -5px;
padding-left: 15px;
background-color: #666;
- font-size: 14px;
+ font-size: small;
}
div#navbar ul {
diff --git a/static/stylesheets/mauve.css b/static/stylesheets/mauve.css
index b0764db..50f5da3 100644
--- a/static/stylesheets/mauve.css
+++ b/static/stylesheets/mauve.css
@@ -46,20 +46,6 @@ tr.detail {
border-top-width: thin;
}
-div.error {
- border: #c66dff medium solid;
- background-color: #e0b0ff;
-}
-
-div.notice {
- border: #c66dff medium solid;
- background-color: #e0b0ff;
-}
-
-div.error p, div.notice p {
- background-color: transparent;
-}
-
.hidden {
display: none;
}
@@ -78,18 +64,18 @@ div.notice {
background-image: url('/images/information.png');
}
-div.notice, div.error {
+div.flash {
margin: 5px 5px 0px;
padding: 0px;
padding-left: 20px;
color: black;
- font-size: 12px;
+ font-size: large;
background-position: 5px;
background-repeat: no-repeat;
min-height: 20px;
}
-div.error p, div.notice p {
+div.flash p {
background-color: transparent;
}
diff --git a/test/tc_mauve_configuration_builders_server.rb b/test/tc_mauve_configuration_builders_server.rb
index 4330610..270c046 100644
--- a/test/tc_mauve_configuration_builders_server.rb
+++ b/test/tc_mauve_configuration_builders_server.rb
@@ -53,8 +53,8 @@ EOF
assert_equal(detail, h.detail)
assert_equal(summary, h.summary)
assert_equal(destination, h.destination)
- assert_equal(raise_after, h.raise_at)
- assert_equal(send_every, h.sleep_interval)
+ assert_equal(raise_after, h.raise_after)
+ assert_equal(send_every, h.poll_every)
end
def test_web_interface_params
@@ -94,14 +94,14 @@ server {
listener {
ip "#{ip}"
port #{port}
- sleep_interval #{sleep_interval}
+ poll_every #{sleep_interval}
}
}
EOF
assert_nothing_raised { Mauve::ConfigurationBuilder.parse(config) }
u = Mauve::UDPServer.instance
- assert_equal(sleep_interval, u.sleep_interval)
+ assert_equal(sleep_interval, u.poll_every)
assert_equal(IPAddr.new(ip), u.ip)
assert_equal(port, u.port)
end
@@ -111,14 +111,14 @@ EOF
config=<<EOF
server {
notifier {
- sleep_interval #{sleep_interval}
+ poll_every #{sleep_interval}
}
}
EOF
assert_nothing_raised { Mauve::ConfigurationBuilder.parse(config) }
n = Mauve::Notifier.instance
- assert_equal(sleep_interval, n.sleep_interval)
+ assert_equal(sleep_interval, n.poll_every)
end
def test_processor_params
@@ -129,7 +129,7 @@ EOF
server {
processor {
transmission_cache_expire_time #{transmission_cache_expire_time}
- sleep_interval #{sleep_interval}
+ poll_every #{sleep_interval}
}
}
EOF
@@ -137,7 +137,7 @@ EOF
assert_nothing_raised { Mauve::ConfigurationBuilder.parse(config) }
pr = Mauve::Processor.instance
assert_equal(transmission_cache_expire_time, pr.transmission_cache_expire_time)
- assert_equal(sleep_interval, pr.sleep_interval)
+ assert_equal(sleep_interval, pr.poll_every)
end
end
diff --git a/test/ts_mauve.rb b/test/test_mauve.rb
index 27284a6..e3df469 100644
--- a/test/ts_mauve.rb
+++ b/test/test_mauve.rb
@@ -1,5 +1,8 @@
-$:.unshift "../lib"
+%w(. ..).each do |path|
+ libdir = File.join(path,"lib")
+ $:.unshift libdir if File.directory?(libdir)
+end
require 'test/unit'
diff --git a/views/_navbar.haml b/views/_navbar.haml
index 283572f..aa2b5f5 100644
--- a/views/_navbar.haml
+++ b/views/_navbar.haml
@@ -26,7 +26,5 @@
%div{:class => ["flash", klass]}
:textile
#{flash[klass]}
- :javascript
- $(document).ready(function () { $('div.flash').delay(1000).fadeOut(2000);});
- else
%div{:class => ["flash", klass], :style => "display: none"}