|
|
|
@ -1,3 +1,9 @@
|
|
|
|
|
App.ApplicationController = Ember.ObjectController.extend({
|
|
|
|
|
updateCurrentPath: function() {
|
|
|
|
|
App.set('currentPath', this.get('currentPath'));
|
|
|
|
|
}.observes('currentPath')
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
App.DcController = Ember.Controller.extend({
|
|
|
|
|
// Whether or not the dropdown menu can be seen
|
|
|
|
|
isDropdownVisible: false,
|
|
|
|
@ -230,7 +236,7 @@ App.KvEditController = KvBaseController.extend({
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
ItemBaseController = Ember.ArrayController.extend({
|
|
|
|
|
needs: ["dc"],
|
|
|
|
|
needs: ["dc", "application"],
|
|
|
|
|
queryParams: ["filter", "status", "condensed"],
|
|
|
|
|
dc: Ember.computed.alias("controllers.dc"),
|
|
|
|
|
condensed: true,
|
|
|
|
@ -238,6 +244,12 @@ ItemBaseController = Ember.ArrayController.extend({
|
|
|
|
|
status: "any status", // default
|
|
|
|
|
statuses: ["any status", "passing", "failing"],
|
|
|
|
|
|
|
|
|
|
isShowingItem: function() {
|
|
|
|
|
var currentPath = this.get('controllers.application.currentPath');
|
|
|
|
|
console.log(currentPath);
|
|
|
|
|
return (currentPath === "dc.nodes.show" || currentPath === "dc.services.show");
|
|
|
|
|
}.property('controllers.application.currentPath'),
|
|
|
|
|
|
|
|
|
|
filteredContent: function() {
|
|
|
|
|
var filter = this.get('filter');
|
|
|
|
|
var status = this.get('status');
|
|
|
|
@ -270,7 +282,6 @@ App.NodesController = ItemBaseController.extend({
|
|
|
|
|
items: Ember.computed.alias("nodes"),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
App.ServicesController = ItemBaseController.extend({
|
|
|
|
|
items: Ember.computed.alias("services"),
|
|
|
|
|
});
|
|
|
|
|