Skip to content

Commit

Permalink
#4071 Add preset theme compatible styles for conditional formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
stroomdev66 committed Oct 30, 2024
1 parent d6a4ee8 commit b22973b
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ class [Lstroom.query.api.v2.Column; - public final void java.lang.Object.wait(lo
class [Lstroom.query.api.v2.Column; - public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
class [Lstroom.query.api.v2.Column; - public java.lang.String java.lang.Object.toString()
class [Lstroom.query.api.v2.Column; - public native int java.lang.Object.hashCode()
class [Lstroom.query.api.v2.ConditionalFormattingStyle; - public boolean java.lang.Object.equals(java.lang.Object)
class [Lstroom.query.api.v2.ConditionalFormattingStyle; - public final native java.lang.Class<?> java.lang.Object.getClass()
class [Lstroom.query.api.v2.ConditionalFormattingStyle; - public final native void java.lang.Object.notify()
class [Lstroom.query.api.v2.ConditionalFormattingStyle; - public final native void java.lang.Object.notifyAll()
class [Lstroom.query.api.v2.ConditionalFormattingStyle; - public final void java.lang.Object.wait() throws java.lang.InterruptedException
class [Lstroom.query.api.v2.ConditionalFormattingStyle; - public final void java.lang.Object.wait(long) throws java.lang.InterruptedException
class [Lstroom.query.api.v2.ConditionalFormattingStyle; - public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
class [Lstroom.query.api.v2.ConditionalFormattingStyle; - public java.lang.String java.lang.Object.toString()
class [Lstroom.query.api.v2.ConditionalFormattingStyle; - public native int java.lang.Object.hashCode()
class [Lstroom.query.api.v2.ExpressionOperator$Op; - public boolean java.lang.Object.equals(java.lang.Object)
class [Lstroom.query.api.v2.ExpressionOperator$Op; - public final native java.lang.Class<?> java.lang.Object.getClass()
class [Lstroom.query.api.v2.ExpressionOperator$Op; - public final native void java.lang.Object.notify()
Expand Down Expand Up @@ -171,6 +180,7 @@ class stroom.query.api.v2.ColumnFilter - public int stroom.query.api.v2.ColumnFi
class stroom.query.api.v2.ColumnFilter - public java.lang.String stroom.query.api.v2.ColumnFilter.getFilter()
class stroom.query.api.v2.ColumnFilter - public java.lang.String stroom.query.api.v2.ColumnFilter.toString()
class stroom.query.api.v2.ConditionalFormattingRule - public boolean stroom.query.api.v2.ConditionalFormattingRule.equals(java.lang.Object)
class stroom.query.api.v2.ConditionalFormattingRule - public boolean stroom.query.api.v2.ConditionalFormattingRule.isCustomStyle()
class stroom.query.api.v2.ConditionalFormattingRule - public boolean stroom.query.api.v2.ConditionalFormattingRule.isEnabled()
class stroom.query.api.v2.ConditionalFormattingRule - public boolean stroom.query.api.v2.ConditionalFormattingRule.isHide()
class stroom.query.api.v2.ConditionalFormattingRule - public final native java.lang.Class<?> java.lang.Object.getClass()
Expand All @@ -180,12 +190,14 @@ class stroom.query.api.v2.ConditionalFormattingRule - public final void java.lan
class stroom.query.api.v2.ConditionalFormattingRule - public final void java.lang.Object.wait(long) throws java.lang.InterruptedException
class stroom.query.api.v2.ConditionalFormattingRule - public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
class stroom.query.api.v2.ConditionalFormattingRule - public int stroom.query.api.v2.ConditionalFormattingRule.hashCode()
class stroom.query.api.v2.ConditionalFormattingRule - public java.lang.Boolean stroom.query.api.v2.ConditionalFormattingRule.getCustomStyle()
class stroom.query.api.v2.ConditionalFormattingRule - public java.lang.String stroom.query.api.v2.ConditionalFormattingRule.getBackgroundColor()
class stroom.query.api.v2.ConditionalFormattingRule - public java.lang.String stroom.query.api.v2.ConditionalFormattingRule.getId()
class stroom.query.api.v2.ConditionalFormattingRule - public java.lang.String stroom.query.api.v2.ConditionalFormattingRule.getTextColor()
class stroom.query.api.v2.ConditionalFormattingRule - public java.lang.String stroom.query.api.v2.ConditionalFormattingRule.toString()
class stroom.query.api.v2.ConditionalFormattingRule - public static stroom.query.api.v2.ConditionalFormattingRule$Builder stroom.query.api.v2.ConditionalFormattingRule.builder()
class stroom.query.api.v2.ConditionalFormattingRule - public stroom.query.api.v2.ConditionalFormattingRule$Builder stroom.query.api.v2.ConditionalFormattingRule.copy()
class stroom.query.api.v2.ConditionalFormattingRule - public stroom.query.api.v2.ConditionalFormattingStyle stroom.query.api.v2.ConditionalFormattingRule.getStyle()
class stroom.query.api.v2.ConditionalFormattingRule - public stroom.query.api.v2.ExpressionOperator stroom.query.api.v2.ConditionalFormattingRule.getExpression()
class stroom.query.api.v2.ConditionalFormattingRule - public void stroom.query.api.v2.ConditionalFormattingRule.setEnabled(boolean)
class stroom.query.api.v2.ConditionalFormattingRule - public void stroom.query.api.v2.ConditionalFormattingRule.setHide(boolean)
Expand All @@ -200,11 +212,33 @@ class stroom.query.api.v2.ConditionalFormattingRule$Builder - public java.lang.S
class stroom.query.api.v2.ConditionalFormattingRule$Builder - public native int java.lang.Object.hashCode()
class stroom.query.api.v2.ConditionalFormattingRule$Builder - public stroom.query.api.v2.ConditionalFormattingRule stroom.query.api.v2.ConditionalFormattingRule$Builder.build()
class stroom.query.api.v2.ConditionalFormattingRule$Builder - public stroom.query.api.v2.ConditionalFormattingRule$Builder stroom.query.api.v2.ConditionalFormattingRule$Builder.backgroundColor(java.lang.String)
class stroom.query.api.v2.ConditionalFormattingRule$Builder - public stroom.query.api.v2.ConditionalFormattingRule$Builder stroom.query.api.v2.ConditionalFormattingRule$Builder.customStyle(java.lang.Boolean)
class stroom.query.api.v2.ConditionalFormattingRule$Builder - public stroom.query.api.v2.ConditionalFormattingRule$Builder stroom.query.api.v2.ConditionalFormattingRule$Builder.enabled(boolean)
class stroom.query.api.v2.ConditionalFormattingRule$Builder - public stroom.query.api.v2.ConditionalFormattingRule$Builder stroom.query.api.v2.ConditionalFormattingRule$Builder.expression(stroom.query.api.v2.ExpressionOperator)
class stroom.query.api.v2.ConditionalFormattingRule$Builder - public stroom.query.api.v2.ConditionalFormattingRule$Builder stroom.query.api.v2.ConditionalFormattingRule$Builder.hide(boolean)
class stroom.query.api.v2.ConditionalFormattingRule$Builder - public stroom.query.api.v2.ConditionalFormattingRule$Builder stroom.query.api.v2.ConditionalFormattingRule$Builder.id(java.lang.String)
class stroom.query.api.v2.ConditionalFormattingRule$Builder - public stroom.query.api.v2.ConditionalFormattingRule$Builder stroom.query.api.v2.ConditionalFormattingRule$Builder.style(stroom.query.api.v2.ConditionalFormattingStyle)
class stroom.query.api.v2.ConditionalFormattingRule$Builder - public stroom.query.api.v2.ConditionalFormattingRule$Builder stroom.query.api.v2.ConditionalFormattingRule$Builder.textColor(java.lang.String)
class stroom.query.api.v2.ConditionalFormattingStyle - public final boolean java.lang.Enum.equals(java.lang.Object)
class stroom.query.api.v2.ConditionalFormattingStyle - public final int java.lang.Enum.compareTo(E)
class stroom.query.api.v2.ConditionalFormattingStyle - public final int java.lang.Enum.hashCode()
class stroom.query.api.v2.ConditionalFormattingStyle - public final int java.lang.Enum.ordinal()
class stroom.query.api.v2.ConditionalFormattingStyle - public final java.lang.Class<E> java.lang.Enum.getDeclaringClass()
class stroom.query.api.v2.ConditionalFormattingStyle - public final java.lang.String java.lang.Enum.name()
class stroom.query.api.v2.ConditionalFormattingStyle - public final java.util.Optional<java.lang.Enum$EnumDesc<E>> java.lang.Enum.describeConstable()
class stroom.query.api.v2.ConditionalFormattingStyle - public final native java.lang.Class<?> java.lang.Object.getClass()
class stroom.query.api.v2.ConditionalFormattingStyle - public final native void java.lang.Object.notify()
class stroom.query.api.v2.ConditionalFormattingStyle - public final native void java.lang.Object.notifyAll()
class stroom.query.api.v2.ConditionalFormattingStyle - public final void java.lang.Object.wait() throws java.lang.InterruptedException
class stroom.query.api.v2.ConditionalFormattingStyle - public final void java.lang.Object.wait(long) throws java.lang.InterruptedException
class stroom.query.api.v2.ConditionalFormattingStyle - public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
class stroom.query.api.v2.ConditionalFormattingStyle - public int java.lang.Enum.compareTo(java.lang.Object)
class stroom.query.api.v2.ConditionalFormattingStyle - public java.lang.String java.lang.Enum.toString()
class stroom.query.api.v2.ConditionalFormattingStyle - public java.lang.String stroom.query.api.v2.ConditionalFormattingStyle.getCssClassName()
class stroom.query.api.v2.ConditionalFormattingStyle - public java.lang.String stroom.query.api.v2.ConditionalFormattingStyle.getDisplayValue()
class stroom.query.api.v2.ConditionalFormattingStyle - public static <T extends java.lang.Enum<T>> T java.lang.Enum.valueOf(java.lang.Class<T>,java.lang.String)
class stroom.query.api.v2.ConditionalFormattingStyle - public static stroom.query.api.v2.ConditionalFormattingStyle stroom.query.api.v2.ConditionalFormattingStyle.valueOf(java.lang.String)
class stroom.query.api.v2.ConditionalFormattingStyle - public static stroom.query.api.v2.ConditionalFormattingStyle[] stroom.query.api.v2.ConditionalFormattingStyle.values()
class stroom.query.api.v2.ExpressionItem - public abstract boolean stroom.query.api.v2.ExpressionItem.containsField(java.lang.String...)
class stroom.query.api.v2.ExpressionItem - public abstract boolean stroom.query.api.v2.ExpressionItem.containsTerm(java.util.function.Predicate<stroom.query.api.v2.ExpressionTerm>)
class stroom.query.api.v2.ExpressionItem - public boolean stroom.query.api.v2.ExpressionItem.enabled()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,47 @@ select StreamId, EventId, EventTime, Status
</SELECT>
</TOKEN_GROUP>
-----
from 'Test Index'
where not UserId = user5 and Description = e0567
and EventTime <= 2000-01-01T00:00:00.000Z
or EventTime = 2016-01-02T00:00:00.000Z
and UserId = user10
select StreamId, EventId, EventTime, Status
=====
<TOKEN_GROUP>
<FROM>
<SINGLE_QUOTED_STRING>'Test Index'</SINGLE_QUOTED_STRING>
</FROM>
<WHERE>
<NOT>not</NOT>
<STRING>UserId</STRING>
<EQUALS>=</EQUALS>
<STRING>user5</STRING>
<AND>and</AND>
<STRING>Description</STRING>
<EQUALS>=</EQUALS>
<STRING>e0567</STRING>
<AND>and</AND>
<STRING>EventTime</STRING>
<LESS_THAN_OR_EQUAL_TO><=</LESS_THAN_OR_EQUAL_TO>
<DATE_TIME>2000-01-01T00:00:00.000Z</DATE_TIME>
<OR>or</OR>
<STRING>EventTime</STRING>
<EQUALS>=</EQUALS>
<DATE_TIME>2016-01-02T00:00:00.000Z</DATE_TIME>
<AND>and</AND>
<STRING>UserId</STRING>
<EQUALS>=</EQUALS>
<STRING>user10</STRING>
</WHERE>
<SELECT>
<STRING>StreamId</STRING>
<COMMA>,</COMMA>
<STRING>EventId</STRING>
<COMMA>,</COMMA>
<STRING>EventTime</STRING>
<COMMA>,</COMMA>
<STRING>Status</STRING>
</SELECT>
</TOKEN_GROUP>
-----
Original file line number Diff line number Diff line change
Expand Up @@ -436,3 +436,19 @@ select StreamId as "Stream Id", EventId as "Event Id", EventTime as "Event Time"
</WHITESPACE><EVAL>eval</EVAL><WHITESPACE> </WHITESPACE><STRING>test</STRING><WHITESPACE> </WHITESPACE><EQUALS>=</EQUALS><WHITESPACE> </WHITESPACE><FUNCTION_NAME>if</FUNCTION_NAME><OPEN_BRACKET>(</OPEN_BRACKET><FUNCTION_NAME>and</FUNCTION_NAME><OPEN_BRACKET>(</OPEN_BRACKET><STRING>idx1</STRING><WHITESPACE> </WHITESPACE><GREATER_THAN_OR_EQUAL_TO>>=</GREATER_THAN_OR_EQUAL_TO><WHITESPACE> </WHITESPACE><NUMBER>0</NUMBER><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>idx2</STRING><WHITESPACE> </WHITESPACE><GREATER_THAN_OR_EQUAL_TO>>=</GREATER_THAN_OR_EQUAL_TO><WHITESPACE> </WHITESPACE><NUMBER>0</NUMBER><CLOSE_BRACKET>)</CLOSE_BRACKET><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><NUMBER>1</NUMBER><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><NUMBER>0</NUMBER><CLOSE_BRACKET>)</CLOSE_BRACKET><WHITESPACE>
</WHITESPACE><SELECT>select</SELECT><WHITESPACE> </WHITESPACE><STRING>StreamId</STRING><WHITESPACE> </WHITESPACE><AS>as</AS><WHITESPACE> </WHITESPACE><DOUBLE_QUOTED_STRING>"Stream Id"</DOUBLE_QUOTED_STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>EventId</STRING><WHITESPACE> </WHITESPACE><AS>as</AS><WHITESPACE> </WHITESPACE><DOUBLE_QUOTED_STRING>"Event Id"</DOUBLE_QUOTED_STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>EventTime</STRING><WHITESPACE> </WHITESPACE><AS>as</AS><WHITESPACE> </WHITESPACE><DOUBLE_QUOTED_STRING>"Event Time"</DOUBLE_QUOTED_STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>Status</STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>UserId</STRING><WHITESPACE> </WHITESPACE><AS>as</AS><WHITESPACE> </WHITESPACE><DOUBLE_QUOTED_STRING>"User Id"</DOUBLE_QUOTED_STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>test</STRING>
-----
from 'Test Index'
where EventTime > 2023-05-05T00:00:00.000Z and (Field = 'blah' or Field = 'blip')
eval idx1 = indexOf(UserId, 'user1')
eval idx2 = indexOf(UserId, 'user')
eval bool = and(idx1 >= 0, idx2 >= 0)
eval test = if(bool, 1, 0)
select StreamId as "Stream Id", EventId as "Event Id", EventTime as "Event Time", Status, UserId as "User Id", test
=====
<FROM>from</FROM><WHITESPACE> </WHITESPACE><SINGLE_QUOTED_STRING>'Test Index'</SINGLE_QUOTED_STRING><WHITESPACE>
</WHITESPACE><WHERE>where</WHERE><WHITESPACE> </WHITESPACE><STRING>EventTime</STRING><WHITESPACE> </WHITESPACE><GREATER_THAN>></GREATER_THAN><WHITESPACE> </WHITESPACE><DATE_TIME>2023-05-05T00:00:00.000Z</DATE_TIME><WHITESPACE> </WHITESPACE><AND>and</AND><WHITESPACE> </WHITESPACE><OPEN_BRACKET>(</OPEN_BRACKET><STRING>Field</STRING><WHITESPACE> </WHITESPACE><EQUALS>=</EQUALS><WHITESPACE> </WHITESPACE><SINGLE_QUOTED_STRING>'blah'</SINGLE_QUOTED_STRING><WHITESPACE> </WHITESPACE><OR>or</OR><WHITESPACE> </WHITESPACE><STRING>Field</STRING><WHITESPACE> </WHITESPACE><EQUALS>=</EQUALS><WHITESPACE> </WHITESPACE><SINGLE_QUOTED_STRING>'blip'</SINGLE_QUOTED_STRING><CLOSE_BRACKET>)</CLOSE_BRACKET><WHITESPACE>
</WHITESPACE><EVAL>eval</EVAL><WHITESPACE> </WHITESPACE><STRING>idx1</STRING><WHITESPACE> </WHITESPACE><EQUALS>=</EQUALS><WHITESPACE> </WHITESPACE><FUNCTION_NAME>indexOf</FUNCTION_NAME><OPEN_BRACKET>(</OPEN_BRACKET><STRING>UserId</STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><SINGLE_QUOTED_STRING>'user1'</SINGLE_QUOTED_STRING><CLOSE_BRACKET>)</CLOSE_BRACKET><WHITESPACE>
</WHITESPACE><EVAL>eval</EVAL><WHITESPACE> </WHITESPACE><STRING>idx2</STRING><WHITESPACE> </WHITESPACE><EQUALS>=</EQUALS><WHITESPACE> </WHITESPACE><FUNCTION_NAME>indexOf</FUNCTION_NAME><OPEN_BRACKET>(</OPEN_BRACKET><STRING>UserId</STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><SINGLE_QUOTED_STRING>'user'</SINGLE_QUOTED_STRING><CLOSE_BRACKET>)</CLOSE_BRACKET><WHITESPACE>
</WHITESPACE><EVAL>eval</EVAL><WHITESPACE> </WHITESPACE><STRING>bool</STRING><WHITESPACE> </WHITESPACE><EQUALS>=</EQUALS><WHITESPACE> </WHITESPACE><FUNCTION_NAME>and</FUNCTION_NAME><OPEN_BRACKET>(</OPEN_BRACKET><STRING>idx1</STRING><WHITESPACE> </WHITESPACE><GREATER_THAN_OR_EQUAL_TO>>=</GREATER_THAN_OR_EQUAL_TO><WHITESPACE> </WHITESPACE><NUMBER>0</NUMBER><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>idx2</STRING><WHITESPACE> </WHITESPACE><GREATER_THAN_OR_EQUAL_TO>>=</GREATER_THAN_OR_EQUAL_TO><WHITESPACE> </WHITESPACE><NUMBER>0</NUMBER><CLOSE_BRACKET>)</CLOSE_BRACKET><WHITESPACE>
</WHITESPACE><EVAL>eval</EVAL><WHITESPACE> </WHITESPACE><STRING>test</STRING><WHITESPACE> </WHITESPACE><EQUALS>=</EQUALS><WHITESPACE> </WHITESPACE><FUNCTION_NAME>if</FUNCTION_NAME><OPEN_BRACKET>(</OPEN_BRACKET><STRING>bool</STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><NUMBER>1</NUMBER><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><NUMBER>0</NUMBER><CLOSE_BRACKET>)</CLOSE_BRACKET><WHITESPACE>
</WHITESPACE><SELECT>select</SELECT><WHITESPACE> </WHITESPACE><STRING>StreamId</STRING><WHITESPACE> </WHITESPACE><AS>as</AS><WHITESPACE> </WHITESPACE><DOUBLE_QUOTED_STRING>"Stream Id"</DOUBLE_QUOTED_STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>EventId</STRING><WHITESPACE> </WHITESPACE><AS>as</AS><WHITESPACE> </WHITESPACE><DOUBLE_QUOTED_STRING>"Event Id"</DOUBLE_QUOTED_STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>EventTime</STRING><WHITESPACE> </WHITESPACE><AS>as</AS><WHITESPACE> </WHITESPACE><DOUBLE_QUOTED_STRING>"Event Time"</DOUBLE_QUOTED_STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>Status</STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>UserId</STRING><WHITESPACE> </WHITESPACE><AS>as</AS><WHITESPACE> </WHITESPACE><DOUBLE_QUOTED_STRING>"User Id"</DOUBLE_QUOTED_STRING><COMMA>,</COMMA><WHITESPACE> </WHITESPACE><STRING>test</STRING>
-----

0 comments on commit b22973b

Please sign in to comment.