SEBSERV-371 fixed

This commit is contained in:
anhefti 2022-12-07 15:31:06 +01:00
parent ec6f12a703
commit 04dbfb9d31
25 changed files with 374 additions and 126 deletions

View file

@ -59,6 +59,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import ch.ethz.seb.sebserver.gbl.Constants;
import ch.ethz.seb.sebserver.gbl.api.JSONMapper;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
public final class Utils {
@ -853,4 +854,8 @@ public final class Utils {
return enumInst.name();
}
public static LocTextKey createFilterTooltipKey(final LocTextKey key) {
return new LocTextKey(key.name + ".filter" + Constants.TOOLTIP_TEXT_KEY_SUFFIX);
}
}

View file

@ -19,6 +19,7 @@ import ch.ethz.seb.sebserver.gbl.model.Domain;
import ch.ethz.seb.sebserver.gbl.model.Entity;
import ch.ethz.seb.sebserver.gbl.model.institution.Institution;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
import ch.ethz.seb.sebserver.gui.service.page.PageContext;
@ -53,10 +54,14 @@ public class InstitutionList implements TemplateComposer {
private static final LocTextKey EMPTY_SELECTION_TEXT_KEY =
new LocTextKey("sebserver.institution.info.pleaseSelect");
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, Entity.FILTER_ATTR_NAME);
private final TableFilterAttribute urlSuffixFilter =
new TableFilterAttribute(CriteriaType.TEXT, Institution.FILTER_ATTR_URL_SUFFIX);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
Entity.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(NAME_TEXT_KEY));
private final TableFilterAttribute urlSuffixFilter = new TableFilterAttribute(
CriteriaType.TEXT,
Institution.FILTER_ATTR_URL_SUFFIX,
Utils.createFilterTooltipKey(URL_TEXT_KEY));
private final TableFilterAttribute activityFilter;
private final PageService pageService;
@ -77,7 +82,8 @@ public class InstitutionList implements TemplateComposer {
CriteriaType.SINGLE_SELECTION,
Institution.FILTER_ATTR_ACTIVE,
StringUtils.EMPTY,
this.pageService.getResourceService()::activityResources);
this.pageService.getResourceService()::activityResources,
Utils.createFilterTooltipKey(ACTIVE_TEXT_KEY));
}
@Override

View file

@ -26,6 +26,7 @@ import ch.ethz.seb.sebserver.gbl.model.Entity;
import ch.ethz.seb.sebserver.gbl.model.user.UserInfo;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.service.ResourceService;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
@ -77,14 +78,22 @@ public class UserAccountList implements TemplateComposer {
// filter attribute models
private final TableFilterAttribute institutionFilter;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, Entity.FILTER_ATTR_NAME);
private final TableFilterAttribute surnameFilter =
new TableFilterAttribute(CriteriaType.TEXT, UserInfo.FILTER_ATTR_SURNAME);
private final TableFilterAttribute usernameFilter =
new TableFilterAttribute(CriteriaType.TEXT, UserInfo.FILTER_ATTR_USER_NAME);
private final TableFilterAttribute mailFilter =
new TableFilterAttribute(CriteriaType.TEXT, UserInfo.FILTER_ATTR_EMAIL);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
Entity.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(NAME_TEXT_KEY));
private final TableFilterAttribute surnameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
UserInfo.FILTER_ATTR_SURNAME,
Utils.createFilterTooltipKey(SURNAME_TEXT_KEY));
private final TableFilterAttribute usernameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
UserInfo.FILTER_ATTR_USER_NAME,
Utils.createFilterTooltipKey(USER_NAME_TEXT_KEY));
private final TableFilterAttribute mailFilter = new TableFilterAttribute(
CriteriaType.TEXT,
UserInfo.FILTER_ATTR_EMAIL,
Utils.createFilterTooltipKey(MAIL_TEXT_KEY));
private final TableFilterAttribute languageFilter;
private final TableFilterAttribute activityFilter;
@ -107,17 +116,20 @@ public class UserAccountList implements TemplateComposer {
this.institutionFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Entity.FILTER_ATTR_INSTITUTION,
this.resourceService::institutionResource);
this.resourceService::institutionResource,
Utils.createFilterTooltipKey(INSTITUTION_TEXT_KEY));
this.languageFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
UserInfo.FILTER_ATTR_LANGUAGE,
this.resourceService::languageResources);
this.resourceService::languageResources,
Utils.createFilterTooltipKey(LANG_TEXT_KEY));
this.activityFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
UserInfo.FILTER_ATTR_ACTIVE,
this.resourceService::activityResources);
this.resourceService::activityResources,
Utils.createFilterTooltipKey(ACTIVE_TEXT_KEY));
}
@Override

View file

@ -97,7 +97,10 @@ public class UserActivityLogs implements TemplateComposer {
private final TableFilterAttribute institutionFilter;
private final TableFilterAttribute userNameFilter =
new TableFilterAttribute(CriteriaType.TEXT, UserActivityLog.FILTER_ATTR_USER_NAME);
new TableFilterAttribute(
CriteriaType.TEXT,
UserActivityLog.FILTER_ATTR_USER_NAME,
Utils.createFilterTooltipKey(USER_TEXT_KEY));
private final TableFilterAttribute activityFilter;
private final TableFilterAttribute entityFilter;
@ -123,17 +126,20 @@ public class UserActivityLogs implements TemplateComposer {
this.institutionFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Entity.FILTER_ATTR_INSTITUTION,
this.resourceService::institutionResource);
this.resourceService::institutionResource,
Utils.createFilterTooltipKey(INSTITUTION_TEXT_KEY));
this.activityFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
UserActivityLog.FILTER_ATTR_ACTIVITY_TYPES,
this.resourceService::userActivityTypeResources);
this.resourceService::userActivityTypeResources,
Utils.createFilterTooltipKey(ACTIVITY_TEXT_KEY));
this.entityFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
UserActivityLog.FILTER_ATTR_ENTITY_TYPES,
this.resourceService::entityTypeResources);
this.resourceService::entityTypeResources,
Utils.createFilterTooltipKey(ENTITY_TYPE_TEXT_KEY));
}
@Override
@ -223,9 +229,8 @@ public class UserActivityLogs implements TemplateComposer {
.withFilter(new TableFilterAttribute(
CriteriaType.DATE_RANGE,
UserActivityLog.FILTER_ATTR_FROM_TO,
Utils.toDateTimeUTC(Utils.getMillisecondsNow())
.minusYears(1)
.toString()))
Utils.toDateTimeUTC(Utils.getMillisecondsNow()).minusYears(1).toString(),
Utils.createFilterTooltipKey(DATE_TEXT_KEY)))
.sortable())
.withDefaultAction(t -> actionBuilder

View file

@ -23,6 +23,7 @@ import ch.ethz.seb.sebserver.gbl.api.EntityType;
import ch.ethz.seb.sebserver.gbl.model.EntityKey;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.CertificateInfo;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.service.i18n.I18nSupport;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
@ -80,7 +81,8 @@ public class CertificateList implements TemplateComposer {
private final TableFilterAttribute aliasFilter = new TableFilterAttribute(
CriteriaType.TEXT,
CertificateInfo.FILTER_ATTR_ALIAS);
CertificateInfo.FILTER_ATTR_ALIAS,
Utils.createFilterTooltipKey(ALIAS_TEXT_KEY));
private final PageService pageService;
private final RestService restService;

View file

@ -109,10 +109,14 @@ public class ConfigTemplateForm implements TemplateComposer {
private final ResourceService resourceService;
private final ExamConfigurationService examConfigurationService;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, TemplateAttribute.FILTER_ATTR_NAME);
private final TableFilterAttribute groupFilter =
new TableFilterAttribute(CriteriaType.TEXT, TemplateAttribute.FILTER_ATTR_GROUP);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
TemplateAttribute.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(ATTRIBUTES_LIST_NAME_TEXT_KEY));
private final TableFilterAttribute groupFilter = new TableFilterAttribute(
CriteriaType.TEXT,
TemplateAttribute.FILTER_ATTR_GROUP,
Utils.createFilterTooltipKey(ATTRIBUTES_LIST_GROUP_TEXT_KEY));
protected ConfigTemplateForm(
final PageService pageService,
@ -210,11 +214,13 @@ public class ConfigTemplateForm implements TemplateComposer {
final TableFilterAttribute viewFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
TemplateAttribute.FILTER_ATTR_VIEW,
() -> this.resourceService.getViewResources(entityKey.modelId));
() -> this.resourceService.getViewResources(entityKey.modelId),
Utils.createFilterTooltipKey(ATTRIBUTES_LIST_VIEW_TEXT_KEY));
final TableFilterAttribute typeFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
TemplateAttribute.FILTER_ATTR_TYPE,
this.resourceService::getAttributeTypeResources);
this.resourceService::getAttributeTypeResources,
Utils.createFilterTooltipKey(ATTRIBUTES_LIST_TYPE_TEXT_KEY));
// TODO move this to an supplier that also can be updated
// the follow-up configuration

View file

@ -20,6 +20,7 @@ import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode.ConfigurationType;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.service.ResourceService;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
@ -65,10 +66,14 @@ public class ConfigTemplateList implements TemplateComposer {
private final int pageSize;
private final TableFilterAttribute institutionFilter;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, Entity.FILTER_ATTR_NAME);
private final TableFilterAttribute descFilter =
new TableFilterAttribute(CriteriaType.TEXT, ConfigurationNode.FILTER_ATTR_DESCRIPTION);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
Entity.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(NAME_TEXT_KEY));
private final TableFilterAttribute descFilter = new TableFilterAttribute(
CriteriaType.TEXT,
ConfigurationNode.FILTER_ATTR_DESCRIPTION,
Utils.createFilterTooltipKey(DESCRIPTION_TEXT_KEY));
protected ConfigTemplateList(
final PageService pageService,
@ -83,7 +88,8 @@ public class ConfigTemplateList implements TemplateComposer {
this.institutionFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Entity.FILTER_ATTR_INSTITUTION,
this.resourceService::institutionResource);
this.resourceService::institutionResource,
Utils.createFilterTooltipKey(INSTITUTION_TEXT_KEY));
}
@Override

View file

@ -25,6 +25,7 @@ import ch.ethz.seb.sebserver.gbl.model.sebconfig.SEBClientConfig;
import ch.ethz.seb.sebserver.gbl.model.user.UserInfo;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.service.ResourceService;
import ch.ethz.seb.sebserver.gui.service.i18n.I18nSupport;
@ -64,15 +65,17 @@ public class SEBClientConfigList implements TemplateComposer {
new LocTextKey("sebserver.clientconfig.info.pleaseSelect");
private final TableFilterAttribute institutionFilter;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, Entity.FILTER_ATTR_NAME);
private final TableFilterAttribute dateFilter =
new TableFilterAttribute(
CriteriaType.DATE,
SEBClientConfig.FILTER_ATTR_CREATION_DATE,
DateTime.now(DateTimeZone.UTC)
.minusYears(1)
.toString(Constants.DEFAULT_DATE_TIME_FORMAT));
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
Entity.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(NAME_TEXT_KEY));
private final TableFilterAttribute dateFilter = new TableFilterAttribute(
CriteriaType.DATE,
SEBClientConfig.FILTER_ATTR_CREATION_DATE,
DateTime.now(DateTimeZone.UTC)
.minusYears(1)
.toString(Constants.DEFAULT_DATE_TIME_FORMAT),
new LocTextKey("sebserver.clientconfig.list.column.date.filter.tooltip"));
private final TableFilterAttribute activityFilter;
private final PageService pageService;
@ -94,12 +97,14 @@ public class SEBClientConfigList implements TemplateComposer {
this.institutionFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Entity.FILTER_ATTR_INSTITUTION,
this.resourceService::institutionResource);
this.resourceService::institutionResource,
Utils.createFilterTooltipKey(INSTITUTION_TEXT_KEY));
this.activityFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
UserInfo.FILTER_ATTR_ACTIVE,
this.resourceService::activityResources);
this.resourceService::activityResources,
Utils.createFilterTooltipKey(ACTIVE_TEXT_KEY));
}
@Override

View file

@ -21,6 +21,7 @@ import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode;
import ch.ethz.seb.sebserver.gbl.model.sebconfig.ConfigurationNode.ConfigurationType;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.service.ResourceService;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
@ -63,10 +64,14 @@ public class SEBExamConfigList implements TemplateComposer {
new LocTextKey("sebserver.examconfig.info.pleaseSelect");
private final TableFilterAttribute institutionFilter;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, Entity.FILTER_ATTR_NAME);
private final TableFilterAttribute descFilter =
new TableFilterAttribute(CriteriaType.TEXT, ConfigurationNode.FILTER_ATTR_DESCRIPTION);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
Entity.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(NAME_TEXT_KEY));
private final TableFilterAttribute descFilter = new TableFilterAttribute(
CriteriaType.TEXT,
ConfigurationNode.FILTER_ATTR_DESCRIPTION,
Utils.createFilterTooltipKey(DESCRIPTION_TEXT_KEY));
private final TableFilterAttribute statusFilter;
private final TableFilterAttribute templateFilter;
@ -99,17 +104,20 @@ public class SEBExamConfigList implements TemplateComposer {
this.institutionFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Entity.FILTER_ATTR_INSTITUTION,
this.resourceService::institutionResource);
this.resourceService::institutionResource,
Utils.createFilterTooltipKey(INSTITUTION_TEXT_KEY));
this.statusFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
ConfigurationNode.FILTER_ATTR_STATUS,
this.resourceService::examConfigStatusFilterResources);
this.resourceService::examConfigStatusFilterResources,
Utils.createFilterTooltipKey(STATUS_TEXT_KEY));
this.templateFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
ConfigurationNode.FILTER_ATTR_TEMPLATE_ID,
this.resourceService::getExamConfigTemplateResourcesSelection);
this.resourceService::getExamConfigTemplateResourcesSelection,
Utils.createFilterTooltipKey(TEMPLATE_TEXT_KEY));
}
@Override

View file

@ -87,8 +87,10 @@ public class ExamList implements TemplateComposer {
private final TableFilterAttribute institutionFilter;
private final TableFilterAttribute lmsFilter;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, Domain.EXAM.ATTR_QUIZ_NAME);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
Domain.EXAM.ATTR_QUIZ_NAME,
Utils.createFilterTooltipKey(COLUMN_TITLE_NAME_KEY));
private final TableFilterAttribute stateFilter;
private final TableFilterAttribute typeFilter;
@ -107,22 +109,26 @@ public class ExamList implements TemplateComposer {
this.institutionFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Entity.FILTER_ATTR_INSTITUTION,
this.resourceService::institutionResource);
this.resourceService::institutionResource,
Utils.createFilterTooltipKey(COLUMN_TITLE_INSTITUTION_KEY));
this.lmsFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
LmsSetup.FILTER_ATTR_LMS_SETUP,
this.resourceService::lmsSetupResource);
this.resourceService::lmsSetupResource,
Utils.createFilterTooltipKey(COLUMN_TITLE_LMS_KEY));
this.stateFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Exam.FILTER_ATTR_STATUS,
this.resourceService::localizedExamStatusSelection);
this.resourceService::localizedExamStatusSelection,
Utils.createFilterTooltipKey(COLUMN_TITLE_STATE_KEY));
this.typeFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Exam.FILTER_ATTR_TYPE,
this.resourceService::examTypeResources);
this.resourceService::examTypeResources,
Utils.createFilterTooltipKey(COLUMN_TITLE_TYPE_KEY));
}
@Override
@ -193,7 +199,8 @@ public class ExamList implements TemplateComposer {
Domain.EXAM.ATTR_QUIZ_START_TIME,
Utils.toDateTimeUTC(Utils.getMillisecondsNow())
.minusYears(1)
.toString()))
.toString(),
new LocTextKey("sebserver.exam.list.column.starttime.filter.tooltip")))
.sortable())
.withColumn(new ColumnDefinition<>(

View file

@ -22,6 +22,7 @@ import ch.ethz.seb.sebserver.gbl.model.Entity;
import ch.ethz.seb.sebserver.gbl.model.exam.ExamTemplate;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.service.ResourceService;
import ch.ethz.seb.sebserver.gui.service.i18n.I18nSupport;
@ -74,8 +75,10 @@ public class ExamTemplateList implements TemplateComposer {
private final int pageSize;
private final TableFilterAttribute institutionFilter;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, ExamTemplate.FILTER_ATTR_NAME);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
ExamTemplate.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(COLUMN_TITLE_NAME_KEY));
private final TableFilterAttribute typeFilter;
protected ExamTemplateList(
@ -89,12 +92,14 @@ public class ExamTemplateList implements TemplateComposer {
this.institutionFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Entity.FILTER_ATTR_INSTITUTION,
this.resourceService::institutionResource);
this.resourceService::institutionResource,
Utils.createFilterTooltipKey(COLUMN_TITLE_INSTITUTION_KEY));
this.typeFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
ExamTemplate.FILTER_ATTR_EXAM_TYPE,
this.resourceService::examTypeResources);
this.resourceService::examTypeResources,
Utils.createFilterTooltipKey(COLUMN_TITLE_EXAM_TYPE_KEY));
}
@Override

View file

@ -23,6 +23,7 @@ import ch.ethz.seb.sebserver.gbl.model.institution.LmsSetup;
import ch.ethz.seb.sebserver.gbl.model.user.UserInfo;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.service.ResourceService;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
@ -64,8 +65,10 @@ public class LmsSetupList implements TemplateComposer {
new LocTextKey("sebserver.lmssetup.list.title");
private final TableFilterAttribute institutionFilter;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, Entity.FILTER_ATTR_NAME);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
Entity.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(NAME_TEXT_KEY));
private final TableFilterAttribute typeFilter;
private final TableFilterAttribute activityFilter;
@ -84,17 +87,20 @@ public class LmsSetupList implements TemplateComposer {
this.institutionFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Entity.FILTER_ATTR_INSTITUTION,
this.resourceService::institutionResource);
this.resourceService::institutionResource,
Utils.createFilterTooltipKey(INSTITUTION_TEXT_KEY));
this.typeFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
LmsSetup.FILTER_ATTR_LMS_TYPE,
this.resourceService::lmsTypeResources);
this.resourceService::lmsTypeResources,
Utils.createFilterTooltipKey(TYPE_TEXT_KEY));
this.activityFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
UserInfo.FILTER_ATTR_ACTIVE,
this.resourceService::activityResources);
this.resourceService::activityResources,
Utils.createFilterTooltipKey(ACTIVITY_TEXT_KEY));
}
@Override

View file

@ -110,8 +110,10 @@ public class QuizLookupList implements TemplateComposer {
// filter attribute models
private final TableFilterAttribute institutionFilter;
private final TableFilterAttribute lmsFilter;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, QuizData.FILTER_ATTR_NAME);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
QuizData.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(NAME_TEXT_KEY));
// dependencies
private final WidgetFactory widgetFactory;
@ -137,12 +139,14 @@ public class QuizLookupList implements TemplateComposer {
this.institutionFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Entity.FILTER_ATTR_INSTITUTION,
this.resourceService::institutionResource);
this.resourceService::institutionResource,
Utils.createFilterTooltipKey(INSTITUTION_TEXT_KEY));
this.lmsFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
LmsSetup.FILTER_ATTR_LMS_SETUP,
this.resourceService::lmsSetupResource);
this.resourceService::lmsSetupResource,
Utils.createFilterTooltipKey(LMS_TEXT_KEY));
}
@Override
@ -204,7 +208,8 @@ public class QuizLookupList implements TemplateComposer {
.withFilter(new TableFilterAttribute(
CriteriaType.DATE,
QuizData.FILTER_ATTR_START_TIME,
this.filterStartDate.toString()))
this.filterStartDate.toString(),
Utils.createFilterTooltipKey(START_TIME_TEXT_KEY)))
.sortable())
.withColumn(new ColumnDefinition<>(

View file

@ -79,10 +79,14 @@ public class FinishedExam implements TemplateComposer {
private static final LocTextKey TABLE_COLUMN_STATUS =
new LocTextKey("sebserver.finished.exam.connections.status");
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, ClientConnection.FILTER_ATTR_SESSION_ID);
private final TableFilterAttribute infoFilter =
new TableFilterAttribute(CriteriaType.TEXT, ClientConnection.ATTR_INFO);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
ClientConnection.FILTER_ATTR_SESSION_ID,
Utils.createFilterTooltipKey(TABLE_COLUMN_NAME));
private final TableFilterAttribute infoFilter = new TableFilterAttribute(
CriteriaType.TEXT,
ClientConnection.ATTR_INFO,
Utils.createFilterTooltipKey(TABLE_COLUMN_INFO));
private final TableFilterAttribute statusFilter;
private final PageService pageService;
@ -110,7 +114,8 @@ public class FinishedExam implements TemplateComposer {
this.statusFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
ClientConnection.FILTER_ATTR_STATUS,
pageService.getResourceService()::localizedClientConnectionStatusResources);
pageService.getResourceService()::localizedClientConnectionStatusResources,
Utils.createFilterTooltipKey(TABLE_COLUMN_STATUS));
}
@Override

View file

@ -109,8 +109,10 @@ public class FinishedExamClientConnection implements TemplateComposer {
private final int pageSize;
private final TableFilterAttribute typeFilter;
private final TableFilterAttribute textFilter =
new TableFilterAttribute(CriteriaType.TEXT, ClientEvent.FILTER_ATTR_TEXT);
private final TableFilterAttribute textFilter = new TableFilterAttribute(
CriteriaType.TEXT,
ClientEvent.FILTER_ATTR_TEXT,
Utils.createFilterTooltipKey(LIST_COLUMN_TEXT_KEY));
protected FinishedExamClientConnection(
final PageService pageService,
@ -130,7 +132,8 @@ public class FinishedExamClientConnection implements TemplateComposer {
this.typeFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Domain.CLIENT_EVENT.ATTR_TYPE,
this.resourceService::clientEventTypeResources);
this.resourceService::clientEventTypeResources,
Utils.createFilterTooltipKey(LIST_COLUMN_TYPE_KEY));
}
@Override

View file

@ -18,6 +18,7 @@ import ch.ethz.seb.sebserver.gbl.model.exam.Exam;
import ch.ethz.seb.sebserver.gbl.model.exam.QuizData;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.content.exam.ExamList;
import ch.ethz.seb.sebserver.gui.service.ResourceService;
@ -55,8 +56,10 @@ public class FinishedExamList implements TemplateComposer {
private final static LocTextKey EMPTY_LIST_TEXT_KEY =
new LocTextKey("sebserver.finished.exam.list.empty");
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, QuizData.FILTER_ATTR_NAME);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
QuizData.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(COLUMN_TITLE_NAME_KEY));
private final TableFilterAttribute typeFilter;
private final TableFilterAttribute stateFilter;
@ -75,12 +78,14 @@ public class FinishedExamList implements TemplateComposer {
this.typeFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Exam.FILTER_ATTR_TYPE,
this.resourceService::examTypeResources);
this.resourceService::examTypeResources,
Utils.createFilterTooltipKey(COLUMN_TITLE_TYPE_KEY));
this.stateFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Exam.FILTER_ATTR_STATUS,
this.resourceService::localizedFinishedExamStatusSelection);
this.resourceService::localizedFinishedExamStatusSelection,
Utils.createFilterTooltipKey(COLUMN_TITLE_STATE_KEY));
}
@Override

View file

@ -132,8 +132,10 @@ public class MonitoringClientConnection implements TemplateComposer {
private final int pageSize;
private final TableFilterAttribute typeFilter;
private final TableFilterAttribute textFilter =
new TableFilterAttribute(CriteriaType.TEXT, ClientEvent.FILTER_ATTR_TEXT);
private final TableFilterAttribute textFilter = new TableFilterAttribute(
CriteriaType.TEXT,
ClientEvent.FILTER_ATTR_TEXT,
Utils.createFilterTooltipKey(LIST_COLUMN_TEXT_KEY));
protected MonitoringClientConnection(
final ServerPushService serverPushService,
@ -161,7 +163,8 @@ public class MonitoringClientConnection implements TemplateComposer {
this.typeFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Domain.CLIENT_EVENT.ATTR_TYPE,
this.resourceService::clientEventTypeResources);
this.resourceService::clientEventTypeResources,
Utils.createFilterTooltipKey(LIST_COLUMN_TYPE_KEY));
}
@Override

View file

@ -17,6 +17,7 @@ import ch.ethz.seb.sebserver.gbl.model.EntityKey;
import ch.ethz.seb.sebserver.gbl.model.session.ClientConnection;
import ch.ethz.seb.sebserver.gbl.model.session.ClientConnection.ConnectionStatus;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
import ch.ethz.seb.sebserver.gui.service.page.PageContext;
@ -49,10 +50,14 @@ public class MonitoringExamSearchPopup {
private final PageService pageService;
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, ClientConnection.FILTER_ATTR_SESSION_ID);
private final TableFilterAttribute infoFilter =
new TableFilterAttribute(CriteriaType.TEXT, ClientConnection.ATTR_INFO);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
ClientConnection.FILTER_ATTR_SESSION_ID,
Utils.createFilterTooltipKey(TABLE_COLUMN_NAME));
private final TableFilterAttribute infoFilter = new TableFilterAttribute(
CriteriaType.TEXT,
ClientConnection.ATTR_INFO,
Utils.createFilterTooltipKey(TABLE_COLUMN_INFO));
private final TableFilterAttribute statusFilter;
protected MonitoringExamSearchPopup(final PageService pageService) {
@ -62,7 +67,8 @@ public class MonitoringExamSearchPopup {
CriteriaType.SINGLE_SELECTION,
ClientConnection.FILTER_ATTR_STATUS,
ConnectionStatus.ACTIVE.name(),
pageService.getResourceService()::localizedClientConnectionStatusResources);
pageService.getResourceService()::localizedClientConnectionStatusResources,
Utils.createFilterTooltipKey(TABLE_COLUMN_STATUS));
}
public void show(final PageContext pageContext) {

View file

@ -18,6 +18,7 @@ import ch.ethz.seb.sebserver.gbl.model.exam.Exam;
import ch.ethz.seb.sebserver.gbl.model.exam.QuizData;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.GuiProfile;
import ch.ethz.seb.sebserver.gbl.util.Utils;
import ch.ethz.seb.sebserver.gui.content.action.ActionDefinition;
import ch.ethz.seb.sebserver.gui.content.exam.ExamList;
import ch.ethz.seb.sebserver.gui.service.ResourceService;
@ -53,8 +54,10 @@ public class MonitoringRunningExamList implements TemplateComposer {
private final static LocTextKey EMPTY_LIST_TEXT_KEY =
new LocTextKey("sebserver.monitoring.exam.list.empty");
private final TableFilterAttribute nameFilter =
new TableFilterAttribute(CriteriaType.TEXT, QuizData.FILTER_ATTR_NAME);
private final TableFilterAttribute nameFilter = new TableFilterAttribute(
CriteriaType.TEXT,
QuizData.FILTER_ATTR_NAME,
Utils.createFilterTooltipKey(COLUMN_TITLE_NAME_KEY));
private final TableFilterAttribute typeFilter;
private final PageService pageService;
@ -72,7 +75,8 @@ public class MonitoringRunningExamList implements TemplateComposer {
this.typeFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
Exam.FILTER_ATTR_TYPE,
this.resourceService::examTypeResources);
this.resourceService::examTypeResources,
Utils.createFilterTooltipKey(COLUMN_TITLE_TYPE_KEY));
}
@Override

View file

@ -119,16 +119,19 @@ public class SEBClientEvents implements TemplateComposer {
this.examFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
ExtendedClientEvent.FILTER_ATTRIBUTE_EXAM,
this.resourceService::getExamLogSelectionResources);
this.resourceService::getExamLogSelectionResources,
Utils.createFilterTooltipKey(EXAM_TEXT_KEY));
this.clientSessionFilter = new TableFilterAttribute(
CriteriaType.TEXT,
ClientConnection.FILTER_ATTR_SESSION_ID);
ClientConnection.FILTER_ATTR_SESSION_ID,
Utils.createFilterTooltipKey(CLIENT_SESSION_TEXT_KEY));
this.eventTypeFilter = new TableFilterAttribute(
CriteriaType.SINGLE_SELECTION,
ClientEvent.FILTER_ATTR_TYPE,
this.resourceService::clientEventTypeResources);
this.resourceService::clientEventTypeResources,
Utils.createFilterTooltipKey(TYPE_TEXT_KEY));
}
@Override
@ -199,7 +202,8 @@ public class SEBClientEvents implements TemplateComposer {
ClientEvent.FILTER_ATTR_SERVER_TIME_FROM_TO,
Utils.toDateTimeUTC(Utils.getMillisecondsNow())
.minusYears(1)
.toString()))
.toString(),
Utils.createFilterTooltipKey(TIME_TEXT_KEY)))
.sortable()
.widthProportion(2))

View file

@ -13,6 +13,7 @@ import java.util.Locale;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DateTime;
import org.eclipse.swt.widgets.ExpandBar;
import org.eclipse.swt.widgets.ExpandItem;
import org.eclipse.swt.widgets.Group;
@ -21,11 +22,13 @@ import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import ch.ethz.seb.sebserver.gui.service.page.PageContext;
import ch.ethz.seb.sebserver.gui.widget.ImageUploadSelection;
import ch.ethz.seb.sebserver.gui.widget.Selection;
public interface PolyglotPageService {
@ -151,6 +154,12 @@ public interface PolyglotPageService {
* @param locTooltipKey the localized text key for the tool-tip to inject */
void injectI18n(TabItem tabItem, LocTextKey locTextKey, LocTextKey locTooltipKey);
void injectI18n(Text textInput, LocTextKey locTextKey, LocTextKey tooltip);
void injectTooltip(DateTime selector, LocTextKey tooltip);
void injectTooltip(Selection selector, LocTextKey tooltip);
/** Used to inject a localized tool-tip text within the given Control (Widget) that automatically gets changed on
* language change.
*

View file

@ -17,6 +17,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DateTime;
import org.eclipse.swt.widgets.ExpandBar;
import org.eclipse.swt.widgets.ExpandItem;
import org.eclipse.swt.widgets.Group;
@ -26,6 +27,7 @@ import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.springframework.context.annotation.Lazy;
@ -39,6 +41,7 @@ import ch.ethz.seb.sebserver.gui.service.i18n.PolyglotPageService;
import ch.ethz.seb.sebserver.gui.service.page.ComposerService;
import ch.ethz.seb.sebserver.gui.service.page.PageContext;
import ch.ethz.seb.sebserver.gui.widget.ImageUploadSelection;
import ch.ethz.seb.sebserver.gui.widget.Selection;
/** Service that supports page language change on the fly */
@Lazy
@ -121,8 +124,10 @@ public final class PolyglotPageServiceImpl implements PolyglotPageService {
@Override
public void injectI18n(final ExpandItem expandItem, final LocTextKey locTextKey) {
expandItem.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
expandItem.setText(this.i18nSupport.getText(locTextKey));
if (locTextKey != null) {
expandItem.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
expandItem.setText(this.i18nSupport.getText(locTextKey));
}
}
@Override
@ -153,8 +158,10 @@ public final class PolyglotPageServiceImpl implements PolyglotPageService {
@Override
public void injectI18n(final TreeItem treeItem, final LocTextKey locTextKey) {
treeItem.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
treeItem.setText(this.i18nSupport.getText(locTextKey));
if (locTextKey != null) {
treeItem.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
treeItem.setText(this.i18nSupport.getText(locTextKey));
}
}
@Override
@ -176,8 +183,10 @@ public final class PolyglotPageServiceImpl implements PolyglotPageService {
@Override
public void injectI18n(final TableColumn tableColumn, final LocTextKey locTextKey, final LocTextKey locTooltipKey) {
tableColumn.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
tableColumn.setText(this.i18nSupport.getText(locTextKey));
if (locTextKey != null) {
tableColumn.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
tableColumn.setText(this.i18nSupport.getText(locTextKey));
}
if (this.i18nSupport.hasText(locTooltipKey)) {
tableColumn.setData(POLYGLOT_ITEM_TOOLTIP_DATA_KEY, locTooltipKey);
@ -185,10 +194,39 @@ public final class PolyglotPageServiceImpl implements PolyglotPageService {
}
}
@Override
public void injectTooltip(final DateTime selector, final LocTextKey locTooltipKey) {
if (this.i18nSupport.hasText(locTooltipKey)) {
selector.setData(POLYGLOT_ITEM_TOOLTIP_DATA_KEY, locTooltipKey);
selector.setToolTipText(Utils.formatLineBreaks(this.i18nSupport.getText(locTooltipKey)));
}
}
@Override
public void injectTooltip(final Selection selection, final LocTextKey locTooltipKey) {
if (this.i18nSupport.hasText(locTooltipKey)) {
selection.setToolTipText(Utils.formatLineBreaks(this.i18nSupport.getText(locTooltipKey)));
}
}
@Override
public void injectI18n(final Text textInput, final LocTextKey locTextKey, final LocTextKey locTooltipKey) {
if (locTextKey != null) {
textInput.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
textInput.setText(this.i18nSupport.getText(locTextKey));
}
if (this.i18nSupport.hasText(locTooltipKey)) {
textInput.setData(POLYGLOT_ITEM_TOOLTIP_DATA_KEY, locTooltipKey);
textInput.setToolTipText(Utils.formatLineBreaks(this.i18nSupport.getText(locTooltipKey)));
}
}
@Override
public void injectI18n(final TabItem tabItem, final LocTextKey locTextKey, final LocTextKey locTooltipKey) {
tabItem.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
tabItem.setText(this.i18nSupport.getText(locTextKey));
if (locTextKey != null) {
tabItem.setData(POLYGLOT_ITEM_TEXT_DATA_KEY, locTextKey);
tabItem.setText(this.i18nSupport.getText(locTextKey));
}
if (this.i18nSupport.hasText(locTooltipKey)) {
tabItem.setData(POLYGLOT_ITEM_TOOLTIP_DATA_KEY, locTooltipKey);

View file

@ -134,51 +134,61 @@ public final class ColumnDefinition<ROW> {
public final String initValue;
public final Supplier<List<Tuple<String>>> resourceSupplier;
public final Function<EntityTable<?>, List<Tuple<String>>> resourceFunction;
public final LocTextKey tooltip;
public TableFilterAttribute(final CriteriaType type, final String columnName) {
this(type, columnName, "", (Supplier<List<Tuple<String>>>) null);
public TableFilterAttribute(
final CriteriaType type,
final String columnName,
final LocTextKey tooltip) {
this(type, columnName, "", (Supplier<List<Tuple<String>>>) null, tooltip);
}
public TableFilterAttribute(
final CriteriaType type,
final String columnName,
final Supplier<List<Tuple<String>>> resourceSupplier) {
final Supplier<List<Tuple<String>>> resourceSupplier,
final LocTextKey tooltip) {
this(type, columnName, "", resourceSupplier);
}
public TableFilterAttribute(
final CriteriaType type,
final String columnName,
final String initValue) {
this(type, columnName, initValue, (Supplier<List<Tuple<String>>>) null);
this(type, columnName, "", resourceSupplier, tooltip);
}
public TableFilterAttribute(
final CriteriaType type,
final String columnName,
final String initValue,
final Supplier<List<Tuple<String>>> resourceSupplier) {
final LocTextKey tooltip) {
this(type, columnName, initValue, (Supplier<List<Tuple<String>>>) null, tooltip);
}
public TableFilterAttribute(
final CriteriaType type,
final String columnName,
final String initValue,
final Supplier<List<Tuple<String>>> resourceSupplier,
final LocTextKey tooltip) {
this.type = type;
this.columnName = columnName;
this.initValue = initValue;
this.resourceSupplier = resourceSupplier;
this.resourceFunction = null;
this.tooltip = tooltip;
}
public TableFilterAttribute(
final CriteriaType type,
final String columnName,
final String initValue,
final Function<EntityTable<?>, List<Tuple<String>>> resourceFunction) {
final Function<EntityTable<?>, List<Tuple<String>>> resourceFunction,
final LocTextKey tooltip) {
this.type = type;
this.columnName = columnName;
this.initValue = initValue;
this.resourceSupplier = null;
this.resourceFunction = resourceFunction;
this.tooltip = tooltip;
}
}

View file

@ -332,6 +332,13 @@ public class TableFilter<ROW extends ModelIdAware> {
TableFilter.this.entityTable.getName() + "_" + this.attribute.columnName,
getAriaLabel());
if (this.attribute.tooltip != null) {
TableFilter.this.entityTable.pageService.getPolyglotPageService().injectI18n(
this.textInput,
null,
this.attribute.tooltip);
}
this.textInput.setLayoutData(gridData);
this.textInput.addListener(SWT.KeyUp, event -> {
if (event.keyCode == Constants.ENTER.hashCode()) {
@ -395,6 +402,12 @@ public class TableFilter<ROW extends ModelIdAware> {
TableFilter.this.entityTable.getName() + "_" + this.attribute.columnName,
TableFilter.this.entityTable.widgetFactory.getI18nSupport().getText(getAriaLabel()));
if (this.attribute.tooltip != null) {
TableFilter.this.entityTable.pageService.getPolyglotPageService().injectTooltip(
this.selector,
this.attribute.tooltip);
}
this.selector
.adaptToControl()
.setLayoutData(gridData);
@ -454,6 +467,11 @@ public class TableFilter<ROW extends ModelIdAware> {
innerComposite,
getAriaLabel(),
TableFilter.this.entityTable.getName() + "_" + this.attribute.columnName);
if (this.attribute.tooltip != null) {
TableFilter.this.entityTable.pageService.getPolyglotPageService().injectTooltip(
this.selector,
this.attribute.tooltip);
}
this.selector.addListener(SWT.Selection, event -> {
TableFilter.this.entityTable.applyFilter();
});
@ -551,6 +569,11 @@ public class TableFilter<ROW extends ModelIdAware> {
final WidgetFactory wf = TableFilter.this.entityTable.widgetFactory;
wf.labelLocalized(this.innerComposite, DATE_FROM_TEXT);
this.fromDateSelector = wf.dateSelector(this.innerComposite, getAriaLabel(), testKey);
if (this.attribute.tooltip != null) {
TableFilter.this.entityTable.pageService.getPolyglotPageService().injectTooltip(
this.fromDateSelector,
this.attribute.tooltip);
}
this.fromDateSelector.addListener(SWT.Selection, event -> {
TableFilter.this.entityTable.applyFilter();
});
@ -563,6 +586,11 @@ public class TableFilter<ROW extends ModelIdAware> {
wf.labelLocalized(this.innerComposite, DATE_TO_TEXT);
this.toDateSelector = wf.dateSelector(this.innerComposite, getAriaLabel(), testKey);
if (this.attribute.tooltip != null) {
TableFilter.this.entityTable.pageService.getPolyglotPageService().injectTooltip(
this.toDateSelector,
this.attribute.tooltip);
}
this.toDateSelector.addListener(SWT.Selection, event -> {
TableFilter.this.entityTable.applyFilter();
});

View file

@ -173,10 +173,13 @@ sebserver.institution.list.title=Institutions
sebserver.institution.list.title.subtitle=
sebserver.institution.list.column.name=Name
sebserver.institution.list.column.name.tooltip=The name of the institution<br/><br/>Use the filter above to narrow down to a specific name<br/>{0}
sebserver.institution.list.column.name.filter.tooltip=Use the filter to narrow down to a specific name
sebserver.institution.list.column.urlSuffix=URL Suffix
sebserver.institution.list.column.urlSuffix.tooltip=The URL suffix to the institutional login page<br/><br/>Use the filter above to narrow down to a specific URL suffix<br/>{0}
sebserver.institution.list.column.urlSuffix.filter.tooltip=Use the filter to narrow down to a specific URL suffix
sebserver.institution.list.column.active=Status
sebserver.institution.list.column.active.tooltip=The activity of the institution<br/><br/>Use the filter above to specify the activity<br/>{0}
sebserver.institution.list.column.active.filter.tooltip=Use the filter to specify the activity
sebserver.institution.action.list=Institution
sebserver.institution.action.form=Institution
@ -235,17 +238,23 @@ sebserver.useraccount.list.title=User Accounts
sebserver.useraccount.list.title.subtitle=
sebserver.useraccount.list.column.institution=Institution
sebserver.useraccount.list.column.institution.tooltip=The institution of the user account<br/><br/>Use the filter above to specify the institution<br/>{0}
sebserver.useraccount.list.column.institution.filter.tooltip=Use the filter to specify the institution
sebserver.useraccount.list.column.name=First Name
sebserver.useraccount.list.column.name.tooltip=The first name of the user<br/><br/>Use the filter above to narrow down to a specific first name<br/>{0}
sebserver.useraccount.list.column.name.filter.tooltip=Use the filter to narrow down to a specific first name
sebserver.useraccount.list.column.surname=Surname
sebserver.useraccount.list.column.surname.tooltip=The surname of the user<br/><br/>Use the filter above to narrow down to a specific surname<br/>{0}
sebserver.useraccount.list.column.surname.filter.tooltip=Use the filter to narrow down to a specific surname
sebserver.useraccount.list.column.username=User Name
sebserver.useraccount.list.column.username.tooltip=The internal user name of the user<br/><br/>Use the filter above to narrow down to a specific user name<br/>{0}
sebserver.useraccount.list.column.username.filter.tooltip=Use the filter to narrow down to a specific user name
sebserver.useraccount.list.column.email=Mail
sebserver.useraccount.list.column.email.tooltip=The e-mail address of the user<br/><br/>Use the filter above to narrow down to a specific e-mail address<br/>{0}
sebserver.useraccount.list.column.email.filter.tooltip=Use the filter to narrow down to a specific e-mail address
sebserver.useraccount.list.column.language=Language
sebserver.useraccount.list.column.active=Status
sebserver.useraccount.list.column.active.tooltip=The status of the user<br/><br/>Use the filter above to specify the status<br/>{0}
sebserver.useraccount.list.column.active.filter.tooltip=Use the filter to specify the status
sebserver.useraccount.action.list=User Account
sebserver.useraccount.action.form=User Account of {0}
@ -330,12 +339,16 @@ sebserver.lmssetup.list.title=Learning Management System Setups
sebserver.lmssetup.list.title.subtitle=List of connection settings to the LMS.
sebserver.lmssetup.list.column.institution=Institution
sebserver.lmssetup.list.column.institution.tooltip=The institution of the LMS setup<br/><br/>Use the filter above to specify the institution<br/>{0}
sebserver.lmssetup.list.column.institution.filter.tooltip=Use the filter to specify the institution
sebserver.lmssetup.list.column.name=Name
sebserver.lmssetup.list.column.name.tooltip=The name of the LMS setup<br/><br/>Use the filter above to narrow down to a specific LMS by name<br/>{0}
sebserver.lmssetup.list.column.name.filter.tooltip=Use the filter to narrow down to a specific LMS by name
sebserver.lmssetup.list.column.type=LMS Type
sebserver.lmssetup.list.column.type.tooltip=The type of the LMS<br/><br/>Use the filter above to specify the LMS type<br/>{0}
sebserver.lmssetup.list.column.type.filter.tooltip=Use the filter to specify the LMS type
sebserver.lmssetup.list.column.active=Status
sebserver.lmssetup.list.column.active.tooltip=The status of the LMS Setup<br/><br/>Use the filter above to specify the status<br/>{0}
sebserver.lmssetup.list.column.active.filter.tooltip=Use the filter above to specify the status
sebserver.lmssetup.action.list=LMS Setup
sebserver.lmssetup.action.form=LMS Setup
@ -411,12 +424,16 @@ sebserver.quizdiscovery.list.title.subtitle=List of exams found in connected LMS
sebserver.quizdiscovery.list.empty=No LMS exam can be found. Please adapt the filter or create a new LMS Setup
sebserver.quizdiscovery.list.column.institution=Institution
sebserver.quizdiscovery.list.column.institution.tooltip=The institution filter<br/><br/>Use the filter above to specify the institution<br/>{0}
sebserver.quizdiscovery.list.column.institution.filter.tooltip=Use the filter to specify the institution
sebserver.quizdiscovery.list.column.lmssetup=LMS
sebserver.quizdiscovery.list.column.lmssetup.tooltip=The LMS setup filter<br/><br/>Use the filter above to find all LMS exams of a specific LMS setup<br/>{0}
sebserver.quizdiscovery.list.column.lmssetup.filter.tooltip=Use the filter to find all LMS exams of a specific LMS setup
sebserver.quizdiscovery.list.column.name=Name
sebserver.quizdiscovery.list.column.name.tooltip=The name of the LMS exam<br/><br/>Use the filter above to narrow down to a specific name<br/>{0}
sebserver.quizdiscovery.list.column.name.filter.tooltip=Use the filter to narrow down to a specific name
sebserver.quizdiscovery.list.column.starttime=Start Time {0}
sebserver.quizdiscovery.list.column.starttime.tooltip=The start time of the LMS exam<br/><br/>Use the filter above to set a specific from date<br/>{0}
sebserver.quizdiscovery.list.column.starttime.filter.tooltip=Use the filter to set a specific from date
sebserver.quizdiscovery.list.column.endtime=End Time {0}
sebserver.quizdiscovery.list.column.endtime.tooltip=The end time of the LMS exam<br/><br/>{0}
sebserver.quizdiscovery.info.pleaseSelect=At first please select an LMS exam from the list
@ -466,16 +483,22 @@ sebserver.exam.list.title=Exam
sebserver.exam.list.title.subtitle=
sebserver.exam.list.column.institution=Institution
sebserver.exam.list.column.institution.tooltip=The institution of the LMS setup that defines the LMS of the exam<br/><br/>Use the filter above to specify the institution<br/>{0}
sebserver.exam.list.column.institution.filter.tooltip=Use the filter to specify the institution
sebserver.exam.list.column.lmssetup=LMS
sebserver.exam.list.column.lmssetup.tooltip=The LMS setup that defines the LMS of the exam<br/><br/>Use the filter above to specify the LMS setup<br/>{0}
sebserver.exam.list.column.lmssetup.filter.tooltip=Use the filter to specify the LMS setup
sebserver.exam.list.column.name=Name
sebserver.exam.list.column.name.tooltip=The name of the exam<br/><br/>Use the filter above to narrow down to a specific exam name<br/>{0}
sebserver.exam.list.column.name.filter.tooltip=Use the filter to narrow down to a specific exam name
sebserver.exam.list.column.starttime=Start Time {0}
sebserver.exam.list.column.starttime.tooltip=The start time of the exam<br/><br/>Use the filter above to set a specific from date<br/>{0}
sebserver.exam.list.column.starttime.filter.tooltip=Use the filter to set a specific from date
sebserver.exam.list.column.type=Type
sebserver.exam.list.column.type.tooltip=The type of the exam<br/><br/>Use the filter above to set a specific exam type<br/>{0}
sebserver.exam.list.column.type.filter.tooltip=Use the filter to set a specific exam type
sebserver.exam.list.column.state=Status
sebserver.exam.list.column.state.tooltip=The current status of the exam<br/><br/>Use the filter above to set a specific exam status<br/>{0}
sebserver.exam.list.column.state.filter.tooltip=Use the filter to set a specific exam status
sebserver.exam.list.empty=No Exam can be found. Please adapt the filter or import one from LMS
sebserver.exam.list.modify.out.dated=Finished exams cannot be modified.
@ -841,7 +864,7 @@ sebserver.exam.signaturekey.grantlist.tag.tooltip=The tag name if the security k
sebserver.exam.signaturekey.grantlist.pleaseSelect=Please select a security key grant from the list.
sebserver.exam.signaturekey.grantlist.delete.confirm=Are you sure to delete this security key grant
sebserver.exam.signaturekey.grant.title=Security Key Grant
sebserver.exam.signaturekey.grant.title=Granted
sebserver.exam.signaturekey.grant.key=Granted Key Hash
sebserver.exam.signaturekey.grant.tag=Tag Name
sebserver.exam.signaturekey.grant.type=Key Type
@ -856,12 +879,16 @@ sebserver.clientconfig.list.title.subtitle=
sebserver.clientconfig.list.actions=
sebserver.clientconfig.list.column.institution=Institution
sebserver.clientconfig.list.column.institution.tooltip=The institution of the connection configuration<br/><br/>Use the filter above to specify the institution<br/>{0}
sebserver.clientconfig.list.column.institution.filter.tooltip=Use the filter to specify the institution
sebserver.clientconfig.list.column.name=Name
sebserver.clientconfig.list.column.name.tooltip=The name of the connection configuration<br/><br/>Use the filter above to narrow down to a specific name<br/>{0}
sebserver.clientconfig.list.column.name.filter.tooltip=Use the filter to narrow down to a specific name
sebserver.clientconfig.list.column.date=Creation Date {0}
sebserver.clientconfig.list.column.date.tooltip=The date when the connection configuration was first created<br/><br/>Use the filter above to specify a from-date<br/>{0}
sebserver.clientconfig.list.column.date.filter.tooltip=Use the filter to specify a from-date
sebserver.clientconfig.list.column.active=Status
sebserver.clientconfig.list.column.active.tooltip=The status of connection configuration<br/><br/>Use the filter above to specify the status<br/>{0}
sebserver.clientconfig.list.column.active.filter.tooltip=Use the filter to specify the status
sebserver.clientconfig.info.pleaseSelect=At first please select a Connection Configuration from the list
sebserver.clientconfig.list.action.no.modify.privilege=No Access: A connection configuration from other institution cannot be modified.
@ -948,14 +975,19 @@ sebserver.examconfig.list.title=Exam Configurations
sebserver.examconfig.list.title.subtitle=
sebserver.examconfig.list.column.institution=Institution
sebserver.examconfig.list.column.institution.tooltip=The institution of the SEB exam configuration<br/><br/>Use the filter above to specify the institution<br/>{0}
sebserver.examconfig.list.column.institution.filter.tooltip=Use the filter to specify the institution
sebserver.examconfig.list.column.name=Name
sebserver.examconfig.list.column.name.tooltip=The name of the SEB exam configuration<br/><br/>Use the filter above to narrow down to a specific name<br/>{0}
sebserver.examconfig.list.column.name.filter.tooltip=Use the filter to narrow down to a specific name
sebserver.examconfig.list.column.description=Description
sebserver.examconfig.list.column.description.tooltip=The description of the SEB exam configuration<br/><br/>Use the filter above to find configurations that contain specific words or phrases within the description.<br/>{0}
sebserver.examconfig.list.column.description.filter.tooltip=Use the filter to find configurations that contain specific words or phrases within the description
sebserver.examconfig.list.column.status=Status
sebserver.examconfig.list.column.status.tooltip=The status of the SEB exam configuration<br/><br/>Use the filter above to specify a status<br/>{0}
sebserver.examconfig.list.column.status.filter.tooltip=Use the filter to specify a status
sebserver.examconfig.list.column.template=Template
sebserver.examconfig.list.column.template.tooltip=The origin template of the SEB exam configuration<br/><br/>Use the filter above to specify a template<br/>{0}
sebserver.examconfig.list.column.template.filter.tooltip=Use the filter to specify a template
sebserver.examconfig.list.actions=
@ -1823,10 +1855,13 @@ sebserver.examtemplate.action.list.new=Add Exam Template
sebserver.examtemplate.list.column.institution=Institution
sebserver.examtemplate.list.column.institution.tooltip=The institution of the exam template <br/><br/>Use the filter above to specify the institution<br/>{0}
sebserver.examtemplate.list.column.institution.filter.tooltip=Use the filter to specify the institution
sebserver.examtemplate.list.column.name=Name
sebserver.examtemplate.list.column.name.tooltip=The name of the exam template<br/><br/>Use the filter above to narrow down to a specific name<br/>{0}
sebserver.examtemplate.list.column.name.filter.tooltip=Use the filter to narrow down to a specific name
sebserver.examtemplate.list.column.examType=Exam Type
sebserver.examtemplate.list.column.examType.tooltip=The exam type defined by the exam template<br/><br/>Use the filter above to select a specific exam type<br/>{0}
sebserver.examtemplate.list.column.examType.filter.tooltip=Use the filter to select a specific exam type
sebserver.examtemplate.list.column.default=Default Template
sebserver.examtemplate.list.column.default.tooltip=Indicates the current default exam template for the institution<br/>{0}
sebserver.examtemplate.list.column.default.true=Yes
@ -1904,6 +1939,8 @@ sebserver.certificate.info.pleaseSelect=At first please select at least one cert
sebserver.certificate.list.empty=There are currently no certificates available
sebserver.certificate.list.title=Certificates
sebserver.certificate.list.column.alias=Alias
sebserver.certificate.list.column.alias.tooltip=The alias name of the certificate<br/><br/>Use the filter above to narrow down to a alias name<br/>{0}
sebserver.certificate.list.column.alias.filter.tooltip=Use the filter to narrow down to a alias name
sebserver.certificate.list.column.validFrom=Valid From
sebserver.certificate.list.column.validTo=Valid To
sebserver.certificate.list.column.type=Types
@ -1959,8 +1996,10 @@ sebserver.monitoring.exam.list.empty=There are currently no running exams
sebserver.monitoring.exam.list.column.name=Name
sebserver.monitoring.exam.list.column.name.tooltip=The name of the exam<br/><br/>Use the filter above to narrow down to a specific exam name<br/>{0}
sebserver.monitoring.exam.list.column.name.filter.tooltip=Use the filter to narrow down to a specific exam name
sebserver.monitoring.exam.list.column.type=Type
sebserver.monitoring.exam.list.column.type.tooltip=The type of the exam<br/><br/>Use the filter above to set a specific exam type<br/>{0}
sebserver.monitoring.exam.list.column.type.filter.tooltip=Use the filter to set a specific exam type
sebserver.monitoring.exam.list.column.startTime=Start Time {0}
sebserver.monitoring.exam.list.column.startTime.tooltip=The start date and time of the exam<br/><br/>{0}
sebserver.monitoring.exam.list.column.endTime=End Time {0}
@ -2046,6 +2085,7 @@ sebserver.monitoring.exam.connection.eventlist.title.tooltip=All events and logs
sebserver.monitoring.exam.connection.eventlist.empty=No event found
sebserver.monitoring.exam.connection.eventlist.type=Event Type
sebserver.monitoring.exam.connection.eventlist.type.tooltip=The type of the log event<br/><br/>Use the filter above to set a specific event type<br/>{0}
sebserver.monitoring.exam.connection.eventlist.type.filter.tooltip=Use the filter to set a specific event type
sebserver.monitoring.exam.connection.eventlist.clienttime=Client Time {0}
sebserver.monitoring.exam.connection.eventlist.clienttime.tooltip=The time the SEB client has sent within the log event<br/><br/>{0}
sebserver.monitoring.exam.connection.eventlist.servertime=Server Time {0}
@ -2053,7 +2093,8 @@ sebserver.monitoring.exam.connection.eventlist.servertime.tooltip=The exact time
sebserver.monitoring.exam.connection.eventlist.value=Value
sebserver.monitoring.exam.connection.eventlist.value.tooltip=The value of the log event<br/><br/>{0}
sebserver.monitoring.exam.connection.eventlist.text=Text
sebserver.monitoring.exam.connection.eventlist.text.tooltip=The text of the log event<br/><br/>{0}
sebserver.monitoring.exam.connection.eventlist.text.tooltip=The text of the log event<br/><br/>Use the filter above to find a specific log message<br/>{0}
sebserver.monitoring.exam.connection.eventlist.text.filter.tooltip=Use the filter to find a specific log message
sebserver.monitoring.exam.connection.event.type.UNKNOWN=Unknown
sebserver.monitoring.exam.connection.event.type.DEBUG_LOG=Debug Log
@ -2108,10 +2149,13 @@ sebserver.finished.exam.list.empty=There are currently no finished exams
sebserver.finished.exam.list.column.name=Name
sebserver.finished.exam.list.column.name.tooltip=The name of the exam<br/><br/>Use the filter above to narrow down to a specific exam name<br/>{0}
sebserver.finished.exam.list.column.name.filter.tooltip=Use the filter to narrow down to a specific exam name
sebserver.finished.exam.list.column.state=State
sebserver.finished.exam.list.column.state.tooltip=The state of the finished exam<br/><br/>Use the filter above to see only archived or finished exams
sebserver.finished.exam.list.column.state.tooltip=The state of the finished exam<br/><br/>Use the filter above to see only archived or finished exams{0}
sebserver.finished.exam.list.column.state.filter.tooltip=Use the filter to see only archived or finished exams
sebserver.finished.exam.list.column.type=Type
sebserver.finished.exam.list.column.type.tooltip=The type of the exam<br/><br/>Use the filter above to set a specific exam type<br/>{0}
sebserver.finished.exam.list.column.type.filter.tooltip=Use the filter to set a specific exam type
sebserver.finished.exam.list.column.startTime=Start Time {0}
sebserver.finished.exam.list.column.startTime.tooltip=The start date and time of the exam<br/><br/>{0}
sebserver.finished.exam.list.column.endTime=End Time {0}
@ -2142,6 +2186,7 @@ sebserver.finished.exam.connection.eventlist.title.tooltip=All events and logs s
sebserver.finished.exam.connection.eventlist.empty=No event found
sebserver.finished.exam.connection.eventlist.type=Event Type
sebserver.finished.exam.connection.eventlist.type.tooltip=The type of the log event<br/><br/>Use the filter above to set a specific event type<br/>{0}
sebserver.finished.exam.connection.eventlist.type.filter.tooltip=Use the filter to set a specific event type
sebserver.finished.exam.connection.eventlist.clienttime=Client Time {0}
sebserver.finished.exam.connection.eventlist.clienttime.tooltip=The time the SEB client has sent within the log event<br/><br/>{0}
sebserver.finished.exam.connection.eventlist.servertime=Server Time {0}
@ -2166,14 +2211,19 @@ sebserver.logs.activity.seblogs.details=Show Details
sebserver.userlogs.list.title=User Activity Logs
sebserver.userlogs.list.column.institution=Institution
sebserver.userlogs.list.column.institution.tooltip=The institution of the user activity log<br/><br/>Use the filter above to specify the institution<br/>{0}
sebserver.userlogs.list.column.institution.filter.tooltip=Use the filter to specify the institution
sebserver.userlogs.list.column.user=User
sebserver.userlogs.list.column.user.tooltip=The user account of the user activity log<br/><br/>Use the filter above to specify a user account<br/>{0}
sebserver.userlogs.list.column.user.filter.tooltip=Use the filter to specify a user account
sebserver.userlogs.list.column.dateTime=Date {0}
sebserver.userlogs.list.column.dateTime.tooltip=The date when the user activity log happened<br/><br/>Use the filter above to specify a from- and to-date range<br/>{0}
sebserver.userlogs.list.column.dateTime.filter.tooltip=>Use the filter to specify a from- and to-date range
sebserver.userlogs.list.column.activityType=User Activity
sebserver.userlogs.list.column.activityType.tooltip=The type of the user activity<br/><br/>Use the filter above to specify an activity type<br/>{0}
sebserver.userlogs.list.column.activityType.filter.tooltip=Use the filter to specify an activity type
sebserver.userlogs.list.column.entityType=Domain Type
sebserver.userlogs.list.column.entityType.tooltip=The domain type of the user activity<br/><br/>Use the filter above to specify a domain type<br/>{0}
sebserver.userlogs.list.column.entityType.filter.tooltip=Use the filter to specify a domain type
sebserver.userlogs.form.user=User
sebserver.userlogs.form.user.tooltip=The user account of the user activity log
@ -2207,14 +2257,19 @@ sebserver.seblogs.list.empty=No SEB client logs available. Please adapt or clear
sebserver.seblogs.info.pleaseSelect=At first please select a SEB client Log from the list
sebserver.seblogs.list.column.institution=Institution
sebserver.seblogs.list.column.institution.tooltip=The institution where the exam belongs to<br/><br/>Use the filter above to specify the institution<br/>{0}
sebserver.seblogs.list.column.institution.filter.tooltip=Use the filter to specify the institution
sebserver.seblogs.list.column.exam=Exam
sebserver.seblogs.list.column.exam.tooltip=The exam of the SEB client logs<br/><br/>Use the filter above to specify an exam<br/>{0}
sebserver.seblogs.list.column.exam.filter.tooltip=Use the filter to specify an exam
sebserver.seblogs.list.column.client-session=User Session-ID
sebserver.seblogs.list.column.client-session.tooltip=The user or user-session identifier<br/><br/>Use the filter above to narrow down to a user identifier name<br/>{0}
sebserver.seblogs.list.column.client-session.filter.tooltip=Use the filter to narrow down to a user identifier name
sebserver.seblogs.list.column.type=Event Type
sebserver.seblogs.list.column.type.tooltip=The SEB client log event type<br/><br/>Use the filter above to specify log type<br/>{0}
sebserver.seblogs.list.column.type.filter.tooltip=Use the filter to specify log type
sebserver.seblogs.list.column.time=Event Time {0}
sebserver.seblogs.list.column.time.tooltip=The SEB client log time<br/><br/>Use the filter above to specify from- and to-date and time<br/>{0}
sebserver.seblogs.list.column.time.filter.tooltip=Use the filter to specify from- and to-date and time
sebserver.seblogs.list.column.value=Value
sebserver.seblogs.list.column.value.tooltip=The SEB client log value<br/><br/>{0}