diff --git a/src/main/java/com/hermesworld/ais/galapagos/staging/impl/StagingImpl.java b/src/main/java/com/hermesworld/ais/galapagos/staging/impl/StagingImpl.java index 4827d746..8f76e1a2 100644 --- a/src/main/java/com/hermesworld/ais/galapagos/staging/impl/StagingImpl.java +++ b/src/main/java/com/hermesworld/ais/galapagos/staging/impl/StagingImpl.java @@ -190,8 +190,13 @@ private static ApplicableChange checkForCreateTopic(TopicMetadata topic, String ChangeBase createChange = ChangeBase.createTopic(topic, createParams); if (topic.getType() != TopicType.INTERNAL) { + List additionalChanges = new ArrayList<>(); ChangeBase firstSchemaChange = ChangeBase.publishTopicSchemaVersion(topic.getName(), firstSchema); - return ChangeBase.compoundChange(createChange, List.of(firstSchemaChange)); + additionalChanges.add(firstSchemaChange); + for (String producer : topic.getProducers()) { + additionalChanges.add(ChangeBase.addTopicProducer(topic.getName(), producer)); + } + return ChangeBase.compoundChange(createChange, additionalChanges); } return createChange; @@ -237,7 +242,6 @@ private static List checkForTopicChanges(TopicMetadata oldTopi toBeDeletedIds .forEach(producerId -> result.add(ChangeBase.removeTopicProducer(newTopic.getName(), producerId))); - } return result; diff --git a/ui/src/app/layout/staging/staging.component.html b/ui/src/app/layout/staging/staging.component.html index 4d7ceb86..97dbac01 100644 --- a/ui/src/app/layout/staging/staging.component.html +++ b/ui/src/app/layout/staging/staging.component.html @@ -82,7 +82,7 @@

{{ 'Staging' }}

  • - +
    {{ result.errorMessage }} diff --git a/ui/src/app/layout/staging/staging.component.ts b/ui/src/app/layout/staging/staging.component.ts index 57a4ae7a..437a7030 100644 --- a/ui/src/app/layout/staging/staging.component.ts +++ b/ui/src/app/layout/staging/staging.component.ts @@ -123,7 +123,7 @@ export class StagingComponent implements OnInit { }); } - stagingText(change: any): string { + stagingText(change: any, isResult: boolean = false): string { const changeType = change.changeType; switch (changeType) { @@ -158,6 +158,9 @@ export class StagingComponent implements OnInit { return this.translate.instant('TOPIC_SUBSCRIPTION_APPROVAL_REQUIRED_FLAG_UPDATED_STAGING', { topicName: change.topicMetadata.name }); case 'COMPOUND_CHANGE': + if (isResult && change.additionalChanges && change.additionalChanges.length) { + return this.stagingText(change.mainChange) + this.translate.instant('COMPOUND_CHANGE_COUNT', { count: change.additionalChanges.length }); + } return this.stagingText(change.mainChange); } return this.translate.instant('OTHER_CHANGE_STAGING', { changeType: changeType }); diff --git a/ui/src/assets/i18n/de.json b/ui/src/assets/i18n/de.json index 69ead5e5..7eeef088 100644 --- a/ui/src/assets/i18n/de.json +++ b/ui/src/assets/i18n/de.json @@ -301,6 +301,7 @@ "APP_SUBSCRIPTION_CANNOT_BE_REVOKED": "Der Anwendung konnten die Rechte für dieses Topic nicht entzogen werden.", "APP_SUCCESSFUL_TOPIC_APPROVED": "Die Anwendung wurde erfolgreich für dieses Topic freigegeben.", "APP_TOPIC_APPROVED_FAILED": "Die Anwendung konnte nicht für dieses Topic freigegeben werden'", - "INVALID_APP_TOOLTIP": "Diese Anwendung sollte nicht mehr verwendet werden." + "INVALID_APP_TOOLTIP": "Diese Anwendung sollte nicht mehr verwendet werden.", + "COMPOUND_CHANGE_COUNT": " (und {{count}} weitere Aktion(en))" } diff --git a/ui/src/assets/i18n/en.json b/ui/src/assets/i18n/en.json index a3bb2b38..67ed59c7 100644 --- a/ui/src/assets/i18n/en.json +++ b/ui/src/assets/i18n/en.json @@ -208,6 +208,6 @@ "APP_SUBSCRIPTION_CANNOT_BE_REVOKED": "The application's rights for this topic could not be revoked.", "APP_SUCCESSFUL_TOPIC_APPROVED": "The application was successfully approved for this topic.", "APP_TOPIC_APPROVED_FAILED": "The application could not be approved for this topic", - "INVALID_APP_TOOLTIP": "This application should no longer be used." + "INVALID_APP_TOOLTIP": "This application should no longer be used.", + "COMPOUND_CHANGE_COUNT": " (and {{count}} more action(s))" } -