Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UNLOCK
fairds
Commits
1abb28a8
Commit
1abb28a8
authored
Jan 10, 2022
by
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
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
build.gradle
View file @
1abb28a8
...
...
@@ -52,8 +52,8 @@ dependencies {
exclude
group:
'org.junit.vintage'
,
module:
'junit-vintage-engine'
}
//
implementation 'org.springframework.boot:spring-boot-starter-web'
//
implementation 'org.springframework.boot:spring-boot-starter-log4j2'
implementation
'org.springframework.boot:spring-boot-starter-web'
implementation
'org.springframework.boot:spring-boot-starter-log4j2'
implementation
'org.vaadin.olli:file-download-wrapper:3.0.1'
...
...
src/main/java/nl/fairbydesign/backend/irods/Data.java
View file @
1abb28a8
...
...
@@ -308,7 +308,7 @@ public class Data {
}
public
static
ArrayList
<
Biom
>
getJobOutputs
(
IRODSAccount
irodsAccount
,
String
search
)
{
logger
.
info
(
"Searching with "
+
search
);
logger
.
info
(
"Searching with "
+
search
+
" with "
+
irodsAccount
.
getUserName
()
);
try
{
// Obtain all projects via metadata
IRODSGenQueryBuilder
queryBuilder
=
new
IRODSGenQueryBuilder
(
true
,
null
);
...
...
src/main/java/nl/fairbydesign/views/main/MainView.java
View file @
1abb28a8
...
...
@@ -20,6 +20,7 @@ import com.vaadin.flow.component.tabs.TabsVariant;
import
com.vaadin.flow.router.PageTitle
;
import
com.vaadin.flow.router.RouterLink
;
import
com.vaadin.flow.server.PWA
;
import
com.vaadin.flow.server.StreamResource
;
import
com.vaadin.flow.server.VaadinSession
;
import
nl.fairbydesign.backend.ApplicationServiceInitListener
;
import
nl.fairbydesign.backend.credentials.Credentials
;
...
...
@@ -79,7 +80,8 @@ public class MainView extends AppLayout {
layout
.
add
(
viewTitle
);
Anchor
authenticate
;
// 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
Credentials
credentials
=
(
Credentials
)
VaadinSession
.
getCurrent
().
getAttribute
(
"credentials"
);
...
...
@@ -112,9 +114,11 @@ public class MainView extends AppLayout {
// Get url host path if unlock in name use unlock logo
UI
.
getCurrent
().
getPage
().
executeJs
(
"return window.location.href"
).
then
(
String
.
class
,
location
->
{
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
{
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"
));
}
});
...
...
src/main/java/nl/fairbydesign/views/unlock/export/Export.java
View file @
1abb28a8
...
...
@@ -29,6 +29,8 @@ import nl.fairbydesign.backend.irods.Data;
import
nl.fairbydesign.backend.kubernetes.Kubernetes
;
import
nl.fairbydesign.views.main.MainView
;
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.pub.CollectionAO
;
import
org.irods.jargon.core.pub.DataObjectAO
;
...
...
@@ -36,7 +38,6 @@ import org.irods.jargon.core.pub.IRODSAccessObjectFactory;
import
org.irods.jargon.core.pub.IRODSFileSystem
;
import
org.irods.jargon.core.pub.domain.AvuData
;
import
org.irods.jargon.core.pub.io.IRODSFileFactory
;
import
org.jboss.logging.Logger
;
import
java.io.File
;
import
java.io.FileWriter
;
...
...
@@ -49,11 +50,14 @@ import java.util.HashSet;
@CssImport
(
"styles/views/empty/empty-view.css"
)
public
class
Export
extends
Div
{
public
static
final
Logger
logger
=
Logger
.
getLogger
(
Export
.
class
);
public
static
final
Logger
logger
=
Log
Mana
ger
.
getLogger
(
Export
.
class
);
private
static
HashSet
<
Biom
>
jobs
=
new
HashSet
<>();
private
ListDataProvider
<
Biom
>
dataProvider
;
public
Export
()
{
// Reset jobs content
jobs
=
new
HashSet
<>();
setId
(
"master-detail-view"
);
Credentials
credentials
=
(
Credentials
)
VaadinSession
.
getCurrent
().
getAttribute
(
"credentials"
);
if
(
credentials
!=
null
&&
credentials
.
isSuccess
())
{
...
...
@@ -65,11 +69,7 @@ public class Export extends Div {
comboBox
.
setItems
(
selections
);
comboBox
.
setPlaceholder
(
"Select export type"
);
// Get information
logger
.
debug
(
"Obtaining phyloseq information by default"
);
// jobs.addAll(Data.getJobOutputs(credentials.getIrodsAccount(), "%/%_PHYLOSEQ"));
// Biom selection overview
// Biom selection overview enforce reset
dataProvider
=
new
ListDataProvider
<>(
jobs
);
Grid
<
Biom
>
grid
=
new
Grid
<>();
...
...
@@ -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
{
add
(
new
Label
(
"To use this you need to login first..."
));
Button
button
=
new
Button
(
"Login"
,
event
->
UI
.
getCurrent
().
navigate
(
"login"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment