This is an automated email from the ASF dual-hosted git repository.
curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new f7e8fd9 styleallthethings!
f7e8fd9 is described below
commit f7e8fd97c5d66ff4bdbd5e33aa9cc49c074fb683
Author: Shane Curcuru <[email protected]>
AuthorDate: Sun Jun 4 08:08:09 2017 -0400
styleallthethings!
---
tools/mirror_check.rb | 8 ++---
www/members/mirror_check.cgi | 82 ++++++++++++++++++++++++--------------------
2 files changed, 49 insertions(+), 41 deletions(-)
diff --git a/tools/mirror_check.rb b/tools/mirror_check.rb
index 781bd11..b806d52 100755
--- a/tools/mirror_check.rb
+++ b/tools/mirror_check.rb
@@ -309,13 +309,13 @@ def display
warns = tests(:W)
if !fatals.empty?
- _h2_ "The mirror at #@url failed our checks:"
+ _h2_.bg_danger "The mirror at #@url failed our checks:"
elsif !errors.empty?
- _h2_ "The mirror at #@url has some problems:"
+ _h2_.bg_warning "The mirror at #@url has some problems:"
elsif !warns.empty?
- _h2_ "The mirror at #@url has some minor issues"
+ _h2_.bg_warning "The mirror at #@url has some minor issues"
else
- _h2_ "The mirror at #@url looks OK, thanks for using this service"
+ _h2_.bg_success "The mirror at #@url looks OK, thanks for using this
service"
end
if @fails > 0
diff --git a/www/members/mirror_check.cgi b/www/members/mirror_check.cgi
index 54dc0ab..e4a6a88 100755
--- a/www/members/mirror_check.cgi
+++ b/www/members/mirror_check.cgi
@@ -1,46 +1,54 @@
#!/usr/bin/env ruby
-
+PAGETITLE = "ASF Distribution Mirror Checker" # Wvisible:infra mirror
+$LOAD_PATH.unshift File.realpath(File.expand_path('../../../lib', __FILE__))
+require 'wunderbar'
+require 'wunderbar/bootstrap'
+require 'whimsy/asf'
require "../../tools/mirror_check.rb"
_html do
- _style %{
- textarea, .mod, label {display: block}
- input[type=submit] {display: block; margin-top: 1em}
- input[name=podling], p, .mod, textarea {margin-left: 2em}
- .subdomain, .domain {color: #000}
- legend {background: #141; color: #DFD; padding: 0.4em}
-# .name {width: 6em}
- ._stdin {color: #C000C0; margin-top: 1em}
- ._stdout {color: #000}
- .error, ._stderr {color: #F00}
- .request {background-color: #BDF}
- }
-
_body? do
- _h2 "Mirror Checker"
- _p do
- _ 'This page can be used to check that an Apache software mirror has
been set up correctly'
- end
- _p do
- _ 'Please see the'
- _a 'Apache how-to mirror page', href:
'http://www.apache.org/info/how-to-mirror.html'
- _ 'for the full details on setting up an ASF mirror.'
- end
-
- _form method: 'post' do
- _fieldset do
- _legend 'ASF Mirror Check Request'
- _ 'Mirror URL'
- _input.name name: 'url', required: true,
- value: ENV['QUERY_STRING'],
- placeholder: 'mirror URL',
- size: 50
- _input type: 'submit', value: 'Check Mirror'
+ _whimsy_body(
+ title: PAGETITLE,
+ related: {
+ 'http://www.apache.org/info/how-to-mirror.html' => 'How To Setup An ASF
Mirror',
+ 'https://www.apache.org/dev/mirrors' => 'Overview of ASF Mirror Systems',
+ },
+ helpblock: -> {
+ _p do
+ _ 'This page can be used to check that an Apache software distribution
mirror has been set up correctly.'
+ end
+ _p do
+ _ 'Please see the'
+ _a 'Apache how-to mirror page', href:
'http://www.apache.org/info/how-to-mirror.html'
+ _ 'for the full details on setting up an ASF mirror.'
+ end
+ }
+ ) do
+ _whimsy_panel('Check A Mirror Site', style: 'panel-success') do
+ _form.form_horizontal method: 'post' do
+ _div.form_group do
+ _label.control_label.col_sm_2 'Mirror URL', for: 'url'
+ _div.col_sm_10 do
+ _input.form_control.name name: 'url', required: true,
+ value: ENV['QUERY_STRING'],
+ placeholder: 'mirror URL',
+ size: 50
+ end
+ end
+ _div.form_group do
+ _div.col_sm_offset_2.col_sm_10 do
+ _input.btn.btn_default type: 'submit', value: 'Check Mirror'
+ end
+ end
+ end
+ end
+ _div.well.well_lg do
+ if _.post?
+ doPost(@url)
+ end
end
- end
-
- if _.post?
- doPost(@url)
end
end
end
+
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].