Skip to content

Commit

Permalink
fix(clusters): preserve filters when clicking active item
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry committed Apr 6, 2017
1 parent d045ee4 commit 1fc14d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/scripts/modules/core/cluster/filter/multiselect.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ module.exports = angular
job: serverGroup.name,
};
if (isClusterChildState()) {
if ($state.includes('**.serverGroup', params)) {
return;
}
$state.go('^.' + serverGroup.category, params);
} else {
$state.go('.' + serverGroup.category, params);
Expand Down
4 changes: 3 additions & 1 deletion app/scripts/modules/core/instance/instances.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ module.exports = angular.module('spinnaker.core.instance.instances.directive', [
};
scope.activeInstance = params;
// also stolen from uiSref directive
$state.go('.instanceDetails', params, {relative: base, inherit: true});
if (!$state.includes('**.instanceDetails', params)) {
$state.go('.instanceDetails', params, {relative: base, inherit: true});
}
event.target.className += ' active';
event.preventDefault();
}
Expand Down

0 comments on commit 1fc14d8

Please sign in to comment.