Skip to content

Commit

Permalink
Comment the HttpRequest stuff in ProjectBrowserPortlet because it doe…
Browse files Browse the repository at this point in the history
…snt work, add csv reading component to the File Viewer in DatasetComponent, change the Port from 444 to 8081, the used port in my set up
  • Loading branch information
marcdichmann committed Aug 29, 2018
1 parent 5706a88 commit 4a82880
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public void buttonClick(ClickEvent event) {
Button header = new Button(String.format("Total number of projects: %s", numberOfProjects));
header.setIcon(FontAwesome.HAND_O_RIGHT);
header.setStyleName(ValoTheme.BUTTON_LARGE);
header.addStyleName(ValoTheme.BUTTON_BORDERLESS);
// header.addStyleName(ValoTheme.BUTTON_BORDERLESS);

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//EINGEFÜGT VON MARC
Expand All @@ -393,16 +393,17 @@ public void buttonClick(ClickEvent event) {
Button infoButton = new Button("URL");
infoButton.setStyleName(ValoTheme.BUTTON_LARGE);
infoButton.addStyleName(ValoTheme.BUTTON_BORDERLESS);
//
// infoButton.addClickListener(new ClickListener() {
// @Override
// public void buttonClick(ClickEvent event) {

infoButton.addClickListener(new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
// VaadinRequest vaadinRequest = VaadinService.getCurrentRequest();
// HttpServletRequest httpServletRequest = ((VaadinServletRequest)vaadinRequest).getHttpServletRequest();
// String requestUrl = httpServletRequest.getRequestURL().toString();
// LOG.info(requestUrl);
// }
// });
LOG.info("URL Button");
}
});


// if()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,16 @@ public void itemClick(ItemClickEvent event) {
res = streamres;
visualize = true;
}
//////////////////////////////////////////////////////////////////////////////////////////
// Von Marc eingefügt

if (datasetFileName.endsWith(".csv")) {
QcMlOpenbisSource re = new QcMlOpenbisSource(url);
StreamResource streamres = new StreamResource(re, datasetFileName);
streamres.setMIMEType("text/plain");
res = streamres;
visualize = true;
}

if (visualize) {
// LOG.debug("Is resource null?: " + String.valueOf(res == null));
Expand Down Expand Up @@ -607,7 +617,7 @@ private URL testDataSetURL(String dataSetCode, String openbisFilename) throws Ma
//String serverURL = config.getOpenbisURL() //(oder sowas)
String base = "http://127.0.0.1";

String downloadURL = base + ":444";
String downloadURL = base + ":8081";
downloadURL += "/datastore_server/";

downloadURL += dataSetCode;
Expand Down

0 comments on commit 4a82880

Please sign in to comment.