Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to choose which type of image to show in changelog #166

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
@@ -1,5 +1,6 @@
package com.hermesworld.ais.galapagos.changes.config;

import com.hermesworld.ais.galapagos.uisupport.controller.ProfilePicture;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependency violation: A "config" package (or, the "changes" "module") should not be dependent on "uisupport" package. Please move ProfilePicture here, in this Config package.

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
Expand All @@ -12,4 +13,6 @@
public class GalapagosChangesConfig {
private int entries;
private int minDays;
private ProfilePicture profilePicture;
private ProfilePicture defaultPicture;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.hermesworld.ais.galapagos.uisupport.controller;

public enum ProfilePicture {
OUTLOOK, GRAVTAR, INITIALS, NONE
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ public UiConfigDto getUiConfig() {
result.setCustomLinks(customLinksConfig.getLinks());
result.setChangelogEntries(changesConfig.getEntries());
result.setChangelogMinDays(changesConfig.getMinDays());
result.setDefaultPicture(changesConfig.getDefaultPicture());
result.setProfilePicture(changesConfig.getProfilePicture());
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ public class UiConfigDto {

private int changelogMinDays;

private ProfilePicture profilePicture;

private ProfilePicture defaultPicture;

}
6 changes: 6 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ galapagos.kafka.metadataTopicsPrefix=galapagos.internal.
galapagos.changelog.entries=10
galapagos.changelog.minDays=30

# Specify what Images to use in the Changelog Dashboard. Outlook returns no image for user with no image selected.
# So the defaultPicture Value is only relevant if you choose outlook as the option for the profile pictures.
# The Possibilities are OUTLOOK, GRAVTAR, INITIALS, NONE
galapagos.changelog.profilePicture=OUTLOOK
galapagos.changelog.defaultPicture=INITIALS

# A list of ACLs which shall be added to every application user in Kafka.
# This is useful e.g. for tools like Confluent Managed Connectors, relying on some default rights.
# permission=ALLOW and host=* is assumed for every ACL here.
Expand Down
Loading