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 Jun 9, 2017
1 parent 3786fb7 commit dd2579d
Showing 1 changed file with 10 additions and 2 deletions.
Expand Up @@ -206,13 +206,21 @@ export class ConfigurationComponent implements OnInit, AfterViewInit {
.reduce((sum, providers) => sum + providers.length, 0);
}

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 dd2579d

Please sign in to comment.