Skip to content

Commit

Permalink
Create the smallLegacy ui folder with the new add legacy bookmark to …
Browse files Browse the repository at this point in the history
…UI folder function
  • Loading branch information
NZepeda committed Sep 18, 2024
1 parent 1cde91f commit 2280099
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 598 deletions.
97 changes: 5 additions & 92 deletions src/4.3_to_5.0/__snapshots__/migrate_43_to_50.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2247,12 +2247,8 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a small input
"content": "{"name":"hidden grand totals"}",
"isDirectory": true,
"lastEditor": "admin",
"owners": [
"admin",
],
"readers": [
"admin",
],
"owners": [],
"readers": [],
"timestamp": 1607879735685,
},
},
Expand All @@ -2262,12 +2258,8 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a small input
"canWrite": true,
"isDirectory": true,
"lastEditor": "admin",
"owners": [
"admin",
],
"readers": [
"admin",
],
"owners": [],
"readers": [],
"timestamp": 1607879735685,
},
},
Expand Down Expand Up @@ -2357,6 +2349,7 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a small input
"organization_settings": {
"entry": {
"content": "{}",
"isDirectory": false,
"owners": [
"ROLE_CS_ROOT",
],
Expand Down Expand Up @@ -2404,86 +2397,6 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a small input
},
},
"users": {
"children": {
"admin": {
"children": {
"activity": {
"entry": {
"content": "{"userFilters":["[Geography].[City].[ALL].[AllMember].[Berlin]"]}",
"owners": [
"admin",
],
"readers": [
"admin",
],
},
},
"settings": {
"entry": {
"content": "{"theme":"dark-activeviam","search.maxResults":10,"userFilters.areEnabled":true,"drillthrough.defaultSelectedColumns":{"EquityDerivativesCube":["delta","gamma","pnlVega","Desk","Currency","Date","HostName"],"EquityDerivativesCubeDist":["BumpedMtmDown","ProductQtyMultiplier","vega","rho","productId","pnlVega","pnlDelta","pnl","gamma","delta","TradeId","ProductBaseMtm"]}}",
"owners": [
"admin",
],
"readers": [
"admin",
],
},
},
},
"entry": {
"canRead": true,
"canWrite": true,
"isDirectory": true,
"lastEditor": "admin",
"owners": [
"admin",
],
"readers": [
"admin",
],
"timestamp": 1607879735685,
},
},
"user1": {
"children": {
"activity": {
"entry": {
"content": "{}",
"owners": [
"user1",
],
"readers": [
"user1",
],
},
},
"settings": {
"entry": {
"content": "{}",
"owners": [
"user1",
],
"readers": [
"user1",
],
},
},
},
"entry": {
"canRead": true,
"canWrite": true,
"isDirectory": true,
"lastEditor": "admin",
"owners": [
"user1",
],
"readers": [
"user1",
],
"timestamp": 1607879735685,
},
},
},
"entry": {
"isDirectory": true,
"owners": [
Expand Down
16 changes: 16 additions & 0 deletions src/4.3_to_5.0/__test_resources__/legacyDashboardBookmark.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Content entry representing a legacy dashboard containing a single pivot table.
* Useful for unit tests.
*/
export const legacyDashboardBookmark = {
entry: {
content: `{"name":"hidden grand totals","type":"container","value":{"style":{},"showTitleBar":false,"body":{"pages":[{"content":[{"key":"1","bookmark":{"name":"Untitled Pivot Table","type":"container","value":{"style":{},"showTitleBar":true,"body":{"serverUrl":"","mdx":"SELECT NON EMPTY Crossjoin(Hierarchize(DrilldownLevel([Geography].[City].[ALL].[AllMember])), Hierarchize(DrilldownLevel([Currency].[Currency].[ALL].[AllMember]))) ON ROWS, NON EMPTY [Measures].[contributors.COUNT] ON COLUMNS FROM [EquityDerivativesCube] CELL PROPERTIES VALUE, FORMATTED_VALUE, BACK_COLOR, FORE_COLOR, FONT_FLAGS","contextValues":{"mdx.hiddengrandtotals":"1"},"updateMode":"once","ranges":{"row":{"chunkSize":2000,"thresholdPercentage":0.1},"column":{"chunkSize":50,"thresholdPercentage":0.2}},"configuration":{"tabular":{"pinnedHeaderSelector":"member","sortingMode":"non-breaking","addButtonFilter":"numeric","cellRenderers":["tree-layout"],"statisticsShown":true,"columnsGroups":[{"captionProducer":"firstColumn","cellFactory":"kpi-status","selector":"kpi-status"},{"captionProducer":"firstColumn","cellFactory":"lookup","selector":"lookup"},{"captionProducer":"expiry","cellFactory":"expiry","selector":"kpi-expiry"},{"captionProducer":"columnMerge","cellFactory":{"args":{},"key":"treeCells"},"selector":"member"}],"hideAddButton":true,"defaultOptions":{},"expansion":{"automaticExpansion":true}}}},"containerKey":"pivot-table"},"writable":true}},{"key":"2","bookmark":{"name":"Untitled Chart","type":"container","value":{"style":{},"showTitleBar":true,"body":{"configuration":{"type":"plotly-line-chart","mapping":{"xAxis":["[Currency].[Currency].[Currency]"],"values":["[Measures].[pnl.FOREX]"],"splitBy":["[Booking].[Desk].[LegalEntity]"],"horizontalSubplots":[],"verticalSubplots":[]},"switchedTo":"plotly-clustered-column-chart"},"query":{"serverUrl":"","mdx":"SELECT NON EMPTY Crossjoin(Hierarchize(DrilldownLevel([Currency].[Currency])), Hierarchize(DrilldownLevel([Booking].[Desk].[ALL].[AllMember]))) ON ROWS, NON EMPTY [Measures].[pnl.FOREX] ON COLUMNS FROM [EquityDerivativesCube]","contextValues":{},"updateMode":"once"}},"containerKey":"chart"},"writable":true}}],"layout":{"children":{"0":{"ck":"2"},"1":{"ck":"1"}},"direction":"row"},"name":"Page 1","filters":{"EquityDerivativesCube":[]}}]},"containerKey":"dashboard"}}`,
isDirectory: false,
owners: ["admin"],
readers: ["admin"],
timestamp: 1607879735685,
lastEditor: "admin",
canRead: true,
canWrite: true,
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Legacy content entry representing a bookmark of an invalid dashboard.
* Useful for unit tests.
*/
export const legacyInvalidDashboardBookmark = {
entry: {
content:
'{"name":"hidden grand totals","type":"container","value":{"style":{},"showTitleBar":false,"body":{"pages":[{"content":[{"key":"1","bookmark":{"name":"Untitled Pivot Table","type":"container","value":{"style":{},"showTitleBar":true,"body":{"serverUrl":"","mdx":"SELECT NON EMPTY Crossjoin(Hierarchize(DrilldownLevel([Geography].[City].[ALL].[AllMember])), Hierarchize(DrilldownLevel([Currency].[Currency].[ALL].[AllMember]))) ON ROWS, NON EMPTY [Measures].[contributors.COUNT] ON COLUMNS FROM [foo] CELL PROPERTIES VALUE, FORMATTED_VALUE, BACK_COLOR, FORE_COLOR, FONT_FLAGS","contextValues":{"mdx.hiddengrandtotals":"1"},"updateMode":"once","ranges":{"row":{"chunkSize":2000,"thresholdPercentage":0.1},"column":{"chunkSize":50,"thresholdPercentage":0.2}},"configuration":{"tabular":{"pinnedHeaderSelector":"member","sortingMode":"non-breaking","addButtonFilter":"numeric","cellRenderers":["tree-layout"],"statisticsShown":true,"columnsGroups":[{"captionProducer":"firstColumn","cellFactory":"kpi-status","selector":"kpi-status"},{"captionProducer":"firstColumn","cellFactory":"lookup","selector":"lookup"},{"captionProducer":"expiry","cellFactory":"expiry","selector":"kpi-expiry"},{"captionProducer":"columnMerge","cellFactory":{"args":{},"key":"treeCells"},"selector":"member"}],"hideAddButton":true,"defaultOptions":{},"expansion":{"automaticExpansion":true}}}},"containerKey":"pivot-table"},"writable":true}},{"key":"2","bookmark":{"name":"Untitled Chart","type":"container","value":{"style":{},"showTitleBar":true,"body":{"configuration":{"type":"plotly-line-chart","mapping":{"xAxis":["[Currency].[Currency].[Currency]"],"values":["[Measures].[pnl.FOREX]"],"splitBy":["[Booking].[Desk].[LegalEntity]"],"horizontalSubplots":[],"verticalSubplots":[]},"switchedTo":"plotly-clustered-column-chart"},"query":{"serverUrl":"","mdx":"SELECT NON EMPTY Crossjoin(Hierarchize(DrilldownLevel([Currency].[Currency])), Hierarchize(DrilldownLevel([Booking].[Desk].[ALL].[AllMember]))) ON ROWS, NON EMPTY [Measures].[pnl.FOREX] ON COLUMNS FROM [EquityDerivativesCube]","contextValues":{},"updateMode":"once"}},"containerKey":"chart"},"writable":true}}],"layout":{"children":{"0":{"ck":"2"},"1":{"ck":"1"}},"direction":"row"},"name":"Page 1","filters":{"EquityDerivativesCube":[]}}]},"containerKey":"dashboard"}}',
isDirectory: false,
owners: ["admin"],
readers: ["admin"],
timestamp: 1607879735685,
lastEditor: "admin",
canRead: true,
canWrite: true,
},
};
17 changes: 17 additions & 0 deletions src/4.3_to_5.0/__test_resources__/legacyInvalidFilterBookmark.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Content entry representing a legacy filter containing an invalid property
* Useful for unit tests.
*/
export const legacyInvalidFilterBookmark = {
entry: {
content:
'{"name":"AUI4 filter","type":"mdx","invalidvalue":{"shouldReplace":true,"type":"filter","mdx":"{[Geography].[City].[ALL].[AllMember].[Berlin], [Geography].[City].[ALL].[AllMember].[London]}","cube":"EquityDerivativesCube"}}',
isDirectory: false,
owners: ["admin"],
readers: ["admin"],
timestamp: 1607879735685,
lastEditor: "admin",
canRead: true,
canWrite: true,
},
};
Loading

0 comments on commit 2280099

Please sign in to comment.