Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/filters/dashboardServicesFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ app.filter('dashboardServices', function () {
var resultingArr = [];
if (condition1) {
angular.forEach(arr, function (el) {
if (el[condition2] || el.status === 'DOWN') {
if (el[condition2]) {
resultingArr.push(el);
}
});
Expand All @@ -19,7 +19,7 @@ app.filter('dashboardServices', function () {
var remaining = [];

angular.forEach(arr, function (el) {
if (el.status === filterStatus) {
if (filterStatus.indexOf(el.status) >= 0) {
filtered.push(el);
}
else {
Expand All @@ -35,7 +35,7 @@ app.filter('dashboardServices', function () {

return function (services, options) {
var shownServices = reduceArray(services, options.showPublic(), "isPublic");
var byStatus = filterByStatus(shownServices, "MAINTENANCE");
var byStatus = filterByStatus(shownServices, ["MAINTENANCE", "DOWN"]);
var shortList = reduceArray(byStatus.remaining, options.showShortList, "onShortList");
return byStatus.filtered.concat(shortList);
};
Expand Down