ui: better error handling

This commit is contained in:
Jack Pearkes 2014-05-01 10:24:41 -04:00
parent 6f77bc93a4
commit 17a1c12e8d
3 changed files with 8 additions and 15 deletions

View file

@ -19,14 +19,17 @@
{{outlet}} {{outlet}}
</script> </script>
<script type="text/x-handlebars" data-template-name="errora"> <script type="text/x-handlebars" data-template-name="error">
<div class="row"> <div class="row">
<div class="col-md-8 col-md-offset-2 col-sm-12 col-xs-12"> <div class="col-md-8 col-md-offset-2 col-sm-12 col-xs-12">
<div class="text-center error"> <div class="text-center error">
{{#if controller.model.statusText }}
<p class="bold">HTTP error code from Consul: <code>{{controller.model.status}} {{controller.model.statusText}}</code></p>
{{/if}}
<p>This is an error page for the Consul web UI. You may have visited a URL that is loading an <p>This is an error page for the Consul web UI. You may have visited a URL that is loading an
unknown resource, so you can try going back to thes <a href="#">root</a>.</p> unknown resource, so you can try going back to the <a href="#">root</a>.</p>
<p>Otherwise, please report any unexpected <p>Otherwise, please report any unexpected
issues to the <a href="https://github.com/hashicorp/consul">GitHub page</a>.</p> issues on the <a href="https://github.com/hashicorp/consul">GitHub page</a>.</p>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,13 +1,5 @@
window.App = Ember.Application.create({ window.App = Ember.Application.create({
rootElement: "#app", rootElement: "#app"
LOG_TRANSITIONS: true,
LOG_STACKTRACE_ON_DEPRECATION: true,
LOG_BINDINGS: true,
LOG_TRANSITIONS: true,
LOG_ACTIVE_GENERATION: true,
// The baseUrl for AJAX requests
// TODO implement in AJAX logic
baseUrl: 'http://localhost:8500'
}); });

View file

@ -1,7 +1,5 @@
//
// Superclass to be used by all of the main routes below. All routes
// but the IndexRoute share the need to have a datacenter set.
// //
// Superclass to be used by all of the main routes below.
// //
App.BaseRoute = Ember.Route.extend({ App.BaseRoute = Ember.Route.extend({
getParentAndGrandparent: function(key) { getParentAndGrandparent: function(key) {