Skip to content

Commit

Permalink
SHIBUI-701 Integrated file system provider with backend
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Nov 9, 2018
1 parent cc6721d commit 98f1d5a
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class ProviderEditStepComponent implements OnDestroy {
this.changes$ = this.store.select(fromProvider.getEntityChanges);
this.provider$ = this.store.select(fromProvider.getSelectedProvider);
this.step$ = this.store.select(fromWizard.getCurrent);
this.schema$ = this.store.select(fromWizard.getParsedSchema);
this.schema$ = this.store.select(fromWizard.getSchema);

this.step$.subscribe(s => {
if (s && s.locked) {
Expand Down
50 changes: 46 additions & 4 deletions ui/src/app/metadata/provider/model/file-system.provider.form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ export const FileSystemMetadataProviderWizard: Wizard<FileSystemMetadataProvider
schema: '/api/ui/MetadataResolver/FilesystemMetadataResolver',
fields: [
'xmlId',
'metadataFile'
'metadataFile',
'doInitialization'
],
fieldsets: [
{
type: 'group-lg',
class: ['col-12'],
fields: [
'xmlId',
'metadataFile'
'metadataFile',
'doInitialization'
]
}
]
Expand Down Expand Up @@ -93,9 +95,40 @@ export const FileSystemMetadataProviderEditor: Wizard<FileSystemMetadataProvider
initialValues: [],
schema: '/api/ui/MetadataResolver/FilesystemMetadataResolver',
fields: [
'enabled',
'name',
'xmlId',
'metadataFile'
'@type',
'metadataFile',
'enabled',
'doInitialization'
],
override: {
'@type': {
type: 'string',
readOnly: true,
widget: 'string',
oneOf: [{ enum: ['FilesystemMetadataResolver'], description: 'value.file-system-metadata-provider'}]
}
},
fieldsets: [
{
type: 'section',
class: ['mb-3'],
fields: [
'name',
'@type',
'enabled'
]
},
{
type: 'group-lg',
class: ['col-12'],
fields: [
'xmlId',
'metadataFile',
'doInitialization'
]
}
]
},
{
Expand All @@ -106,6 +139,15 @@ export const FileSystemMetadataProviderEditor: Wizard<FileSystemMetadataProvider
schema: '/api/ui/MetadataResolver/FilesystemMetadataResolver',
fields: [
'reloadableMetadataResolverAttributes'
],
fieldsets: [
{
type: 'group-lg',
class: ['col-12'],
fields: [
'reloadableMetadataResolverAttributes'
]
}
]
}
]
Expand Down
1 change: 1 addition & 0 deletions ui/src/app/wizard/model/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface WizardStep {
fields?: string[];
fieldsets?: WizardFieldset[];
summary?: boolean;
override?: any;
}

export interface WizardFieldset {
Expand Down
9 changes: 9 additions & 0 deletions ui/src/app/wizard/reducer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ export const getSplitSchema = (schema: any, step: WizardStep) => {
}
};

if (step.override) {
Object.keys(step.override).forEach(key => {
let override = step.override[key];
if (s.properties.hasOwnProperty(key)) {
s.properties[key] = { ...s.properties[key], ...override };
}
});
}

if (schema.definitions) {
s.definitions = schema.definitions;
}
Expand Down

0 comments on commit 98f1d5a

Please sign in to comment.