From b8c96461b52fd9432d5839f5c90617350daac018 Mon Sep 17 00:00:00 2001 From: chasegawa Date: Wed, 25 Sep 2024 09:09:31 -0700 Subject: [PATCH 1/3] NOJIRA - expanding the values that can be used for att bundles --- .../controller/AttributeBundleController.java | 42 ++++++++++++++++++- gradle.properties | 2 +- .../attribute/AttributeBundleDefinition.js | 4 +- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/AttributeBundleController.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/AttributeBundleController.java index a1fc130dc..75f995d1c 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/AttributeBundleController.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/AttributeBundleController.java @@ -1,5 +1,6 @@ package edu.internet2.tier.shibboleth.admin.ui.controller; +import edu.internet2.tier.shibboleth.admin.ui.configuration.CustomPropertiesConfiguration; import edu.internet2.tier.shibboleth.admin.ui.domain.AttributeBundle; import edu.internet2.tier.shibboleth.admin.ui.exception.ObjectIdExistsException; import edu.internet2.tier.shibboleth.admin.ui.exception.PersistentEntityNotFound; @@ -21,13 +22,19 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + @RestController @RequestMapping("/api/custom/entity/bundles") @Slf4j -@Tags(value = {@Tag(name = "bundles")}) +@Tags(value = { @Tag(name = "bundles") }) public class AttributeBundleController { @Autowired AttributeBundleService attributeBundleService; + @Autowired CustomPropertiesConfiguration customPropertiesConfiguration; + @Secured("ROLE_ADMIN") @PostMapping @Transactional @@ -63,4 +70,37 @@ public ResponseEntity update(@RequestBody AttributeBundle bundle) throws Pers AttributeBundle result = attributeBundleService.updateBundle(bundle); return ResponseEntity.ok(result); } + + @GetMapping("/bundle_schema") + public ResponseEntity getBundleSchema() { + HashMap result = new HashMap<>(); + result.put("type", "object"); + result.put("required", new String[] { "name" }); + HashMap props = new HashMap<>(); + HashMap nameMap = new HashMap<>(); + nameMap.put("type", "string"); + nameMap.put("title", "label.bundle-name"); + nameMap.put("description", "tooltip.bundle-name"); + nameMap.put("minLength", 1); + nameMap.put("maxLength", 255); + props.put("name", nameMap); + HashMap attributesMap = new HashMap<>(); + attributesMap.put("type", "array"); + attributesMap.put("title", "label.attributes"); + attributesMap.put("description", "Attribute table - select the attributes you want to bundle (default unchecked)"); + attributesMap.put("uniqueItems", true); + HashMap itemsMap = new HashMap<>(); + itemsMap.put("type", "string"); + itemsMap.put("enum", getAttributeNames()); + attributesMap.put("items", itemsMap); + props.put("attributes", attributesMap); + result.put("properties", props); + return ResponseEntity.ok(result); + } + + private List getAttributeNames() { + List resultNames = new ArrayList<>(); + customPropertiesConfiguration.getAttributes().forEach(map -> resultNames.add(map.get("name"))); + return resultNames; + } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 7e1ca4702..b3ae433e3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ name=shibui group=edu.internet2.tier.shibboleth.admin.ui -version=2.0.2 +version=2.1.0-SNAPSHOT ### library versions ### ## As of 2-23-23 diff --git a/ui/src/app/metadata/domain/attribute/AttributeBundleDefinition.js b/ui/src/app/metadata/domain/attribute/AttributeBundleDefinition.js index dd5416687..7c60db1cf 100644 --- a/ui/src/app/metadata/domain/attribute/AttributeBundleDefinition.js +++ b/ui/src/app/metadata/domain/attribute/AttributeBundleDefinition.js @@ -5,7 +5,7 @@ export const AttributeBundleDefinition = { label: 'Metadata Attribute Bundle', type: '@MetadataAttributeBundle', steps: [], - schema: `${BASE_PATH}assets/schema/attribute/bundle.schema.json`, + schema: `${BASE_PATH}api/custom/entity/bundles/bundle_schema`, uiSchema: { attributes: { 'ui:widget': 'AttributeReleaseWidget' @@ -28,4 +28,4 @@ export const CustomAttributeEditor = { 'ui:disabled': true } }, AttributeBundleDefinition.uiSchema) -}; \ No newline at end of file +}; From 002234c4324d8ba7037945c52a3c0a3804989896 Mon Sep 17 00:00:00 2001 From: chasegawa Date: Thu, 26 Sep 2024 15:18:00 -0700 Subject: [PATCH 2/3] NOJIRA - handling migration of values for existing bundles --- .../MigrationTasksContextLoadedListener.java | 35 ++++ .../admin/ui/domain/AttributeBundle.java | 4 +- .../repository/AttributeBundleRepository.java | 13 ++ testbed/postgres/conf/application.yml | 192 +++++++++++++++--- 4 files changed, 211 insertions(+), 33 deletions(-) diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/MigrationTasksContextLoadedListener.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/MigrationTasksContextLoadedListener.java index 5adb815cc..427a83759 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/MigrationTasksContextLoadedListener.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/MigrationTasksContextLoadedListener.java @@ -1,5 +1,7 @@ package edu.internet2.tier.shibboleth.admin.ui.configuration; +import edu.internet2.tier.shibboleth.admin.ui.domain.BundleableAttributeType; +import edu.internet2.tier.shibboleth.admin.ui.repository.AttributeBundleRepository; import edu.internet2.tier.shibboleth.admin.ui.repository.EntityDescriptorRepository; import edu.internet2.tier.shibboleth.admin.ui.security.model.Group; import edu.internet2.tier.shibboleth.admin.ui.security.model.Ownership; @@ -13,11 +15,19 @@ import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; +import java.util.HashSet; +import java.util.Set; + /** * After the context loads, do any needed migration tasks */ @Component public class MigrationTasksContextLoadedListener implements ApplicationListener { + private static boolean attrBundleMigrated = false; + + @Autowired + private AttributeBundleRepository attributeBundleRepository; + @Autowired private EntityDescriptorRepository entityDescriptorRepository; @@ -36,8 +46,14 @@ public class MigrationTasksContextLoadedListener implements ApplicationListener< @Override public void onApplicationEvent(ContextRefreshedEvent event) { doshibui_1740_migration(); // do first + if (!attrBundleMigrated) { + doAttributeBundleMigration(); + } } + /** + * This was a long time ago - don't think we need this anymore... + */ @Transactional void doshibui_1740_migration() { groupService.ensureAdminGroupExists(); // do first @@ -62,4 +78,23 @@ void doshibui_1740_migration() { } }); } + + @Transactional + void doAttributeBundleMigration() { + attributeBundleRepository.migrateData(); + attributeBundleRepository.findAll().forEach(attrBundleEntry -> { + try { + Set names = new HashSet(); + attrBundleEntry.getAttributes().forEach(value -> { + names.add(BundleableAttributeType.values()[Integer.parseInt(value)].label()); + }); + attrBundleEntry.setAttributes(names); + attributeBundleRepository.save(attrBundleEntry); + } + catch (NumberFormatException ignore) { + } + }); + attrBundleMigrated = true; + attributeBundleRepository.clearMigratedValues(); + } } \ No newline at end of file diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/AttributeBundle.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/AttributeBundle.java index 0b11b8f21..88748fca2 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/AttributeBundle.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/AttributeBundle.java @@ -13,9 +13,9 @@ @Entity(name = "attribute_bundle_definition") @Data public class AttributeBundle { - @Column(nullable = false) + @Column(name="attribute_names", nullable = false) @ElementCollection - Set attributes = new HashSet<>(); + Set attributes = new HashSet<>(); @Column(name = "name", nullable = true) String name; diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/repository/AttributeBundleRepository.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/repository/AttributeBundleRepository.java index 0c9bc2aed..f360bde54 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/repository/AttributeBundleRepository.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/repository/AttributeBundleRepository.java @@ -2,6 +2,9 @@ import edu.internet2.tier.shibboleth.admin.ui.domain.AttributeBundle; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Optional; @@ -15,4 +18,14 @@ public interface AttributeBundleRepository extends JpaRepository findByResourceId(String resourceId); AttributeBundle save(AttributeBundle target); + + @Query(value = "INSERT INTO attribute_bundle_definition_attribute_names SELECT * FROM attribute_bundle_definition_attributes", nativeQuery = true) + @Modifying + @Transactional + void migrateData(); + + @Query(value = "DELETE FROM attribute_bundle_definition_attributes", nativeQuery = true) + @Modifying + @Transactional + void clearMigratedValues(); } \ No newline at end of file diff --git a/testbed/postgres/conf/application.yml b/testbed/postgres/conf/application.yml index b13a2ac74..c601bece1 100644 --- a/testbed/postgres/conf/application.yml +++ b/testbed/postgres/conf/application.yml @@ -50,7 +50,145 @@ custom: displayName: label.attribute-eduPersonUniqueId - name: employeeNumber displayName: label.attribute-employeeNumber - # Custom attributes + # Custom attributes + - name: SANSmail + displayName: SANSmail + - name: displayName + displayName: displayName + - name: sn + displayName: sn + - name: mail-attr + displayName: mail-attr + - name: email + displayName: email + - name: homePhone + displayName: homePhone + - name: homePostalAddress + displayName: homePostalAddress + - name: mobileNumber + displayName: mobileNumber + - name: pagerNumber + displayName: pagerNumber + - name: commonName + displayName: commonName + - name: locality + displayName: locality + - name: stateProvince + displayName: stateProvince + - name: street + displayName: street + - name: organizationName + displayName: organizationName + - name: organizationalUnit + displayName: organizationalUnit + - name: title + displayName: title + - name: postalAddress + displayName: postalAddress + - name: postalCode + displayName: postalCode + - name: telephoneNumber + displayName: telephoneNumber + - name: initials + displayName: initials + - name: muohioeduAffiliationCode + displayName: muohioeduAffiliationCode + - name: eppnMUOhio + displayName: eppnMUOhio + - name: muohioeduLocationCode + displayName: muohioeduLocationCode + - name: muohioeduPrimaryLocation + displayName: muohioeduPrimaryLocation + - name: buildingName + displayName: buildingName + - name: muohioeduDepartment + displayName: muohioeduDepartment + - name: muohioeduDepartmentCode + displayName: muohioeduDepartmentCode + - name: muohioeduDivisionCode + displayName: muohioeduDivisionCode + - name: muohioeduDivision + displayName: muohioeduDivision + - name: muohioeduCampusTelephoneNumber + displayName: muohioeduCampusTelephoneNumber + - name: eduCourseOffering + displayName: eduCourseOffering + - name: isMemberOf + displayName: isMemberOf + - name: group + displayName: group + - name: studentType + displayName: studentType + - name: campus_fyindicator + displayName: campus_fyindicator + - name: upperUID + displayName: upperUID + - name: sciquestRole + displayName: sciquestRole + - name: awsRoles + displayName: awsRoles + - name: nyansaRole + displayName: nyansaRole + - name: awsRoleSessionName + displayName: awsRoleSessionName + - name: awsSessionDuration + displayName: awsSessionDuration + - name: muohioeduMiddleName + displayName: muohioeduMiddleName + - name: BannerID + displayName: BannerID + - name: trimmedBannerID + displayName: trimmedBannerID + - name: SAML_SUBJECT + displayName: SAML_SUBJECT + - name: OPEID + displayName: OPEID + - name: stream2Role + displayName: stream2Role + - name: muohioeduPersonPrimaryAffiliation + displayName: muohioeduPersonPrimaryAffiliation + - name: muohioeduPrimaryAffiliationCode + displayName: muohioeduPrimaryAffiliationCode + - name: User.FirstName + displayName: User.FirstName + - name: User.LastName + displayName: User.LastName + - name: User.Country + displayName: User.Country + - name: eppnMUOhioScripted + displayName: eppnMUOhioScripted + - name: Gallup.Country + displayName: Gallup.Country + - name: Gallup.SANSmail + displayName: Gallup.SANSmail + - name: Gallup.nameIdentifier + displayName: Gallup.nameIdentifier + - name: Gallup.PPID + displayName: Gallup.PPID + - name: Gallup.Surname + displayName: Gallup.Surname + - name: Gallup.GivenName + displayName: Gallup.GivenName + + + # The following contains a map of relying party overrides. + # The structure of an entry is as follows: + # - name: The name of the entry. used to uniquely identify this entry. + # displayName: This will normally be the label used when displaying this override in the UI + # displayType: The type to use when displaying this option + # helpText: This is the help-icon hover-over text + # defaultValues: One or more values to be displayed as default options in the UI + # persistType: Optional. If it is necessary to persist something different than the override's display type, + # set that type here. For example, display a boolean, but persist a string. + # persistValue: Required only when persistType is used. Defines the value to be persisted. + # attributeName: This is the name of the attribute to be used in the xml. This is assumed to be a URI. + # attributeFriendlyName: This is the friendly name associated with the above attributeName. + # + # It is imperative when defining these that the displayType and persistType are known types. + # Typos or unsupported values here will result in that override being skipped! + # Supported types are as follows: boolean, integer, string, set, list + # Note that persistType doesn't have to match displayType. However, the only unmatching combination currently + # supported is a displayType of boolean and persistType of string. overrides: # Default overrides - name: signAssertion @@ -81,6 +219,7 @@ custom: persistValue: shibboleth.SecurityConfiguration.SHA1 attributeName: http://shibboleth.net/ns/profiles/securityConfiguration attributeFriendlyName: securityConfiguration + protocol: saml,oidc - name: ignoreAuthenticationMethod displayName: label.ignore-any-sp-requested-authentication-method displayType: boolean @@ -89,6 +228,7 @@ custom: persistValue: 0x1 attributeName: http://shibboleth.net/ns/profiles/disallowedFeatures attributeFriendlyName: disallowedFeatures + protocol: saml,oidc - name: omitNotBefore displayName: label.omit-not-before-condition displayType: boolean @@ -123,6 +263,7 @@ custom: - urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport attributeName: http://shibboleth.net/ns/profiles/defaultAuthenticationMethods attributeFriendlyName: defaultAuthenticationMethods + protocol: saml,oidc - name: forceAuthn displayName: label.force-authn displayType: boolean @@ -135,13 +276,17 @@ custom: helpText: tooltip.ignore-request-signatures attributeName: http://shibboleth.net/ns/profiles/ignoreRequestSignatures attributeFriendlyName: ignoreRequestSignatures - - name: disallowedFeatures - attributeFriendlyName: disallowedFeatures - displayName: label.disallowedFeatures - helpText: tooltip.disallowedFeatures - displayType: string - attributeName: http://shibboleth.net/ns/profiles/disallowedFeatures - protocol: oidc + - name: postAuthenticationFlows + attributeFriendlyName: postAuthenticationFlows + displayName: label.postAuthenticationFlows + helpText: tooltip.postAuthenticationFlows + displayType: selection_list + defaultValues: + - attribute-release + - expiring-password + - terms-of-use + attributeName: http://shibboleth.net/ns/profiles/postAuthenticationFlows" + protocol: saml,oidc - name: inboundInterceptorFlows attributeFriendlyName: inboundInterceptorFlows displayName: label.inboundInterceptorFlows @@ -156,14 +301,6 @@ custom: displayType: string attributeName: http://shibboleth.net/ns/profiles/outboundInterceptorFlows protocol: oidc - - name: securityConfiguration - attributeFriendlyName: securityConfiguration - displayName: label.securityConfiguration - helpText: tooltip.securityConfiguration - displayType: string - defaultValue: shibboleth.DefaultSecurityConfiguration - attributeName: http://shibboleth.net/ns/profiles/securityConfiguration - protocol: oidc - name: tokenEndpointAuthMethods attributeFriendlyName: tokenEndpointAuthMethods displayName: label.tokenEndpointAuthMethods @@ -172,20 +309,13 @@ custom: defaultValue: client_secret_basic, client_secret_post, client_secret_jwt, private_key_jwt attributeName: http://shibboleth.net/ns/profiles/tokenEndpointAuthMethods protocol: oidc - - name: defaultAuthenticationMethods - attributeFriendlyName: defaultAuthenticationMethods - displayName: label.defaultAuthenticationMethods - helpText: tooltip.defaultAuthenticationMethods - displayType: string - attributeName: http://shibboleth.net/ns/profiles/defaultAuthenticationMethods - protocol: oidc - - name: postAuthenticationFlows - attributeFriendlyName: postAuthenticationFlows - displayName: label.postAuthenticationFlows - helpText: tooltip.postAuthenticationFlows - displayType: string - attributeName: http://shibboleth.net/ns/profiles/postAuthenticationFlows - protocol: oidc + # - name: postAuthenticationFlows + # attributeFriendlyName: postAuthenticationFlows + # displayName: label.postAuthenticationFlows + # helpText: tooltip.postAuthenticationFlows + # displayType: string + # attributeName: http://shibboleth.net/ns/profiles/postAuthenticationFlows + # protocol: oidc - name: proxyCount attributeFriendlyName: proxyCount displayName: label.proxyCount @@ -379,7 +509,7 @@ custom: - name: IDTokenLifetimeBrowser attributeFriendlyName: IDTokenLifetimeBrowser displayName: label.IDTokenLifetime.browser - helpText: tooltip.IDTokenLifetime.broswer + helpText: tooltip.IDTokenLifetime.browser displayType: string defaultValue: PT1H attributeName: http://shibboleth.net/ns/profiles/oidc/sso/browser/IDTokenLifetime From 09afabb79a0434d9a01e3d892af691bbc4ae40df Mon Sep 17 00:00:00 2001 From: chasegawa Date: Thu, 26 Sep 2024 16:57:00 -0700 Subject: [PATCH 3/3] NOJIRA - handling migration of values for existing bundles --- .../admin/ui/service/JsonSchemaBuilderService.groovy | 2 +- .../MigrationTasksContextLoadedListener.java | 4 ++-- .../admin/ui/controller/AttributeBundleController.java | 2 +- .../tier/shibboleth/admin/ui/domain/AttributeBundle.java | 2 +- .../admin/ui/service/AttributeBundleService.java | 2 +- .../domain/attribute/AttributeBundleDefinition.js | 2 +- ui/src/app/metadata/view/MetadataAttributeBundles.js | 8 ++++---- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JsonSchemaBuilderService.groovy b/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JsonSchemaBuilderService.groovy index 7be383917..e596d7710 100644 --- a/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JsonSchemaBuilderService.groovy +++ b/backend/src/main/groovy/edu/internet2/tier/shibboleth/admin/ui/service/JsonSchemaBuilderService.groovy @@ -25,7 +25,7 @@ class JsonSchemaBuilderService { List result = new ArrayList<>() List resultNames = new ArrayList<>() attributeBundleService.findAll().forEach({ bundle -> - result.add(bundle.getAttributes()) + result.add(bundle.getAttributeNames()) resultNames.add(bundle.getName()) }) diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/MigrationTasksContextLoadedListener.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/MigrationTasksContextLoadedListener.java index 427a83759..3f4abaeb7 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/MigrationTasksContextLoadedListener.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/MigrationTasksContextLoadedListener.java @@ -85,10 +85,10 @@ void doAttributeBundleMigration() { attributeBundleRepository.findAll().forEach(attrBundleEntry -> { try { Set names = new HashSet(); - attrBundleEntry.getAttributes().forEach(value -> { + attrBundleEntry.getAttributeNames().forEach(value -> { names.add(BundleableAttributeType.values()[Integer.parseInt(value)].label()); }); - attrBundleEntry.setAttributes(names); + attrBundleEntry.setAttributeNames(names); attributeBundleRepository.save(attrBundleEntry); } catch (NumberFormatException ignore) { diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/AttributeBundleController.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/AttributeBundleController.java index 75f995d1c..406d0532b 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/AttributeBundleController.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/controller/AttributeBundleController.java @@ -93,7 +93,7 @@ public ResponseEntity getBundleSchema() { itemsMap.put("type", "string"); itemsMap.put("enum", getAttributeNames()); attributesMap.put("items", itemsMap); - props.put("attributes", attributesMap); + props.put("attributeNames", attributesMap); result.put("properties", props); return ResponseEntity.ok(result); } diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/AttributeBundle.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/AttributeBundle.java index 88748fca2..009a75455 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/AttributeBundle.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/domain/AttributeBundle.java @@ -15,7 +15,7 @@ public class AttributeBundle { @Column(name="attribute_names", nullable = false) @ElementCollection - Set attributes = new HashSet<>(); + Set attributeNames = new HashSet<>(); @Column(name = "name", nullable = true) String name; diff --git a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/AttributeBundleService.java b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/AttributeBundleService.java index 9b5fe243b..207cad763 100644 --- a/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/AttributeBundleService.java +++ b/backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/service/AttributeBundleService.java @@ -40,7 +40,7 @@ public AttributeBundle updateBundle(AttributeBundle bundle) throws PersistentEnt } AttributeBundle bundleToUpdate = dbBundle.get(); bundleToUpdate.setName(bundle.getName()); - bundleToUpdate.setAttributes(bundle.getAttributes()); + bundleToUpdate.setAttributeNames(bundle.getAttributeNames()); return attributeBundleRepository.save(bundleToUpdate); } diff --git a/ui/src/app/metadata/domain/attribute/AttributeBundleDefinition.js b/ui/src/app/metadata/domain/attribute/AttributeBundleDefinition.js index 7c60db1cf..18b76a7de 100644 --- a/ui/src/app/metadata/domain/attribute/AttributeBundleDefinition.js +++ b/ui/src/app/metadata/domain/attribute/AttributeBundleDefinition.js @@ -7,7 +7,7 @@ export const AttributeBundleDefinition = { steps: [], schema: `${BASE_PATH}api/custom/entity/bundles/bundle_schema`, uiSchema: { - attributes: { + attributeNames: { 'ui:widget': 'AttributeReleaseWidget' } }, diff --git a/ui/src/app/metadata/view/MetadataAttributeBundles.js b/ui/src/app/metadata/view/MetadataAttributeBundles.js index b0e805e19..abe10bf0c 100644 --- a/ui/src/app/metadata/view/MetadataAttributeBundles.js +++ b/ui/src/app/metadata/view/MetadataAttributeBundles.js @@ -18,7 +18,7 @@ export function MetadataAttributeBundles() { {(load, find, create, update, remove, loading) => - {(bundles, reload) => + {(bundles, reload) =>
@@ -49,7 +49,7 @@ export function MetadataAttributeBundles() { {bundles.map((bundle, i) => { bundle.name } - + @@ -71,7 +71,7 @@ export function MetadataAttributeBundles() {
- + } @@ -79,4 +79,4 @@ export function MetadataAttributeBundles() { }
); -} \ No newline at end of file +}