ui: initial commit

This commit is contained in:
Jack Pearkes 2014-04-21 16:01:53 -04:00
parent 168b240e5c
commit 7e890dc45b
9 changed files with 122 additions and 0 deletions

2
.gitignore vendored
View File

@ -30,3 +30,5 @@ website/build/
website/npm-debug.log website/npm-debug.log
*.old *.old
*.attr *.attr
ui/.sass-cache

10
ui/Makefile Normal file
View File

@ -0,0 +1,10 @@
server:
python -m SimpleHTTPServer
watch:
sass styles --watch
build:
sass styles
.PHONY: server watch build

42
ui/README.md Normal file
View File

@ -0,0 +1,42 @@
## Consul Web UI
This directory contains the Consul Web UI. Consul contains a built-in
HTTP server that serves this directoy, but any common HTTP server
is capable of serving it.
It uses JavaScript to communicate with the [Consul API](). The basic
features it provides are:
- Service view. A list of your registered services, their
health and the nodes they run on.
- Node view. A list of your registered nodes, the services running
on each and the health of the node.
- Key/value view and update
It's aware of multiple data centers, so you can get a quick global
overview before drilling into specific data-centers for detailed
views.
### Development
Improvements and bug fixes are welcome and encouraged for the Web UI.
The UI is built with SASS CSS, so you'll need to compile that through
the associated makefile, as well as installing the `sass` gem.
gem install sass
One-time stylesheet compilation:
make build
Reloading compilation for development:
make watch
Additionally, you'll need to run a local webserver.
make server
### Running the tests

0
ui/index.html Normal file
View File

0
ui/javascripts/app.js Normal file
View File

View File

@ -0,0 +1 @@
$foobar: white;

54
ui/styles/base.css Normal file
View File

@ -0,0 +1,54 @@
/*
Syntax error: File to import not found or unreadable: layout.
Load paths:
/Users/pearkes/code/hashicorp/consul/ui
/Users/pearkes/code/hashicorp/consul/ui/styles
on line 2 of styles/base.scss
1: @import "variables";
2: @import "layout";
3:
4: body {
5: background-color: $foobar;
6: }
Backtrace:
styles/base.scss:2
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/import_node.rb:67:in `rescue in import'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/import_node.rb:45:in `import'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/import_node.rb:28:in `imported_file'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/import_node.rb:37:in `css_import?'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/perform.rb:217:in `visit_import'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/perform.rb:100:in `visit'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/perform.rb:128:in `visit_root'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/perform.rb:100:in `visit'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/visitors/perform.rb:7:in `visit'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/tree/root_node.rb:20:in `render'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/engine.rb:315:in `_render'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/engine.rb:262:in `render'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/plugin/compiler.rb:362:in `update_stylesheet'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/plugin/compiler.rb:203:in `block in update_stylesheets'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/plugin/compiler.rb:201:in `each'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/plugin/compiler.rb:201:in `update_stylesheets'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.19/lib/sass/plugin/compiler.rb:283:in `block in watch'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/listen-0.7.3/lib/listen/multi_listener.rb:108:in `call'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/listen-0.7.3/lib/listen/multi_listener.rb:108:in `on_change'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/listen-0.7.3/lib/listen/multi_listener.rb:117:in `block in initialize_adapter'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/listen-0.7.3/lib/listen/adapter.rb:198:in `call'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/listen-0.7.3/lib/listen/adapter.rb:198:in `report_changes'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/listen-0.7.3/lib/listen/adapter.rb:210:in `poll_changed_dirs'
/Users/pearkes/.rvm/gems/ruby-2.0.0-p247/gems/listen-0.7.3/lib/listen/adapters/darwin.rb:38:in `block in start'
*/
body:before {
white-space: pre;
font-family: monospace;
content: "Syntax error: File to import not found or unreadable: layout.\A Load paths:\A /Users/pearkes/code/hashicorp/consul/ui\A /Users/pearkes/code/hashicorp/consul/ui/styles\A on line 2 of styles/base.scss\A \A 1: @import \"variables\";\A 2: @import \"layout\";\A 3: \A 4: body {\A 5: background-color: $foobar;\A 6: }"; }

6
ui/styles/base.scss Normal file
View File

@ -0,0 +1,6 @@
@import "variables";
@import "layout";
body {
background-color: $foobar;
}

7
ui/styles/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long