Skip to content

Commit

Permalink
Merged in bugfix/SHIBUI-1508 (pull request #380)
Browse files Browse the repository at this point in the history
SHIBUI-1508 Fixed issues with configuration page

Approved-by: Ryan Mathis <rmathis@unicon.net>
  • Loading branch information
rmathis committed Sep 26, 2019
2 parents 7e9638c + e9ef6e2 commit 27486b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class MetadataConfigurationComponent implements OnChanges {
) {}

ngOnChanges(): void {
this.zero = this.configuration.sections.some(s => !s.properties.length);
this.zero = !this.configuration.sections.some(s => !!s.properties.length);
}

edit(id: string): void {
Expand Down
10 changes: 4 additions & 6 deletions ui/src/app/metadata/configuration/reducer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ export const assignValueToProperties = (models, properties, definition: any): an
return {
...prop,
differences,
value: models.map(model => {
return model[prop.id];
}),
value: models.map(model => model[prop.id]),
widget
};
}
Expand Down Expand Up @@ -153,7 +151,7 @@ export const getConfigurationModelEnabledFn =
(config: Metadata) => config ? ('serviceEnabled' in config) ? config.serviceEnabled : config.enabled : false;

export const getConfigurationModelNameFn =
(config: Metadata) => config ? ('serviceProviderName' in config) ? config.serviceProviderName : config.name : false;
(config: Metadata) => config ? ('serviceProviderName' in config) ? config.serviceProviderName : config.name : '';

export const getConfigurationModelTypeFn =
(config: Metadata) => config ? ('@type' in config) ? config['@type'] : 'resolver' : null;
Expand All @@ -163,8 +161,8 @@ export const isAdditionalFilter = (type) => filterPluginTypes.indexOf(type) ===

export const getVersionModelFiltersFn =
(model, kind) => kind === 'provider' ?
model.metadataFilters.filter(filter => isAdditionalFilter(filter['@type'])) :
null;
model.metadataFilters ? model.metadataFilters.filter(filter => isAdditionalFilter(filter['@type'])) :
[] : null;

// Version History

Expand Down

0 comments on commit 27486b6

Please sign in to comment.