New: App health displayed in UI

This commit is contained in:
Mark McDowall
2014-02-25 21:40:47 -08:00
parent 90a6bcaa47
commit c8ae9f40fb
54 changed files with 873 additions and 44 deletions

View File

@@ -47,6 +47,7 @@
<i class="icon-laptop"></i>
<br>
System
<span id="x-health"></span>
</a>
</li>
<li>

View File

@@ -3,10 +3,15 @@ define(
[
'marionette',
'jquery',
'Health/HealthView',
'Navbar/Search'
], function (Marionette, $) {
return Marionette.ItemView.extend({
template: 'Navbar/NavbarTemplate',
], function (Marionette, $, HealthView) {
return Marionette.Layout.extend({
template: 'Navbar/NavbarLayoutTemplate',
regions: {
health: '#x-health'
},
ui: {
search: '.x-series-search'
@@ -18,6 +23,7 @@ define(
onRender: function () {
this.ui.search.bindSearch();
this.health.show(new HealthView());
},
onClick: function (event) {
@@ -30,9 +36,9 @@ define(
var href = event.target.getAttribute('href');
//if couldn't find it look up'
if (!href && target.parent('a') && target.parent('a')[0]) {
if (!href && target.closest('a') && target.closest('a')[0]) {
var linkElement = target.parent('a')[0];
var linkElement = target.closest('a')[0];
href = linkElement.getAttribute('href');
this.setActive(linkElement);