Skip to content

Commit bf7be3d

Browse files
1.0.0-beta.8 #185
Release 1.0.0 beta.8 containing security fixes, colored sample statuses, and adapts to the new DB structure
2 parents ea8cb31 + 8679e0d commit bf7be3d

File tree

17 files changed

+119
-245
lines changed

17 files changed

+119
-245
lines changed

.github/workflows/sync_project.yml

-32
This file was deleted.

.qube.yml

-24
This file was deleted.

CHANGELOG.rst

+27
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@ Changelog
44

55
This project adheres to `Semantic Versioning <https://semver.org/>`_.
66

7+
1.0.0-beta.8 (2021-12-22)
8+
---------------------------
9+
10+
**Added**
11+
12+
* Color sample status (#177)
13+
14+
* Use person table instead of subscriber (#183)
15+
16+
**Fixed**
17+
18+
* Manifest file download is reset correctly after project selection change (`#169 <https://github.com/qbicsoftware/sample-tracking-status-overview/pull/169>`_)
19+
20+
* CVE-2021-45105
21+
22+
* CVE-2021-33609
23+
24+
**Dependencies**
25+
26+
* ``org.apache.logging.log4j:log4j-core:2.16.0`` -> ``2.17.0``
27+
28+
* ``org.apache.logging.log4j:log4j-api:2.16.0`` -> ``2.17.0``
29+
30+
* ``com.vaadin:vaadin-bom:8.14.0`` -> ``8.14.1``
31+
732
1.0.0-beta.7 (2021-12-15)
833
---------------------------
934

@@ -16,6 +41,7 @@ This project adheres to `Semantic Versioning <https://semver.org/>`_.
1641
**Dependencies**
1742

1843
* ``org.apache.logging.log4j:log4j-core:2.15.0`` -> ``2.16.0``
44+
1945
* ``org.apache.logging.log4j:log4j-api:2.15.0`` -> ``2.16.0``
2046

2147
1.0.0-beta.6 (2021-12-13)
@@ -30,6 +56,7 @@ This project adheres to `Semantic Versioning <https://semver.org/>`_.
3056
**Dependencies**
3157

3258
* ``org.apache.logging.log4j:log4j-core:2.13.2`` -> ``2.15.0``
59+
3360
* ``org.apache.logging.log4j:log4j-api:2.13.2`` -> ``2.15.0``
3461

3562
**Deprecated**

docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
# the built documents.
5858
#
5959
# The short X.Y version.
60-
version = '1.0.0-beta.6'
60+
version = '1.0.0-beta.8'
6161
# The full version, including alpha/beta/rc tags.
62-
release = '1.0.0-beta.6'
62+
release = '1.0.0-beta.8'
6363

6464
# The language for content autogenerated by Sphinx. Refer to documentation
6565
# for a list of supported languages.

pom.xml

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
<project
33
xmlns="http://maven.apache.org/POM/4.0.0"
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
66
<modelVersion>4.0.0</modelVersion>
77
<modules>
88
<module>sample-tracking-status-overview-app</module>
99
<module>sample-tracking-status-overview-domain</module>
1010
</modules>
1111
<artifactId>sample-tracking-status-overview</artifactId>
1212
<groupId>life.qbic</groupId>
13-
<version>1.0.0-beta.7</version> <!-- <<QUBE_FORCE_BUMP>> -->
13+
<version>1.0.0-beta.8</version> <!-- <<QUBE_FORCE_BUMP>> -->
1414
<name>Sample Tracking Status Overview</name>
15-
<url>http://github.com/qbicsoftware/sample-tracking-status-overview</url>
15+
<url>https://github.com/qbicsoftware/sample-tracking-status-overview</url>
1616
<description>Gives a visual overview of sample statuses</description>
1717
<packaging>pom</packaging>
1818
<!-- we only need to tell maven where to find our parent pom and other QBiC dependencies -->
@@ -23,7 +23,9 @@
2323

2424
<groovy.version>3.0.8</groovy.version>
2525

26-
<vaadin.version>8.14.0</vaadin.version>
26+
<log4j.version>2.17.0</log4j.version>
27+
28+
<vaadin.version>8.14.1</vaadin.version>
2729
<vaadin.plugin.version>8.14.0</vaadin.plugin.version>
2830
</properties>
2931

@@ -136,12 +138,12 @@
136138
<dependency>
137139
<groupId>org.apache.logging.log4j</groupId>
138140
<artifactId>log4j-api</artifactId>
139-
<version>2.16.0</version>
141+
<version>${log4j.version}</version>
140142
</dependency>
141143
<dependency>
142144
<groupId>org.apache.logging.log4j</groupId>
143145
<artifactId>log4j-core</artifactId>
144-
<version>2.16.0</version>
146+
<version>${log4j.version}</version>
145147
</dependency>
146148
</dependencies>
147149
</dependencyManagement>

qube.cfg

-15
This file was deleted.

sample-tracking-status-overview-app/pom.xml

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,18 @@
55
<parent>
66
<artifactId>sample-tracking-status-overview</artifactId>
77
<groupId>life.qbic</groupId>
8-
<version>1.0.0-beta.7</version> <!-- <<QUBE_FORCE_BUMP>> -->
8+
<version>1.0.0-beta.8</version> <!-- <<QUBE_FORCE_BUMP>> -->
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<packaging>war</packaging>
12-
<properties>
13-
<log4j.version>2.16.0</log4j.version>
14-
</properties>
1512
<artifactId>sample-tracking-status-overview-app</artifactId>
1613
<name>The sample tracking status overview portlet</name>
1714
<url>http://github.com/qbicsoftware/sample-tracking-status-overview</url>
1815
<dependencies>
1916
<dependency>
2017
<groupId>life.qbic</groupId>
2118
<artifactId>sample-tracking-status-overview-domain</artifactId>
22-
<version>1.0.0-beta.7</version> <!-- <<QUBE_FORCE_BUMP>> -->
19+
<version>1.0.0-beta.8</version> <!-- <<QUBE_FORCE_BUMP>> -->
2320
<scope>compile</scope>
2421
</dependency>
2522
<dependency>

sample-tracking-status-overview-app/src/main/groovy/life/qbic/portal/sampletracking/DependencyManager.groovy

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class DependencyManager {
9393
private static Subscriber subscriberFor(PortalUser portalUser) {
9494
return new Subscriber(portalUser.firstName,
9595
portalUser.lastName,
96+
portalUser.title.value,
9697
portalUser.emailAddress)
9798
}
9899

sample-tracking-status-overview-app/src/main/groovy/life/qbic/portal/sampletracking/components/projectoverview/ProjectOverviewView.groovy

+15-10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import com.vaadin.data.provider.DataProvider
44
import com.vaadin.data.provider.ListDataProvider
55
import com.vaadin.event.selection.SingleSelectionEvent
66
import com.vaadin.icons.VaadinIcons
7+
import com.vaadin.server.ClientConnector
78
import com.vaadin.server.FileDownloader
89
import com.vaadin.server.StreamResource
910
import com.vaadin.shared.ui.ContentMode
@@ -23,8 +24,8 @@ import life.qbic.portal.sampletracking.components.projectoverview.samplelist.Fai
2324
import life.qbic.portal.sampletracking.components.projectoverview.samplelist.FailedQCSamplesView
2425
import life.qbic.portal.sampletracking.components.projectoverview.statusdisplay.SampleCount
2526
import life.qbic.portal.sampletracking.components.projectoverview.statusdisplay.State
26-
import life.qbic.portal.sampletracking.components.projectoverview.subscribe.SubscriptionCheckboxFactory
2727
import life.qbic.portal.sampletracking.components.projectoverview.subscribe.SubscribeProjectController
28+
import life.qbic.portal.sampletracking.components.projectoverview.subscribe.SubscriptionCheckboxFactory
2829

2930
import java.util.function.Consumer
3031

@@ -56,7 +57,6 @@ class ProjectOverviewView extends VerticalLayout implements HasHotbar, HasTitle
5657
private static final Collection<String> columnIdsWithFilters = ["ProjectCode", "ProjectTitle"]
5758

5859
final static int MAX_CODE_COLUMN_WIDTH = 400
59-
private FileDownloader fileDownloader
6060
private HorizontalLayout projectButtonBar = new HorizontalLayout()
6161

6262
ProjectOverviewView(NotificationService notificationService, ProjectOverviewViewModel viewModel, DownloadProjectController downloadProjectController
@@ -171,21 +171,26 @@ class ProjectOverviewView extends VerticalLayout implements HasHotbar, HasTitle
171171
private Button setupDownloadButton() {
172172
Button downloadManifestAction = new Button("Download Manifest", VaadinIcons.DOWNLOAD)
173173
viewModel.addPropertyChangeListener("generatedManifest", {
174-
if (isDownloadAvailable()) {
175-
this.fileDownloader = new FileDownloader(new StreamResource({viewModel.getManifestInputStream()}, "manifest.txt"))
176-
this.fileDownloader.extend(downloadManifestAction)
177-
} else {
178-
if (this.fileDownloader) {
179-
if (downloadManifestAction.extensions.contains(fileDownloader)) {
180-
downloadManifestAction.removeExtension(this.fileDownloader)
181-
}
174+
if (it.getOldValue() != it.getNewValue()) {
175+
removeFileDownloaders(downloadManifestAction)
176+
if (it.newValue) {
177+
FileDownloader fileDownloader = new FileDownloader(new StreamResource({viewModel.getManifestInputStream()}, "manifest.txt"))
178+
fileDownloader.extend(downloadManifestAction)
182179
}
183180
}
184181
})
185182
enableWhenDownloadIsAvailable(downloadManifestAction)
186183
return downloadManifestAction
187184
}
188185

186+
private static void removeFileDownloaders(ClientConnector clientConnector) {
187+
def fileDownloaders = clientConnector.extensions.stream()
188+
.filter((extension) -> extension instanceof FileDownloader)
189+
.collect()
190+
fileDownloaders.forEach(clientConnector::removeExtension)
191+
}
192+
193+
189194
private void setupProjects() {
190195
projectGrid = new Grid<ProjectSummary>()
191196
fillProjectsGrid()

sample-tracking-status-overview-app/src/main/groovy/life/qbic/portal/sampletracking/components/projectoverview/subscribe/SubscribeProjectPresenter.groovy

+4-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ class SubscribeProjectPresenter implements SubscribeProjectOutput {
4949
*/
5050
@Override
5151
void subscriptionFailed(Subscriber subscriber, String projectCode) {
52+
//todo this message might not be meaningful to the user, e.g. if a person entry is missing
5253
String message = "An unexpected error occured while trying to subscribe to project ${projectCode}. " +
53-
"Please contact ${Constants.CONTACT_HELPDESK}."
54+
"${Constants.CONTACT_HELPDESK}."
5455
notificationService.publishFailure(message)
5556
}
5657

@@ -78,8 +79,9 @@ class SubscribeProjectPresenter implements SubscribeProjectOutput {
7879
*/
7980
@Override
8081
void unsubscriptionFailed(Subscriber subscriber, String projectCode) {
82+
//todo this message might not be meaningful to the user
8183
String message = "An unexpected error occured while trying to unsubscribe from project ${projectCode}. " +
82-
"Please contact ${Constants.CONTACT_HELPDESK}."
84+
"${Constants.CONTACT_HELPDESK}."
8385
notificationService.publishFailure(message)
8486
}
8587
}

sample-tracking-status-overview-app/src/main/groovy/life/qbic/portal/sampletracking/components/sampleoverview/SampleOverviewView.groovy

+15-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ import com.vaadin.ui.HorizontalLayout
77
import com.vaadin.ui.VerticalLayout
88
import life.qbic.business.samples.Sample
99
import life.qbic.business.samples.info.GetSamplesInfoOutput
10+
import life.qbic.datamodel.samples.Status
1011
import life.qbic.portal.sampletracking.communication.notification.NotificationService
1112
import life.qbic.portal.sampletracking.components.HasHotbar
1213
import life.qbic.portal.sampletracking.components.HasTitle
1314
import life.qbic.portal.sampletracking.components.Resettable
15+
import life.qbic.portal.sampletracking.components.projectoverview.statusdisplay.SampleCount
16+
import life.qbic.portal.sampletracking.components.projectoverview.statusdisplay.State
1417

1518
/**
1619
* <b>A view component showing a list of samples</b>
@@ -51,13 +54,24 @@ class SampleOverviewView extends VerticalLayout implements HasHotbar, HasTitle,
5154
ListDataProvider<Sample> dataProvider = ListDataProvider.ofCollection(samples)
5255
samplesGrid.addColumn(Sample::getCode).setCaption("Sample Code").setId("SampleCode")
5356
samplesGrid.addColumn(Sample::getName).setCaption("Sample Name").setId("SampleName")
54-
samplesGrid.addColumn(Sample::getStatus).setCaption("Sample Status").setId("SampleStatus")
57+
samplesGrid.addColumn(Sample::getStatus).setCaption("Sample Status").setId("SampleStatus").setStyleGenerator({Sample sample -> determineColor(sample.status)})
5558
samplesGrid.setSelectionMode(Grid.SelectionMode.NONE)
5659
samplesGrid.setDataProvider(dataProvider)
5760
samplesGrid.setHeightMode(HeightMode.ROW)
5861
return samplesGrid
5962
}
6063

64+
private static String determineColor(Status status) {
65+
switch (status){
66+
case Status.DATA_AVAILABLE:
67+
return State.COMPLETED.getCssClass()
68+
case Status.SAMPLE_QC_FAIL:
69+
return State.FAILED.getCssClass()
70+
default:
71+
return State.IN_PROGRESS.getCssClass()
72+
}
73+
}
74+
6175
/**
6276
* Model for this view component
6377
*/

0 commit comments

Comments
 (0)