-
-
-
-
diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/EvaluationSimulationPage.java b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/EvaluationSimulationPage.java
deleted file mode 100644
index c1cdf9ec31c..00000000000
--- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/EvaluationSimulationPage.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2019
- * Ubiquitous Knowledge Processing (UKP) Lab
- * Technische Universität Darmstadt
- *
- * Licensed to the Technische Universität Darmstadt under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The Technische Universität Darmstadt
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.tudarmstadt.ukp.inception.recommendation.evaluation;
-
-import static de.tudarmstadt.ukp.clarin.webanno.model.PermissionLevel.MANAGER;
-import static de.tudarmstadt.ukp.clarin.webanno.support.lambda.LambdaBehavior.visibleWhenModelIsNotNull;
-import static de.tudarmstadt.ukp.clarin.webanno.ui.core.page.ProjectPageBase.NS_PROJECT;
-import static de.tudarmstadt.ukp.clarin.webanno.ui.core.page.ProjectPageBase.PAGE_PARAM_PROJECT;
-
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.wicketstuff.annotation.mount.MountPath;
-
-import de.tudarmstadt.ukp.clarin.webanno.api.ProjectService;
-import de.tudarmstadt.ukp.clarin.webanno.model.Project;
-import de.tudarmstadt.ukp.clarin.webanno.security.UserDao;
-import de.tudarmstadt.ukp.clarin.webanno.ui.core.page.ProjectPageBase;
-import de.tudarmstadt.ukp.inception.recommendation.api.model.Recommender;
-import de.tudarmstadt.ukp.inception.recommendation.project.RecommenderListPanel;
-
-@MountPath(NS_PROJECT + "/${" + PAGE_PARAM_PROJECT + "}/simulation")
-public class EvaluationSimulationPage
- extends ProjectPageBase
-{
- private static final long serialVersionUID = 3042218455285633439L;
-
- private IModel selectedRecommenderModel;
- private @SpringBean ProjectService projectService;
- private @SpringBean UserDao userRepository;
-
- private static final String MID_EVALUATION_SIMULATION_CONTAINER = "evaluation-simulation-container";
- private static final String MID_RECOMMENDER_LIST = "recommenderList";
- private static final String MID_RECOMMENDER_VIEW = "recommenderView";
-
- public EvaluationSimulationPage(final PageParameters aPageParameters)
- {
- super(aPageParameters);
-
- Project project = getProject();
-
- requireProjectRole(userRepository.getCurrentUser(), MANAGER);
-
- selectedRecommenderModel = Model.of();
-
- SimulationLearningCurvePanel evaluationSimulationPanel = new SimulationLearningCurvePanel(
- MID_EVALUATION_SIMULATION_CONTAINER, project, selectedRecommenderModel);
- add(evaluationSimulationPanel);
-
- RecommenderViewPanel recommenderViewPanel = new RecommenderViewPanel(MID_RECOMMENDER_VIEW,
- selectedRecommenderModel);
- recommenderViewPanel.setOutputMarkupPlaceholderTag(true);
- recommenderViewPanel.add(visibleWhenModelIsNotNull(recommenderViewPanel));
- add(recommenderViewPanel);
-
- RecommenderListPanel recommenderListPanel = new RecommenderListPanel(MID_RECOMMENDER_LIST,
- Model.of(project), selectedRecommenderModel, false);
- recommenderListPanel.setChangeAction(_target -> {
- evaluationSimulationPanel.recommenderChanged();
- _target.add(recommenderViewPanel);
- });
- add(recommenderListPanel);
- }
-}
diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/EvaluationSimulationPage.properties b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/EvaluationSimulationPage.properties
deleted file mode 100644
index ad24199dbd1..00000000000
--- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/EvaluationSimulationPage.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# Licensed to the Technische Universität Darmstadt under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The Technische Universität Darmstadt
-# licenses this file to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-page.title=Evaluation
diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/EvaluationSimulationPageMenuItem.java b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/EvaluationSimulationPageMenuItem.java
deleted file mode 100644
index a8bfaae83dd..00000000000
--- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/EvaluationSimulationPageMenuItem.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Technische Universität Darmstadt under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The Technische Universität Darmstadt
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.tudarmstadt.ukp.inception.recommendation.evaluation;
-
-import static de.tudarmstadt.ukp.clarin.webanno.model.PermissionLevel.MANAGER;
-
-import org.apache.wicket.Page;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.annotation.Order;
-
-import de.agilecoders.wicket.core.markup.html.bootstrap.image.IconType;
-import de.agilecoders.wicket.extensions.markup.html.bootstrap.icon.FontAwesome5IconType;
-import de.tudarmstadt.ukp.clarin.webanno.api.ProjectService;
-import de.tudarmstadt.ukp.clarin.webanno.model.Project;
-import de.tudarmstadt.ukp.clarin.webanno.security.UserDao;
-import de.tudarmstadt.ukp.clarin.webanno.security.model.User;
-import de.tudarmstadt.ukp.clarin.webanno.ui.core.menu.ProjectMenuItem;
-import de.tudarmstadt.ukp.inception.recommendation.api.RecommendationService;
-import de.tudarmstadt.ukp.inception.recommendation.config.RecommenderServiceAutoConfiguration;
-import wicket.contrib.input.events.key.KeyType;
-
-/**
- *
- * This class is exposed as a Spring Component via
- * {@link RecommenderServiceAutoConfiguration#evaluationSimulationPageMenuItem()}.
- *
- */
-@Order(300)
-public class EvaluationSimulationPageMenuItem
- implements ProjectMenuItem
-{
- private @Autowired UserDao userRepo;
- private @Autowired ProjectService projectService;
- private @Autowired RecommendationService recommenderService;
-
- @Override
- public String getPath()
- {
- return "/evaluation";
- }
-
- @Override
- public IconType getIcon()
- {
- return FontAwesome5IconType.chart_line_s;
- }
-
- @Override
- public String getLabel()
- {
- return "Evaluation";
- }
-
- @Override
- public boolean applies(Project aProject)
- {
- // Visible if the current user is a curator
- User user = userRepo.getCurrentUser();
- if (!(projectService.hasRole(user, aProject, MANAGER))) {
- return false;
- }
-
- return !recommenderService.listRecommenders(aProject).isEmpty();
- }
-
- @Override
- public Class extends Page> getPageClass()
- {
- return EvaluationSimulationPage.class;
- }
-
- @Override
- public KeyType[] shortcut()
- {
- return new KeyType[] { KeyType.Alt, KeyType.s };
- }
-}
diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/RecommenderViewPanel.html b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/RecommenderViewPanel.html
deleted file mode 100644
index 5ec6631884d..00000000000
--- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/RecommenderViewPanel.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/RecommenderViewPanel.java b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/RecommenderViewPanel.java
deleted file mode 100644
index adff0fdd90c..00000000000
--- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/RecommenderViewPanel.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Technische Universität Darmstadt under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The Technische Universität Darmstadt
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.tudarmstadt.ukp.inception.recommendation.evaluation;
-
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.form.TextField;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.ComponentPropertyModel;
-import org.apache.wicket.model.CompoundPropertyModel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.LoadableDetachableModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
-
-import de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature;
-import de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer;
-import de.tudarmstadt.ukp.inception.recommendation.api.RecommenderFactoryRegistry;
-import de.tudarmstadt.ukp.inception.recommendation.api.model.Recommender;
-import de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommendationEngineFactory;
-
-public class RecommenderViewPanel
- extends Panel
-{
- private static final long serialVersionUID = -5278078988218713188L;
-
- private static final String MID_FORM = "form";
- private static final String MID_NAME = "name";
- private static final String MID_FEATURE = "feature";
- private static final String MID_LAYER = "layer";
- private static final String MID_TOOL = "tool";
-
- private @SpringBean RecommenderFactoryRegistry recommenderRegistry;
-
- public RecommenderViewPanel(String aId, IModel aRecommender)
- {
- super(aId, aRecommender);
-
- Form form = new Form<>(MID_FORM, CompoundPropertyModel.of(aRecommender));
- add(form);
-
- form.add(new TextField<>(MID_NAME, String.class));
- form.add(new TextField<>(MID_TOOL, LoadableDetachableModel.of(this::getToolName),
- String.class));
- form.add(new TextField(MID_FEATURE,
- new ComponentPropertyModel<>("feature.uiName")));
- form.add(new TextField(MID_LAYER,
- new ComponentPropertyModel<>("layer.uiName")));
- }
-
- public Recommender getModelObject()
- {
- return (Recommender) getDefaultModelObject();
- }
-
- private String getToolName()
- {
- if (getModelObject() == null) {
- return null;
- }
-
- RecommendationEngineFactory> factory = recommenderRegistry
- .getFactory(getModelObject().getTool());
- if (factory == null) {
- return "[UNSUPPORTED]";
- }
-
- return factory.getName();
- }
-}
diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/RecommenderViewPanel.properties b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/RecommenderViewPanel.properties
deleted file mode 100644
index 2d5ce95f857..00000000000
--- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/RecommenderViewPanel.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Technische Universität Darmstadt under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The Technische Universität Darmstadt
-# licenses this file to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-details=Details
-name=Name
-layer=Layer
-tool=Tool
-feature=Feature
diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/SimulationLearningCurvePanel.html b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/SimulationLearningCurvePanel.html
deleted file mode 100644
index fb54df69264..00000000000
--- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/SimulationLearningCurvePanel.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/SimulationLearningCurvePanel.java b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/SimulationLearningCurvePanel.java
deleted file mode 100644
index da824d6be60..00000000000
--- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/evaluation/SimulationLearningCurvePanel.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * Licensed to the Technische Universität Darmstadt under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The Technische Universität Darmstadt
- * licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package de.tudarmstadt.ukp.inception.recommendation.evaluation;
-
-import static de.tudarmstadt.ukp.clarin.webanno.api.CasUpgradeMode.AUTO_CAS_UPGRADE;
-import static de.tudarmstadt.ukp.clarin.webanno.api.casstorage.CasAccessMode.SHARED_READ_ONLY_ACCESS;
-import static de.tudarmstadt.ukp.clarin.webanno.model.PermissionLevel.ANNOTATOR;
-import static de.tudarmstadt.ukp.clarin.webanno.support.WebAnnoConst.CURATION_USER;
-import static de.tudarmstadt.ukp.clarin.webanno.support.WebAnnoConst.INITIAL_CAS_PSEUDO_USER;
-import static de.tudarmstadt.ukp.clarin.webanno.support.lambda.LambdaBehavior.visibleWhen;
-import static de.tudarmstadt.ukp.inception.recommendation.model.RecommenderEvaluationScoreMetricEnum.Accuracy;
-import static java.util.Collections.emptyList;
-import static org.apache.commons.collections4.CollectionUtils.isNotEmpty;
-import static org.apache.commons.lang3.exception.ExceptionUtils.getRootCauseMessage;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Optional;
-
-import org.apache.uima.cas.CAS;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.feedback.IFeedback;
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.LoadableDetachableModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.util.ListModel;
-import org.apache.wicket.request.cycle.RequestCycle;
-import org.apache.wicket.spring.injection.annot.SpringBean;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import de.tudarmstadt.ukp.clarin.webanno.api.DocumentService;
-import de.tudarmstadt.ukp.clarin.webanno.api.ProjectService;
-import de.tudarmstadt.ukp.clarin.webanno.model.Project;
-import de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument;
-import de.tudarmstadt.ukp.clarin.webanno.security.UserDao;
-import de.tudarmstadt.ukp.clarin.webanno.security.model.User;
-import de.tudarmstadt.ukp.clarin.webanno.support.lambda.LambdaAjaxButton;
-import de.tudarmstadt.ukp.clarin.webanno.support.lambda.LambdaChoiceRenderer;
-import de.tudarmstadt.ukp.inception.recommendation.api.RecommenderFactoryRegistry;
-import de.tudarmstadt.ukp.inception.recommendation.api.evaluation.EvaluationResult;
-import de.tudarmstadt.ukp.inception.recommendation.api.evaluation.IncrementalSplitter;
-import de.tudarmstadt.ukp.inception.recommendation.api.model.Recommender;
-import de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommendationEngine;
-import de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommendationEngineFactory;
-import de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommendationException;
-import de.tudarmstadt.ukp.inception.recommendation.chart.ChartPanel;
-import de.tudarmstadt.ukp.inception.recommendation.model.RecommenderEvaluationScoreMetricEnum;
-
-public class SimulationLearningCurvePanel
- extends Panel
-{
- private static final long serialVersionUID = 4306746527837380863L;
-
- private static final String MID_CHART_CONTAINER = "chart-container";
- private static final String MID_SIMULATION_START_BUTTON = "simulation-start-button";
- private static final String MID_FORM = "form";
-
- private static final double TRAIN_PERCENTAGE = 0.8;
- private static final int STEPS = 10;
- private static final int LOW_SAMPLE_THRESHOLD = 10;
-
- private static final Logger LOG = LoggerFactory.getLogger(SimulationLearningCurvePanel.class);
-
- private static final List DROPDOWN_VALUES = Arrays
- .asList(RecommenderEvaluationScoreMetricEnum.values());
-
- private @SpringBean DocumentService documentService;
- private @SpringBean ProjectService projectService;
- private @SpringBean UserDao userDao;
- private @SpringBean RecommenderFactoryRegistry recommenderRegistry;
-
- private final Project project;
- private final IModel recommender;
- private final IModel user;
- private final IModel metric;
-
- private final DropDownChoice metricChoice;
- private final DropDownChoice annotatorChoice;
- private final ChartPanel chartPanel;
-
- private final IModel> evaluationResults;
-
- public SimulationLearningCurvePanel(String aId, Project aProject,
- IModel aRecommender)
- {
- super(aId, aRecommender);
-
- project = aProject;
- recommender = aRecommender;
- evaluationResults = new ListModel(emptyList());
- metric = new Model(Accuracy);
-
- Form form = new Form<>(MID_FORM);
- add(form);
-
- chartPanel = new ChartPanel(MID_CHART_CONTAINER, evaluationResults, metric);
- chartPanel.setOutputMarkupPlaceholderTag(true);
- chartPanel.add(visibleWhen(() -> isNotEmpty(chartPanel.getModelObject())));
- form.add(chartPanel);
-
- metricChoice = new DropDownChoice("metric", metric,
- new ListModel(DROPDOWN_VALUES));
- metricChoice.setOutputMarkupId(true);
- form.add(metricChoice);
-
- IModel> annotatorChoiceModel = LoadableDetachableModel
- .of(this::getSelectableAnnotators);
- user = Model.of(annotatorChoiceModel.getObject().get(0));
- annotatorChoice = new DropDownChoice("annotator", user, annotatorChoiceModel);
- annotatorChoice.setChoiceRenderer(new LambdaChoiceRenderer<>(User::getUiName));
- annotatorChoice.setOutputMarkupId(true);
- form.add(annotatorChoice);
-
- // clicking the start button the annotated documents are evaluated and the learning curve
- // for the selected recommender is plotted in the hCart Panel
- form.add(new LambdaAjaxButton<>(MID_SIMULATION_START_BUTTON, (_target, _form) -> {
- recommenderChanged();
- evaluate();
- _target.add(chartPanel);
- }));
- }
-
- private List getSelectableAnnotators()
- {
- List list = new ArrayList<>();
- list.add(new User(INITIAL_CAS_PSEUDO_USER, "
-
- org.webjars.bower
- hover
- org.webjars.bowergithub.xbsoftwareenjoyhint
@@ -101,7 +97,6 @@
- Maven doesn't detect the the webjar dependencies because there is
- no actual code dependency
-->
- org.webjars.bower:hoverorg.webjars.bowergithub.xbsoftware:enjoyhintorg.webjars.npm:kineticorg.webjars.bower:jquery.scrollTo
diff --git a/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/closesession/CloseSessionActionBarExtension.java b/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/closesession/CloseSessionActionBarExtension.java
new file mode 100644
index 00000000000..f551e4577c4
--- /dev/null
+++ b/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/closesession/CloseSessionActionBarExtension.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Technische Universität Darmstadt under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The Technische Universität Darmstadt
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.tudarmstadt.ukp.clarin.webanno.ui.annotation.actionbar.closesession;
+
+import org.apache.wicket.markup.html.panel.Panel;
+import org.springframework.core.annotation.Order;
+
+import de.tudarmstadt.ukp.clarin.webanno.api.annotation.actionbar.ActionBarExtension;
+import de.tudarmstadt.ukp.clarin.webanno.api.annotation.page.AnnotationPageBase;
+import de.tudarmstadt.ukp.clarin.webanno.ui.annotation.config.AnnotationUIAutoConfiguration;
+import de.tudarmstadt.ukp.inception.ui.core.menubar.MenuBar;
+
+/**
+ *
+ * This class is exposed as a Spring Component via
+ * {@link AnnotationUIAutoConfiguration#closeSessionActionBarExtension}.
+ *
+ */
+@Order(10000)
+public class CloseSessionActionBarExtension
+ implements ActionBarExtension
+{
+ @Override
+ public boolean accepts(AnnotationPageBase aPage)
+ {
+ return aPage.visitChildren(MenuBar.class, (c, v) -> {
+ v.stop(!((MenuBar) c).isVisible());
+ });
+ }
+
+ @Override
+ public Panel createActionBarItem(String aId, AnnotationPageBase aPage)
+ {
+ return new CloseSessionPanel(aId, aPage);
+ }
+}
diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/learningcurve/MetricSelectDropDownPanel.html b/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/closesession/CloseSessionPanel.html
similarity index 58%
rename from inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/learningcurve/MetricSelectDropDownPanel.html
rename to inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/closesession/CloseSessionPanel.html
index 24d9357fb6a..10bf7ffeb5a 100644
--- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/sidebar/learningcurve/MetricSelectDropDownPanel.html
+++ b/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/closesession/CloseSessionPanel.html
@@ -1,9 +1,9 @@
+
-
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/closesession/CloseSessionPanel.java b/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/closesession/CloseSessionPanel.java
new file mode 100644
index 00000000000..1f296eed3d7
--- /dev/null
+++ b/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/actionbar/closesession/CloseSessionPanel.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Technische Universität Darmstadt under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The Technische Universität Darmstadt
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.tudarmstadt.ukp.clarin.webanno.ui.annotation.actionbar.closesession;
+
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+import de.tudarmstadt.ukp.clarin.webanno.api.annotation.page.AnnotationPageBase;
+import de.tudarmstadt.ukp.clarin.webanno.security.config.LoginProperties;
+import de.tudarmstadt.ukp.clarin.webanno.security.config.PreauthenticationProperties;
+import de.tudarmstadt.ukp.clarin.webanno.support.lambda.LambdaAjaxLink;
+import de.tudarmstadt.ukp.clarin.webanno.ui.core.logout.LogoutPanel;
+
+public class CloseSessionPanel
+ extends Panel
+{
+ private static final long serialVersionUID = -9213541738534665790L;
+
+ private @SpringBean PreauthenticationProperties preauthenticationProperties;
+ private @SpringBean LoginProperties securityProperties;
+
+ public CloseSessionPanel(String aId, AnnotationPageBase aPage)
+ {
+ super(aId);
+ queue(new LambdaAjaxLink("logoutButton", this::actionLogout));
+ }
+
+ private void actionLogout(AjaxRequestTarget aTarget)
+ {
+ LogoutPanel.actionLogout(this, preauthenticationProperties, securityProperties);
+ }
+}
diff --git a/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/config/AnnotationUIAutoConfiguration.java b/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/config/AnnotationUIAutoConfiguration.java
index d76ad21694a..b9c61136013 100644
--- a/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/config/AnnotationUIAutoConfiguration.java
+++ b/inception/inception-ui-annotation/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/annotation/config/AnnotationUIAutoConfiguration.java
@@ -28,6 +28,7 @@
import de.tudarmstadt.ukp.clarin.webanno.api.ProjectService;
import de.tudarmstadt.ukp.clarin.webanno.security.UserDao;
import de.tudarmstadt.ukp.clarin.webanno.ui.annotation.AnnotationPageMenuItem;
+import de.tudarmstadt.ukp.clarin.webanno.ui.annotation.actionbar.closesession.CloseSessionActionBarExtension;
import de.tudarmstadt.ukp.clarin.webanno.ui.annotation.actionbar.undo.AnnotationUndoActionBarExtension;
import de.tudarmstadt.ukp.clarin.webanno.ui.annotation.actionbar.undo.actions.ChainAnnotationActionUndoSupport;
import de.tudarmstadt.ukp.clarin.webanno.ui.annotation.actionbar.undo.actions.FeatureValueActionUndoSupport;
@@ -84,4 +85,10 @@ public FeatureValueActionUndoSupport featureValueActionUndoSupport()
{
return new FeatureValueActionUndoSupport();
}
+
+ @Bean
+ public CloseSessionActionBarExtension closeSessionActionBarExtension()
+ {
+ return new CloseSessionActionBarExtension();
+ }
}
diff --git a/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/WicketApplicationBase.properties b/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/WicketApplicationBase.properties
index a79c1d43ff6..20c76c4ca69 100644
--- a/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/WicketApplicationBase.properties
+++ b/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/WicketApplicationBase.properties
@@ -40,6 +40,7 @@ redo=Redo
moveUp=Up
moveDown=Down
busy=Busy...
+logOut=Log out
enabled=Enabled
diff --git a/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.css b/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.css
index d789c1de1cb..c24f4517379 100644
--- a/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.css
+++ b/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.css
@@ -23,6 +23,11 @@
.login-form {
min-width: 440px;
max-width: 30%;
+ transition: box-shadow .3s;
+}
+
+.login-form:hover {
+ box-shadow: 0 0 10px var(--bs-tertiary-color);
}
.login-form input[type=text],input[type=password] {
@@ -39,4 +44,4 @@
.form-floating > .form-control:not(:placeholder-shown) ~ label::after {
background-color: unset !important;
-}
\ No newline at end of file
+}
diff --git a/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.html b/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.html
index 29543eade0e..a46de32ba17 100644
--- a/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.html
+++ b/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.html
@@ -21,7 +21,7 @@
-
+
Welcome!
diff --git a/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.java b/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.java
index e1c1ea6262a..39081022c27 100644
--- a/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.java
+++ b/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/login/LoginPage.java
@@ -62,7 +62,6 @@
import com.giffing.wicket.spring.boot.context.scan.WicketSignInPage;
-import de.agilecoders.wicket.webjars.request.resource.WebjarsCssResourceReference;
import de.tudarmstadt.ukp.clarin.webanno.api.SessionMetaData;
import de.tudarmstadt.ukp.clarin.webanno.security.UserDao;
import de.tudarmstadt.ukp.clarin.webanno.security.config.LoginProperties;
@@ -81,7 +80,7 @@
public class LoginPage
extends ApplicationPageBase
{
- private static final String PARAM_SKIP_AUTP_LOGIN = "skipAutoLogin";
+ public static final String PARAM_SKIP_AUTO_LOGIN = "skipAutoLogin";
private static final String PARAM_ERROR = "error";
private static final String PROP_RESTORE_DEFAULT_ADMIN_ACCOUNT = "restoreDefaultAdminAccount";
@@ -123,7 +122,7 @@ public LoginPage(PageParameters aParameters)
saml2LoginPanel.add(visibleWhen(this::isLoginAllowed));
queue(saml2LoginPanel);
- var skipAutoLogin = aParameters.get(PARAM_SKIP_AUTP_LOGIN).toBoolean(false)
+ var skipAutoLogin = aParameters.get(PARAM_SKIP_AUTO_LOGIN).toBoolean(false)
|| tooManyUsers.getObject();
// Failed OAuth2/SAML call this page with the parameter `?error` so we display a message
@@ -236,9 +235,6 @@ public void renderHead(IHeaderResponse aResponse)
{
super.renderHead(aResponse);
- aResponse.render(CssHeaderItem
- .forReference(new WebjarsCssResourceReference("hover/current/css/hover.css")));
-
aResponse.render(CssHeaderItem.forReference(LoginPageCssResourceReference.get()));
// Capture the URL fragment into a hidden form field so we can use it later when
diff --git a/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/logout/LogoutPanel.html b/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/logout/LogoutPanel.html
index ed974763c1e..f8d7511d2bb 100644
--- a/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/logout/LogoutPanel.html
+++ b/inception/inception-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/logout/LogoutPanel.html
@@ -34,7 +34,7 @@
- Log out
+