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

Update download control options #10264

Merged
merged 1 commit into from
Jul 12, 2023
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 @@ -1262,4 +1262,20 @@ public static String getReferenceGenomeName() {
public static String getOncoKbToken() {
return portalProperties.getProperty(ONCOKB_TOKEN, null);
}

public static String getDownloadControl() {
String downloadControlOption = getProperty("skin.hide_download_controls");
/*
skin.hide_download_controls return_value
true hide
false show
data data
null/empty show
*/
switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
case "true" : return "hide";
case "data" : return "data";
default: return "show";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,9 @@ Below you can find the complete list of all the available skin properties.
</tr>
<tr>
<td>skin.hide_download_controls</td>
<td>removes all download and copy-to-clipboard options.</td>
<td>show</td>
<td>
string. "show" enables all download and copy-to-clipboard options. "data" disables data download but keeps figure and top-level data. "hide" disables all the download and copy-to-keyboard options.
</td>
<td>controls download options in UI. **true**: hides all download options. **false**: shows all download options. **data**: disable data download but not figure download</td>
<td>false</td>
<td>true / false / data</td>
</tr>
<tr>
<td>skin.show_settings_menu</td>
Expand Down
3 changes: 2 additions & 1 deletion portal/src/main/webapp/config_service.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@
"skin.patient_view.copy_number_table.columns.show_on_init",
"skin.patient_view.structural_variant_table.columns.show_on_init",
"comparison.categorical_na_values",
"skin.hide_download_controls",
"study_download_url",
"skin.home_page.show_reference_genome"
};
Expand Down Expand Up @@ -203,6 +202,8 @@
obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));

obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));

obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());

out.println(obj.toJSONString());

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/portal.properties.EXAMPLE
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ skin.study_view.link_text=To build your own case set, try out our enhanced Study
# skin.home_page.show_reference_genome=false

## setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
# skin.hide_download_controls=show
# skin.hide_download_controls=false

## setting controlling which name should be used to display the authenticated user (email, or username)
# skin.user_display_name=email
Expand Down