diff --git a/ui/public/assets/schema/source/metadata-source.json b/ui/public/assets/schema/source/metadata-source.json index eaf89a5f0..0a2f6baba 100644 --- a/ui/public/assets/schema/source/metadata-source.json +++ b/ui/public/assets/schema/source/metadata-source.json @@ -22,8 +22,7 @@ "serviceEnabled": { "title": "label.enable-this-service", "description": "tooltip.enable-this-service-upon-saving", - "type": "boolean", - "default": false + "type": "boolean" }, "organization": { "$ref": "#/definitions/Organization" @@ -76,8 +75,7 @@ }, "properties": { "x509CertificateAvailable": { - "type": "boolean", - "default": true + "type": "boolean" }, "authenticationRequestsSigned": { "title": "label.authentication-requests-signed", @@ -161,11 +159,16 @@ "type": "boolean", "default": false }, - "dontSignResponse": { - "title": "label.dont-sign-the-response", - "description": "tooltip.dont-sign-response", - "type": "boolean", - "default": false + "nameIdFormats": { + "$ref": "#/definitions/nameIdFormats" + }, + "responderId": { + "title": "label.responder-id", + "description": "tooltip.responder-id", + "type": "string" + }, + "authenticationMethods": { + "$ref": "#/definitions/authenticationMethods" }, "turnOffEncryption": { "title": "label.turn-off-encryption-of-response", @@ -173,9 +176,15 @@ "type": "boolean", "default": false }, - "useSha": { - "title": "label.use-sha1-signing-algorithm", - "description": "tooltip.usa-sha-algorithm", + "forceAuthn": { + "title": "label.force-authn", + "description": "tooltip.force-authn", + "type": "boolean", + "default": false + }, + "dontSignResponse": { + "title": "label.dont-sign-the-response", + "description": "tooltip.dont-sign-response", "type": "boolean", "default": false }, @@ -185,27 +194,15 @@ "type": "boolean", "default": false }, - "omitNotBefore": { - "title": "label.omit-not-before-condition", - "description": "tooltip.omit-not-before-condition", + "useSha": { + "title": "label.use-sha1-signing-algorithm", + "description": "tooltip.usa-sha-algorithm", "type": "boolean", "default": false }, - "responderId": { - "title": "label.responder-id", - "description": "tooltip.responder-id", - "type": "string", - "default": "" - }, - "nameIdFormats": { - "$ref": "#/definitions/nameIdFormats" - }, - "authenticationMethods": { - "$ref": "#/definitions/authenticationMethods" - }, - "forceAuthn": { - "title": "label.force-authn", - "description": "tooltip.force-authn", + "omitNotBefore": { + "title": "label.omit-not-before-condition", + "description": "tooltip.omit-not-before-condition", "type": "boolean", "default": false } @@ -218,8 +215,19 @@ "items": { "type": "string", "enum": [ + [ + "givenName", + "eduPersonAffiliation", + "eduPersonScopedAffiliation", + "employeeNumber" + ], + [ + "uid", + "surname", + "eduPersonAffiliation", + "employeeNumber" + ], "eduPersonPrincipalName", - {"name": "foo", "attributes": []}, "uid", "mail", "surname", @@ -231,6 +239,10 @@ "eduPersonAssurance", "eduPersonUniqueId", "employeeNumber" + ], + "enumNames": [ + "Bundle 1", + "Bundle 2" ] }, "uniqueItems": true diff --git a/ui/src/app/dashboard/view/SourcesTab.js b/ui/src/app/dashboard/view/SourcesTab.js index e69198fb6..36cdc1bdf 100644 --- a/ui/src/app/dashboard/view/SourcesTab.js +++ b/ui/src/app/dashboard/view/SourcesTab.js @@ -59,7 +59,7 @@ export function SourcesTab () { {(enable, remove) => remove(id, loadSources)} onEnable={(s, e) => enable(s, e, loadSources) } onChangeGroup={changeSourceGroup} /> diff --git a/ui/src/app/form/component/widgets/AttributeReleaseWidget.js b/ui/src/app/form/component/widgets/AttributeReleaseWidget.js index 9ff995e59..8483f7931 100644 --- a/ui/src/app/form/component/widgets/AttributeReleaseWidget.js +++ b/ui/src/app/form/component/widgets/AttributeReleaseWidget.js @@ -4,6 +4,7 @@ import Translate from "../../../i18n/components/translate"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCheck, faTimes } from "@fortawesome/free-solid-svg-icons"; import Button from 'react-bootstrap/Button'; +import { useTranslator } from "../../../i18n/hooks"; const selectValue = (value, selected, all) => { const at = all.indexOf(value); @@ -59,6 +60,17 @@ const AttributeReleaseWidget = ({ onChange(update); } + + const onCheckBundle = (option) => { + const all = (enumOptions).map(({ value }) => value); + let update = [ + ...value + ]; + (option.value).forEach(v => update = selectValue(v, update, all)); + + onChange(update); + } + const onClearAll = () => { onChange([]); } @@ -78,11 +90,21 @@ const AttributeReleaseWidget = ({ const checked = value.indexOf(option.value) !== -1; const itemDisabled = enumDisabled && (enumDisabled).indexOf(option.value) !== -1; + const bundled = typeof option.value === 'string' ? false : true; return ( - - + + {bundled ? + {option.label} + : + {option.label} + }
+ {bundled ? + + :
+ }
diff --git a/ui/src/app/metadata/domain/source/definition/SourceDefinition.js b/ui/src/app/metadata/domain/source/definition/SourceDefinition.js index 6f7276255..c650a1f95 100644 --- a/ui/src/app/metadata/domain/source/definition/SourceDefinition.js +++ b/ui/src/app/metadata/domain/source/definition/SourceDefinition.js @@ -10,7 +10,8 @@ export const SourceBase = { label: 'Metadata Source', type: '@MetadataProvider', steps: [], - schema: `${API_BASE_PATH}/ui/MetadataSources`, + //schema: `${API_BASE_PATH}/ui/MetadataSources`, + schema: `/assets/schema/source/metadata-source.json`, parser: (data) => removeNull(data, true), diff --git a/ui/src/app/metadata/wizard/Wizard.js b/ui/src/app/metadata/wizard/Wizard.js index cc52249fe..644c911a4 100644 --- a/ui/src/app/metadata/wizard/Wizard.js +++ b/ui/src/app/metadata/wizard/Wizard.js @@ -6,7 +6,7 @@ const WizardContext = React.createContext(); const { Provider, Consumer } = WizardContext; const initialState = { - current: 'common', + current: 'attribute', disabled: false, loading: false };