beetle 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70,9 +70,17 @@ module Beetle
70
70
  end
71
71
 
72
72
  def html_response(status)
73
- b = "<!doctype html>\n"
73
+ b = "<!doctype html>"
74
74
  b << "<html><head><title>Beetle Configuration Server Status</title>#{html_styles(status)}</head>"
75
- b << "<body><h1>Beetle Configuration Server Status</h1><table cellspacing=0>\n"
75
+ b << "<body><h1>Beetle Configuration Server Status</h1>"
76
+ unless status[:redis_master_available?]
77
+ b << "<form name='masterswitch' method='post' action='/initiate_master_switch'>"
78
+ b << "Master down! "
79
+ b << "<a href='javascript: document.masterswitch.submit();'>Initiate master switch</a> "
80
+ b << "or wait until system performs it automatically."
81
+ b << "</form>"
82
+ end
83
+ b << "<table cellspacing=0>\n"
76
84
  plain_text_response(status).split("\n").compact.each do |row|
77
85
  row =~/(^[^:]+): (.*)$/
78
86
  name, value = $1, $2
@@ -82,11 +90,6 @@ module Beetle
82
90
  b << "<tr><td>#{name}</td><td>#{value}</td></tr>\n"
83
91
  end
84
92
  b << "</table>"
85
- unless status[:redis_master_available?]
86
- b << "<form name='masterswitch' method='post' action='/initiate_master_switch'>"
87
- b << "<a href='javascript: document.masterswitch.submit();'>Initiate master switch</a>"
88
- b << "</form>"
89
- end
90
93
  b << "</body></html>"
91
94
  end
92
95
 
@@ -104,14 +107,14 @@ h1 { color: #{warn_color}; margin-bottom: 0.2em;}
104
107
  a:link, a:visited {text-decoration:none; color:#A52A2A;}
105
108
  a:hover, a:active {text-decoration:none; color:#FF0000;}
106
109
  a {
107
- font-size: 2em; padding: 10px; background: #cdcdcd;
110
+ padding: 10px; background: #cdcdcd;
108
111
  -moz-border-radius: 5px;
109
112
  border-radius: 5px;
110
113
  -moz-box-shadow: 2px 2px 2px #bbb;
111
114
  -webkit-box-shadow: 2px 2px 2px #bbb;
112
115
  box-shadow: 2px 2px 2px #bbb;
113
116
  }
114
- form { margin-top: 1em; }
117
+ form { font-size: 1em; margin-bottom: 1em; }
115
118
  </style>
116
119
  EOS
117
120
  end
@@ -1,3 +1,3 @@
1
1
  module Beetle
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: beetle
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.1
5
+ version: 0.3.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Stefan Kaes
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-06-07 00:00:00.000000000 Z
16
+ date: 2013-06-12 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: uuid4r
@@ -281,7 +281,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
281
281
  - !ruby/object:Gem::Version
282
282
  segments:
283
283
  - 0
284
- hash: 872771783453317640
284
+ hash: -3946675881285663057
285
285
  version: '0'
286
286
  none: false
287
287
  required_rubygems_version: !ruby/object:Gem::Requirement