Skip to content

Commit

Permalink
add config param to customize single vs multi oncokb icons
Browse files Browse the repository at this point in the history
  • Loading branch information
onursumer committed Jan 3, 2022
1 parent 8fee85e commit 3dee607
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public class GlobalProperties {
public static final String STUDY_VIEW_MDACC_HEATMAP_META_URL = "mdacc.heatmap.study.meta.url";

public static final String SHOW_ONCOKB = "show.oncokb";
public static final String MERGE_ONCOKB_ICONS_BY_DEFAULT = "oncokb.merge_icons_by_default";
public static final String ONCOKB_TOKEN = "oncokb.token";

private static String sessionServiceURL;
Expand Down Expand Up @@ -902,6 +903,15 @@ public static boolean showOncoKB() {
}
}

public static boolean mergeOncoKBIcons() {
String mergeOncoKbIconsByDefault = portalProperties.getProperty(MERGE_ONCOKB_ICONS_BY_DEFAULT);
if (mergeOncoKbIconsByDefault == null || mergeOncoKbIconsByDefault.isEmpty()) {
return true; // merge OncoKB icons by default
} else {
return Boolean.parseBoolean(mergeOncoKbIconsByDefault);
}
}

public static boolean showHotspot() {
String hotspot = portalProperties.getProperty(SHOW_HOTSPOT);
if (hotspot==null) {
Expand Down
1 change: 1 addition & 0 deletions portal/src/main/webapp/config_service.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"oncoprint.hide_vus.default",
"mycancergenome.show",
"oncokb.public_api.url",
"oncokb.merge_icons_by_default",
"digitalslidearchive.iframe.url",
"digitalslidearchive.meta.url",
"mdacc.heatmap.meta.url",
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/portal.properties.EXAMPLE
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ oncokb.public_api.url=https://public.api.oncokb.org/api/v1
# Your OncoKB Token which an be found under https://www.oncokb.org/account/settings
oncokb.token=

# Enable merging of OncoKB icons by default
# oncokb.merge_icons_by_default=true

# Enable Chang's hotspot list (true, false)
show.hotspot=true
Expand Down

0 comments on commit 3dee607

Please sign in to comment.