Skip to content

Commit 95a820b

Browse files
Release 1.0.0 Beta.11 #207
Release 1.0.0 beta.11
2 parents a0654f0 + 2326953 commit 95a820b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+16129
-197
lines changed

.designer/designer-theme.css

+14,823
Large diffs are not rendered by default.

CHANGELOG.rst

+25
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.11 (2022-01-26)
8+
---------------------------
9+
10+
**Added**
11+
12+
* Changed notification style (#191)
13+
14+
* Add sorting by subscription and last updated (#204)
15+
16+
* Implement searchbar for projects and samples (#205)
17+
18+
* Add filtering by status (#199)
19+
20+
**Fixed**
21+
22+
* Update overall UI design (#198)
23+
24+
* Add tooltips and cursor change for better UX (#201)
25+
26+
**Dependencies**
27+
28+
* ``life.qbic:data-model-lib:2.12.0`` -> ``2.15.0``
29+
30+
**Deprecated**
31+
732
1.0.0-beta.10 (2022-01-18)
833
---------------------------
934

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can run the application in a ``testing`` mode:
2121

2222
.. code-block:: bash
2323
24-
mvn clean jetty:run -Denvironment=testing -Demail=<email> -Dauth_id=<auth provider id>
24+
mvn clean jetty:run -Denvironment=testing -Demail=<email> -Dauth_id=<auth provider id> -Dfirst_name=<first name> -Dlast_name=<last name>
2525
2626
You also see, that you need to provide two more properties then, ``email`` and ``auth_id``. The email property is used
2727
to generate your portal-user id, the auth-id is the one that is provided by the authentication provider after successful login into the portal.

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.9'
60+
version = '1.0.0-beta.11-SNAPSHOT'
6161
# The full version, including alpha/beta/rc tags.
62-
release = '1.0.0-beta.9'
62+
release = '1.0.0-beta.11-SNAPSHOT'
6363

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

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</modules>
1111
<artifactId>sample-tracking-status-overview</artifactId>
1212
<groupId>life.qbic</groupId>
13-
<version>1.0.0-beta.10</version> <!-- <<QUBE_FORCE_BUMP>> -->
13+
<version>1.0.0-beta.11</version> <!-- <<QUBE_FORCE_BUMP>> -->
1414
<name>Sample Tracking Status Overview</name>
1515
<url>https://github.com/qbicsoftware/sample-tracking-status-overview</url>
1616
<description>Gives a visual overview of sample statuses</description>
@@ -133,7 +133,7 @@
133133
<dependency>
134134
<groupId>life.qbic</groupId>
135135
<artifactId>data-model-lib</artifactId>
136-
<version>2.12.0</version>
136+
<version>2.15.0</version>
137137
</dependency>
138138
<dependency>
139139
<groupId>org.apache.logging.log4j</groupId>

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>sample-tracking-status-overview</artifactId>
77
<groupId>life.qbic</groupId>
8-
<version>1.0.0-beta.10</version>
8+
<version>1.0.0-beta.11</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<packaging>war</packaging>
@@ -16,7 +16,7 @@
1616
<dependency>
1717
<groupId>life.qbic</groupId>
1818
<artifactId>sample-tracking-status-overview-domain</artifactId>
19-
<version>1.0.0-beta.10</version>
19+
<version>1.0.0-beta.11</version>
2020
<scope>compile</scope>
2121
</dependency>
2222
<dependency>

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

+15-41
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ import life.qbic.datamodel.dtos.portal.PortalUser
2222
import life.qbic.portal.sampletracking.communication.notification.MessageBroker
2323
import life.qbic.portal.sampletracking.communication.notification.NotificationService
2424
import life.qbic.portal.sampletracking.components.AppView
25+
import life.qbic.portal.sampletracking.components.MainPage
2526
import life.qbic.portal.sampletracking.components.NotificationHandler
27+
import life.qbic.portal.sampletracking.components.ViewModel
2628
import life.qbic.portal.sampletracking.components.projectoverview.CountSamplesPresenter
2729
import life.qbic.portal.sampletracking.components.projectoverview.LoadProjectsPresenter
2830
import life.qbic.portal.sampletracking.components.projectoverview.ProjectOverviewView
2931
import life.qbic.portal.sampletracking.components.projectoverview.ProjectOverviewViewModel
32+
import life.qbic.portal.sampletracking.components.projectoverview.ProjectView
3033
import life.qbic.portal.sampletracking.components.projectoverview.download.DownloadProjectController
3134
import life.qbic.portal.sampletracking.components.projectoverview.download.ManifestPresenter
3235
import life.qbic.portal.sampletracking.components.projectoverview.samplelist.FailedQCSamplesController
@@ -35,6 +38,7 @@ import life.qbic.portal.sampletracking.components.projectoverview.subscribe.Subs
3538
import life.qbic.portal.sampletracking.components.projectoverview.subscribe.SubscribeProjectPresenter
3639
import life.qbic.portal.sampletracking.components.sampleoverview.SampleOverviewView
3740
import life.qbic.portal.sampletracking.components.sampleoverview.SampleOverviewController
41+
import life.qbic.portal.sampletracking.components.sampleoverview.SampleView
3842
import life.qbic.portal.sampletracking.datasources.Credentials
3943
import life.qbic.portal.sampletracking.datasources.OpenBisConnector
4044
import life.qbic.portal.sampletracking.datasources.database.DatabaseSession
@@ -55,7 +59,7 @@ import life.qbic.portal.utils.ConfigurationManagerFactory
5559
*
5660
* @since 1.0.0
5761
*
58-
*/
62+
*/
5963
class DependencyManager {
6064
private VerticalLayout portletView
6165
private ConfigurationManager configurationManager
@@ -149,55 +153,25 @@ class DependencyManager {
149153
}
150154

151155
private VerticalLayout setupPortletView() {
152-
ProjectOverviewView projectOverviewView = createProjectOverviewView()
153-
SampleOverviewView sampleOverviewView = new SampleOverviewView(notificationService)
154-
SampleOverviewController projectSamplesController = setupProjectSamplesUseCase(sampleOverviewView.getPresenter())
156+
ViewModel viewModel = new ViewModel(projectResourceService, statusCountService)
157+
SampleView sampleView = new SampleView(viewModel, notificationService)
158+
ProjectView projectView = new ProjectView(viewModel, setupSubscribeProjectUseCase(), notificationService, subscriptionUser, setupDownloadProjectUseCase(viewModel))
159+
SampleOverviewController sampleOverviewController = setupProjectSamplesUseCase(sampleView.getPresenter())
155160

161+
MainPage mainPage = new MainPage(projectView, sampleView, viewModel, sampleOverviewController)
156162

157-
AppView mainView = new AppView(projectOverviewView, sampleOverviewView, projectSamplesController)
158-
return mainView
159-
}
160-
161-
/**
162-
* Creates a new ProjectOverviewView using
163-
* <ul>
164-
* <li>{@link #projectResourceService}</li>
165-
* <li>{@link #statusCountService}</li>
166-
* </ul>
167-
* @return a new ProjectOverviewView
168-
*/
169-
private ProjectOverviewView createProjectOverviewView() {
170-
ProjectOverviewViewModel viewModel = new ProjectOverviewViewModel(projectResourceService, statusCountService,
171-
this.subscriptionUser)
172-
SubscribeProjectController subscribeProjectController = setupSubscribeProjectUseCase()
173-
DownloadProjectController downloadController = setupDownloadProjectUseCase(viewModel)
174-
175-
FailedQCSamplesView failedQCSamplesView = new FailedQCSamplesView(notificationService)
176-
FailedQCSamplesController failedQCSamplesController = setupFailedQCUseCase(failedQCSamplesView.getPresenter())
177-
178-
ProjectOverviewView view = new ProjectOverviewView(notificationService,
179-
viewModel,
180-
downloadController,
181-
failedQCSamplesView,
182-
failedQCSamplesController,
183-
subscribeProjectController)
184-
return view
163+
return mainPage
185164
}
186165

187166
private SampleOverviewController setupProjectSamplesUseCase(GetSamplesInfoOutput output) {
188167
GetSamplesInfo getSamplesInfo = new GetSamplesInfo(sampleStatusDataSource, downloadSamplesDataSource, getSamplesInfoDataSource, output)
189168
return new SampleOverviewController(getSamplesInfo)
190169
}
191170

192-
private FailedQCSamplesController setupFailedQCUseCase(GetSamplesInfoOutput output){
193-
GetSamplesInfo getSamplesInfo = new GetSamplesInfo(sampleStatusDataSource, downloadSamplesDataSource,getSamplesInfoDataSource, output)
194-
return new FailedQCSamplesController(getSamplesInfo)
195-
}
196-
197-
private DownloadProjectController setupDownloadProjectUseCase(ProjectOverviewViewModel viewModel) {
171+
private DownloadProjectController setupDownloadProjectUseCase(ViewModel viewModel) {
198172
DownloadSamplesOutput output = new ManifestPresenter(notificationService, viewModel)
199173
DownloadSamples downloadSamples = new DownloadSamples(downloadSamplesDataSource, output)
200-
174+
201175
return new DownloadProjectController(downloadSamples)
202176
}
203177

@@ -213,7 +187,7 @@ class DependencyManager {
213187
*/
214188
private void populateProjectService() {
215189
LoadProjectsOutput output = new LoadProjectsPresenter(projectResourceService, notificationService)
216-
LoadProjectsInput loadProjects = new LoadProjects(loadProjectsDataSource, output, lastChangedDateDataSource, subscribedProjectsDataSource )
190+
LoadProjectsInput loadProjects = new LoadProjects(loadProjectsDataSource, output, lastChangedDateDataSource, subscribedProjectsDataSource)
217191
loadProjects.withSubscriptions(subscriptionUser)
218192
}
219193

@@ -231,7 +205,7 @@ class DependencyManager {
231205
}
232206
}
233207

234-
/**
208+
/**
235209
* Returns the global notification center
236210
* @return a notification center that handles app notifications
237211
*/

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class StatusOverviewApp extends QBiCPortletUI {
3737
// The constructor MUST NOT fail since the user does not get any feedback otherwise.
3838
try {
3939
PortalUser user = loadUser()
40-
log.info("Loading portlet for user: $user.userId - $user.authProviderId")
40+
log.info("Loading portlet for user: $user.userId - $user.firstName $user.lastName ($user.authProviderId)")
4141
dependencyManager = new DependencyManager(user)
4242
notificationCenter = dependencyManager.getNotificationCenter()
4343
} catch (Exception e) {

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

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
package life.qbic.portal.sampletracking.components
22

3-
import com.vaadin.ui.Button
3+
44
import com.vaadin.ui.Component
5-
import com.vaadin.ui.Grid
65
import com.vaadin.ui.HorizontalLayout
76
import com.vaadin.ui.Label
87
import com.vaadin.ui.VerticalLayout
9-
import com.vaadin.ui.components.grid.ItemClickListener
108
import com.vaadin.ui.themes.ValoTheme
119
import life.qbic.portal.sampletracking.components.projectoverview.ProjectOverviewView
12-
import life.qbic.portal.sampletracking.components.projectoverview.ProjectSummary
1310
import life.qbic.portal.sampletracking.components.sampleoverview.SampleOverviewController
1411
import life.qbic.portal.sampletracking.components.sampleoverview.SampleOverviewView
1512
import life.qbic.portal.sampletracking.components.toggle.ToggleButton
@@ -28,14 +25,14 @@ class AppView extends VerticalLayout {
2825
private final SampleOverviewController sampleOverviewController
2926

3027
private final HorizontalLayout hotbar = new HorizontalLayout()
31-
protected final Label titleLabel = new Label("Sample Status Portlet")
28+
protected final Label appTitleLabel = new Label("Sample Status Viewer")
3229
private final ToggleButton projectSampleToggle
3330

3431
AppView(ProjectOverviewView projectOverviewView, SampleOverviewView sampleOverviewView, SampleOverviewController sampleOverviewController) {
3532
this.setMargin(true)
3633
this.setSpacing(true)
3734

38-
titleLabel.addStyleName(ValoTheme.LABEL_HUGE)
35+
appTitleLabel.addStyleName(ValoTheme.LABEL_HUGE)
3936

4037
this.projectOverviewView = projectOverviewView
4138
this.sampleOverviewView = sampleOverviewView
@@ -52,11 +49,11 @@ class AppView extends VerticalLayout {
5249
showProjectView(true)
5350
showSampleView(false)
5451

55-
this.addComponents(titleLabel, createSpacer(2, Unit.EM), hotbar, projectOverviewView, sampleOverviewView)
52+
this.addComponents(appTitleLabel, createSpacer(2, Unit.EM), hotbar, projectOverviewView, sampleOverviewView)
5653
}
5754

5855

59-
private void listenToProjectSelectionChange(){
56+
private void listenToProjectSelectionChange() {
6057
projectOverviewView.onSelectedProjectChange({
6158
if (it) {
6259
projectSampleToggle.setEnabled(true)
@@ -71,13 +68,11 @@ class AppView extends VerticalLayout {
7168
private void showProjectView(Boolean visible) {
7269
projectOverviewView.setVisible(visible)
7370
projectOverviewView.getHotbar().setVisible(visible)
74-
if (visible) this.titleLabel.value = projectOverviewView.getTitle()
7571
}
7672

7773
private void showSampleView(Boolean visible) {
7874
sampleOverviewView.setVisible(visible)
7975
sampleOverviewView.getHotbar().setVisible(visible)
80-
if (visible) this.titleLabel.value = sampleOverviewView.getTitle()
8176
}
8277

8378
private void addHotbarItem(HorizontalLayout item) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package life.qbic.portal.sampletracking.components;
2+
3+
import life.qbic.portal.sampletracking.components.projectoverview.ProjectView;
4+
import com.vaadin.ui.VerticalLayout
5+
import life.qbic.portal.sampletracking.components.sampleoverview.SampleOverviewController;
6+
import life.qbic.portal.sampletracking.components.sampleoverview.SampleView
7+
8+
9+
class MainPage extends VerticalLayout {
10+
11+
private final ProjectView projectView
12+
private final SampleView sampleView
13+
private final ViewModel viewModel
14+
private final SampleOverviewController controller
15+
16+
MainPage(ProjectView projectLayout, SampleView sampleLayout, ViewModel viewModel, SampleOverviewController sampleOverviewController) {
17+
this.projectView = projectLayout
18+
this.sampleView = sampleLayout
19+
this.viewModel = viewModel
20+
this.controller = sampleOverviewController
21+
22+
this.addComponents(projectLayout, sampleLayout)
23+
sampleLayout.setVisible(false)
24+
25+
listenToProjectSelectionChange()
26+
}
27+
28+
private void listenToProjectSelectionChange() {
29+
projectView.onSelectedProjectChange({
30+
if (it) {
31+
controller.getSamplesFor(it.code)
32+
} else {
33+
sampleView.reset()
34+
}
35+
})
36+
37+
viewModel.addPropertyChangeListener("projectViewEnabled", {
38+
projectView.setVisible(viewModel.projectViewEnabled)
39+
sampleView.setVisible(!viewModel.projectViewEnabled)
40+
})
41+
}
42+
}

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class NotificationHandler {
2323
}
2424

2525
private static void showMessage(String message, Type type) {
26-
Notification notification = new Notification(message, type)
26+
StyledNotification notification = new StyledNotification(message, type)
2727
if (Page.getCurrent()) {
2828
notification.show(Page.getCurrent())
2929
} else {
@@ -33,8 +33,8 @@ class NotificationHandler {
3333

3434

3535
void subscribeToService() {
36-
notificationService.subscribe({showMessage(it, Type.ERROR_MESSAGE)}, Topic.NOTIFICATION_FAILURE)
37-
notificationService.subscribe({showMessage(it, Type.HUMANIZED_MESSAGE)}, Topic.NOTIFICATION_SUCCESS)
38-
notificationService.subscribe({showMessage(it, Type.ASSISTIVE_NOTIFICATION)}, Topic.NOTIFICATION_INFO)
36+
notificationService.subscribe({ showMessage(it, Type.ERROR_MESSAGE) }, Topic.NOTIFICATION_FAILURE)
37+
notificationService.subscribe({ showMessage(it, Type.HUMANIZED_MESSAGE) }, Topic.NOTIFICATION_SUCCESS)
38+
notificationService.subscribe({ showMessage(it, Type.ASSISTIVE_NOTIFICATION) }, Topic.NOTIFICATION_INFO)
3939
}
4040
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class StyledNotification extends Notification {
99

1010
StyledNotification(String caption) {
1111
super(caption)
12-
setNotificationProperties()
12+
setNotificationProperties(Type.HUMANIZED_MESSAGE)
1313
}
1414

1515
StyledNotification(String caption, Type type) {

0 commit comments

Comments
 (0)