From b40710e3280d92d2d69b4d781051b5b833f8c76c Mon Sep 17 00:00:00 2001 From: Timo Notheisen <65653426+tnotheis@users.noreply.github.com> Date: Wed, 29 May 2024 10:59:47 +0200 Subject: [PATCH] Admin UI: Tier quotas don't show up after changing the tier of an identity (#678) * fix: give TierOfIdentityChangedDomainEvent a unique id * chore: fix namespace * chore: give DatawalletModifiedDomainEvent a descriptive id * chore: copy default value for subscriptionClientName to helm values --- .../DatawalletModifiedDomainEventHandler.cs | 1 + .../src/Devices.Application/Extensions/IEventBusExtensions.cs | 1 + .../DatawalletModifiedDomainEvent.cs | 3 +-- .../DomainEvents/Outgoing/TierOfIdentityChangedDomainEvent.cs | 2 +- .../DomainEvents/Outgoing/DatawalletModifiedDomainEvent.cs | 2 +- helm/values.yaml | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEventHandler.cs b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEventHandler.cs index 44a9e62739..02e2b784f1 100644 --- a/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEventHandler.cs +++ b/Modules/Devices/src/Devices.Application/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEventHandler.cs @@ -1,6 +1,7 @@ using Backbone.BuildingBlocks.Application.Abstractions.Infrastructure.EventBus; using Backbone.BuildingBlocks.Application.PushNotifications; using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Datawallet; +using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.DatawalletModificationCreated; namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.DatawalletModificationCreated; diff --git a/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs b/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs index 30cc40a00e..20ecccc02c 100644 --- a/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs +++ b/Modules/Devices/src/Devices.Application/Extensions/IEventBusExtensions.cs @@ -2,6 +2,7 @@ using Backbone.Modules.Devices.Application.DomainEvents.Incoming.DatawalletModificationCreated; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.ExternalEventCreated; using Backbone.Modules.Devices.Application.DomainEvents.Incoming.IdentityDeletionProcessStarted; +using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.DatawalletModificationCreated; using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.ExternalEventCreated; using Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEvent.cs index d717cd27f6..6afe3c4f08 100644 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEvent.cs +++ b/Modules/Devices/src/Devices.Domain/DomainEvents/Incoming/DatawalletModificationCreated/DatawalletModifiedDomainEvent.cs @@ -1,8 +1,7 @@ -using Backbone.BuildingBlocks.Domain; using Backbone.BuildingBlocks.Domain.Events; using Backbone.DevelopmentKit.Identity.ValueObjects; -namespace Backbone.Modules.Devices.Application.DomainEvents.Incoming.DatawalletModificationCreated; +namespace Backbone.Modules.Devices.Domain.DomainEvents.Incoming.DatawalletModificationCreated; public class DatawalletModifiedDomainEvent : DomainEvent { diff --git a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierOfIdentityChangedDomainEvent.cs b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierOfIdentityChangedDomainEvent.cs index 08be9bd64b..af4d61489b 100644 --- a/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierOfIdentityChangedDomainEvent.cs +++ b/Modules/Devices/src/Devices.Domain/DomainEvents/Outgoing/TierOfIdentityChangedDomainEvent.cs @@ -6,7 +6,7 @@ namespace Backbone.Modules.Devices.Domain.DomainEvents.Outgoing; public class TierOfIdentityChangedDomainEvent : DomainEvent { - public TierOfIdentityChangedDomainEvent(Identity identity, TierId oldTierIdId, TierId newTierIdId) : base($"{identity.Address}/TierOfIdentityChanged") + public TierOfIdentityChangedDomainEvent(Identity identity, TierId oldTierIdId, TierId newTierIdId) : base($"{identity.Address}/TierOfIdentityChanged/{Guid.NewGuid()}") { OldTierId = oldTierIdId; NewTierId = newTierIdId; diff --git a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/DatawalletModifiedDomainEvent.cs b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/DatawalletModifiedDomainEvent.cs index 6ef968504f..43435320e1 100644 --- a/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/DatawalletModifiedDomainEvent.cs +++ b/Modules/Synchronization/src/Synchronization.Domain/DomainEvents/Outgoing/DatawalletModifiedDomainEvent.cs @@ -5,7 +5,7 @@ namespace Backbone.Modules.Synchronization.Domain.DomainEvents.Outgoing; public class DatawalletModifiedDomainEvent : DomainEvent { - public DatawalletModifiedDomainEvent(IdentityAddress identity, DeviceId modifiedByDevice) : base(Guid.NewGuid().ToString()) + public DatawalletModifiedDomainEvent(IdentityAddress identity, DeviceId modifiedByDevice) : base($"{identity}/Datawallet/Modified/{Guid.NewGuid()}") { Identity = identity; ModifiedByDevice = modifiedByDevice; diff --git a/helm/values.yaml b/helm/values.yaml index 320a782c50..3775b66e9b 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -502,7 +502,7 @@ global: # connectionInfo - only applicable if Vendor is "RabbitMQ"; the host name of the RabbitMQ service; the connection string of the Azure Service Bus if Vendor is "Azure"; if Vendor is "GoogleCloud" this is not used connectionInfo: "" # subscriptionClientName - the name of the subscription that should be used to receive events - subscriptionClientName: "" + subscriptionClientName: "consumerapi" # rabbitMQUsername - only applicable if Vendor is "RabbitMQ"; should be set via environment variable rabbitMQUsername: "" # rabbitMQPassword - only applicable if Vendor is "RabbitMQ"; should be set via environment variable