strelka-admin 0.0.1.pre7
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.rdoc +4 -0
- data/Manifest.txt +58 -0
- data/README.rdoc +65 -0
- data/Rakefile +42 -0
- data/data/strelka-admin/app.conf +7 -0
- data/data/strelka-admin/apps/config-service +72 -0
- data/data/strelka-admin/apps/strelka-admin +102 -0
- data/data/strelka-admin/apps/strelka-setup +32 -0
- data/data/strelka-admin/host-config.rb +44 -0
- data/data/strelka-admin/static/css/bootstrap-responsive.css +581 -0
- data/data/strelka-admin/static/css/bootstrap-responsive.min.css +4 -0
- data/data/strelka-admin/static/css/bootstrap.css +3496 -0
- data/data/strelka-admin/static/css/bootstrap.min.css +632 -0
- data/data/strelka-admin/static/css/master.css +337 -0
- data/data/strelka-admin/static/css/reset.css +112 -0
- data/data/strelka-admin/static/fonts/IstokWeb-Bold.ttf +0 -0
- data/data/strelka-admin/static/fonts/IstokWeb-BoldItalic.ttf +0 -0
- data/data/strelka-admin/static/fonts/IstokWeb-Italic.ttf +0 -0
- data/data/strelka-admin/static/fonts/IstokWeb-Regular.ttf +0 -0
- data/data/strelka-admin/static/fonts/OFL.txt +94 -0
- data/data/strelka-admin/static/images/21d1-16.png +0 -0
- data/data/strelka-admin/static/images/21d1.png +0 -0
- data/data/strelka-admin/static/images/glyphicons-halflings-white.png +0 -0
- data/data/strelka-admin/static/images/glyphicons-halflings.png +0 -0
- data/data/strelka-admin/static/images/icons/blank.png +0 -0
- data/data/strelka-admin/static/images/icons/cross-button.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-button.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-circle-frame.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-circle.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-octagon-frame.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-octagon.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-red.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-shield.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-small-circle.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-small-red.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-small-white.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-small.png +0 -0
- data/data/strelka-admin/static/images/icons/tick-white.png +0 -0
- data/data/strelka-admin/static/images/icons/tick.png +0 -0
- data/data/strelka-admin/static/images/noise.jpg +0 -0
- data/data/strelka-admin/static/images/noise.png +0 -0
- data/data/strelka-admin/static/js/admin/app.js +60 -0
- data/data/strelka-admin/static/js/vendor/backbone.js +1290 -0
- data/data/strelka-admin/static/js/vendor/bootstrap.js +1720 -0
- data/data/strelka-admin/static/js/vendor/bootstrap.min.js +1 -0
- data/data/strelka-admin/static/js/vendor/jquery-1.7.1.js +9266 -0
- data/data/strelka-admin/static/js/vendor/jquery.jeditable.mini.js +38 -0
- data/data/strelka-admin/static/js/vendor/jquery.tmpl.min.js +10 -0
- data/data/strelka-admin/static/js/vendor/jquery.tmplPlus.min.js +11 -0
- data/data/strelka-admin/static/js/vendor/jquery.tools.min.js +20 -0
- data/data/strelka-admin/static/js/vendor/json2.js +487 -0
- data/data/strelka-admin/static/js/vendor/underscore.js +999 -0
- data/data/strelka-admin/templates/admin/console.tmpl +80 -0
- data/data/strelka-admin/templates/admin/host.tmpl +75 -0
- data/data/strelka-admin/templates/admin/message.tmpl +14 -0
- data/data/strelka-admin/templates/admin/server.tmpl +75 -0
- data/data/strelka-admin/templates/layout.tmpl +85 -0
- data/lib/strelka/admin.rb +63 -0
- metadata +210 -0
- metadata.gz.sig +0 -0
data.tar.gz.sig
ADDED
Binary file
|
data/History.rdoc
ADDED
data/Manifest.txt
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
History.rdoc
|
2
|
+
Manifest.txt
|
3
|
+
README.rdoc
|
4
|
+
Rakefile
|
5
|
+
data/strelka-admin/app.conf
|
6
|
+
data/strelka-admin/apps/config-service
|
7
|
+
data/strelka-admin/apps/strelka-admin
|
8
|
+
data/strelka-admin/apps/strelka-setup
|
9
|
+
data/strelka-admin/host-config.rb
|
10
|
+
data/strelka-admin/static/css/bootstrap-responsive.css
|
11
|
+
data/strelka-admin/static/css/bootstrap-responsive.min.css
|
12
|
+
data/strelka-admin/static/css/bootstrap.css
|
13
|
+
data/strelka-admin/static/css/bootstrap.min.css
|
14
|
+
data/strelka-admin/static/css/master.css
|
15
|
+
data/strelka-admin/static/css/reset.css
|
16
|
+
data/strelka-admin/static/fonts/IstokWeb-Bold.ttf
|
17
|
+
data/strelka-admin/static/fonts/IstokWeb-BoldItalic.ttf
|
18
|
+
data/strelka-admin/static/fonts/IstokWeb-Italic.ttf
|
19
|
+
data/strelka-admin/static/fonts/IstokWeb-Regular.ttf
|
20
|
+
data/strelka-admin/static/fonts/OFL.txt
|
21
|
+
data/strelka-admin/static/images/21d1-16.png
|
22
|
+
data/strelka-admin/static/images/21d1.png
|
23
|
+
data/strelka-admin/static/images/glyphicons-halflings-white.png
|
24
|
+
data/strelka-admin/static/images/glyphicons-halflings.png
|
25
|
+
data/strelka-admin/static/images/icons/blank.png
|
26
|
+
data/strelka-admin/static/images/icons/cross-button.png
|
27
|
+
data/strelka-admin/static/images/icons/tick-button.png
|
28
|
+
data/strelka-admin/static/images/icons/tick-circle-frame.png
|
29
|
+
data/strelka-admin/static/images/icons/tick-circle.png
|
30
|
+
data/strelka-admin/static/images/icons/tick-octagon-frame.png
|
31
|
+
data/strelka-admin/static/images/icons/tick-octagon.png
|
32
|
+
data/strelka-admin/static/images/icons/tick-red.png
|
33
|
+
data/strelka-admin/static/images/icons/tick-shield.png
|
34
|
+
data/strelka-admin/static/images/icons/tick-small-circle.png
|
35
|
+
data/strelka-admin/static/images/icons/tick-small-red.png
|
36
|
+
data/strelka-admin/static/images/icons/tick-small-white.png
|
37
|
+
data/strelka-admin/static/images/icons/tick-small.png
|
38
|
+
data/strelka-admin/static/images/icons/tick-white.png
|
39
|
+
data/strelka-admin/static/images/icons/tick.png
|
40
|
+
data/strelka-admin/static/images/noise.jpg
|
41
|
+
data/strelka-admin/static/images/noise.png
|
42
|
+
data/strelka-admin/static/js/admin/app.js
|
43
|
+
data/strelka-admin/static/js/vendor/backbone.js
|
44
|
+
data/strelka-admin/static/js/vendor/bootstrap.js
|
45
|
+
data/strelka-admin/static/js/vendor/bootstrap.min.js
|
46
|
+
data/strelka-admin/static/js/vendor/jquery-1.7.1.js
|
47
|
+
data/strelka-admin/static/js/vendor/jquery.jeditable.mini.js
|
48
|
+
data/strelka-admin/static/js/vendor/jquery.tmpl.min.js
|
49
|
+
data/strelka-admin/static/js/vendor/jquery.tmplPlus.min.js
|
50
|
+
data/strelka-admin/static/js/vendor/jquery.tools.min.js
|
51
|
+
data/strelka-admin/static/js/vendor/json2.js
|
52
|
+
data/strelka-admin/static/js/vendor/underscore.js
|
53
|
+
data/strelka-admin/templates/admin/console.tmpl
|
54
|
+
data/strelka-admin/templates/admin/host.tmpl
|
55
|
+
data/strelka-admin/templates/admin/message.tmpl
|
56
|
+
data/strelka-admin/templates/admin/server.tmpl
|
57
|
+
data/strelka-admin/templates/layout.tmpl
|
58
|
+
lib/strelka/admin.rb
|
data/README.rdoc
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
= Strelka
|
2
|
+
|
3
|
+
* http://deveiate.org/projects/Strelka/wiki/AdminConsole
|
4
|
+
|
5
|
+
== Description
|
6
|
+
|
7
|
+
Strelka is a framework for creating and deploying Mongrel2 web applications
|
8
|
+
in Ruby, and for managing a Mongrel2 cluster.
|
9
|
+
|
10
|
+
It's named after the Russian dog who was one of the first space travelers
|
11
|
+
to orbit the Earth and return alive.
|
12
|
+
|
13
|
+
|
14
|
+
== Prerequisites
|
15
|
+
|
16
|
+
* Strelka[http://deveiate.org/projects/Strelka]
|
17
|
+
* Ruby 1.9.3 or better
|
18
|
+
|
19
|
+
|
20
|
+
== Installation
|
21
|
+
|
22
|
+
$ gem install strelka-admin
|
23
|
+
$ leash setup /usr/local/strelka-admin strelka-admin /usr/local/var/db/mongrel2.sqlite
|
24
|
+
$ cd /usr/local/strelka-admin
|
25
|
+
$ emacs app.conf
|
26
|
+
$ leash start strelka-admin app.conf
|
27
|
+
|
28
|
+
|
29
|
+
== Contributing
|
30
|
+
|
31
|
+
You can check out the current development source with
|
32
|
+
Mercurial[http://repo.deveiate.org/Strelka-Admin], or if you prefer
|
33
|
+
Git, via {its Github mirror}[https://github.com/ged/strelka-admin].
|
34
|
+
|
35
|
+
|
36
|
+
== License
|
37
|
+
|
38
|
+
Copyright (c) 2011-2012, Michael Granger
|
39
|
+
All rights reserved.
|
40
|
+
|
41
|
+
Redistribution and use in source and binary forms, with or without
|
42
|
+
modification, are permitted provided that the following conditions are met:
|
43
|
+
|
44
|
+
* Redistributions of source code must retain the above copyright notice,
|
45
|
+
this list of conditions and the following disclaimer.
|
46
|
+
|
47
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
48
|
+
this list of conditions and the following disclaimer in the documentation
|
49
|
+
and/or other materials provided with the distribution.
|
50
|
+
|
51
|
+
* Neither the name of the author/s, nor the names of the project's
|
52
|
+
contributors may be used to endorse or promote products derived from this
|
53
|
+
software without specific prior written permission.
|
54
|
+
|
55
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
56
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
57
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
58
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
59
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
60
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
61
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
62
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
63
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
64
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
65
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
|
3
|
+
require 'rake/clean'
|
4
|
+
|
5
|
+
begin
|
6
|
+
require 'hoe'
|
7
|
+
rescue LoadError
|
8
|
+
abort "This Rakefile requires 'hoe' (gem install hoe)"
|
9
|
+
end
|
10
|
+
|
11
|
+
Hoe.plugin :mercurial
|
12
|
+
Hoe.plugin :signing
|
13
|
+
Hoe.plugin :manualgen
|
14
|
+
|
15
|
+
Hoe.plugins.delete :rubyforge
|
16
|
+
|
17
|
+
hoespec = Hoe.spec 'strelka-admin' do
|
18
|
+
self.readme_file = 'README.rdoc'
|
19
|
+
self.history_file = 'History.rdoc'
|
20
|
+
self.extra_rdoc_files = FileList[ '*.rdoc' ]
|
21
|
+
|
22
|
+
self.developer 'Michael Granger', 'ged@FaerieMUD.org'
|
23
|
+
|
24
|
+
self.dependency 'strelka', '~> 0.0'
|
25
|
+
self.dependency 'rspec', '~> 2.8', :developer
|
26
|
+
|
27
|
+
self.spec_extras[:licenses] = ["BSD"]
|
28
|
+
self.require_ruby_version( '>=1.9.3' )
|
29
|
+
self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
|
30
|
+
self.check_history_on_release = true if self.respond_to?( :check_history_on_release= )
|
31
|
+
|
32
|
+
self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
|
33
|
+
end
|
34
|
+
|
35
|
+
ENV['VERSION'] ||= hoespec.spec.version.to_s
|
36
|
+
|
37
|
+
# Ensure the specs pass before checking in
|
38
|
+
task 'hg:precheckin' => [ :check_history, :check_manifest ]
|
39
|
+
|
40
|
+
# Rebuild the ChangeLog immediately before release
|
41
|
+
task :prerelease => 'ChangeLog'
|
42
|
+
|
@@ -0,0 +1,72 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'configurability'
|
4
|
+
require 'strelka'
|
5
|
+
require 'uuidtools'
|
6
|
+
|
7
|
+
# The Strelka mongrel2 config service app.
|
8
|
+
class Strelka::ConfigService < Strelka::App
|
9
|
+
extend Configurability
|
10
|
+
|
11
|
+
# Piggyback on the
|
12
|
+
|
13
|
+
# The version of this service API -- used in determining the
|
14
|
+
# versioned route. If this changes in a non-backward compatible way,
|
15
|
+
# this should be incremented
|
16
|
+
APIVERSION = 1
|
17
|
+
|
18
|
+
# The 'appid' of the route to point the application at
|
19
|
+
ID = Strelka::CONFIGSERVICE_ID
|
20
|
+
|
21
|
+
# Load some plugins
|
22
|
+
plugins :restresources
|
23
|
+
|
24
|
+
# By default, responses are HTML
|
25
|
+
default_type 'text/html'
|
26
|
+
|
27
|
+
# Templating -- wrap human-viewable stuff in a consistent layout
|
28
|
+
layout 'layout.tmpl'
|
29
|
+
# templates \
|
30
|
+
# :overview => 'configservice/overview.tmpl'
|
31
|
+
|
32
|
+
|
33
|
+
# GET /uuid -- fetch a plain-text random UUID
|
34
|
+
get '/uuid' do |req|
|
35
|
+
res = req.response
|
36
|
+
uuid = UUIDTools::UUID.random_create.to_s
|
37
|
+
|
38
|
+
res.for( :text, :yaml, :json ) {[ uuid ]}
|
39
|
+
res.for( :html ) do
|
40
|
+
tmpl = self.template( :message )
|
41
|
+
tmpl.message = uuid
|
42
|
+
self.log.debug "Returning message template: %p" % [ tmpl ]
|
43
|
+
tmpl
|
44
|
+
end
|
45
|
+
|
46
|
+
return res
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
#
|
51
|
+
# Config Service API
|
52
|
+
#
|
53
|
+
|
54
|
+
def self::configure( * )
|
55
|
+
resource Mongrel2::Config::Server
|
56
|
+
resource Mongrel2::Config::Host
|
57
|
+
resource Mongrel2::Config::Route
|
58
|
+
resource Mongrel2::Config::Setting
|
59
|
+
resource Mongrel2::Config::Filter
|
60
|
+
resource Mongrel2::Config::Mimetype
|
61
|
+
|
62
|
+
end # class Strelka::AdminConsole
|
63
|
+
|
64
|
+
|
65
|
+
if __FILE__ == $0
|
66
|
+
Strelka.load_config
|
67
|
+
Strelka::ConfigService.run
|
68
|
+
end
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
@@ -0,0 +1,102 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'strelka'
|
4
|
+
require 'strelka/admin'
|
5
|
+
|
6
|
+
|
7
|
+
# The Strelka admin web console.
|
8
|
+
class Strelka::AdminConsole < Strelka::App
|
9
|
+
|
10
|
+
# The 'appid' of the route to point the application at
|
11
|
+
ID = Strelka::ADMINSERVER_ID
|
12
|
+
|
13
|
+
# Load some plugins
|
14
|
+
plugins :templating, :routing, :filters, :errors
|
15
|
+
|
16
|
+
|
17
|
+
# By default, responses are HTML
|
18
|
+
default_type 'text/html'
|
19
|
+
|
20
|
+
#
|
21
|
+
# Templating
|
22
|
+
#
|
23
|
+
|
24
|
+
# Templating -- wrap everything in the layout
|
25
|
+
layout 'layout.tmpl'
|
26
|
+
templates \
|
27
|
+
:console => 'admin/console.tmpl',
|
28
|
+
:server => 'admin/server.tmpl',
|
29
|
+
:host => 'admin/host.tmpl',
|
30
|
+
:message => 'admin/message.tmpl'
|
31
|
+
|
32
|
+
|
33
|
+
#
|
34
|
+
# Filters
|
35
|
+
#
|
36
|
+
|
37
|
+
# Add some custom headers to all responses
|
38
|
+
filter( :response ) do |res|
|
39
|
+
res.headers.x_strelka_version = Strelka.version_string( true )
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
#
|
44
|
+
# Routes
|
45
|
+
#
|
46
|
+
|
47
|
+
### Initialize some application data.
|
48
|
+
def initialize( * )
|
49
|
+
|
50
|
+
# Commonalize all the loggers
|
51
|
+
Mongrel2.logger = Strelka.logger
|
52
|
+
Configurability.logger = Strelka.logger
|
53
|
+
Inversion.logger.level = Logger::WARN
|
54
|
+
|
55
|
+
@adminserver = Mongrel2::Config::Server.by_uuid( ADMINSERVER_ID ).first
|
56
|
+
@control = @adminserver.control_socket
|
57
|
+
|
58
|
+
super
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
#
|
63
|
+
# Custom Error Responses
|
64
|
+
#
|
65
|
+
|
66
|
+
# on_status 404, :missing
|
67
|
+
#
|
68
|
+
# on_status 302,304, :redirect
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
#
|
73
|
+
# App Routes
|
74
|
+
#
|
75
|
+
|
76
|
+
# GET / -- console view
|
77
|
+
get do |req|
|
78
|
+
tmpl = self.template( :console )
|
79
|
+
tmpl.request = req
|
80
|
+
tmpl.control = @control
|
81
|
+
tmpl.servers = Mongrel2::Config.servers
|
82
|
+
|
83
|
+
return tmpl
|
84
|
+
end
|
85
|
+
|
86
|
+
end # class Strelka::AdminConsole
|
87
|
+
|
88
|
+
|
89
|
+
if __FILE__ == $0
|
90
|
+
require 'configurability/config'
|
91
|
+
|
92
|
+
# Commonalize all the loggers
|
93
|
+
Mongrel2.logger = Strelka.logger
|
94
|
+
Configurability.logger = Strelka.logger
|
95
|
+
PluginFactory.logger = Strelka.logger
|
96
|
+
|
97
|
+
Inversion.logger.level = Logger::WARN
|
98
|
+
|
99
|
+
Strelka.load_config
|
100
|
+
Strelka::AdminConsole.run
|
101
|
+
end
|
102
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'inversion'
|
4
|
+
require 'strelka'
|
5
|
+
|
6
|
+
# The Strelka setup web application.
|
7
|
+
class Strelka::SetupProcess < Strelka::App
|
8
|
+
|
9
|
+
# NOTE:
|
10
|
+
# This is currently just a sketch for an idea of how Strelka could support stateful
|
11
|
+
# 'process' applications ala Tir's coroutine-based "natural" handlers. It's not
|
12
|
+
# implemented yet, so this will error:
|
13
|
+
plugins :process
|
14
|
+
|
15
|
+
layout 'setup/layout.tmpl'
|
16
|
+
|
17
|
+
views :step1 => 'setup/step1',
|
18
|
+
:step2 => 'setup/step2'
|
19
|
+
|
20
|
+
|
21
|
+
### Progress through the setup process.
|
22
|
+
def main( req )
|
23
|
+
params = show( :step1 )
|
24
|
+
params = show( :step2, params )
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end # class Strelka::AdminConsole
|
29
|
+
|
30
|
+
|
31
|
+
Strelka::SetupProcess.run( 'strelka-setup' )
|
32
|
+
|
@@ -0,0 +1,44 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'pathname'
|
4
|
+
|
5
|
+
require 'mongrel2/config'
|
6
|
+
include Mongrel2::Config::DSL
|
7
|
+
|
8
|
+
require 'strelka'
|
9
|
+
require 'strelka/constants'
|
10
|
+
include Strelka::Constants
|
11
|
+
|
12
|
+
# Load the app classes to grab their appids. Only necessary for bootstrapping.
|
13
|
+
adminapp = Strelka::App.load( DATADIR + 'apps/strelka-admin' ).first
|
14
|
+
helloapp = Strelka::App.load( DATADIR + 'apps/hello-world' ).first
|
15
|
+
|
16
|
+
# This is the config that's loaded by 'leash setup' to get the admin server
|
17
|
+
# up and running.
|
18
|
+
server ADMINSERVER_ID do
|
19
|
+
name 'Strelka Admin Server'
|
20
|
+
port 8833
|
21
|
+
chroot '.'
|
22
|
+
access_log '/logs/admin-access.log'
|
23
|
+
error_log '/logs/admin-error.log'
|
24
|
+
pid_file '/run/admin.pid'
|
25
|
+
bind_addr '127.0.0.1'
|
26
|
+
|
27
|
+
default_host 'localhost'
|
28
|
+
|
29
|
+
host 'localhost' do
|
30
|
+
route '/', handler( 'tcp://127.0.0.1:19999', adminapp.default_appid )
|
31
|
+
route '/hello', handler( 'tcp://127.0.0.1:19995', helloapp.default_appid )
|
32
|
+
|
33
|
+
route '/css', directory( 'static/css/', 'base.css', 'text/css' )
|
34
|
+
route '/images', directory( 'static/images/' )
|
35
|
+
route '/fonts', directory( 'static/fonts/' )
|
36
|
+
route '/js', directory( 'static/js/', 'index.js', 'text/javascript' )
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
setting "control_port", 'ipc://run/control'
|
41
|
+
|
42
|
+
mimetypes '.ttf' => 'application/x-font-truetype',
|
43
|
+
'.otf' => 'application/x-font-opentype'
|
44
|
+
|
@@ -0,0 +1,581 @@
|
|
1
|
+
/*!
|
2
|
+
* Bootstrap Responsive v2.0.1
|
3
|
+
*
|
4
|
+
* Copyright 2012 Twitter, Inc
|
5
|
+
* Licensed under the Apache License v2.0
|
6
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
*
|
8
|
+
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
9
|
+
*/
|
10
|
+
.clearfix {
|
11
|
+
*zoom: 1;
|
12
|
+
}
|
13
|
+
.clearfix:before, .clearfix:after {
|
14
|
+
display: table;
|
15
|
+
content: "";
|
16
|
+
}
|
17
|
+
.clearfix:after {
|
18
|
+
clear: both;
|
19
|
+
}
|
20
|
+
.hidden {
|
21
|
+
display: none;
|
22
|
+
visibility: hidden;
|
23
|
+
}
|
24
|
+
@media (max-width: 480px) {
|
25
|
+
.nav-collapse {
|
26
|
+
-webkit-transform: translate3d(0, 0, 0);
|
27
|
+
}
|
28
|
+
.page-header h1 small {
|
29
|
+
display: block;
|
30
|
+
line-height: 18px;
|
31
|
+
}
|
32
|
+
input[class*="span"],
|
33
|
+
select[class*="span"],
|
34
|
+
textarea[class*="span"],
|
35
|
+
.uneditable-input {
|
36
|
+
display: block;
|
37
|
+
width: 100%;
|
38
|
+
min-height: 28px;
|
39
|
+
/* Make inputs at least the height of their button counterpart */
|
40
|
+
|
41
|
+
/* Makes inputs behave like true block-level elements */
|
42
|
+
|
43
|
+
-webkit-box-sizing: border-box;
|
44
|
+
/* Older Webkit */
|
45
|
+
|
46
|
+
-moz-box-sizing: border-box;
|
47
|
+
/* Older FF */
|
48
|
+
|
49
|
+
-ms-box-sizing: border-box;
|
50
|
+
/* IE8 */
|
51
|
+
|
52
|
+
box-sizing: border-box;
|
53
|
+
/* CSS3 spec*/
|
54
|
+
|
55
|
+
}
|
56
|
+
.input-prepend input[class*="span"], .input-append input[class*="span"] {
|
57
|
+
width: auto;
|
58
|
+
}
|
59
|
+
input[type="checkbox"], input[type="radio"] {
|
60
|
+
border: 1px solid #ccc;
|
61
|
+
}
|
62
|
+
.form-horizontal .control-group > label {
|
63
|
+
float: none;
|
64
|
+
width: auto;
|
65
|
+
padding-top: 0;
|
66
|
+
text-align: left;
|
67
|
+
}
|
68
|
+
.form-horizontal .controls {
|
69
|
+
margin-left: 0;
|
70
|
+
}
|
71
|
+
.form-horizontal .control-list {
|
72
|
+
padding-top: 0;
|
73
|
+
}
|
74
|
+
.form-horizontal .form-actions {
|
75
|
+
padding-left: 10px;
|
76
|
+
padding-right: 10px;
|
77
|
+
}
|
78
|
+
.modal {
|
79
|
+
position: absolute;
|
80
|
+
top: 10px;
|
81
|
+
left: 10px;
|
82
|
+
right: 10px;
|
83
|
+
width: auto;
|
84
|
+
margin: 0;
|
85
|
+
}
|
86
|
+
.modal.fade.in {
|
87
|
+
top: auto;
|
88
|
+
}
|
89
|
+
.modal-header .close {
|
90
|
+
padding: 10px;
|
91
|
+
margin: -10px;
|
92
|
+
}
|
93
|
+
.carousel-caption {
|
94
|
+
position: static;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
@media (max-width: 767px) {
|
98
|
+
.container {
|
99
|
+
width: auto;
|
100
|
+
padding: 0 20px;
|
101
|
+
}
|
102
|
+
.row-fluid {
|
103
|
+
width: 100%;
|
104
|
+
}
|
105
|
+
.row {
|
106
|
+
margin-left: 0;
|
107
|
+
}
|
108
|
+
.row > [class*="span"], .row-fluid > [class*="span"] {
|
109
|
+
float: none;
|
110
|
+
display: block;
|
111
|
+
width: auto;
|
112
|
+
margin: 0;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
@media (min-width: 768px) and (max-width: 979px) {
|
116
|
+
.row {
|
117
|
+
margin-left: -20px;
|
118
|
+
*zoom: 1;
|
119
|
+
}
|
120
|
+
.row:before, .row:after {
|
121
|
+
display: table;
|
122
|
+
content: "";
|
123
|
+
}
|
124
|
+
.row:after {
|
125
|
+
clear: both;
|
126
|
+
}
|
127
|
+
[class*="span"] {
|
128
|
+
float: left;
|
129
|
+
margin-left: 20px;
|
130
|
+
}
|
131
|
+
.span1 {
|
132
|
+
width: 42px;
|
133
|
+
}
|
134
|
+
.span2 {
|
135
|
+
width: 104px;
|
136
|
+
}
|
137
|
+
.span3 {
|
138
|
+
width: 166px;
|
139
|
+
}
|
140
|
+
.span4 {
|
141
|
+
width: 228px;
|
142
|
+
}
|
143
|
+
.span5 {
|
144
|
+
width: 290px;
|
145
|
+
}
|
146
|
+
.span6 {
|
147
|
+
width: 352px;
|
148
|
+
}
|
149
|
+
.span7 {
|
150
|
+
width: 414px;
|
151
|
+
}
|
152
|
+
.span8 {
|
153
|
+
width: 476px;
|
154
|
+
}
|
155
|
+
.span9 {
|
156
|
+
width: 538px;
|
157
|
+
}
|
158
|
+
.span10 {
|
159
|
+
width: 600px;
|
160
|
+
}
|
161
|
+
.span11 {
|
162
|
+
width: 662px;
|
163
|
+
}
|
164
|
+
.span12, .container {
|
165
|
+
width: 724px;
|
166
|
+
}
|
167
|
+
.offset1 {
|
168
|
+
margin-left: 82px;
|
169
|
+
}
|
170
|
+
.offset2 {
|
171
|
+
margin-left: 144px;
|
172
|
+
}
|
173
|
+
.offset3 {
|
174
|
+
margin-left: 206px;
|
175
|
+
}
|
176
|
+
.offset4 {
|
177
|
+
margin-left: 268px;
|
178
|
+
}
|
179
|
+
.offset5 {
|
180
|
+
margin-left: 330px;
|
181
|
+
}
|
182
|
+
.offset6 {
|
183
|
+
margin-left: 392px;
|
184
|
+
}
|
185
|
+
.offset7 {
|
186
|
+
margin-left: 454px;
|
187
|
+
}
|
188
|
+
.offset8 {
|
189
|
+
margin-left: 516px;
|
190
|
+
}
|
191
|
+
.offset9 {
|
192
|
+
margin-left: 578px;
|
193
|
+
}
|
194
|
+
.offset10 {
|
195
|
+
margin-left: 640px;
|
196
|
+
}
|
197
|
+
.offset11 {
|
198
|
+
margin-left: 702px;
|
199
|
+
}
|
200
|
+
.row-fluid {
|
201
|
+
width: 100%;
|
202
|
+
*zoom: 1;
|
203
|
+
}
|
204
|
+
.row-fluid:before, .row-fluid:after {
|
205
|
+
display: table;
|
206
|
+
content: "";
|
207
|
+
}
|
208
|
+
.row-fluid:after {
|
209
|
+
clear: both;
|
210
|
+
}
|
211
|
+
.row-fluid > [class*="span"] {
|
212
|
+
float: left;
|
213
|
+
margin-left: 2.762430939%;
|
214
|
+
}
|
215
|
+
.row-fluid > [class*="span"]:first-child {
|
216
|
+
margin-left: 0;
|
217
|
+
}
|
218
|
+
.row-fluid > .span1 {
|
219
|
+
width: 5.801104972%;
|
220
|
+
}
|
221
|
+
.row-fluid > .span2 {
|
222
|
+
width: 14.364640883%;
|
223
|
+
}
|
224
|
+
.row-fluid > .span3 {
|
225
|
+
width: 22.928176794%;
|
226
|
+
}
|
227
|
+
.row-fluid > .span4 {
|
228
|
+
width: 31.491712705%;
|
229
|
+
}
|
230
|
+
.row-fluid > .span5 {
|
231
|
+
width: 40.055248616%;
|
232
|
+
}
|
233
|
+
.row-fluid > .span6 {
|
234
|
+
width: 48.618784527%;
|
235
|
+
}
|
236
|
+
.row-fluid > .span7 {
|
237
|
+
width: 57.182320438000005%;
|
238
|
+
}
|
239
|
+
.row-fluid > .span8 {
|
240
|
+
width: 65.74585634900001%;
|
241
|
+
}
|
242
|
+
.row-fluid > .span9 {
|
243
|
+
width: 74.30939226%;
|
244
|
+
}
|
245
|
+
.row-fluid > .span10 {
|
246
|
+
width: 82.87292817100001%;
|
247
|
+
}
|
248
|
+
.row-fluid > .span11 {
|
249
|
+
width: 91.436464082%;
|
250
|
+
}
|
251
|
+
.row-fluid > .span12 {
|
252
|
+
width: 99.999999993%;
|
253
|
+
}
|
254
|
+
input.span1, textarea.span1, .uneditable-input.span1 {
|
255
|
+
width: 32px;
|
256
|
+
}
|
257
|
+
input.span2, textarea.span2, .uneditable-input.span2 {
|
258
|
+
width: 94px;
|
259
|
+
}
|
260
|
+
input.span3, textarea.span3, .uneditable-input.span3 {
|
261
|
+
width: 156px;
|
262
|
+
}
|
263
|
+
input.span4, textarea.span4, .uneditable-input.span4 {
|
264
|
+
width: 218px;
|
265
|
+
}
|
266
|
+
input.span5, textarea.span5, .uneditable-input.span5 {
|
267
|
+
width: 280px;
|
268
|
+
}
|
269
|
+
input.span6, textarea.span6, .uneditable-input.span6 {
|
270
|
+
width: 342px;
|
271
|
+
}
|
272
|
+
input.span7, textarea.span7, .uneditable-input.span7 {
|
273
|
+
width: 404px;
|
274
|
+
}
|
275
|
+
input.span8, textarea.span8, .uneditable-input.span8 {
|
276
|
+
width: 466px;
|
277
|
+
}
|
278
|
+
input.span9, textarea.span9, .uneditable-input.span9 {
|
279
|
+
width: 528px;
|
280
|
+
}
|
281
|
+
input.span10, textarea.span10, .uneditable-input.span10 {
|
282
|
+
width: 590px;
|
283
|
+
}
|
284
|
+
input.span11, textarea.span11, .uneditable-input.span11 {
|
285
|
+
width: 652px;
|
286
|
+
}
|
287
|
+
input.span12, textarea.span12, .uneditable-input.span12 {
|
288
|
+
width: 714px;
|
289
|
+
}
|
290
|
+
}
|
291
|
+
@media (max-width: 979px) {
|
292
|
+
body {
|
293
|
+
padding-top: 0;
|
294
|
+
}
|
295
|
+
.navbar-fixed-top {
|
296
|
+
position: static;
|
297
|
+
margin-bottom: 18px;
|
298
|
+
}
|
299
|
+
.navbar-fixed-top .navbar-inner {
|
300
|
+
padding: 5px;
|
301
|
+
}
|
302
|
+
.navbar .container {
|
303
|
+
width: auto;
|
304
|
+
padding: 0;
|
305
|
+
}
|
306
|
+
.navbar .brand {
|
307
|
+
padding-left: 10px;
|
308
|
+
padding-right: 10px;
|
309
|
+
margin: 0 0 0 -5px;
|
310
|
+
}
|
311
|
+
.navbar .nav-collapse {
|
312
|
+
clear: left;
|
313
|
+
}
|
314
|
+
.navbar .nav {
|
315
|
+
float: none;
|
316
|
+
margin: 0 0 9px;
|
317
|
+
}
|
318
|
+
.navbar .nav > li {
|
319
|
+
float: none;
|
320
|
+
}
|
321
|
+
.navbar .nav > li > a {
|
322
|
+
margin-bottom: 2px;
|
323
|
+
}
|
324
|
+
.navbar .nav > .divider-vertical {
|
325
|
+
display: none;
|
326
|
+
}
|
327
|
+
.navbar .nav .nav-header {
|
328
|
+
color: #999999;
|
329
|
+
text-shadow: none;
|
330
|
+
}
|
331
|
+
.navbar .nav > li > a, .navbar .dropdown-menu a {
|
332
|
+
padding: 6px 15px;
|
333
|
+
font-weight: bold;
|
334
|
+
color: #999999;
|
335
|
+
-webkit-border-radius: 3px;
|
336
|
+
-moz-border-radius: 3px;
|
337
|
+
border-radius: 3px;
|
338
|
+
}
|
339
|
+
.navbar .dropdown-menu li + li a {
|
340
|
+
margin-bottom: 2px;
|
341
|
+
}
|
342
|
+
.navbar .nav > li > a:hover, .navbar .dropdown-menu a:hover {
|
343
|
+
background-color: #222222;
|
344
|
+
}
|
345
|
+
.navbar .dropdown-menu {
|
346
|
+
position: static;
|
347
|
+
top: auto;
|
348
|
+
left: auto;
|
349
|
+
float: none;
|
350
|
+
display: block;
|
351
|
+
max-width: none;
|
352
|
+
margin: 0 15px;
|
353
|
+
padding: 0;
|
354
|
+
background-color: transparent;
|
355
|
+
border: none;
|
356
|
+
-webkit-border-radius: 0;
|
357
|
+
-moz-border-radius: 0;
|
358
|
+
border-radius: 0;
|
359
|
+
-webkit-box-shadow: none;
|
360
|
+
-moz-box-shadow: none;
|
361
|
+
box-shadow: none;
|
362
|
+
}
|
363
|
+
.navbar .dropdown-menu:before, .navbar .dropdown-menu:after {
|
364
|
+
display: none;
|
365
|
+
}
|
366
|
+
.navbar .dropdown-menu .divider {
|
367
|
+
display: none;
|
368
|
+
}
|
369
|
+
.navbar-form, .navbar-search {
|
370
|
+
float: none;
|
371
|
+
padding: 9px 15px;
|
372
|
+
margin: 9px 0;
|
373
|
+
border-top: 1px solid #222222;
|
374
|
+
border-bottom: 1px solid #222222;
|
375
|
+
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
|
376
|
+
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
|
377
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
|
378
|
+
}
|
379
|
+
.navbar .nav.pull-right {
|
380
|
+
float: none;
|
381
|
+
margin-left: 0;
|
382
|
+
}
|
383
|
+
.navbar-static .navbar-inner {
|
384
|
+
padding-left: 10px;
|
385
|
+
padding-right: 10px;
|
386
|
+
}
|
387
|
+
.btn-navbar {
|
388
|
+
display: block;
|
389
|
+
}
|
390
|
+
.nav-collapse {
|
391
|
+
overflow: hidden;
|
392
|
+
height: 0;
|
393
|
+
}
|
394
|
+
}
|
395
|
+
@media (min-width: 980px) {
|
396
|
+
.nav-collapse.collapse {
|
397
|
+
height: auto !important;
|
398
|
+
}
|
399
|
+
}
|
400
|
+
@media (min-width: 1200px) {
|
401
|
+
.row {
|
402
|
+
margin-left: -30px;
|
403
|
+
*zoom: 1;
|
404
|
+
}
|
405
|
+
.row:before, .row:after {
|
406
|
+
display: table;
|
407
|
+
content: "";
|
408
|
+
}
|
409
|
+
.row:after {
|
410
|
+
clear: both;
|
411
|
+
}
|
412
|
+
[class*="span"] {
|
413
|
+
float: left;
|
414
|
+
margin-left: 30px;
|
415
|
+
}
|
416
|
+
.span1 {
|
417
|
+
width: 70px;
|
418
|
+
}
|
419
|
+
.span2 {
|
420
|
+
width: 170px;
|
421
|
+
}
|
422
|
+
.span3 {
|
423
|
+
width: 270px;
|
424
|
+
}
|
425
|
+
.span4 {
|
426
|
+
width: 370px;
|
427
|
+
}
|
428
|
+
.span5 {
|
429
|
+
width: 470px;
|
430
|
+
}
|
431
|
+
.span6 {
|
432
|
+
width: 570px;
|
433
|
+
}
|
434
|
+
.span7 {
|
435
|
+
width: 670px;
|
436
|
+
}
|
437
|
+
.span8 {
|
438
|
+
width: 770px;
|
439
|
+
}
|
440
|
+
.span9 {
|
441
|
+
width: 870px;
|
442
|
+
}
|
443
|
+
.span10 {
|
444
|
+
width: 970px;
|
445
|
+
}
|
446
|
+
.span11 {
|
447
|
+
width: 1070px;
|
448
|
+
}
|
449
|
+
.span12, .container {
|
450
|
+
width: 1170px;
|
451
|
+
}
|
452
|
+
.offset1 {
|
453
|
+
margin-left: 130px;
|
454
|
+
}
|
455
|
+
.offset2 {
|
456
|
+
margin-left: 230px;
|
457
|
+
}
|
458
|
+
.offset3 {
|
459
|
+
margin-left: 330px;
|
460
|
+
}
|
461
|
+
.offset4 {
|
462
|
+
margin-left: 430px;
|
463
|
+
}
|
464
|
+
.offset5 {
|
465
|
+
margin-left: 530px;
|
466
|
+
}
|
467
|
+
.offset6 {
|
468
|
+
margin-left: 630px;
|
469
|
+
}
|
470
|
+
.offset7 {
|
471
|
+
margin-left: 730px;
|
472
|
+
}
|
473
|
+
.offset8 {
|
474
|
+
margin-left: 830px;
|
475
|
+
}
|
476
|
+
.offset9 {
|
477
|
+
margin-left: 930px;
|
478
|
+
}
|
479
|
+
.offset10 {
|
480
|
+
margin-left: 1030px;
|
481
|
+
}
|
482
|
+
.offset11 {
|
483
|
+
margin-left: 1130px;
|
484
|
+
}
|
485
|
+
.row-fluid {
|
486
|
+
width: 100%;
|
487
|
+
*zoom: 1;
|
488
|
+
}
|
489
|
+
.row-fluid:before, .row-fluid:after {
|
490
|
+
display: table;
|
491
|
+
content: "";
|
492
|
+
}
|
493
|
+
.row-fluid:after {
|
494
|
+
clear: both;
|
495
|
+
}
|
496
|
+
.row-fluid > [class*="span"] {
|
497
|
+
float: left;
|
498
|
+
margin-left: 2.564102564%;
|
499
|
+
}
|
500
|
+
.row-fluid > [class*="span"]:first-child {
|
501
|
+
margin-left: 0;
|
502
|
+
}
|
503
|
+
.row-fluid > .span1 {
|
504
|
+
width: 5.982905983%;
|
505
|
+
}
|
506
|
+
.row-fluid > .span2 {
|
507
|
+
width: 14.529914530000001%;
|
508
|
+
}
|
509
|
+
.row-fluid > .span3 {
|
510
|
+
width: 23.076923077%;
|
511
|
+
}
|
512
|
+
.row-fluid > .span4 {
|
513
|
+
width: 31.623931624%;
|
514
|
+
}
|
515
|
+
.row-fluid > .span5 {
|
516
|
+
width: 40.170940171000005%;
|
517
|
+
}
|
518
|
+
.row-fluid > .span6 {
|
519
|
+
width: 48.717948718%;
|
520
|
+
}
|
521
|
+
.row-fluid > .span7 {
|
522
|
+
width: 57.264957265%;
|
523
|
+
}
|
524
|
+
.row-fluid > .span8 {
|
525
|
+
width: 65.81196581200001%;
|
526
|
+
}
|
527
|
+
.row-fluid > .span9 {
|
528
|
+
width: 74.358974359%;
|
529
|
+
}
|
530
|
+
.row-fluid > .span10 {
|
531
|
+
width: 82.905982906%;
|
532
|
+
}
|
533
|
+
.row-fluid > .span11 {
|
534
|
+
width: 91.45299145300001%;
|
535
|
+
}
|
536
|
+
.row-fluid > .span12 {
|
537
|
+
width: 100%;
|
538
|
+
}
|
539
|
+
input.span1, textarea.span1, .uneditable-input.span1 {
|
540
|
+
width: 60px;
|
541
|
+
}
|
542
|
+
input.span2, textarea.span2, .uneditable-input.span2 {
|
543
|
+
width: 160px;
|
544
|
+
}
|
545
|
+
input.span3, textarea.span3, .uneditable-input.span3 {
|
546
|
+
width: 260px;
|
547
|
+
}
|
548
|
+
input.span4, textarea.span4, .uneditable-input.span4 {
|
549
|
+
width: 360px;
|
550
|
+
}
|
551
|
+
input.span5, textarea.span5, .uneditable-input.span5 {
|
552
|
+
width: 460px;
|
553
|
+
}
|
554
|
+
input.span6, textarea.span6, .uneditable-input.span6 {
|
555
|
+
width: 560px;
|
556
|
+
}
|
557
|
+
input.span7, textarea.span7, .uneditable-input.span7 {
|
558
|
+
width: 660px;
|
559
|
+
}
|
560
|
+
input.span8, textarea.span8, .uneditable-input.span8 {
|
561
|
+
width: 760px;
|
562
|
+
}
|
563
|
+
input.span9, textarea.span9, .uneditable-input.span9 {
|
564
|
+
width: 860px;
|
565
|
+
}
|
566
|
+
input.span10, textarea.span10, .uneditable-input.span10 {
|
567
|
+
width: 960px;
|
568
|
+
}
|
569
|
+
input.span11, textarea.span11, .uneditable-input.span11 {
|
570
|
+
width: 1060px;
|
571
|
+
}
|
572
|
+
input.span12, textarea.span12, .uneditable-input.span12 {
|
573
|
+
width: 1160px;
|
574
|
+
}
|
575
|
+
.thumbnails {
|
576
|
+
margin-left: -30px;
|
577
|
+
}
|
578
|
+
.thumbnails > li {
|
579
|
+
margin-left: 30px;
|
580
|
+
}
|
581
|
+
}
|