Skip to content

Commit

Permalink
Show only MigrationRules phase rules
Browse files Browse the repository at this point in the history
In rules configuration form, show only migration rules.

#close WINDUP-1382
  • Loading branch information
klinki committed Aug 15, 2017
1 parent a0c34e8 commit 0501f7d
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,21 @@ export class ConfigurationComponent implements OnInit, AfterViewInit {
this.filter = Object.assign({}, this.filter);
}

getRuleProvidersByPath(path: RulesPath) {
getOnlyMigrationRules(path: RulesPath) {
const ruleProviders = this.ruleProvidersByPath.get(path) || [];

return ruleProviders.filter(provider => {
return provider.phase === 'MIGRATIONRULESPHASE';
});
}

getRuleProvidersByPath(path: RulesPath) {
const ruleProviders = this.getOnlyMigrationRules(path);
return this._sortingService.sort(ruleProviders);
}

getFilteredRuleProvidersByPath(path: RulesPath) {
let filteredRuleProviders = this.ruleProvidersByPath.get(path) || [];
let filteredRuleProviders = this.getOnlyMigrationRules(path);

this.filter.selectedFilters.forEach(filter => {
filteredRuleProviders = filteredRuleProviders.filter((provider) => {
Expand Down

0 comments on commit 0501f7d

Please sign in to comment.