Skip to content

Commit

Permalink
Users are linked correctly to the current documentation in the data m…
Browse files Browse the repository at this point in the history
…anager application (#653)

* Update documentation linkage and download information

* Provide default values for environment variables and description

* Fix API linkage

Co-authored-by: Tobias Koch <[email protected]>

* Provide default contact email

---------

Co-authored-by: Tobias Koch <[email protected]>
  • Loading branch information
Steffengreiner and KochTobi authored Jun 28, 2024
1 parent ce7e1d3 commit 75387a9
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* Personal Access Token Component
* <p>
* This {@link PageArea} allows the user to manage his personal access tokens. The user is able to
* view a tokens expiration date and descripton. Additionally,he is able to delete and create
* view a tokens expiration date and description. Additionally,he is able to delete and create
* personal access tokens. Only after a personal access token is created its raw text is shown to
* the user with the ability to copy it to the clipboard
*/
Expand Down Expand Up @@ -137,7 +137,7 @@ private Span generateHeader() {

private Div generateDescription() {
Anchor downloadGuideLink = new Anchor(
"https://qbicsoftware.github.io/research-data-management/download/introduction/",
"https://qbicsoftware.github.io/research-data-management/rawdata/raw_data_download_create_pat/",
"Download Guide", AnchorTarget.BLANK);
Text upperDescription = new Text(
"Personal access tokens allow you to access your own data via the API. They can be used as an alternative over basic authentication (authentication through username and password).");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ private void addTitleAndDescription() {
title.addClassNames("project-overview-title");
Span descriptionStart = new Span(
"Manage all your scientific data in one place with the Data Manager. You can access our ");
Anchor descriptionLinkToDoc = new Anchor("https://qbicsoftware.github.io/data-manager-app/",
Anchor descriptionLinkToDoc = new Anchor(
"https://qbicsoftware.github.io/research-data-management/",
"documentation", AnchorTarget.BLANK);
Span descriptionEnd = new Span(
" and learn more about using the Data Manager.\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.html.Paragraph;
import com.vaadin.flow.component.html.Span;
import com.vaadin.flow.component.tabs.TabSheet;
import com.vaadin.flow.spring.annotation.SpringComponent;
import com.vaadin.flow.spring.annotation.UIScope;
import jakarta.annotation.security.PermitAll;
Expand Down Expand Up @@ -57,22 +58,28 @@ private void initializeSections() {
Div downloadRawDataSection = generateSection("Download RAW data URLs",
"Download the file with a list of URLs corresponding to the measurement you want to download.",
generateDownloadUrlsButton);
CodeBlock codeBlock = new CodeBlock("curl", "-OJ", "-H",
TabSheet codeTabSheet = new TabSheet();
CodeBlock curlCodeBlock = new CodeBlock("curl", "-OJ", "-H",
"\"Authorization: Bearer <ACCESS_TOKEN>\"",
"<DOWNLOAD_URL>");
Div runCurlCommandSection = generateSection("Run cURL command",
"Install cURL on your system, open it and enter the following command once for each file you want to download",
codeBlock);
CodeBlock wgetCodeBlock = new CodeBlock("wget", "--content-disposition", "--trust-server-names",
"--header",
"\"Authorization: Bearer <ACCESS_TOKEN>\"",
"<DOWNLOAD_URL>");
codeTabSheet.add("curl", curlCodeBlock);
codeTabSheet.add("wget", wgetCodeBlock);
Div runCurlCommandSection = generateSection("Download Data",
"Install cURL or wGet on your system, open the command line and enter one of the following command once for each file you want to download",
codeTabSheet);
Span additionalInfoSection = generateAdditionalInformationSection();
add(generateTokenSection, downloadRawDataSection, runCurlCommandSection, additionalInfoSection);
}

private Span generateAdditionalInformationSection() {
Anchor downloadGuideLink = new Anchor(
"https://qbicsoftware.github.io/research-data-management/download/introduction/",
"https://qbicsoftware.github.io/research-data-management/rawdata/raw_data_download_run_download/",
"here", AnchorTarget.BLANK);
Text additionalInformationText = new Text(
"Learn more about how to download the datasets ");
Text additionalInformationText = new Text("Learn more about how to download the datasets ");
return new Span(additionalInformationText, downloadGuideLink);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,37 @@
{
"name": "openbis.datasource.as.url",
"type": "java.lang.String",
"description": "URL of the openbis application server containing the measurement information"
"description": "URL of the openbis application server containing the measurement information."
},
{
"name": "openbis.datasource.dss.url",
"type": "java.lang.String",
"description": "URL of the openbis datastore server containing the measurement information"
"description": "URL of the openbis datastore server containing the measurement information."
},
{
"name": "qbic.communication.data-manager.source-code.url",
"type": "java.lang.String",
"description": "URL of the repository hosting the source code for the data manager application."
},
{
"name": "qbic.communication.documentation.url",
"type": "java.lang.String",
"description": "URL of the github pages instance hosting the user documentation for the data manager application."
},
{
"name": "qbic.communication.contact.email",
"type": "java.lang.String",
"description": "Contact email address to get in touch with qbic about the data manager application."
},
{
"name": "qbic.communication.contact.subject",
"type": "java.lang.String",
"description": "Subject String for the contact email address."
},
{
"name": "qbic.communication.api.url",
"type": "java.lang.String",
"description": "URL of the repository hosting the information on how to interact with the data manager API."
}
]
}
6 changes: 3 additions & 3 deletions user-interface/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ qbic.access-token.iteration-count=${ACCESS_TOKEN_ITERATIONS:100000}
server.download.api.measurement.url=${DOWNLOAD_MEASUREMENT_API_URL:}
################## External links and contacts ###############################
qbic.communication.data-manager.source-code.url=https://github.com/qbicsoftware/data-manager-app
qbic.communication.documentation.url=${DOCUMENTATION_URL:}
qbic.communication.contact.email=${CONTACT_EMAIL:helpdesk@example.com}
qbic.communication.documentation.url=${DOCUMENTATION_URL:https://qbicsoftware.github.io/research-data-management/}
qbic.communication.contact.email=${CONTACT_EMAIL:[email protected].com}
qbic.communication.contact.subject=${CONTACT_SUBJECT:Data Management Question}
qbic.communication.api.url=${API_URL:}
qbic.communication.api.url=${API_URL:https://download.qbic.uni-tuebingen.de/swagger-ui.html}

0 comments on commit 75387a9

Please sign in to comment.