diff --git a/backend/src/main/resources/metadata-sources-ui-schema.json b/backend/src/main/resources/metadata-sources-ui-schema.json index 3f002253a..9d64e75b4 100644 --- a/backend/src/main/resources/metadata-sources-ui-schema.json +++ b/backend/src/main/resources/metadata-sources-ui-schema.json @@ -310,6 +310,7 @@ }, "attributeRelease": { "type": "array", + "title": "label.attribute-release", "description": "Attribute release table - select the attributes you want to release (default unchecked)", "widget": { "id": "checklist", diff --git a/ui/src/app/metadata/configuration/action/configuration.action.ts b/ui/src/app/metadata/configuration/action/configuration.action.ts index 42d1dddaa..6c71b61a6 100644 --- a/ui/src/app/metadata/configuration/action/configuration.action.ts +++ b/ui/src/app/metadata/configuration/action/configuration.action.ts @@ -8,6 +8,10 @@ export enum ConfigurationActionTypes { LOAD_METADATA_SUCCESS = '[Metadata Configuration] Load Metadata Success', LOAD_METADATA_ERROR = '[Metadata Configuration] Load Metadata Error', + LOAD_SCHEMA_REQUEST = '[Metadata Configuration] Load Schema Request', + LOAD_SCHEMA_SUCCESS = '[Metadata Configuration] Load Schema Success', + LOAD_SCHEMA_ERROR = '[Metadata Configuration] Load Schema Error', + SET_METADATA = '[Metadata Configuration] Set Metadata Model', SET_DEFINITION = '[Metadata Configuration] Set Metadata Definition', SET_SCHEMA = '[Metadata Configuration] Set Metadata Schema', @@ -32,6 +36,24 @@ export class LoadMetadataError implements Action { constructor(public payload: any) { } } +export class LoadSchemaRequest implements Action { + readonly type = ConfigurationActionTypes.LOAD_SCHEMA_REQUEST; + + constructor(public payload: string) { } +} + +export class LoadSchemaSuccess implements Action { + readonly type = ConfigurationActionTypes.LOAD_SCHEMA_SUCCESS; + + constructor(public payload: Schema) { } +} + +export class LoadSchemaError implements Action { + readonly type = ConfigurationActionTypes.LOAD_SCHEMA_ERROR; + + constructor(public payload: any) { } +} + export class SetMetadata implements Action { readonly type = ConfigurationActionTypes.SET_METADATA; @@ -55,6 +77,12 @@ export class ClearConfiguration implements Action { } export type ConfigurationActionsUnion = + | LoadMetadataRequest + | LoadMetadataSuccess + | LoadMetadataError + | LoadSchemaRequest + | LoadSchemaSuccess + | LoadSchemaError | SetMetadata | SetDefinition | SetSchema diff --git a/ui/src/app/metadata/configuration/component/array-property.component.html b/ui/src/app/metadata/configuration/component/array-property.component.html new file mode 100644 index 000000000..ee177445e --- /dev/null +++ b/ui/src/app/metadata/configuration/component/array-property.component.html @@ -0,0 +1,51 @@ +
+ +
{{ property.name }}
+
+
+
+
+ {{ i + 1 }}.  + {{ property.items.properties[prop].title }} +
+
+ {{ value[prop] }} +
+
+
+
+
+ + + + + + + + +
+ {{ attr.label }} +
+ + true + + + false + +
+
+
+
+
+ +
+ {{ property.name }} +

+ +
+
\ No newline at end of file diff --git a/ui/src/app/metadata/configuration/component/array-property.component.ts b/ui/src/app/metadata/configuration/component/array-property.component.ts new file mode 100644 index 000000000..77c8fcab0 --- /dev/null +++ b/ui/src/app/metadata/configuration/component/array-property.component.ts @@ -0,0 +1,36 @@ +import { Component, Input } from '@angular/core'; +import { Property } from '../../domain/model/property'; +import { Observable, of } from 'rxjs'; +import { AttributesService } from '../../domain/service/attributes.service'; +import { ConfigurationPropertyComponent } from './configuration-property.component'; + +@Component({ + selector: 'array-property', + templateUrl: './array-property.component.html', + styleUrls: [] +}) + +export class ArrayPropertyComponent extends ConfigurationPropertyComponent { + @Input() property: Property; + + constructor( + private attrService: AttributesService + ) { + super(); + } + + getKeys(schema): string[] { + return Object.keys(schema.properties); + } + + get attributeList$(): Observable<{ key: string, label: string }[]> { + if (this.property.widget && this.property.widget.hasOwnProperty('data')) { + return of(this.property.widget.data); + } + if (this.property.widget && this.property.widget.hasOwnProperty('dataUrl')) { + return this.attrService.query(this.property.widget.dataUrl); + } + return of([]); + } +} + diff --git a/ui/src/app/metadata/configuration/component/configuration-property.component.html b/ui/src/app/metadata/configuration/component/configuration-property.component.html new file mode 100644 index 000000000..e69de29bb diff --git a/ui/src/app/metadata/configuration/component/configuration-property.component.ts b/ui/src/app/metadata/configuration/component/configuration-property.component.ts new file mode 100644 index 000000000..91e97e87b --- /dev/null +++ b/ui/src/app/metadata/configuration/component/configuration-property.component.ts @@ -0,0 +1,19 @@ +import { Component, Input } from '@angular/core'; +import { Property } from '../../domain/model/property'; + +@Component({ + selector: 'configuration-property', + templateUrl: './configuration-property.component.html', + styleUrls: [] +}) + +export class ConfigurationPropertyComponent { + @Input() property: Property; + + constructor() { } + + getItemType(items: Property): string { + return items.widget ? items.widget.id : 'default'; + } +} + diff --git a/ui/src/app/metadata/configuration/component/metadata-configuration.component.html b/ui/src/app/metadata/configuration/component/metadata-configuration.component.html index f2034d06b..30e133525 100644 --- a/ui/src/app/metadata/configuration/component/metadata-configuration.component.html +++ b/ui/src/app/metadata/configuration/component/metadata-configuration.component.html @@ -1,10 +1,23 @@ -
-
-
- {{ i + 1 }}: {{ section.label }} - - {{ prop | json }} - -
-
-
\ No newline at end of file +
+
+
+
+

+ 0{{ i + 1 }} + {{ section.label | translate }} +

+ +
+
+ Option + Value +
+ +
+
+
diff --git a/ui/src/app/metadata/configuration/component/metadata-configuration.component.ts b/ui/src/app/metadata/configuration/component/metadata-configuration.component.ts index 578b7abd3..6b3089f78 100644 --- a/ui/src/app/metadata/configuration/component/metadata-configuration.component.ts +++ b/ui/src/app/metadata/configuration/component/metadata-configuration.component.ts @@ -1,7 +1,7 @@ import { Component, ChangeDetectionStrategy, Input } from '@angular/core'; -import { WizardStep } from '../../../wizard/model'; -import Section from '../model/section'; import { MetadataConfiguration } from '../model/metadata-configuration'; +import { Property } from '../../domain/model/property'; +import Section from '../model/section'; @Component({ selector: 'metadata-configuration', @@ -13,4 +13,8 @@ export class MetadataConfigurationComponent { @Input() configuration: MetadataConfiguration; constructor() { } + + edit(section: Section): void { + console.log(section); + } } diff --git a/ui/src/app/metadata/configuration/component/object-property.component.html b/ui/src/app/metadata/configuration/component/object-property.component.html new file mode 100644 index 000000000..b0aa7b967 --- /dev/null +++ b/ui/src/app/metadata/configuration/component/object-property.component.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ui/src/app/metadata/configuration/component/object-property.component.ts b/ui/src/app/metadata/configuration/component/object-property.component.ts new file mode 100644 index 000000000..db107da92 --- /dev/null +++ b/ui/src/app/metadata/configuration/component/object-property.component.ts @@ -0,0 +1,26 @@ +import { Component, Input } from '@angular/core'; +import { Property } from '../../domain/model/property'; +import { ConfigurationPropertyComponent } from './configuration-property.component'; + +@Component({ + selector: 'object-property', + templateUrl: './object-property.component.html', + styleUrls: [] +}) + +export class ObjectPropertyComponent extends ConfigurationPropertyComponent { + @Input() property: Property; + + constructor() { + super(); + } + + getKeys(schema): string[] { + return Object.keys(schema.properties); + } + + getItemType(items: Property): string { + return items.widget ? items.widget.id : 'default'; + } +} + diff --git a/ui/src/app/metadata/configuration/component/primitive-property.component.html b/ui/src/app/metadata/configuration/component/primitive-property.component.html new file mode 100644 index 000000000..9eef2181f --- /dev/null +++ b/ui/src/app/metadata/configuration/component/primitive-property.component.html @@ -0,0 +1,5 @@ +
+ {{ property.name }} + {{ property.value || property.value === false ? property.value : '-' }} +
\ No newline at end of file diff --git a/ui/src/app/metadata/configuration/component/primitive-property.component.ts b/ui/src/app/metadata/configuration/component/primitive-property.component.ts new file mode 100644 index 000000000..951d2c72a --- /dev/null +++ b/ui/src/app/metadata/configuration/component/primitive-property.component.ts @@ -0,0 +1,15 @@ +import { Component, Input } from '@angular/core'; +import { ConfigurationPropertyComponent } from './configuration-property.component'; + +@Component({ + selector: 'primitive-property', + templateUrl: './primitive-property.component.html', + styleUrls: [] +}) + +export class PrimitivePropertyComponent extends ConfigurationPropertyComponent { + constructor() { + super(); + } +} + diff --git a/ui/src/app/metadata/configuration/configuration.module.ts b/ui/src/app/metadata/configuration/configuration.module.ts index c04ab7add..eb69b14af 100644 --- a/ui/src/app/metadata/configuration/configuration.module.ts +++ b/ui/src/app/metadata/configuration/configuration.module.ts @@ -3,22 +3,36 @@ import { CommonModule } from '@angular/common'; import { StoreModule } from '@ngrx/store'; import { EffectsModule } from '@ngrx/effects'; +import { NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap'; + import { I18nModule } from '../../i18n/i18n.module'; import { MetadataConfigurationComponent } from './component/metadata-configuration.component'; import { ConfigurationComponent } from './container/configuration.component'; import { MetadataConfigurationService } from './service/configuration.service'; import * as fromConfig from './reducer'; import { MetadataConfigurationEffects } from './effect/configuration.effect'; +import { ConfigurationPropertyComponent } from './component/configuration-property.component'; +import { DomainModule } from '../domain/domain.module'; +import { PrimitivePropertyComponent } from './component/primitive-property.component'; +import { ObjectPropertyComponent } from './component/object-property.component'; +import { ArrayPropertyComponent } from './component/array-property.component'; +import { RouterModule } from '@angular/router'; @NgModule({ declarations: [ MetadataConfigurationComponent, + ConfigurationPropertyComponent, + PrimitivePropertyComponent, + ObjectPropertyComponent, + ArrayPropertyComponent, ConfigurationComponent ], entryComponents: [], imports: [ CommonModule, - I18nModule + I18nModule, + NgbPopoverModule, + RouterModule ], exports: [], providers: [] diff --git a/ui/src/app/metadata/configuration/container/configuration.component.html b/ui/src/app/metadata/configuration/container/configuration.component.html index 21e8a3311..1e9f67486 100644 --- a/ui/src/app/metadata/configuration/container/configuration.component.html +++ b/ui/src/app/metadata/configuration/container/configuration.component.html @@ -11,7 +11,7 @@
- +
\ No newline at end of file diff --git a/ui/src/app/metadata/configuration/container/configuration.component.ts b/ui/src/app/metadata/configuration/container/configuration.component.ts index 3c47e0b93..eb52f60ba 100644 --- a/ui/src/app/metadata/configuration/container/configuration.component.ts +++ b/ui/src/app/metadata/configuration/container/configuration.component.ts @@ -24,7 +24,7 @@ export class ConfigurationComponent implements OnDestroy { private store: Store, private routerState: ActivatedRoute ) { - this.configuration$ = this.store.select(fromConfiguration.getConfigurationColumns); + this.configuration$ = this.store.select(fromConfiguration.getConfigurationSections); this.routerState.params.pipe( takeUntil(this.ngUnsubscribe), @@ -32,8 +32,6 @@ export class ConfigurationComponent implements OnDestroy { ).subscribe(store); this.configuration$.subscribe(c => console.log(c)); - - // this.resolver$ = this.store.select(fromResolvers.getSelectedResolver).pipe(skipWhile(p => !p)); } ngOnDestroy() { diff --git a/ui/src/app/metadata/configuration/effect/configuration.effect.ts b/ui/src/app/metadata/configuration/effect/configuration.effect.ts index b3c8f0515..ef86d13fd 100644 --- a/ui/src/app/metadata/configuration/effect/configuration.effect.ts +++ b/ui/src/app/metadata/configuration/effect/configuration.effect.ts @@ -10,7 +10,11 @@ import { LoadMetadataError, ConfigurationActionTypes, SetMetadata, - SetDefinition + SetDefinition, + LoadSchemaRequest, + LoadSchemaSuccess, + SetSchema, + LoadSchemaError } from '../action/configuration.action'; @Injectable() @@ -36,11 +40,36 @@ export class MetadataConfigurationEffects { ); @Effect() - setDefinitionOnMetadataSet$ = this.actions$.pipe( + setDefinition$ = this.actions$.pipe( ofType(ConfigurationActionTypes.SET_METADATA), map(action => new SetDefinition(this.configService.getDefinition(action.payload))) ); + @Effect() + loadSchemaOnDefinitionSet$ = this.actions$.pipe( + ofType(ConfigurationActionTypes.SET_DEFINITION), + map(action => new LoadSchemaRequest(action.payload.schema)) + ); + + @Effect() + loadSchemaData$ = this.actions$.pipe( + ofType(ConfigurationActionTypes.LOAD_SCHEMA_REQUEST), + switchMap(action => + this.configService + .loadSchema(action.payload) + .pipe( + map(schema => new LoadSchemaSuccess(schema)), + catchError(error => of(new LoadSchemaError(error))) + ) + ) + ); + + @Effect() + setSchema$ = this.actions$.pipe( + ofType(ConfigurationActionTypes.LOAD_SCHEMA_SUCCESS), + map(action => new SetSchema(action.payload)) + ); + constructor( private configService: MetadataConfigurationService, private actions$: Actions diff --git a/ui/src/app/metadata/configuration/model/metadata-configuration.ts b/ui/src/app/metadata/configuration/model/metadata-configuration.ts index 10768f14e..b8a37b85e 100644 --- a/ui/src/app/metadata/configuration/model/metadata-configuration.ts +++ b/ui/src/app/metadata/configuration/model/metadata-configuration.ts @@ -1,5 +1,5 @@ import Section from './section'; export interface MetadataConfiguration { - columns: Array
[]; + sections: Section[]; } diff --git a/ui/src/app/metadata/configuration/reducer/index.ts b/ui/src/app/metadata/configuration/reducer/index.ts index 13b5c627f..3fb2ae27d 100644 --- a/ui/src/app/metadata/configuration/reducer/index.ts +++ b/ui/src/app/metadata/configuration/reducer/index.ts @@ -29,47 +29,29 @@ export const getConfigurationModel = createSelector(getConfigurationState, fromC export const getConfigurationDefinition = createSelector(getConfigurationState, fromConfiguration.getDefinition); export const getConfigurationSchema = createSelector(getConfigurationState, fromConfiguration.getSchema); -export const mergedSchema = createSelector(getConfigurationSchema, schema => !schema ? null : Object.keys(schema).reduce((coll, key) => ({ - ...merge(coll, schema[key]) -}), {} as any)); - export const getConfigurationSectionsFn = (model, definition, schema) => !definition || !schema ? null : - definition.steps - .filter(step => step.id !== 'summary') - .map( - (step: WizardStep, num: number) => { - return ({ - id: step.id, - pageNumber: num + 1, - index: step.index, - label: step.label, - properties: utils.getStepProperties( - getSplitSchema(schema, step), - definition.formatter(model), - schema.definitions || {} - ) - }); - } - ); - -export const getConfigurationColumnsFn = sections => !sections ? null : - sections.reduce((resultArray, item, index) => { - const chunkIndex = Math.floor(index / Math.round(this.sections.length / 2)); - - if (!resultArray[chunkIndex]) { - resultArray[chunkIndex] = []; - } - - resultArray[chunkIndex].push(item); - - return resultArray; - }, []); - + ({ + sections: definition.steps + .filter(step => step.id !== 'summary') + .map( + (step: WizardStep, num: number) => { + return ({ + id: step.id, + pageNumber: num + 1, + index: step.index, + label: step.label, + properties: utils.getStepProperties( + getSplitSchema(schema, step), + definition.formatter(model), + schema.definitions || {} + ) + }); + } + ) + }); export const getConfigurationSections = createSelector( getConfigurationModel, getConfigurationDefinition, - mergedSchema, + getConfigurationSchema, getConfigurationSectionsFn ); - -export const getConfigurationColumns = createSelector(getConfigurationSections, getConfigurationColumnsFn); diff --git a/ui/src/app/metadata/configuration/service/configuration.service.ts b/ui/src/app/metadata/configuration/service/configuration.service.ts index 9ea95a79a..d7f5641d9 100644 --- a/ui/src/app/metadata/configuration/service/configuration.service.ts +++ b/ui/src/app/metadata/configuration/service/configuration.service.ts @@ -5,6 +5,7 @@ import { Metadata } from '../../domain/domain.type'; import { Wizard } from '../../../wizard/model'; import { MetadataSourceEditor } from '../../domain/model/wizards/metadata-source-editor'; import { MetadataProviderEditorTypes } from '../../provider/model'; +import { Schema } from '../model/schema'; export enum PATHS { resolver = 'EntityDescriptor', @@ -31,5 +32,9 @@ export class MetadataConfigurationService { getDefinition(model: Metadata): Wizard { return MetadataProviderEditorTypes.find(def => def.type === model['@type']) || new MetadataSourceEditor(); } + + loadSchema(path: string): Observable { + return this.http.get(path); + } } diff --git a/ui/src/app/metadata/domain/model/property.ts b/ui/src/app/metadata/domain/model/property.ts index f54829916..a792514d8 100644 --- a/ui/src/app/metadata/domain/model/property.ts +++ b/ui/src/app/metadata/domain/model/property.ts @@ -1,4 +1,5 @@ export interface Property { + title?: string; type: string; name: string; value: string[]; diff --git a/ui/src/app/metadata/domain/model/wizards/metadata-source-base.ts b/ui/src/app/metadata/domain/model/wizards/metadata-source-base.ts index 673f176c1..aab844d5e 100644 --- a/ui/src/app/metadata/domain/model/wizards/metadata-source-base.ts +++ b/ui/src/app/metadata/domain/model/wizards/metadata-source-base.ts @@ -9,6 +9,7 @@ export class MetadataSourceBase implements Wizard { label = 'Metadata Source'; type = '@MetadataProvider'; steps: WizardStep[] = []; + schema = ''; bindings = { '/securityInfo/x509CertificateAvailable': [ diff --git a/ui/src/app/metadata/domain/model/wizards/metadata-source-editor.ts b/ui/src/app/metadata/domain/model/wizards/metadata-source-editor.ts index 2c5c66a59..13136ddfc 100644 --- a/ui/src/app/metadata/domain/model/wizards/metadata-source-editor.ts +++ b/ui/src/app/metadata/domain/model/wizards/metadata-source-editor.ts @@ -3,12 +3,12 @@ import { MetadataResolver } from '../metadata-resolver'; import { MetadataSourceBase } from './metadata-source-base'; export class MetadataSourceEditor extends MetadataSourceBase implements Wizard { + schema = '/api/ui/MetadataSources'; steps: WizardStep[] = [ { index: 1, id: 'common', label: 'label.sp-org-info', - schema: '/api/ui/MetadataSources', fields: [ 'serviceProviderName', 'entityId', @@ -38,7 +38,6 @@ export class MetadataSourceEditor extends MetadataSourceBase implements Wizard { + schema = '/api/ui/MetadataSources'; steps: WizardStep[] = [ { index: 1, id: 'common', label: 'label.name-and-entity-id', - schema: '/api/ui/MetadataSources', fields: [ 'serviceProviderName', 'entityId' @@ -28,7 +28,6 @@ export class MetadataSourceWizard extends MetadataSourceBase implements Wizard = { label: 'BaseMetadataProvider', type: 'BaseMetadataResolver', + schema: '', getValidators(namesList: string[]): any { const validators = { '/': (value, property, form_current) => { diff --git a/ui/src/app/metadata/provider/model/dynamic-http.provider.form.ts b/ui/src/app/metadata/provider/model/dynamic-http.provider.form.ts index be0654dec..a0ca22143 100644 --- a/ui/src/app/metadata/provider/model/dynamic-http.provider.form.ts +++ b/ui/src/app/metadata/provider/model/dynamic-http.provider.form.ts @@ -80,13 +80,13 @@ export const DynamicHttpMetadataProviderWizard: Wizard = { ...FileBackedHttpMetadataProviderWizard, + schema: 'assets/schema/provider/filebacked-http.schema.json', steps: [ { id: 'common', label: 'label.common-attributes', index: 1, initialValues: [], - schema: 'assets/schema/provider/filebacked-http-common.editor.schema.json', fields: [ 'enabled', 'xmlId', @@ -120,7 +117,6 @@ export const FileBackedHttpMetadataProviderEditor: Wizard = { ...BaseMetadataProviderEditor, label: 'MetadataProvider', type: 'MetadataProvider', + schema: 'assets/schema/provider/metadata-provider.schema.json', steps: [ { id: 'new', label: 'label.select-metadata-provider-type', index: 1, initialValues: [], - schema: 'assets/schema/provider/metadata-provider.schema.json', fields: [ 'name', '@type' diff --git a/ui/src/app/metadata/resolver/container/resolver-edit.component.html b/ui/src/app/metadata/resolver/container/resolver-edit.component.html index bf04c16ae..88eb1946a 100644 --- a/ui/src/app/metadata/resolver/container/resolver-edit.component.html +++ b/ui/src/app/metadata/resolver/container/resolver-edit.component.html @@ -31,7 +31,8 @@   diff --git a/ui/src/app/metadata/resolver/container/resolver-edit.component.ts b/ui/src/app/metadata/resolver/container/resolver-edit.component.ts index 6161919f9..f793ef96e 100644 --- a/ui/src/app/metadata/resolver/container/resolver-edit.component.ts +++ b/ui/src/app/metadata/resolver/container/resolver-edit.component.ts @@ -56,8 +56,6 @@ export class ResolverEditComponent implements OnDestroy, CanComponentDeactivate let startIndex$ = this.route.firstChild.params.pipe(map(p => p.form)); startIndex$.pipe(takeUntil(this.ngUnsubscribe)).subscribe(index => this.store.dispatch(new SetIndex(index))); - this.index$.pipe(takeUntil(this.ngUnsubscribe)).subscribe(index => index && this.go(index)); - this.store .select(fromWizard.getCurrentWizardSchema) .pipe(filter(s => !!s)) @@ -67,10 +65,6 @@ export class ResolverEditComponent implements OnDestroy, CanComponentDeactivate this.store.select(fromResolver.getEntityChanges).subscribe(changes => this.latest = changes); } - go(index: string): void { - this.router.navigate(['./', index], { relativeTo: this.route }); - } - ngOnDestroy() { this.clear(); this.ngUnsubscribe.next(); diff --git a/ui/src/app/wizard/model/wizard.ts b/ui/src/app/wizard/model/wizard.ts index 3115ed041..5729c4f24 100644 --- a/ui/src/app/wizard/model/wizard.ts +++ b/ui/src/app/wizard/model/wizard.ts @@ -2,13 +2,13 @@ import { FormDefinition } from './form-definition'; export interface Wizard extends FormDefinition { steps: WizardStep[]; + schema: string; } export interface WizardStep { id: string; label: string; initialValues?: WizardValue[]; - schema?: string; index: number; locked?: boolean; fields?: string[]; diff --git a/ui/src/app/wizard/reducer/index.ts b/ui/src/app/wizard/reducer/index.ts index 3446f3713..4c3321c62 100644 --- a/ui/src/app/wizard/reducer/index.ts +++ b/ui/src/app/wizard/reducer/index.ts @@ -48,11 +48,7 @@ export const getWizardIsDisabled = createSelector(getState, fromWizard.getDisabl export const getWizardDefinition = createSelector(getState, fromWizard.getDefinition); export const getSchemaCollection = createSelector(getState, fromWizard.getCollection); -export const getSchemaPath = (index: string, wizard: Wizard) => { - if (!wizard) { return null; } - const step = wizard.steps.find(s => s.id === index); - return step ? step.schema : null; -}; +export const getSchemaPath = (wizard: Wizard) => wizard ? wizard.schema : null; export const getSplitSchema = (schema: any, step: WizardStep) => { if (!schema || !step.fields || !step.fields.length || !schema.properties) { @@ -93,7 +89,7 @@ export const getSplitSchema = (schema: any, step: WizardStep) => { return s; }; -export const getCurrentWizardSchema = createSelector(getWizardIndex, getWizardDefinition, getSchemaPath); +export const getCurrentWizardSchema = createSelector(getWizardDefinition, getSchemaPath); export const getPreviousFn = (index: string, wizard: Wizard) => { if (!wizard) { return null; } diff --git a/ui/src/assets/schema/provider/filebacked-http-advanced.schema.json b/ui/src/assets/schema/provider/filebacked-http-advanced.schema.json deleted file mode 100644 index 2e19da247..000000000 --- a/ui/src/assets/schema/provider/filebacked-http-advanced.schema.json +++ /dev/null @@ -1,242 +0,0 @@ -{ - "type": "object", - "title": "", - "properties": { - "httpMetadataResolverAttributes": { - "order": [], - "type": "object", - "fieldsets": [ - { - "title": "label.http-connection-attributes", - "type": "section", - "fields": [ - "connectionRequestTimeout", - "connectionTimeout", - "socketTimeout" - ] - }, - { - "title": "label.http-security-attributes", - "type": "section", - "class": "col-12", - "fields": [ - "disregardTLSCertificate" - ] - }, - { - "title": "label.http-proxy-attributes", - "type": "section", - "class": "col-12", - "fields": [ - "proxyHost", - "proxyPort", - "proxyUser", - "proxyPassword" - ] - }, - { - "title": "label.http-caching-attributes", - "type": "section", - "class": "col-12", - "fields": [ - "httpCaching", - "httpCacheDirectory", - "httpMaxCacheEntries", - "httpMaxCacheEntrySize" - ] - }, - { - "title": "", - "type": "hidden", - "class": "col-12", - "fields": [ - "tlsTrustEngineRef", - "httpClientSecurityParametersRef", - "httpClientRef" - ] - } - ], - "properties": { - "httpClientRef": { - "type": "string", - "title": "", - "description": "", - "placeholder": "", - "widget": "hidden" - }, - "connectionRequestTimeout": { - "type": "string", - "title": "label.connection-request-timeout", - "description": "tooltip.connection-request-timeout", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - }, - "connectionTimeout": { - "type": "string", - "title": "label.connection-timeout", - "description": "tooltip.connection-timeout", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - }, - "socketTimeout": { - "type": "string", - "title": "label.socket-timeout", - "description": "tooltip.socket-timeout", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - }, - "disregardTLSCertificate": { - "type": "boolean", - "title": "label.disregard-tls-cert", - "description": "tooltip.disregard-tls-cert", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "True" - }, - { - "enum": [ - false - ], - "description": "False" - } - ] - }, - "tlsTrustEngineRef": { - "type": "string", - "title": "", - "description": "", - "placeholder": "", - "widget": "hidden" - }, - "httpClientSecurityParametersRef": { - "type": "string", - "title": "", - "description": "", - "placeholder": "", - "widget": "hidden" - }, - "proxyHost": { - "type": "string", - "title": "label.proxy-host", - "description": "tooltip.proxy-host", - "placeholder": "" - }, - "proxyPort": { - "type": "string", - "title": "label.proxy-port", - "description": "tooltip.proxy-port", - "placeholder": "" - }, - "proxyUser": { - "type": "string", - "title": "label.proxy-user", - "description": "tooltip.proxy-user", - "placeholder": "" - }, - "proxyPassword": { - "type": "string", - "title": "label.proxy-password", - "description": "tooltip.proxy-password", - "placeholder": "" - }, - "httpCaching": { - "type": "string", - "title": "label.http-caching", - "description": "tooltip.http-caching", - "placeholder": "label.select-caching-type", - "widget": { - "id": "select" - }, - "oneOf": [ - { - "enum": [ - "none" - ], - "description": "value.none" - }, - { - "enum": [ - "file" - ], - "description": "value.file" - }, - { - "enum": [ - "memory" - ], - "description": "value.memory" - } - ] - }, - "httpCacheDirectory": { - "type": "string", - "title": "label.http-caching-directory", - "description": "tooltip.http-caching-directory", - "placeholder": "" - }, - "httpMaxCacheEntries": { - "type": "integer", - "title": "label.http-max-cache-entries", - "description": "tooltip.http-max-cache-entries", - "placeholder": "", - "minimum": 0 - }, - "httpMaxCacheEntrySize": { - "type": "integer", - "title": "label.max-cache-entry-size", - "description": "tooltip.max-cache-entry-size", - "placeholder": "", - "minimum": 0 - } - } - } - } -} diff --git a/ui/src/assets/schema/provider/filebacked-http-common.editor.schema.json b/ui/src/assets/schema/provider/filebacked-http-common.editor.schema.json deleted file mode 100644 index 9e1d37308..000000000 --- a/ui/src/assets/schema/provider/filebacked-http-common.editor.schema.json +++ /dev/null @@ -1,259 +0,0 @@ -{ - "type": "object", - "order": [ - "name", - "@type", - "xmlId", - "metadataURL", - "initializeFromBackupFile", - "backingFile", - "backupFileInitNextRefreshDelay", - "requireValidMetadata", - "failFastInitialization", - "useDefaultPredicateRegistry", - "satisfyAnyPredicates" - ], - "required": [ - "name", - "xmlId", - "metadataURL", - "backingFile", - "backupFileInitNextRefreshDelay" - ], - "anyOf": [ - { - "properties": { - "initializeFromBackupFile": { - "enum": [ - true - ] - } - } - }, - { - "properties": { - "initializeFromBackupFile": { - "enum": [ - false - ] - } - } - } - ], - "fieldsets": [ - { - "type": "section", - "fields": [ - "name", - "@type", - "enabled" - ] - }, - { - "type": "group-lg", - "fields": [ - "xmlId", - "metadataURL", - "initializeFromBackupFile", - "backingFile", - "backupFileInitNextRefreshDelay", - "requireValidMetadata", - "failFastInitialization", - "useDefaultPredicateRegistry", - "satisfyAnyPredicates" - ] - } - ], - "properties": { - "name": { - "title": "label.metadata-provider-name", - "description": "tooltip.metadata-provider-name", - "type": "string", - "widget": { - "id": "string", - "help": "message.must-be-unique" - } - }, - "@type": { - "title": "label.metadata-provider-type", - "description": "tooltip.metadata-provider-type", - "placeholder": "label.select-metadata-type", - "type": "string", - "readOnly": true, - "widget": { - "id": "select", - "disabled": true - }, - "oneOf": [ - { - "enum": [ - "FileBackedHttpMetadataResolver" - ], - "description": "value.file-backed-http-metadata-provider" - } - ] - }, - "enabled": { - "title": "label.enable-service", - "description": "tooltip.enable-service", - "type": "boolean", - "default": false - }, - "xmlId": { - "title": "label.xml-id", - "description": "tooltip.xml-id", - "type": "string", - "default": "", - "minLength": 1 - }, - "metadataURL": { - "title": "label.metadata-url", - "description": "tooltip.metadata-url", - "type": "string", - "default": "", - "minLength": 1 - }, - "initializeFromBackupFile": { - "title": "label.init-from-backup", - "description": "tooltip.init-from-backup", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true - }, - "backingFile": { - "title": "label.backing-file", - "description": "tooltip.backing-file", - "type": "string", - "default": "" - }, - "backupFileInitNextRefreshDelay": { - "title": "label.backup-file-init-refresh-delay", - "description": "tooltip.backup-file-init-refresh-delay", - "type": "string", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - }, - "requireValidMetadata": { - "title": "label.require-valid-metadata", - "description": "tooltip.require-valid-metadata", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true - }, - "failFastInitialization": { - "title": "label.fail-fast-init", - "description": "tooltip.fail-fast-init", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true - }, - "useDefaultPredicateRegistry": { - "title": "label.use-default-predicate-reg", - "description": "tooltip.use-default-predicate-reg", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true - }, - "satisfyAnyPredicates": { - "title": "label.satisfy-any-predicates", - "description": "tooltip.satisfy-any-predicates", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": false - } - } -} \ No newline at end of file diff --git a/ui/src/assets/schema/provider/filebacked-http-common.schema.json b/ui/src/assets/schema/provider/filebacked-http-common.schema.json deleted file mode 100644 index 5db366d07..000000000 --- a/ui/src/assets/schema/provider/filebacked-http-common.schema.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "type": "object", - "order": [ - "xmlId", - "metadataURL", - "initializeFromBackupFile", - "backingFile", - "backupFileInitNextRefreshDelay", - "requireValidMetadata", - "failFastInitialization", - "useDefaultPredicateRegistry", - "satisfyAnyPredicates" - ], - "required": ["xmlId", "metadataURL", "backingFile", "backupFileInitNextRefreshDelay"], - "properties": { - "xmlId": { - "title": "label.xml-id", - "description": "tooltip.xml-id", - "type": "string", - "default": "", - "minLength": 1 - }, - "metadataURL": { - "title": "label.metadata-url", - "description": "tooltip.metadata-url", - "type": "string", - "default": "", - "minLength": 1 - }, - "initializeFromBackupFile": { - "title": "label.init-from-backup", - "description": "tooltip.init-from-backup", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true - }, - "backingFile": { - "title": "label.backing-file", - "description": "tooltip.backing-file", - "type": "string", - "default": "" - }, - "backupFileInitNextRefreshDelay": { - "title": "label.backup-file-init-refresh-delay", - "description": "tooltip.backup-file-init-refresh-delay", - "type": "string", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - }, - "requireValidMetadata": { - "title": "label.require-valid-metadata", - "description": "tooltip.require-valid-metadata", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true - }, - "failFastInitialization": { - "title": "label.fail-fast-init", - "description": "tooltip.fail-fast-init", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true - }, - "useDefaultPredicateRegistry": { - "title": "label.use-default-predicate-reg", - "description": "tooltip.use-default-predicate-reg", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": true - }, - "satisfyAnyPredicates": { - "title": "label.satisfy-any-predicates", - "description": "tooltip.satisfy-any-predicates", - "type": "boolean", - "widget": { - "id": "boolean-radio" - }, - "oneOf": [ - { - "enum": [ - true - ], - "description": "value.true" - }, - { - "enum": [ - false - ], - "description": "value.false" - } - ], - "default": false - } - } -} diff --git a/ui/src/assets/schema/provider/filebacked-http-filters.schema.json b/ui/src/assets/schema/provider/filebacked-http-filters.schema.json deleted file mode 100644 index 820063bfa..000000000 --- a/ui/src/assets/schema/provider/filebacked-http-filters.schema.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "type": "object", - "properties": { - "metadataFilters": { - "title": "", - "description": "", - "type": "object", - "properties": { - "RequiredValidUntil": { - "title": "label.required-valid-until", - "type": "object", - "widget": { - "id": "fieldset" - }, - "properties": { - "maxValidityInterval": { - "title": "label.max-validity-interval", - "description": "tooltip.max-validity-interval", - "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "P14D", - "P7D", - "P1D", - "PT12H" - ] - }, - "default": null, - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - } - } - }, - "SignatureValidation": { - "title": "label.signature-validation-filter", - "type": "object", - "widget": { - "id": "fieldset" - }, - "properties": { - "requireSignedRoot": { - "title": "label.require-signed-root", - "description": "tooltip.require-signed-root", - "type": "boolean", - "default": true - }, - "certificateFile": { - "title": "label.certificate-file", - "description": "tooltip.certificate-file", - "type": "string", - "widget": "textline" - } - }, - "anyOf": [ - { - "properties": { - "requireSignedRoot": { - "enum": [ true ] - }, - "certificateFile": { - "minLength": 1, - "type": "string" - } - }, - "required": [ - "certificateFile" - ] - }, - { - "properties": { - "requireSignedRoot": { - "enum": [ false ] - } - } - } - ] - }, - "EntityRoleWhiteList": { - "title": "label.entity-role-whitelist", - "type": "object", - "widget": { - "id": "fieldset" - }, - "properties": { - "retainedRoles": { - "title": "label.retained-roles", - "description": "tooltip.retained-roles", - "type": "array", - "items": { - "widget": { - "id": "select" - }, - "type": "string", - "oneOf": [ - { - "enum": [ - "md:SPSSODescriptor" - ], - "description": "value.spdescriptor" - }, - { - "enum": [ - "md:AttributeAuthorityDescriptor" - ], - "description": "value.attr-auth-descriptor" - } - ] - } - }, - "removeRolelessEntityDescriptors": { - "title": "label.remove-roleless-entity-descriptors", - "description": "tooltip.remove-roleless-entity-descriptors", - "type": "boolean", - "default": true - }, - "removeEmptyEntitiesDescriptors": { - "title": "label.remove-empty-entities-descriptors", - "description": "tooltip.remove-empty-entities-descriptors", - "type": "boolean", - "default": true - } - } - } - } - } - } -} diff --git a/ui/src/assets/schema/provider/filebacked-http-reloading.schema.json b/ui/src/assets/schema/provider/filebacked-http-reloading.schema.json deleted file mode 100644 index 6723e4cb1..000000000 --- a/ui/src/assets/schema/provider/filebacked-http-reloading.schema.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "type": "object", - "properties": { - "reloadableMetadataResolverAttributes": { - "type": "object", - "properties": { - "minRefreshDelay": { - "title": "label.min-refresh-delay", - "description": "tooltip.min-refresh-delay", - "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - }, - "maxRefreshDelay": { - "title": "label.max-refresh-delay", - "description": "tooltip.max-refresh-delay", - "type": "string", - "placeholder": "label.duration", - "widget": { - "id": "datalist", - "data": [ - "PT0S", - "PT30S", - "PT1M", - "PT10M", - "PT30M", - "PT1H", - "PT4H", - "PT12H", - "PT24H" - ] - }, - "default": null, - "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" - }, - "refreshDelayFactor": { - "title": "label.refresh-delay-factor", - "description": "tooltip.refresh-delay-factor", - "type": "string", - "widget": { - "id": "string", - "help": "message.real-number" - }, - "placeholder": "label.real-number", - "minimum": 0, - "maximum": 1, - "default": "", - "pattern": "^(?:([0]*(\\.[0-9]+)?|[0]*\\.[0-9]*[1-9][0-9]*)|)$" - } - } - } - } -} diff --git a/ui/src/assets/schema/provider/filebacked-http.schema.json b/ui/src/assets/schema/provider/filebacked-http.schema.json new file mode 100644 index 000000000..f543e9e89 --- /dev/null +++ b/ui/src/assets/schema/provider/filebacked-http.schema.json @@ -0,0 +1,686 @@ +{ + "type": "object", + "order": [ + "name", + "@type", + "xmlId", + "metadataURL", + "initializeFromBackupFile", + "backingFile", + "backupFileInitNextRefreshDelay", + "requireValidMetadata", + "failFastInitialization", + "useDefaultPredicateRegistry", + "satisfyAnyPredicates" + ], + "required": [ + "name", + "xmlId", + "metadataURL", + "backingFile", + "backupFileInitNextRefreshDelay" + ], + "anyOf": [ + { + "properties": { + "initializeFromBackupFile": { + "enum": [ + true + ] + } + } + }, + { + "properties": { + "initializeFromBackupFile": { + "enum": [ + false + ] + } + } + } + ], + "fieldsets": [ + { + "type": "section", + "fields": [ + "name", + "@type", + "enabled" + ] + }, + { + "type": "group-lg", + "fields": [ + "xmlId", + "metadataURL", + "initializeFromBackupFile", + "backingFile", + "backupFileInitNextRefreshDelay", + "requireValidMetadata", + "failFastInitialization", + "useDefaultPredicateRegistry", + "satisfyAnyPredicates" + ] + } + ], + "properties": { + "name": { + "title": "label.metadata-provider-name", + "description": "tooltip.metadata-provider-name", + "type": "string", + "widget": { + "id": "string", + "help": "message.must-be-unique" + } + }, + "@type": { + "title": "label.metadata-provider-type", + "description": "tooltip.metadata-provider-type", + "placeholder": "label.select-metadata-type", + "type": "string", + "readOnly": true, + "widget": { + "id": "select", + "disabled": true + }, + "oneOf": [ + { + "enum": [ + "FileBackedHttpMetadataResolver" + ], + "description": "value.file-backed-http-metadata-provider" + } + ] + }, + "enabled": { + "title": "label.enable-service", + "description": "tooltip.enable-service", + "type": "boolean", + "default": false + }, + "xmlId": { + "title": "label.xml-id", + "description": "tooltip.xml-id", + "type": "string", + "default": "", + "minLength": 1 + }, + "metadataURL": { + "title": "label.metadata-url", + "description": "tooltip.metadata-url", + "type": "string", + "default": "", + "minLength": 1 + }, + "initializeFromBackupFile": { + "title": "label.init-from-backup", + "description": "tooltip.init-from-backup", + "type": "boolean", + "widget": { + "id": "boolean-radio" + }, + "oneOf": [ + { + "enum": [ + true + ], + "description": "value.true" + }, + { + "enum": [ + false + ], + "description": "value.false" + } + ], + "default": true + }, + "backingFile": { + "title": "label.backing-file", + "description": "tooltip.backing-file", + "type": "string", + "default": "" + }, + "backupFileInitNextRefreshDelay": { + "title": "label.backup-file-init-refresh-delay", + "description": "tooltip.backup-file-init-refresh-delay", + "type": "string", + "widget": { + "id": "datalist", + "data": [ + "PT0S", + "PT30S", + "PT1M", + "PT10M", + "PT30M", + "PT1H", + "PT4H", + "PT12H", + "PT24H" + ] + }, + "default": null, + "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + }, + "requireValidMetadata": { + "title": "label.require-valid-metadata", + "description": "tooltip.require-valid-metadata", + "type": "boolean", + "widget": { + "id": "boolean-radio" + }, + "oneOf": [ + { + "enum": [ + true + ], + "description": "value.true" + }, + { + "enum": [ + false + ], + "description": "value.false" + } + ], + "default": true + }, + "failFastInitialization": { + "title": "label.fail-fast-init", + "description": "tooltip.fail-fast-init", + "type": "boolean", + "widget": { + "id": "boolean-radio" + }, + "oneOf": [ + { + "enum": [ + true + ], + "description": "value.true" + }, + { + "enum": [ + false + ], + "description": "value.false" + } + ], + "default": true + }, + "useDefaultPredicateRegistry": { + "title": "label.use-default-predicate-reg", + "description": "tooltip.use-default-predicate-reg", + "type": "boolean", + "widget": { + "id": "boolean-radio" + }, + "oneOf": [ + { + "enum": [ + true + ], + "description": "value.true" + }, + { + "enum": [ + false + ], + "description": "value.false" + } + ], + "default": true + }, + "satisfyAnyPredicates": { + "title": "label.satisfy-any-predicates", + "description": "tooltip.satisfy-any-predicates", + "type": "boolean", + "widget": { + "id": "boolean-radio" + }, + "oneOf": [ + { + "enum": [ + true + ], + "description": "value.true" + }, + { + "enum": [ + false + ], + "description": "value.false" + } + ], + "default": false + }, + "httpMetadataResolverAttributes": { + "order": [], + "type": "object", + "fieldsets": [ + { + "title": "label.http-connection-attributes", + "type": "section", + "fields": [ + "connectionRequestTimeout", + "connectionTimeout", + "socketTimeout" + ] + }, + { + "title": "label.http-security-attributes", + "type": "section", + "class": "col-12", + "fields": [ + "disregardTLSCertificate" + ] + }, + { + "title": "label.http-proxy-attributes", + "type": "section", + "class": "col-12", + "fields": [ + "proxyHost", + "proxyPort", + "proxyUser", + "proxyPassword" + ] + }, + { + "title": "label.http-caching-attributes", + "type": "section", + "class": "col-12", + "fields": [ + "httpCaching", + "httpCacheDirectory", + "httpMaxCacheEntries", + "httpMaxCacheEntrySize" + ] + }, + { + "title": "", + "type": "hidden", + "class": "col-12", + "fields": [ + "tlsTrustEngineRef", + "httpClientSecurityParametersRef", + "httpClientRef" + ] + } + ], + "properties": { + "httpClientRef": { + "type": "string", + "title": "", + "description": "", + "placeholder": "", + "widget": "hidden" + }, + "connectionRequestTimeout": { + "type": "string", + "title": "label.connection-request-timeout", + "description": "tooltip.connection-request-timeout", + "placeholder": "label.duration", + "widget": { + "id": "datalist", + "data": [ + "PT0S", + "PT30S", + "PT1M", + "PT10M", + "PT30M", + "PT1H", + "PT4H", + "PT12H", + "PT24H" + ] + }, + "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + }, + "connectionTimeout": { + "type": "string", + "title": "label.connection-timeout", + "description": "tooltip.connection-timeout", + "placeholder": "label.duration", + "widget": { + "id": "datalist", + "data": [ + "PT0S", + "PT30S", + "PT1M", + "PT10M", + "PT30M", + "PT1H", + "PT4H", + "PT12H", + "PT24H" + ] + }, + "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + }, + "socketTimeout": { + "type": "string", + "title": "label.socket-timeout", + "description": "tooltip.socket-timeout", + "placeholder": "label.duration", + "widget": { + "id": "datalist", + "data": [ + "PT0S", + "PT30S", + "PT1M", + "PT10M", + "PT30M", + "PT1H", + "PT4H", + "PT12H", + "PT24H" + ] + }, + "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + }, + "disregardTLSCertificate": { + "type": "boolean", + "title": "label.disregard-tls-cert", + "description": "tooltip.disregard-tls-cert", + "widget": { + "id": "boolean-radio" + }, + "oneOf": [ + { + "enum": [ + true + ], + "description": "True" + }, + { + "enum": [ + false + ], + "description": "False" + } + ] + }, + "tlsTrustEngineRef": { + "type": "string", + "title": "", + "description": "", + "placeholder": "", + "widget": "hidden" + }, + "httpClientSecurityParametersRef": { + "type": "string", + "title": "", + "description": "", + "placeholder": "", + "widget": "hidden" + }, + "proxyHost": { + "type": "string", + "title": "label.proxy-host", + "description": "tooltip.proxy-host", + "placeholder": "" + }, + "proxyPort": { + "type": "string", + "title": "label.proxy-port", + "description": "tooltip.proxy-port", + "placeholder": "" + }, + "proxyUser": { + "type": "string", + "title": "label.proxy-user", + "description": "tooltip.proxy-user", + "placeholder": "" + }, + "proxyPassword": { + "type": "string", + "title": "label.proxy-password", + "description": "tooltip.proxy-password", + "placeholder": "" + }, + "httpCaching": { + "type": "string", + "title": "label.http-caching", + "description": "tooltip.http-caching", + "placeholder": "label.select-caching-type", + "widget": { + "id": "select" + }, + "oneOf": [ + { + "enum": [ + "none" + ], + "description": "value.none" + }, + { + "enum": [ + "file" + ], + "description": "value.file" + }, + { + "enum": [ + "memory" + ], + "description": "value.memory" + } + ] + }, + "httpCacheDirectory": { + "type": "string", + "title": "label.http-caching-directory", + "description": "tooltip.http-caching-directory", + "placeholder": "" + }, + "httpMaxCacheEntries": { + "type": "integer", + "title": "label.http-max-cache-entries", + "description": "tooltip.http-max-cache-entries", + "placeholder": "", + "minimum": 0 + }, + "httpMaxCacheEntrySize": { + "type": "integer", + "title": "label.max-cache-entry-size", + "description": "tooltip.max-cache-entry-size", + "placeholder": "", + "minimum": 0 + } + } + }, + "reloadableMetadataResolverAttributes": { + "type": "object", + "properties": { + "minRefreshDelay": { + "title": "label.min-refresh-delay", + "description": "tooltip.min-refresh-delay", + "type": "string", + "placeholder": "label.duration", + "widget": { + "id": "datalist", + "data": [ + "PT0S", + "PT30S", + "PT1M", + "PT10M", + "PT30M", + "PT1H", + "PT4H", + "PT12H", + "PT24H" + ] + }, + "default": null, + "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + }, + "maxRefreshDelay": { + "title": "label.max-refresh-delay", + "description": "tooltip.max-refresh-delay", + "type": "string", + "placeholder": "label.duration", + "widget": { + "id": "datalist", + "data": [ + "PT0S", + "PT30S", + "PT1M", + "PT10M", + "PT30M", + "PT1H", + "PT4H", + "PT12H", + "PT24H" + ] + }, + "default": null, + "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + }, + "refreshDelayFactor": { + "title": "label.refresh-delay-factor", + "description": "tooltip.refresh-delay-factor", + "type": "string", + "widget": { + "id": "string", + "help": "message.real-number" + }, + "placeholder": "label.real-number", + "minimum": 0, + "maximum": 1, + "default": "", + "pattern": "^(?:([0]*(\\.[0-9]+)?|[0]*\\.[0-9]*[1-9][0-9]*)|)$" + } + } + }, + "metadataFilters": { + "title": "", + "description": "", + "type": "object", + "properties": { + "RequiredValidUntil": { + "title": "label.required-valid-until", + "type": "object", + "widget": { + "id": "fieldset" + }, + "properties": { + "maxValidityInterval": { + "title": "label.max-validity-interval", + "description": "tooltip.max-validity-interval", + "type": "string", + "placeholder": "label.duration", + "widget": { + "id": "datalist", + "data": [ + "PT0S", + "P14D", + "P7D", + "P1D", + "PT12H" + ] + }, + "default": null, + "pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" + } + } + }, + "SignatureValidation": { + "title": "label.signature-validation-filter", + "type": "object", + "widget": { + "id": "fieldset" + }, + "properties": { + "requireSignedRoot": { + "title": "label.require-signed-root", + "description": "tooltip.require-signed-root", + "type": "boolean", + "default": true + }, + "certificateFile": { + "title": "label.certificate-file", + "description": "tooltip.certificate-file", + "type": "string", + "widget": "textline" + } + }, + "anyOf": [ + { + "properties": { + "requireSignedRoot": { + "enum": [ + true + ] + }, + "certificateFile": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "certificateFile" + ] + }, + { + "properties": { + "requireSignedRoot": { + "enum": [ + false + ] + } + } + } + ] + }, + "EntityRoleWhiteList": { + "title": "label.entity-role-whitelist", + "type": "object", + "widget": { + "id": "fieldset" + }, + "properties": { + "retainedRoles": { + "title": "label.retained-roles", + "description": "tooltip.retained-roles", + "type": "array", + "items": { + "widget": { + "id": "select" + }, + "type": "string", + "oneOf": [ + { + "enum": [ + "md:SPSSODescriptor" + ], + "description": "value.spdescriptor" + }, + { + "enum": [ + "md:AttributeAuthorityDescriptor" + ], + "description": "value.attr-auth-descriptor" + } + ] + } + }, + "removeRolelessEntityDescriptors": { + "title": "label.remove-roleless-entity-descriptors", + "description": "tooltip.remove-roleless-entity-descriptors", + "type": "boolean", + "default": true + }, + "removeEmptyEntitiesDescriptors": { + "title": "label.remove-empty-entities-descriptors", + "description": "tooltip.remove-empty-entities-descriptors", + "type": "boolean", + "default": true + } + } + } + } + } + } +} \ No newline at end of file diff --git a/ui/src/styles.scss b/ui/src/styles.scss index 454ccba2e..a3f814d8a 100644 --- a/ui/src/styles.scss +++ b/ui/src/styles.scss @@ -6,6 +6,7 @@ @import './theme/alert'; @import './theme/typography'; @import './theme/list'; +@import './theme/utility'; body { background-color: theme-color("light"); diff --git a/ui/src/theme/utility.scss b/ui/src/theme/utility.scss new file mode 100644 index 000000000..f6c3c0e9e --- /dev/null +++ b/ui/src/theme/utility.scss @@ -0,0 +1,7 @@ +.border-2 { + border-width: 2px !important; +} + +.bg-lighter { + background: #FAFAFA !important; +} \ No newline at end of file