Permalink
Browse files

Merge branch '2.0'

  • Loading branch information...
2 parents f82054a + 5ab3896 commit ed8b6990d0488dbcc72e9fb0cd015f62e28dfedd Jared Morrow committed Sep 4, 2014
Showing with 60,041 additions and 72,810 deletions.
  1. +3 −2 .gitignore
  2. +0 −2 .travis.yml
  3. +22 −1 Makefile
  4. +11 −0 README.md
  5. +0 −117 README.org
  6. +0 −16 priv/admin/css/cluster.styl
  7. +77 −22 priv/admin/css/compiled/style.css
  8. +28 −0 priv/admin/css/general.styl
  9. +31 −0 priv/admin/css/ring.styl
  10. +6 −22 priv/admin/js/app.js
  11. +183 −127 priv/admin/js/cluster.js
  12. +17 −8 priv/admin/js/core.js
  13. 0 priv/admin/js/generated/.gitkeep
  14. +0 −12 priv/admin/js/generated/templates.js
  15. +0 −36,028 priv/admin/js/generated/vendor.js
  16. +5 −5 priv/admin/js/legacy/gui.js
  17. +33 −50 priv/admin/js/nodes.js
  18. +120 −73 priv/admin/js/ring.js
  19. +150 −115 priv/admin/js/router.js
  20. +53 −46 priv/admin/js/shared.js
  21. +0 −10 priv/admin/js/snapshot.js
  22. +4 −4 priv/admin/js/templates/application.hbs
  23. +6 −6 priv/admin/js/templates/cluster.hbs
  24. +7 −2 priv/admin/js/templates/current_cluster_item.hbs
  25. +1 −1 priv/admin/js/templates/current_nodes_item.hbs
  26. +19 −0 priv/admin/js/templates/loading.hbs
  27. +3 −3 priv/admin/js/templates/nodes.hbs
  28. +8 −0 priv/admin/js/templates/ring.hbs
  29. +1 −1 priv/admin/js/templates/staged_cluster_item.hbs
  30. +36,470 −0 priv/admin/js/vendor/ember-1.0.0.js
  31. +7,211 −0 priv/admin/js/vendor/ember-data-1.0.0-beta.1.js
  32. +0 −4,176 priv/admin/js/vendor/ember-data-latest.js
  33. +0 −20,709 priv/admin/js/vendor/ember-latest.js
  34. +0 −1,550 priv/admin/js/vendor/handlebars-1.0.0.beta.6.js
  35. +2,278 −0 priv/admin/js/vendor/handlebars-1.0.0.js
  36. +9,789 −0 priv/admin/js/vendor/jquery-1.10.2.js
  37. +6 −0 priv/admin/js/vendor/jquery-1.10.2.min.js
  38. +0 −9,404 priv/admin/js/vendor/jquery-1.7.2.js
  39. +0 −4 priv/admin/js/vendor/jquery-1.7.min.js
  40. +48 −0 priv/riak_control.schema
  41. BIN rebar
  42. +10 −12 rebar.config
  43. +1 −1 src/riak_control.app.src
  44. +23 −8 src/riak_control_security.erl
  45. +26 −4 src/riak_control_session.erl
  46. +6 −19 src/riak_control_sup.erl
  47. +0 −250 test/eqc_routes.erl
  48. +1 −0 test/javascripts/admin
  49. +24 −0 test/javascripts/data/mock_responses.js
  50. +52 −0 test/javascripts/index.html
  51. +62 −0 test/javascripts/pages_test.js
  52. +139 −0 test/javascripts/runner.js
  53. +598 −0 test/javascripts/support/jquery.mockjax.js
  54. +244 −0 test/javascripts/support/qunit-1.12.0.css
  55. +2,212 −0 test/javascripts/support/qunit-1.12.0.js
  56. +12 −0 test/javascripts/test_helper.js
  57. +41 −0 test/riak_control_schema_test.erl
View
@@ -5,6 +5,7 @@ doc/*
deps/*
erl_crash.dump
EUnit-SASL.log
-priv/admin/js/templates.js
-priv/admin/js/vendor.js
+priv/admin/js/generated/templates.js
+priv/admin/js/generated/vendor.js
tags
+erln8.config
View
@@ -5,5 +5,3 @@ notifications:
otp_release:
- R15B01
- R15B
- - R14B04
- - R14B03
View
@@ -17,9 +17,30 @@ clean:
distclean: clean
@./rebar delete-deps
-test: all
+test: all test_erlang test_javascript
+
+test_erlang: all
@./rebar skip_deps=true eunit
+define MISSING_PHANTOM_MESSAGE
+PhantomJS is missing to run the javascript tests, to install on your OS do the following
+
+- MacOS via homebrew run `brew install phantomjs`
+- Ubuntu `apt-get install phantomjs`
+- Other linux distros should check http://phantomjs.org/download.html to download a binary build
+
+or visit http://phantomjs.org/ for more information.
+endef
+export MISSING_PHANTOM_MESSAGE
+
+test_javascript: all
+ifeq ($(strip $(shell command -v phantomjs > /dev/null 2>&1 || echo 1)),)
+ @echo "==> riak_control (qunit)"
+ @phantomjs test/javascripts/runner.js test/javascripts/index.html
+else
+ @echo "$$MISSING_PHANTOM_MESSAGE"
+endif
+
##
## Doc targets
##
View
@@ -0,0 +1,11 @@
+# Riak Control
+
+Riak Control is a OTP application included in the Riak database which
+provides a user interface for cluster planning and visibility. As Riak
+Control comes bundled with Riak, you do not need to install this
+application separately.
+
+## Enabling Riak Control
+
+For more information on enabling Riak Control, see the
+[docs](http://docs.basho.com/riak/latest/ops/advanced/riak-control/).
View
@@ -1,117 +0,0 @@
-[[http://travis-ci.org/basho/riak_control][Travis-CI]] :: [[https://secure.travis-ci.org/basho/riak_control.png]]
-
-* What is Riak Control?
-Riak Control is a set of webmachine resources, all accessible via
-the /admin/* paths, allow you to inspect your running cluster,
-and manipulate it in various ways.
-
-* Note on Supported Browsers
-Riak Control does not currently support Internet Explorer.
-
-* How Do I Start Riak Control?
-By default, Riak Control is disabled. There are a few, simple steps
-to get it up and running.
-
-** Modify the Node's app.config File.
-Riak Control is completely managed through the app.config file for
-Riak. Riak Control requires SSL for authentication purposes and
-therefore you will need to enable HTTPS, SSL, and riak_control.
-
-*** Enable HTTPS and SSL in riak_core:
-In the riak_core section of app.config, there should sections
-for HTTPS and SSL commented out. You will need to uncomment them
-back in.
-
-WARNING: In order for your node to be accessible via HTTP and the
-riak_control admin panel to be available via HTTPS, you will need
-to change the HTTPS port to something else:
-
-: {https, [ {"127.0.0.1", 8069} ]}
-
-You will also need to generate your own self-signed certificate
-(http://www.akadia.com/services/ssh_test_certificate.html) or modify the
-app.config to point to your own:
-
-: {ssl, [ {certfile, "./etc/cert.pem"},
-: {keyfile, "./etc/key.pem"}
-: ]}
-
-**** SSL with Intermediate Authorities
-If you are using a certificate that includes an intermediate authority, include the `cacertfile` key and value:
-
-: {ssl, [
-: {certfile, "./etc/cert.pem"},
-: {cacertfile, "./etc/cacert.pem"},
-: {keyfile, "./etc/key.pem"}
-: ]},
-
-*** Enable riak_control and setup basic authentication
-In the riak_control section of app.config, first you'll need to
-make sure that it is enabled:
-
-: {enabled, true}
-
-Next, you'll need to specify the style of authentication you would
-like performed when accessing the admin panel. Currently the only
-valid authentication styles are 'userlist' and 'none'.
-
-: {auth, userlist}
-
-If you choose 'userlist' as your authentication method, you need to
-also create one. You specify a list of usernames and passwords (as
-plaintext) that your administrators will use to connect to the admin
-panel.
-
-: {userlist, [{"username", "password"}, ...]}
-
-Finally, the Riak Control admin panel is broken up into several
-sections, each can be toggled on and off. Currently, the only section
-is the 'admin' section. You need to ensure that it is enabled.
-
-: {admin, true}
-
-** Start or Restart Riak
-Once the above changes have been made, you can now start or restart
-your Riak node. You will then be able to access the admin panel by
-pointing your browser to it:
-
-: https://127.0.0.1:8069/admin
-
-In the above URL, it was assumed that 8069 was used as the SSL port
-in your app.config file.
-
-* What Information Does Riak Control Provide?
-The Riak Control admin panel is broken up into several sections.
-
-** Snapshot
-This is a quick "health check" for your cluster. If Riak Control finds
-anything worrisome, it will let you know and provide links to pages
-where you can diagnose and/or fix the problem.
-
-If a node is running Riak pre-1.1, it will be listed as incompatible
-in the Riak Control interface. While in this state, Riak Control will
-be unable to retrieve and display statistics and configuration for that
-node.
-
-** Cluster Management
-The Cluster Management page gives you the ability to add the node
-running Riak Control to an existing cluster, or to join standalone nodes
-into the current cluster. Cluster Management also provides an overview
-of claim, and the current cluster configuration, allowing you to stage
-changes to the existing cluster and commit the staged plan once
-confirming the staged cluster.
-
-** Node Management
-The Node Management page gives you an overview of how much memory your
-nodes are using, what percentage of the ring they claim ownership of,
-and the ability to mark a failed node as down, or stop an individual
-node.
-
-** Ring Overview
-The Ring Overview gives you a quick glimpse into all the partitions
-in your ring, what nodes own them, whether they are offline, handing
-off data, and what services are currently running on them (e.g. kv,
-pipe, search).
-
-You can quickly filter the partitions and see only those you are
-interested in.
@@ -39,22 +39,6 @@ CSS to be applied ONLY on the cluster page
h3
copy-font()
- .spinner-box
- corners()
- text-align : center
- background : rgba(255, 255, 255, .05)
- padding : 25px
-
- img, h4
- vertical-align : middle
-
- h4
- opaque(.8)
- display : inline-block
- padding-top : 6px
- padding-left : 10px
- line-height : 1.2
-
.actions-container
css-transition(height .4s ease, margin-bottom .4s ease)
overflow : hidden
@@ -220,6 +220,40 @@ th {
text-align: left;
padding: 0 5px 5px;
}
+.spinner-box {
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -o-border-radius: 4px;
+ border-radius: 4px;
+ text-align: center;
+ background: rgba(255,255,255,0.05);
+ padding: 25px;
+}
+.spinner-box img,
+.spinner-box h4 {
+ vertical-align: middle;
+}
+.spinner-box h4 {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+ display: inline-block;
+ padding-top: 6px;
+ padding-left: 10px;
+ line-height: 1.2;
+}
+.spinner-box.loading-route {
+ margin-top: 50px;
+ height: 250px;
+ line-height: 250px;
+}
+.spinner-box.loading-route img,
+.spinner-box.loading-route h4 {
+ display: inline;
+ line-height: 250px;
+ margin-top: 0;
+ padding-top: 0;
+}
#header {
width: 100%;
height: 53px;
@@ -1186,28 +1220,6 @@ div.tooltip:hover > span {
#cluster-page h3 {
font-family: 'noticia', georgia, serif;
}
-#cluster-page .spinner-box {
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- -ms-border-radius: 4px;
- -o-border-radius: 4px;
- border-radius: 4px;
- text-align: center;
- background: rgba(255,255,255,0.05);
- padding: 25px;
-}
-#cluster-page .spinner-box img,
-#cluster-page .spinner-box h4 {
- vertical-align: middle;
-}
-#cluster-page .spinner-box h4 {
- opacity: 0.8;
- filter: alpha(opacity=80);
- display: inline-block;
- padding-top: 6px;
- padding-left: 10px;
- line-height: 1.2;
-}
#cluster-page .actions-container {
-webkit-transition: height 0.4s ease;
-moz-transition: height 0.4s ease;
@@ -2109,6 +2121,49 @@ div.tooltip:hover > span {
width: 15%;
}
}
+#ring-page .error-message {
+ font-family: 'noticia', georgia, serif;
+ -webkit-box-shadow: 0 2px 3px rgba(0,0,0,0.35);
+ -moz-box-shadow: 0 2px 3px rgba(0,0,0,0.35);
+ -ms-box-shadow: 0 2px 3px rgba(0,0,0,0.35);
+ -o-box-shadow: 0 2px 3px rgba(0,0,0,0.35);
+ box-shadow: 0 2px 3px rgba(0,0,0,0.35);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ -ms-border-radius: 4px;
+ -o-border-radius: 4px;
+ border-radius: 4px;
+ font-size: 14px;
+ font-style: italic;
+ color: #ccc;
+ padding: 8px 10px 9px 12px;
+ background: rgba(232,78,78,0.5);
+ border: 1px solid rgba(235,105,105,0.5);
+ margin-top: 25px;
+}
+#ring-page .error-message .error-link {
+ font-family: 'titillium', helvetica, arial, sans-serif;
+ font-weight: bold;
+ padding-left: 5px;
+}
+#ring-page .error-message .error-link:hover {
+ text-decoration: underline;
+}
+#ring-page .error-message .close-error {
+ width: 16px;
+ height: 16px;
+ opacity: 0.6;
+ filter: alpha(opacity=60);
+ cursor: pointer;
+ display: inline-block;
+ float: right;
+ vertical-align: middle;
+ background: url("/admin/ui/images/close-error.png") left top no-repeat transparent;
+}
+#ring-page .error-message .close-error:hover {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
#ring-page select {
float: right;
min-width: 100px;
@@ -62,6 +62,34 @@ th
/* IDs & Classes */
+.spinner-box
+ corners()
+ text-align : center
+ background : rgba(255, 255, 255, .05)
+ padding : 25px
+
+ img, h4
+ vertical-align : middle
+
+ h4
+ opaque(.8)
+ display : inline-block
+ padding-top : 6px
+ padding-left : 10px
+ line-height : 1.2
+
+ &.loading-route
+ margin-top : 50px
+ height : 250px
+ line-height : 250px
+
+ img, h4
+ display : inline
+ line-height : 250px
+ margin-top : 0
+ padding-top : 0
+
+
#header
dimensions(100%, 53px)
border-bottom : 1px solid lightWhite
View
@@ -7,6 +7,37 @@ CSS to be applied ONLY on the ring page
#ring-page
+ .error-message
+ copy-font()
+ vendor('box-shadow', 0 2px 3px darkened)
+ corners()
+ font-size : 14px
+ font-style : italic
+ color : mediumGray
+ padding : 8px 10px 9px 12px
+ background : rgba(232, 78, 78, .5)
+ border : 1px solid lighten(rgba(232, 78, 78, .5), 15%)
+ margin-top : 25px
+
+ .error-link
+ headline-bold()
+ padding-left : 5px
+
+ &:hover
+ text-decoration : underline
+
+ .close-error
+ dimensions(16px, 16px)
+ opaque(.6)
+ cursor : pointer
+ display : inline-block
+ float : right
+ vertical-align : middle
+ background : url('/admin/ui/images/close-error.png') left top no-repeat transparent
+
+ &:hover
+ opaque(1)
+
select
float : right
min-width : 100px
Oops, something went wrong.

0 comments on commit ed8b699

Please sign in to comment.