Commit 1abb28a8 authored by Jasper Koehorst's avatar Jasper Koehorst
Browse files

meta-inf not working at the moment, fixed export issue of showing content

parent e6bb820c
Pipeline #35636 passed with stage
in 2 minutes and 53 seconds
...@@ -52,8 +52,8 @@ dependencies { ...@@ -52,8 +52,8 @@ dependencies {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
} }
// implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web'
// implementation 'org.springframework.boot:spring-boot-starter-log4j2' implementation 'org.springframework.boot:spring-boot-starter-log4j2'
implementation 'org.vaadin.olli:file-download-wrapper:3.0.1' implementation 'org.vaadin.olli:file-download-wrapper:3.0.1'
......
...@@ -308,7 +308,7 @@ public class Data { ...@@ -308,7 +308,7 @@ public class Data {
} }
public static ArrayList<Biom> getJobOutputs(IRODSAccount irodsAccount, String search) { public static ArrayList<Biom> getJobOutputs(IRODSAccount irodsAccount, String search) {
logger.info("Searching with " + search); logger.info("Searching with " + search + " with " + irodsAccount.getUserName());
try { try {
// Obtain all projects via metadata // Obtain all projects via metadata
IRODSGenQueryBuilder queryBuilder = new IRODSGenQueryBuilder(true, null); IRODSGenQueryBuilder queryBuilder = new IRODSGenQueryBuilder(true, null);
......
...@@ -20,6 +20,7 @@ import com.vaadin.flow.component.tabs.TabsVariant; ...@@ -20,6 +20,7 @@ import com.vaadin.flow.component.tabs.TabsVariant;
import com.vaadin.flow.router.PageTitle; import com.vaadin.flow.router.PageTitle;
import com.vaadin.flow.router.RouterLink; import com.vaadin.flow.router.RouterLink;
import com.vaadin.flow.server.PWA; import com.vaadin.flow.server.PWA;
import com.vaadin.flow.server.StreamResource;
import com.vaadin.flow.server.VaadinSession; import com.vaadin.flow.server.VaadinSession;
import nl.fairbydesign.backend.ApplicationServiceInitListener; import nl.fairbydesign.backend.ApplicationServiceInitListener;
import nl.fairbydesign.backend.credentials.Credentials; import nl.fairbydesign.backend.credentials.Credentials;
...@@ -79,7 +80,8 @@ public class MainView extends AppLayout { ...@@ -79,7 +80,8 @@ public class MainView extends AppLayout {
layout.add(viewTitle); layout.add(viewTitle);
Anchor authenticate; Anchor authenticate;
// Added user icon // Added user icon
layout.add(new Image("images/user.svg", "Avatar")); StreamResource imageResource = new StreamResource("user.svg", () -> getClass().getResourceAsStream("/META-INF/resources/images/user.svg"));
layout.add(new Image(imageResource, "Avatar"));
// Obtain credentials for authentication purposes // Obtain credentials for authentication purposes
Credentials credentials = (Credentials) VaadinSession.getCurrent().getAttribute("credentials"); Credentials credentials = (Credentials) VaadinSession.getCurrent().getAttribute("credentials");
...@@ -112,9 +114,11 @@ public class MainView extends AppLayout { ...@@ -112,9 +114,11 @@ public class MainView extends AppLayout {
// Get url host path if unlock in name use unlock logo // Get url host path if unlock in name use unlock logo
UI.getCurrent().getPage().executeJs("return window.location.href").then(String.class, location -> { UI.getCurrent().getPage().executeJs("return window.location.href").then(String.class, location -> {
if (location.contains("unlock")) { if (location.contains("unlock")) {
logoLayout.add(new Image("images/unlock_logo.png", "Unlock logo")); StreamResource imageResource = new StreamResource("unlock_logo.png", () -> getClass().getResourceAsStream("/META-INF/resources/images/unlock_logo.png"));
logoLayout.add(new Image(imageResource, "Unlock logo"));
} else { } else {
logoLayout.add(new Image("images/logo.png", "Unlock logo")); StreamResource imageResource = new StreamResource("logo.png", () -> getClass().getResourceAsStream("/META-INF/resources/images/logo.png"));
logoLayout.add(new Image(imageResource, "Unlock logo"));
} }
}); });
......
...@@ -29,6 +29,8 @@ import nl.fairbydesign.backend.irods.Data; ...@@ -29,6 +29,8 @@ import nl.fairbydesign.backend.irods.Data;
import nl.fairbydesign.backend.kubernetes.Kubernetes; import nl.fairbydesign.backend.kubernetes.Kubernetes;
import nl.fairbydesign.views.main.MainView; import nl.fairbydesign.views.main.MainView;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.irods.jargon.core.connection.IRODSAccount; import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.pub.CollectionAO; import org.irods.jargon.core.pub.CollectionAO;
import org.irods.jargon.core.pub.DataObjectAO; import org.irods.jargon.core.pub.DataObjectAO;
...@@ -36,7 +38,6 @@ import org.irods.jargon.core.pub.IRODSAccessObjectFactory; ...@@ -36,7 +38,6 @@ import org.irods.jargon.core.pub.IRODSAccessObjectFactory;
import org.irods.jargon.core.pub.IRODSFileSystem; import org.irods.jargon.core.pub.IRODSFileSystem;
import org.irods.jargon.core.pub.domain.AvuData; import org.irods.jargon.core.pub.domain.AvuData;
import org.irods.jargon.core.pub.io.IRODSFileFactory; import org.irods.jargon.core.pub.io.IRODSFileFactory;
import org.jboss.logging.Logger;
import java.io.File; import java.io.File;
import java.io.FileWriter; import java.io.FileWriter;
...@@ -49,11 +50,14 @@ import java.util.HashSet; ...@@ -49,11 +50,14 @@ import java.util.HashSet;
@CssImport("styles/views/empty/empty-view.css") @CssImport("styles/views/empty/empty-view.css")
public class Export extends Div { public class Export extends Div {
public static final Logger logger = Logger.getLogger(Export.class); public static final Logger logger = LogManager.getLogger(Export.class);
private static HashSet<Biom> jobs = new HashSet<>(); private static HashSet<Biom> jobs = new HashSet<>();
private ListDataProvider<Biom> dataProvider; private ListDataProvider<Biom> dataProvider;
public Export() { public Export() {
// Reset jobs content
jobs = new HashSet<>();
setId("master-detail-view"); setId("master-detail-view");
Credentials credentials = (Credentials) VaadinSession.getCurrent().getAttribute("credentials"); Credentials credentials = (Credentials) VaadinSession.getCurrent().getAttribute("credentials");
if (credentials != null && credentials.isSuccess()) { if (credentials != null && credentials.isSuccess()) {
...@@ -65,11 +69,7 @@ public class Export extends Div { ...@@ -65,11 +69,7 @@ public class Export extends Div {
comboBox.setItems(selections); comboBox.setItems(selections);
comboBox.setPlaceholder("Select export type"); comboBox.setPlaceholder("Select export type");
// Get information // Biom selection overview enforce reset
logger.debug("Obtaining phyloseq information by default");
// jobs.addAll(Data.getJobOutputs(credentials.getIrodsAccount(), "%/%_PHYLOSEQ"));
// Biom selection overview
dataProvider = new ListDataProvider<>(jobs); dataProvider = new ListDataProvider<>(jobs);
Grid<Biom> grid = new Grid<>(); Grid<Biom> grid = new Grid<>();
...@@ -303,15 +303,6 @@ public class Export extends Div { ...@@ -303,15 +303,6 @@ public class Export extends Div {
} }
} }
}); });
// Button help = new Button("Help");
// Dialog helpDialog = new Dialog();
// Have some html help content
// Add dialog to button help
// help.addClickListener(event -> helpDialog.open());
// add(help);
} else { } else {
add(new Label("To use this you need to login first...")); add(new Label("To use this you need to login first..."));
Button button = new Button("Login", event -> UI.getCurrent().navigate("login")); Button button = new Button("Login", event -> UI.getCurrent().navigate("login"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment