Skip to content

Commit

Permalink
add :ComputeUrl config option and use in Compute button #3747
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Apr 28, 2017
1 parent 037eb0e commit 374abce
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions doc/sphinx-guides/source/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -603,3 +603,10 @@ or
Dataverse calculates checksums for uploaded files so that users can determine if their file was corrupted via upload or download. This is sometimes called "file fixity": https://en.wikipedia.org/wiki/File_Fixity

The default checksum algorithm used is MD5 and should be sufficient for establishing file fixity. "SHA-1" is an experimental alternate value for this setting.

:ComputeBaseUrl
+++++++++++++++

Set the base URL for the "Compute" button for a dataset.

``curl -X PUT -d 'https://giji.massopencloud.org/application/dataverse/jobs?containerName=' http://localhost:8080/api/admin/settings/:ComputeBaseUrl``
4 changes: 4 additions & 0 deletions src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ public Boolean isSwiftStorage(){
}
return swiftBool;
}

public String getComputeUrl() {
return settingsService.getValueForKey(SettingsServiceBean.Key.ComputeBaseUrl) + getSwiftContainerName();
}

public DataFile getSelectedDownloadFile() {
return selectedDownloadFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class SettingsServiceBean {
* So there.
*/
public enum Key {
ComputeBaseUrl,
IdentifierGenerationStyle,
OAuth2CallbackUrl,
DefaultAuthProvider,
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/filesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<span class="glyphicon #{DatasetPage.locked ? 'glyphicon-ban-circle' : 'glyphicon-plus'}"/> <h:outputText id="uploadFile-s-Link" value="#{bundle['file.uploadFiles']}"/>
</h:outputLink>
<!-- COMPUTE BUTTON -->
<h:outputLink value="" type="button" class="btn btn-default" rendered="#{DatasetPage.isSwiftStorage()}"><span class="glyphicon glyphicon-flash"/> #{bundle['file.compute']}
<h:outputLink value="#{DatasetPage.computeUrl}" type="button" class="btn btn-default" rendered="#{DatasetPage.isSwiftStorage()}"><span class="glyphicon glyphicon-flash"/> #{bundle['file.compute']}
</h:outputLink>

</div>
Expand Down

0 comments on commit 374abce

Please sign in to comment.