Skip to content

Commit

Permalink
SHIBUI-701 Integrated with endpoints for schema
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Nov 9, 2018
1 parent 68846b3 commit fdb2ad9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const FileSystemMetadataProviderEditor: Wizard<FileSystemMetadataProvider
label: 'label.common-attributes',
index: 1,
initialValues: [],
schema: 'assets/schema/provider/filebacked-http-common.editor.schema.json',
schema: '/api/ui/MetadataResolver/FilesystemMetadataResolver',
fields: [
'enabled',
'xmlId',
Expand All @@ -103,7 +103,7 @@ export const FileSystemMetadataProviderEditor: Wizard<FileSystemMetadataProvider
label: 'label.reloading-attributes',
index: 2,
initialValues: [],
schema: 'assets/schema/provider/filebacked-http-reloading.schema.json',
schema: '/api/ui/MetadataResolver/FilesystemMetadataResolver',
fields: [
'reloadableMetadataResolverAttributes'
]
Expand Down
3 changes: 2 additions & 1 deletion ui/src/app/schema-form/widget/select/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, AfterViewInit } from '@angular/core';

import { SelectWidget } from 'ngx-schema-form';
import { SchemaService } from '../../service/schema.service';
import { map } from 'rxjs/operators';
import { map, shareReplay } from 'rxjs/operators';

@Component({
selector: 'select-component',
Expand Down Expand Up @@ -30,6 +30,7 @@ export class CustomSelectComponent extends SelectWidget implements AfterViewInit
this.options$ = this.widgetService
.get(this.schema.widget.dataUrl)
.pipe(
shareReplay(),
map(opts =>
opts.map(opt =>
({ label: opt.replace('Resolver', 'Provider'), value: opt })
Expand Down

0 comments on commit fdb2ad9

Please sign in to comment.