Skip to content

Commit d38a782

Browse files
authored
Merge pull request #4775 from gchq/gh-4692_column_filter_selections
Gh 4692 column filter selections
2 parents c2447fc + 6ea4dfd commit d38a782

File tree

97 files changed

+2889
-675
lines changed

Some content is hidden

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

97 files changed

+2889
-675
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ elasticsearch = "8.12.2"
1313
httpcore = "4.4.16" # Transient dependency of Elasticsearch
1414
flyway = "10.0.0"
1515
guice = "7.0.0"
16-
gwt = "2.11.0"
16+
gwt = "2.12.1"
1717
jackson-swagger = "2.11.1" # Specific version of jackson for use with the swagger plugin
1818
jmh = "1.37"
1919
jooq = "3.18.7" # Defined at the top of this file

stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/ReportExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ private String getFileName(final String baseName,
390390
String fileName = baseName;
391391
fileName = NON_BASIC_CHARS.matcher(fileName).replaceAll("");
392392
fileName = MULTIPLE_SPACE.matcher(fileName).replaceAll(" ");
393-
fileName = fileName.replace(" ", "_");
393+
fileName = fileName.replace(' ', '_');
394394
fileName = fileName + "." + extension;
395395
return fileName;
396396
}

stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/ScheduledQueryAnalyticExecutor.java

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
import stroom.query.common.v2.OpenGroups;
4949
import stroom.query.common.v2.ResultStoreManager;
5050
import stroom.query.common.v2.ResultStoreManager.RequestAndStore;
51-
import stroom.query.common.v2.SimpleRowCreator;
51+
import stroom.query.common.v2.RowValueFilter;
5252
import stroom.query.common.v2.ValFilter;
5353
import stroom.query.common.v2.format.FormatterFactory;
5454
import stroom.query.language.SearchRequestFactory;
@@ -74,7 +74,6 @@
7474
import java.util.ArrayList;
7575
import java.util.List;
7676
import java.util.Map;
77-
import java.util.Optional;
7877
import java.util.function.Consumer;
7978
import java.util.function.Predicate;
8079

@@ -274,37 +273,28 @@ boolean process(final AnalyticRuleDoc analytic,
274273
final FormatterFactory formatterFactory =
275274
new FormatterFactory(sampleRequest.getDateTimeSettings());
276275

277-
// Create the row creator.
278-
Optional<ItemMapper<Row>> optionalRowCreator = FilteredRowCreator.create(
279-
dataStore.getColumns(),
280-
columns,
281-
false,
282-
formatterFactory,
283-
keyFactory,
284-
tableSettings.getAggregateFilter(),
285-
expressionContext.getDateTimeSettings(),
286-
errorConsumer,
287-
expressionPredicateFactory);
288-
289-
if (optionalRowCreator.isEmpty()) {
290-
optionalRowCreator = SimpleRowCreator.create(
276+
if (RowValueFilter.matches(columns)) {
277+
// Create the row creator.
278+
final ItemMapper<Row> rowCreator = FilteredRowCreator.create(
291279
dataStore.getColumns(),
292280
columns,
281+
false,
293282
formatterFactory,
294283
keyFactory,
295-
errorConsumer);
296-
}
297-
298-
final ItemMapper<Row> rowCreator = optionalRowCreator.orElse(null);
284+
tableSettings.getAggregateFilter(),
285+
expressionContext.getDateTimeSettings(),
286+
errorConsumer,
287+
expressionPredicateFactory);
299288

300-
dataStore.fetch(
301-
columns,
302-
OffsetRange.UNBOUNDED,
303-
OpenGroups.NONE,
304-
resultRequest.getTimeFilter(),
305-
rowCreator,
306-
itemConsumer,
307-
countConsumer);
289+
dataStore.fetch(
290+
columns,
291+
OffsetRange.UNBOUNDED,
292+
OpenGroups.NONE,
293+
resultRequest.getTimeFilter(),
294+
rowCreator,
295+
itemConsumer,
296+
countConsumer);
297+
}
308298

309299
} finally {
310300
final List<String> errors = errorConsumer.getErrors();

stroom-app-gwt/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ tasks.register('gwtCompile', JavaExec) {
315315
}
316316

317317
args = [
318+
'-sourceLevel', '17',
318319
'-logLevel', 'INFO',
319320
'-workDir', workDir,
320321
'-XfragmentCount', '5',
@@ -376,6 +377,7 @@ tasks.register('gwtDraftCompile', JavaExec) {
376377
}
377378

378379
args = [
380+
'-sourceLevel', '17',
379381
'-logLevel', 'INFO',
380382
'-workDir', workDir,
381383
'-draftCompile', // Speeds up compile with 25%
@@ -444,6 +446,7 @@ tasks.register('gwtSuperDevMode', JavaExec) {
444446
}
445447

446448
args = [
449+
'-sourceLevel', '17',
447450
'-logLevel', 'INFO',
448451
'-workDir', workDir,
449452
'-failOnError',

stroom-app/src/main/java/stroom/app/App.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
import jakarta.servlet.DispatcherType;
7676
import jakarta.servlet.FilterRegistration;
7777
import jakarta.validation.ValidatorFactory;
78+
import org.eclipse.jetty.http.HttpCookie;
79+
import org.eclipse.jetty.server.handler.ContextHandler;
7880
import org.eclipse.jetty.server.session.SessionHandler;
7981
import org.eclipse.jetty.servlets.CrossOriginFilter;
8082

@@ -385,13 +387,17 @@ private void configureSessionHandling(final Environment environment,
385387
private void configureSessionCookie(final Environment environment,
386388
final SessionCookieConfig sessionCookieConfig) {
387389
// Ensure the session cookie that provides JSESSIONID is secure.
388-
final jakarta.servlet.SessionCookieConfig servletSessionCookieConfig = environment
390+
final ContextHandler.Context context = environment
389391
.getApplicationContext()
390-
.getServletContext()
392+
.getServletContext();
393+
394+
final jakarta.servlet.SessionCookieConfig servletSessionCookieConfig = context
391395
.getSessionCookieConfig();
392396
servletSessionCookieConfig.setSecure(sessionCookieConfig.isSecure());
393397
servletSessionCookieConfig.setHttpOnly(sessionCookieConfig.isHttpOnly());
394-
// TODO : Add `SameSite=Strict` when supported by JEE
398+
context.setAttribute(
399+
HttpCookie.SAME_SITE_DEFAULT_ATTRIBUTE,
400+
sessionCookieConfig.getSameSite().getAttributeValue());
395401
}
396402

397403
private static void configureCors(io.dropwizard.core.setup.Environment environment) {

stroom-app/src/main/resources/ui/css/components.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,3 +2431,41 @@ button.main-menu svg {
24312431
.permissionDetails {
24322432
overflow-y: scroll;
24332433
}
2434+
2435+
.ColumnValuesFilterViewImpl {
2436+
min-width: 200px;
2437+
max-width: 600px;
2438+
min-height: 200px;
2439+
max-height: 600px;
2440+
display: flex;
2441+
flex-direction: column;
2442+
gap: var(--control__padding--vertical);
2443+
}
2444+
2445+
.ColumnValuesFilterViewImpl .bar {
2446+
display: flex;
2447+
gap: var(--control__padding--horizontal);
2448+
}
2449+
2450+
.ColumnValuesFilterViewImpl .link {
2451+
display: inline-block;
2452+
cursor: pointer;
2453+
padding: 2px 5px;
2454+
text-decoration: underline;
2455+
}
2456+
2457+
.ColumnValuesFilterViewImpl .listContainer {
2458+
height: 300px;
2459+
}
2460+
2461+
.columnValueCell {
2462+
display: flex;
2463+
align-items: center;
2464+
cursor: pointer;
2465+
gap: var(--row__gap--horizontal);
2466+
padding: var(--row__padding--vertical) var(--row__padding--horizontal);
2467+
}
2468+
2469+
.columnValueCell-text {
2470+
white-space: nowrap;
2471+
}

stroom-app/src/main/resources/ui/css/dashboard.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@
428428

429429
.column-top {
430430
display: flex;
431+
width: 100%;
431432
flex-direction: row;
432433
cursor: pointer;
433434
opacity: 0.9;
@@ -464,6 +465,13 @@
464465
text-decoration: none;
465466
}
466467

468+
.column-valueFilter {
469+
display: flex;
470+
flex-grow: 1;
471+
flex-direction: row-reverse;
472+
padding-right: 5px;
473+
}
474+
467475
.TablePresenter input {
468476
width: 100%;
469477
display: none;

stroom-app/src/main/resources/ui/css/stroom.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ html,body {
2121
width: 100%;
2222
height: 100%;
2323
overflow: hidden;
24-
background: white;
24+
background: transparent;
2525
color: var(--text-color);
2626
direction: ltr;
2727

@@ -644,7 +644,6 @@ select option:disabled {
644644
}
645645

646646
.info-page {
647-
background-color: var(--page__background-color);
648647
color: var(--text-color);
649648
padding: 5px;
650649
padding-top: 0;
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)