Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new aggregations UI #7102

Merged
merged 39 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
545e05c
debug container update
JulianWielga Jul 23, 2024
41167a7
placeholders support
JulianWielga Jul 23, 2024
86cb5c6
optional fieldErrors
JulianWielga Jul 23, 2024
7aaa9a8
cleanup
JulianWielga Jul 23, 2024
94599d8
show errors in NodeRow
JulianWielga Jul 23, 2024
e2f1dad
extract findParamDefinitonByName
JulianWielga Jul 23, 2024
735e6ab
replace aggregator & aggregateBy with row with editors
JulianWielga Jul 23, 2024
8675e38
refactor & test fix
JulianWielga Aug 2, 2024
217a745
fixed ace editor tabindex
JulianWielga Aug 19, 2024
b2e04f2
groupBy
JulianWielga Aug 20, 2024
40ecbcb
fixed record parse
JulianWielga Aug 20, 2024
f6f8a78
cleanup
JulianWielga Aug 20, 2024
adf97da
fixed types error
JulianWielga Aug 20, 2024
7e28c7a
minor things
JulianWielga Sep 10, 2024
e3fcca1
Merge remote-tracking branch 'upstream/staging' into aggregate-ui
JulianWielga Sep 16, 2024
8231b25
json editor settings sync with aceWrapper
JulianWielga Sep 17, 2024
4b17cc8
test tweak
JulianWielga Sep 17, 2024
300234e
Merge remote-tracking branch 'upstream/staging' into aggregate-ui
JulianWielga Sep 17, 2024
1b9e796
test tweak
JulianWielga Sep 18, 2024
4178e18
Updated snapshots (#6834)
github-actions[bot] Sep 18, 2024
3f73fe8
minor types fixes
JulianWielga Oct 1, 2024
c1022f4
fields labels
JulianWielga Oct 1, 2024
a64c0d3
required fields
JulianWielga Oct 1, 2024
ce7d43a
presets fixed
JulianWielga Oct 3, 2024
7de29fd
Merge remote-tracking branch 'upstream/staging' into aggregate-ui
JulianWielga Oct 3, 2024
17c64fe
sort type options
JulianWielga Oct 3, 2024
415c449
Merge branch 'staging' into preview/aggregate-ui
JulianWielga Oct 18, 2024
c110f56
Merge branch 'staging' into preview/aggregate-ui
JulianWielga Oct 22, 2024
14d3bff
Merge branch 'staging' into preview/aggregate-ui
JulianWielga Oct 24, 2024
b951ac5
Merge branch 'staging' into preview/aggregate-ui
JulianWielga Oct 24, 2024
1726fb5
Merge branch 'staging' into preview/aggregate-ui
JulianWielga Oct 28, 2024
f636550
review fixes
JulianWielga Oct 28, 2024
f289d19
Merge branch 'staging' into preview/aggregate-ui
JulianWielga Oct 28, 2024
4d1d0c3
test fixes
JulianWielga Oct 28, 2024
9b056e3
add cypress test
JulianWielga Oct 29, 2024
2368e27
Updated snapshots (#7100)
github-actions[bot] Oct 29, 2024
525507e
Merge branch 'staging' into preview/aggregate-ui
JulianWielga Oct 29, 2024
6cfcabf
trigger build
JulianWielga Oct 29, 2024
8d47f20
Updated snapshots (#7105)
github-actions[bot] Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions designer/client/cypress/e2e/aggregations.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
describe("Aggregations", () => {
const seed = "aggregations";

before(() => {
cy.deleteAllTestProcesses({
filter: seed,
force: true,
});
});

after(() => {
cy.deleteAllTestProcesses({ filter: seed });
});

["aggregate-sliding", "aggregate-tumbling", "aggregate-session"].forEach((component) => {
it(`should display updated UI for ${component}`, () => {
cy.visitNewProcess(seed, "aggregations", "Default");
cy.getNode(component).dblclick();
cy.get("[data-testid=window]").should("be.visible");
cy.get("[title='Aggregations']")
.parent()
.should("be.visible")
.matchImage({
screenshotConfig: {
padding: [80, 10, 10, 10],
},
});
});
});
});
2 changes: 1 addition & 1 deletion designer/client/cypress/e2e/jsonEditor.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("JSON editor", () => {
.should("be.enabled")
.click();
cy.get("[data-testid=window]").as("modal");
cy.get("[title='Input schema']").next().find(".ace_editor").should("be.visible").as("editor");
cy.get("[title='Input schema']").next().find(".ace_editor").should("be.visible").parent().as("editor");

cy.get("@editor").matchImage({
maxDiffThreshold: 0.0025,
Expand Down
8 changes: 6 additions & 2 deletions designer/client/cypress/e2e/sqlEditor.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ describe("Sql editor", () => {
cy.layoutScenario();
cy.get("[model-id=sql-source]").should("be.visible").trigger("dblclick");
cy.get("[data-testid=window]").should("be.visible");
cy.get("#ace-editor").should("not.have.class", "tokenizer-working").parent().matchImage({ maxDiffThreshold });
cy.get("#ace-editor").should("not.have.class", "tokenizer-working");
cy.wait(1000);
cy.get("#ace-editor").parent().matchImage({ maxDiffThreshold });
cy.get("[data-testid=window]").matchImage();
});

Expand All @@ -26,7 +28,9 @@ describe("Sql editor", () => {

cy.wrap(["sql-source", "sql-source2", "sql-source3"]).each((name) => {
cy.get(`[model-id=${name}]`).should("be.visible").trigger("dblclick");
cy.get("#ace-editor").should("not.have.class", "tokenizer-working").parent().matchImage({ maxDiffThreshold });
cy.get("#ace-editor").should("not.have.class", "tokenizer-working");
cy.wait(1000);
cy.get("#ace-editor").parent().matchImage({ maxDiffThreshold });
cy.get("[data-testid=window]")
.contains(/^cancel$/i)
.click();
Expand Down
283 changes: 283 additions & 0 deletions designer/client/cypress/fixtures/aggregations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
{
"metaData": {
"id": "test",
"additionalFields": {
"description": null,
"properties": {
"parallelism": "1",
"spillStateToDisk": "true",
"useAsyncInterpretation": "",
"checkpointIntervalInSeconds": ""
},
"metaDataType": "StreamMetaData",
"showDescription": false
}
},
"nodes": [
{
"id": "periodic",
"ref": {
"typ": "periodic",
"parameters": [
{
"name": "period",
"expression": {
"language": "spel",
"expression": "T(java.time.Duration).parse('PT1M')"
}
},
{
"name": "count",
"expression": {
"language": "spel",
"expression": "1"
}
},
{
"name": "value",
"expression": {
"language": "spel",
"expression": "1"
}
}
]
},
"additionalFields": {
"description": null,
"layoutData": {
"x": 360,
"y": 0
}
},
"type": "Source"
},
{
"nexts": [
[
{
"id": "aggregate-session",
"outputVar": "outputVar",
"nodeType": "aggregate-session",
"parameters": [
{
"name": "groupBy",
"expression": {
"language": "spel",
"expression": "{ #input.floatValue }.toString"
}
},
{
"name": "aggregator",
"expression": {
"language": "spel",
"expression": "#AGG.map({\n count: #AGG.sum\n})"
}
},
{
"name": "aggregateBy",
"expression": {
"language": "spel",
"expression": "{\n count: 1\n}"
}
},
{
"name": "endSessionCondition",
"expression": {
"language": "spel",
"expression": "true"
}
},
{
"name": "sessionTimeout",
"expression": {
"language": "spel",
"expression": "T(java.time.Duration).parse('PT1H')"
}
},
{
"name": "emitWhen",
"expression": {
"language": "spel",
"expression": "T(pl.touk.nussknacker.engine.flink.util.transformer.aggregate.SessionWindowTrigger).OnEvent"
}
}
],
"additionalFields": {
"description": null,
"layoutData": {
"x": 720,
"y": 360
}
},
"type": "CustomNode"
},
{
"id": "dead-end",
"ref": {
"typ": "dead-end",
"parameters": []
},
"endResult": null,
"isDisabled": null,
"additionalFields": {
"description": null,
"layoutData": {
"x": 720,
"y": 540
}
},
"type": "Sink"
}
],
[
{
"id": "aggregate-sliding",
"outputVar": "outputVar",
"nodeType": "aggregate-sliding",
"parameters": [
{
"name": "groupBy",
"expression": {
"language": "spel",
"expression": "{ #input.longValue }.toString"
}
},
{
"name": "aggregator",
"expression": {
"language": "spel",
"expression": "#AGG.map({\n count: #AGG.sum\n})"
}
},
{
"name": "aggregateBy",
"expression": {
"language": "spel",
"expression": "{\n count: 1\n}"
}
},
{
"name": "windowLength",
"expression": {
"language": "spel",
"expression": "T(java.time.Duration).parse('PT1H')"
}
},
{
"name": "emitWhenEventLeft",
"expression": {
"language": "spel",
"expression": "false"
}
}
],
"additionalFields": {
"description": null,
"layoutData": {
"x": 0,
"y": 360
}
},
"type": "CustomNode"
},
{
"id": "dead-end 1",
"ref": {
"typ": "dead-end",
"parameters": []
},
"endResult": null,
"isDisabled": null,
"additionalFields": {
"description": null,
"layoutData": {
"x": 0,
"y": 540
}
},
"type": "Sink"
}
],
[
{
"id": "aggregate-tumbling",
"outputVar": "outputVar",
"nodeType": "aggregate-tumbling",
"parameters": [
{
"name": "groupBy",
"expression": {
"language": "spel",
"expression": "{ #input.longValue }.toString"
}
},
{
"name": "aggregator",
"expression": {
"language": "spel",
"expression": "#AGG.map({\n count: #AGG.sum\n})"
}
},
{
"name": "aggregateBy",
"expression": {
"language": "spel",
"expression": "{\n count: 1\n}"
}
},
{
"name": "windowLength",
"expression": {
"language": "spel",
"expression": "T(java.time.Duration).parse('PT1H')"
}
},
{
"name": "emitWhen",
"expression": {
"language": "spel",
"expression": "T(pl.touk.nussknacker.engine.flink.util.transformer.aggregate.TumblingWindowTrigger).OnEvent"
}
}
],
"additionalFields": {
"description": null,
"layoutData": {
"x": 360,
"y": 360
}
},
"type": "CustomNode"
},
{
"id": "dead-end 2",
"ref": {
"typ": "dead-end",
"parameters": []
},
"endResult": null,
"isDisabled": null,
"additionalFields": {
"description": null,
"layoutData": {
"x": 360,
"y": 540
}
},
"type": "Sink"
}
]
],
"id": "split",
"additionalFields": {
"description": null,
"layoutData": {
"x": 360,
"y": 180
}
},
"type": "Split"
}
],
"additionalBranches": []
}
Loading
Loading