Skip to content

Commit

Permalink
Merge pull request #49 from aodn/features/5606-update-logo-config
Browse files Browse the repository at this point in the history
Features/5606 update logo config
  • Loading branch information
vietnguyengit authored Jun 4, 2024
2 parents d25d4b3 + 37ff913 commit 2e433bc
Show file tree
Hide file tree
Showing 38 changed files with 40 additions and 67 deletions.
14 changes: 5 additions & 9 deletions geonetwork-config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,32 @@
},
{
"type": "logos",
"jsonFileName": "csiro_logo.json"
"jsonFileName": "deakin_logo.json"
},
{
"type": "logos",
"jsonFileName": "dsto_logo.json"
},
{
"type": "logos",
"jsonFileName": "ga_logo.json"
"jsonFileName": "eatlas_logo.json"
},
{
"type": "logos",
"jsonFileName": "ga_v2_logo.json"
"jsonFileName": "ga_logo.json"
},
{
"type": "logos",
"jsonFileName": "imas_colour_logo.json"
"jsonFileName": "ga_v2_logo.json"
},
{
"type": "logos",
"jsonFileName": "imas_logo.json"
"jsonFileName": "imas_colour_logo.json"
},
{
"type": "logos",
"jsonFileName": "imos_colour_logo.json"
},
{
"type": "logos",
"jsonFileName": "imos_logo.json"
},
{
"type": "logos",
"jsonFileName": "mhl_logo.json"
Expand Down
2 changes: 1 addition & 1 deletion geonetwork-config/groups/aodn.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "AODN",
"description": null,
"logo": "AODN_logo.gif",
"logo": "AODN_color_logo.gif",
"website": null,
"defaultCategory": {},
"allowedCategories": [],
Expand Down
2 changes: 1 addition & 1 deletion geonetwork-config/groups/imos.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"logo": "IMOS_logo.gif",
"logo": "IMOS_colour_logo.gif",
"website": null,
"defaultCategory": null,
"allowedCategories": [],
Expand Down
2 changes: 1 addition & 1 deletion geonetwork-config/harvesters/imos-catalogue.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"password": {}
},
"capabilitiesUrl": "https://catalogue-imos.aodn.org.au/geonetwork/srv/eng/csw?request=GetCapabilities&service=CSW&version=2.0.2",
"icon": "IMOS_logo.gif",
"icon": "IMOS_color_logo.gif",
"rejectDuplicateResource": "false",
"hopCount": "2",
"xpathFilter": {},
Expand Down
2 changes: 1 addition & 1 deletion geonetwork-config/harvesters/imos.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"site": {
"name": "IMOS (currently doesn't exclude harvested content)",
"uuid": "a83c5159-61cf-40e5-b47a-b6215a738f30",
"icon": "IMOS_logo.gif",
"icon": "IMOS_color_logo.gif",
"account": {
"use": "false",
"username": {},
Expand Down
Binary file added geonetwork-config/logos/AODN_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonetwork-config/logos/CDU_logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonetwork-config/logos/CSIRO_colour_logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonetwork-config/logos/IMAS_colour_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonetwork-config/logos/IMOS_colour_logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonetwork-config/logos/NCI_logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonetwork-config/logos/NIWA_logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonetwork-config/logos/NSW_GOV_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonetwork-config/logos/UWA_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonetwork-config/logos/aad_color_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion geonetwork-config/logos/aad_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "aad_logo",
"image": "AAD_logo.gif",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/AAD_logo.gif"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/aad_color_logo.png"
}
4 changes: 2 additions & 2 deletions geonetwork-config/logos/aodn_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "aodn_logo",
"image": "AODN_logo.gif",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/AODN_logo.gif"
"image": "AODN_color_logo.gif",
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/AODN_logo.png"
}
2 changes: 1 addition & 1 deletion geonetwork-config/logos/cdu_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "cdu_logo",
"image": "CDU_logo.gif",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/CDU_logo.gif"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/CDU_logo.gif"
}
2 changes: 1 addition & 1 deletion geonetwork-config/logos/csiro_colour_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "csiro_colour_logo",
"image": "CSIRO_colour_logo.gif",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/CSIRO_colour_logo.gif"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/CSIRO_colour_logo.gif"
}
5 changes: 5 additions & 0 deletions geonetwork-config/logos/deakin_logo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": "deakin_logo",
"image": "Deakin_logo.gif",
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/deakin_logo.png"
}
Binary file added geonetwork-config/logos/deakin_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added geonetwork-config/logos/eatlas_color_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions geonetwork-config/logos/eatlas_logo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": "eatlas_logo",
"image": "EAtlas_color_logo.gif",
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/eatlas_color_logo.png"
}
2 changes: 1 addition & 1 deletion geonetwork-config/logos/imas_colour_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "imas_colour_logo",
"image": "IMAS_colour_logo.png",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/IMAS_colour_logo.png"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/IMAS_colour_logo.png"
}
5 changes: 0 additions & 5 deletions geonetwork-config/logos/imas_logo.json

This file was deleted.

2 changes: 1 addition & 1 deletion geonetwork-config/logos/imos_colour_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "imos_colour_logo",
"image": "IMOS_colour_logo.gif",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/IMOS_colour_logo.gif"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/IMOS_colour_logo.gif"
}
5 changes: 0 additions & 5 deletions geonetwork-config/logos/imos_logo.json

This file was deleted.

Binary file added geonetwork-config/logos/marvlis.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion geonetwork-config/logos/nci_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "nci_logo",
"image": "NCI_logo.gif",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/NCI_logo.gif"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/NCI_logo.gif"
}
2 changes: 1 addition & 1 deletion geonetwork-config/logos/niwa_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "niwa_logo",
"image": "NIWA_logo.gif",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/NIWA_logo.gif"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/NIWA_logo.gif"
}
2 changes: 1 addition & 1 deletion geonetwork-config/logos/nsw_gov_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "nsw_gov_logo",
"image": "NSW_GOV_logo.gif",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/NSW_GOV_logo.gif"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/NSW_GOV_logo.png"
}
Binary file added geonetwork-config/logos/ran_logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion geonetwork-config/logos/ran_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "ran_logo",
"image": "RAN_logo.gif",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/RAN_logo.gif"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/ran_logo.gif"
}
2 changes: 1 addition & 1 deletion geonetwork-config/logos/uwa_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "uwa_logo",
"image": "UWA_logo.png",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/UWA_logo.png"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/UWA_logo.png"
}
Binary file added geonetwork-config/logos/wamsi_logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion geonetwork-config/logos/wamsi_logo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "wamsi_logo",
"image": "WAMSI_logo.gif",
"link": "https://content.aodn.org.au/Documents/Images/Logos/AODN_Partner/WAMSI_logo.gif"
"link": "https://raw.githubusercontent.com/aodn/geonetwork4-build/{git_branch}/geonetwork-config/logos/wamsi_logo.gif"
}
34 changes: 4 additions & 30 deletions geonetwork/src/main/java/au/org/aodn/geonetwork4/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,39 +68,12 @@ public class Config {
@Value("${aodn.geonetwork4.env:DEV}")
protected Environment environment;

@Value("${aodn.geonetwork4.githubBranch}")
protected String gitBranch;

@Autowired
protected GenericEntityListener genericEntityListener;

// /**
// * Geonetwork set root logger to OFF for most log4j2 profile, hence you miss most of the information,
// * this make it super hard to debug. The code here is to turn the ROOT logger back to INFO. It will be,
// * logger dependent and by default log goes to FILE appender only.
// */
// protected void resetLoggerLevel(Level level) {
// LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
// org.apache.logging.log4j.core.config.Configuration config = ctx.getConfiguration();
//
// AppenderRef file = AppenderRef.createAppenderRef("File", level, null);
// AppenderRef console = AppenderRef.createAppenderRef("Console", level, null);
//
// LoggerConfig c = LoggerConfig.newBuilder()
// .withLevel(level)
// .withRefs(new AppenderRef[] {file, console})
// .withLoggerName("au.org.aodn")
// .withIncludeLocation("au.org.aodn")
// .withAdditivity(false)
// .withConfig(config)
// .build();
//
// c.addAppender(config.getAppender("File"), level, null);
// c.addAppender(config.getAppender("Console"), level, null);
//
// config.addLogger("au.org.aodn", c);
// // LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
// // loggerConfig.setLevel(Level.INFO);
// ctx.updateLoggers();
// }

/**
* Use aspectJ to intercept all call that ends with WithHttpInfo, we must always use geonetwork api call
* ends with WithHttpInfo because the way geonetworks works is you must present an X-XSRF-TOKEN and session
Expand Down Expand Up @@ -137,6 +110,7 @@ public ResponseEntity<?> aroundAdvice(ProceedingJoinPoint joinPoint) throws Thro
@PostConstruct
public void init() throws NoSuchAlgorithmException, KeyManagementException {
logger.info("AODN - Done set logger info");
logger.info("Using git branch {} for setup", gitBranch);

/*
* No need to do host verfication, this should apply to dev env only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class GitRemoteConfig implements RemoteConfig {
protected ObjectMapper objectMapper = new ObjectMapper();

public static final String ACTIVE_PROFILE_PARAM = "{active_profile}";
public static final String GIT_BRANCH = "{git_branch}";

public GitRemoteConfig(RestTemplate template, String activeProfile, String githubBranch) {
this.restTemplate = template;
Expand Down Expand Up @@ -54,7 +55,9 @@ public List<String> readJson(List<RemoteConfigValue> filenames) {
ResponseEntity<String> content = restTemplate.getForEntity(url, String.class);

if (content.getStatusCode().is2xxSuccessful()) {
return content.getBody();
return content.getBody() != null ?
content.getBody().replace(GIT_BRANCH, githubBranch) :
null;
}
else {
logger.info("Config file not found {}", n.getJsonFileName());
Expand Down

0 comments on commit 2e433bc

Please sign in to comment.