Skip to content

Commit

Permalink
Add friendly name in events when installing a service (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
ihiverlet authored Jul 19, 2024
1 parent f3f8d7f commit 3647872
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public class InstallServiceEvent extends OnyxiaEvent {
private String namespace;
private String releaseName;
private String packageName;
private String friendlyName;

public String getReleaseName() {
return releaseName;
Expand All @@ -23,6 +24,14 @@ public void setPackageName(String packageName) {
this.packageName = packageName;
}

public String getFriendlyName() {
return friendlyName;
}

public void setFriendlyName(String friendlyName) {
this.friendlyName = friendlyName;
}

private String username;
private String catalogId;

Expand All @@ -33,12 +42,14 @@ public InstallServiceEvent(
String namespace,
String releaseName,
String packageName,
String catalogId) {
String catalogId,
String friendlyName) {
this.namespace = namespace;
this.releaseName = releaseName;
this.catalogId = catalogId;
this.username = username;
this.packageName = packageName;
this.friendlyName = friendlyName;
}

public String getUsername() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public SuspendResumeServiceEvent(
String packageName,
String catalogId,
boolean suspend) {
super(username, namespace, releaseName, packageName, catalogId);
super(username, namespace, releaseName, packageName, catalogId, null);
this.isSuspend = suspend;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ public Collection<Object> installApp(
namespaceId,
requestDTO.getName(),
pkg.getName(),
catalogId);
catalogId,
requestDTO.getFriendlyName());
onyxiaEventPublisher.publishEvent(installServiceEvent);
Map<String, String> metadata = new HashMap<>();
metadata.put("catalog", Base64Utils.base64Encode(catalogId));
Expand Down

0 comments on commit 3647872

Please sign in to comment.