Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,13 @@ private static ApplicableChange checkForCreateTopic(TopicMetadata topic, String

ChangeBase createChange = ChangeBase.createTopic(topic, createParams);
if (topic.getType() != TopicType.INTERNAL) {
List<ChangeBase> 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;
Expand Down Expand Up @@ -237,7 +242,6 @@ private static List<ApplicableChange> checkForTopicChanges(TopicMetadata oldTopi

toBeDeletedIds
.forEach(producerId -> result.add(ChangeBase.removeTopicProducer(newTopic.getName(), producerId)));

}

return result;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/layout/staging/staging.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h2 class="text-muted">{{ 'Staging' }}</h2>
<li *ngFor="let result of stagingResult" [class.text-danger]="!result.stagingSuccessful" [class.text-success]="result.stagingSuccessful">
<span *ngIf="!result.stagingSuccessful" class="me-3"><i class="fas fa-times"></i></span>
<span *ngIf="result.stagingSuccessful" class="me-3"><i class="fas fa-check"></i></span>
<span [innerHTML]="stagingText(result.change)"></span>
<span [innerHTML]="stagingText(result.change, true)"></span>
<span *ngIf="!result.stagingSuccessful">
<br>
<span style="font-size: smaller">{{ result.errorMessage }}</span>
Expand Down
5 changes: 4 additions & 1 deletion ui/src/app/layout/staging/staging.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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 });
Expand Down
3 changes: 2 additions & 1 deletion ui/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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))"
}

4 changes: 2 additions & 2 deletions ui/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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))"
}