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

DPBI-523: Merge upstream 1.40.2 #7

Merged
merged 267 commits into from
Jan 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
267 commits
Select commit Hold shift + click to select a range
29f1702
Use POSIX locale identifier (#749)
adrianmroz-allegro May 10, 2021
84776c6
Release 1.32.0-beta.2
adrianmroz-allegro May 10, 2021
b7408ee
add locale doscs (#750)
adrianmroz-allegro May 10, 2021
99765bf
Add OAuth docs (#752)
adrianmroz-allegro May 12, 2021
2ddcce3
Return default locale if passed unrecognized locale identifier (#753)
adrianmroz-allegro May 12, 2021
1980538
Promoted values in StringValuesList (#754)
adrianmroz-allegro May 12, 2021
37b954c
Release 1.32.0-beta.3
adrianmroz-allegro May 14, 2021
b21547a
Bump node-sass dependency (#760)
adrianmroz-allegro May 19, 2021
98a198e
Remove incorrect output type from 400 response on /plyql to prevent x…
adrianmroz-allegro May 19, 2021
5375f9e
Release 1.32.0
adrianmroz-allegro May 21, 2021
aa761cc
Sources refactor (#764)
adrianmroz-allegro Jun 2, 2021
93f3286
Add few datasets (#769)
adrianmroz-allegro Jun 9, 2021
0901435
Fix typo (#770)
adrianmroz-allegro Jun 9, 2021
c2057ba
Feature/custom limits (#758)
adrianmroz-allegro Jun 9, 2021
d923951
Custom TimeShift periods and Latest periods in Time Dimension Filter …
adrianmroz-allegro Jun 9, 2021
fc69eea
Move scroll state to specific visualisations (#775)
adrianmroz-allegro Jun 18, 2021
44ca4f7
Remove old and unused code (#776)
adrianmroz-allegro Jun 18, 2021
d0ef656
Extract highlight management into HighlightController and use it for …
adrianmroz-allegro Jun 22, 2021
880c899
DataProvider (#779)
adrianmroz-allegro Jun 24, 2021
75cce25
Partial Tiles (#780)
adrianmroz-allegro Jul 2, 2021
f177fbe
Release 1.33.0-beta.0
adrianmroz-allegro Jul 2, 2021
c61047e
Fix check for `isPartialFilterInOverflow`. Previously code checked cl…
adrianmroz-allegro Jul 7, 2021
a2b3fd1
Release 1.33.0-beta.1
adrianmroz-allegro Jul 7, 2021
8ef2fdf
Feature/show extended description in info bubble (#788)
adrianmroz-allegro Aug 13, 2021
063b6f7
Release 1.33.0-beta.2
adrianmroz-allegro Aug 13, 2021
8805993
First check if new NumberClause exist and then compare it to old one.…
adrianmroz-allegro Sep 3, 2021
8b2ec68
Add title attribute to all Tiles (#791)
adrianmroz-allegro Sep 3, 2021
2645baa
Fix old Barchart component (#793)
adrianmroz-allegro Sep 3, 2021
5731270
Accept Splits as sources for drop on Filter Row and vice versa. (#790)
adrianmroz-allegro Sep 3, 2021
b25a910
Add file names for exported files (#794)
adrianmroz-allegro Sep 3, 2021
fef1fd0
Release 1.33.0-beta.3
adrianmroz-allegro Sep 3, 2021
aea0695
downloadable dataset context (#795)
adrianmroz-allegro Sep 15, 2021
47c0cba
Grid requires series (#797)
adrianmroz-allegro Sep 24, 2021
f1e46c0
Release 1.33.0-beta.4
adrianmroz-allegro Sep 24, 2021
a3fd142
Central panel (#796)
adrianmroz-allegro Oct 4, 2021
e02ade2
Grid 1.0 (#804)
adrianmroz-allegro Oct 14, 2021
cbcc68e
Bump axios from 0.21.1 to 0.21.2 (#798)
dependabot[bot] Oct 14, 2021
b13ef38
lift segment width (#806)
adrianmroz-allegro Oct 18, 2021
1f8299b
Fix splits in resolvers (#807)
adrianmroz-allegro Oct 20, 2021
0b5937e
Remove beta notice from grid ui (#808)
adrianmroz-allegro Oct 21, 2021
edb4622
Release 1.33.0-beta.5
adrianmroz-allegro Oct 21, 2021
f906bb8
Total on grid (#809)
adrianmroz-allegro Nov 3, 2021
82d6f58
Release 1.33.0-beta.6
adrianmroz-allegro Nov 3, 2021
d218419
Promote Grid Visualization (#811)
adrianmroz-allegro Nov 8, 2021
fd2e06f
Release 1.33.0-beta.7
adrianmroz-allegro Nov 8, 2021
0ede0da
Release 1.33.0
adrianmroz-allegro Nov 10, 2021
31f938b
BarChart: Check if there is a series under cursor. (#814)
adrianmroz-allegro Nov 18, 2021
d87d63d
Refactor time monitor (#815)
adrianmroz-allegro Nov 22, 2021
a74c0e1
Fix typo in Query Decorator example in docs (#816)
adrianmroz-allegro Dec 1, 2021
c16c945
Provide correct iterable for Promise.all #817 (#818)
wmeler Dec 1, 2021
f8c7af2
Time monitor failure handling (#819)
adrianmroz-allegro Dec 7, 2021
903cc0b
Bump marked from 0.7.0 to 4.0.10 (#822)
dependabot[bot] Jan 17, 2022
d3565d1
For multiValue dimensions add filters also on split level. That would…
adrianmroz-allegro Jan 28, 2022
b809af8
Bug/timeattribute (#823)
adrianmroz-allegro Feb 2, 2022
31e4452
Release 1.33.1
adrianmroz-allegro Feb 3, 2022
8626e55
Bump ssri from 6.0.1 to 6.0.2 (#825)
dependabot[bot] Feb 3, 2022
f8ea308
Fix height of heatmaps main container. (#826)
adrianmroz-allegro Feb 7, 2022
315015b
Use `isTruthy` helper instead of boolean cast (#835)
adrianmroz-allegro Feb 16, 2022
8195934
Release 1.33.2
adrianmroz-allegro Feb 17, 2022
645cd86
Add new Split kind: boolean. (#833)
adrianmroz-allegro Feb 17, 2022
4dc8ebf
Release 1.33.3
adrianmroz-allegro Feb 17, 2022
e9b1123
Deployment automation for branches (#837)
mkuthan Feb 18, 2022
b6b1ee6
Normalize branch name in github actions (#840)
kzadurska Feb 18, 2022
4f01e9c
Bump ua-parser-js from 0.7.19 to 0.7.31 (#828)
dependabot[bot] Feb 21, 2022
ebc064e
Bump pathval from 1.1.0 to 1.1.1 (#830)
dependabot[bot] Feb 21, 2022
4723b11
Introduce basic lighthouse-ci
plesiecki Feb 22, 2022
65bc7af
Streamlined fonts
plesiecki Feb 24, 2022
8690439
Extract CSS from JS bundle
plesiecki Feb 24, 2022
cf9d40d
rm style-loader
plesiecki Feb 24, 2022
e833760
CSS extract plugin within common config
plesiecki Feb 24, 2022
29f03c3
Move stylesheet link to the head
plesiecki Feb 24, 2022
574c052
Async main script
plesiecki Feb 24, 2022
decaef8
Don't inline fonts into CSS
plesiecki Feb 24, 2022
8673f5a
Better integration with Lighthouse CI
plesiecki Feb 24, 2022
5a45e1b
Simpler lhci workflow
plesiecki Feb 24, 2022
4545472
Pack .lighthouseci as artifact
plesiecki Feb 24, 2022
1dc2868
Comment on url-loader limit
plesiecki Feb 25, 2022
ec838f9
Polyfills bundle
plesiecki Feb 28, 2022
370a088
Feature / scatterplot (#853)
kzadurska Feb 28, 2022
2f998b0
Release 1.34.0
adrianmroz-allegro Mar 1, 2022
f9666b6
Fix missing x axis label (#856)
kzadurska Mar 1, 2022
92150c3
Release 1.34.1
adrianmroz-allegro Mar 1, 2022
797950e
Babel build
plesiecki Feb 28, 2022
d34e682
rm visResolve field re-declaration
plesiecki Mar 1, 2022
d5235af
Simpler babel config
plesiecki Mar 1, 2022
4279ddb
Type module for modern script
plesiecki Mar 1, 2022
55b6d05
Upgrade d3 to v4
plesiecki Mar 2, 2022
bc75297
Apply @babel/plugin-transform-runtime to re-use of Babel's injected h…
plesiecki Mar 3, 2022
46f6399
Print link to LH report
plesiecki Mar 3, 2022
eb81437
Comment with lighthouse report URL
plesiecki Mar 3, 2022
9187458
Bump react-syntax-highlighter to save on bundle size
plesiecki Mar 3, 2022
1404ce2
Bundle analysis with Statoscope
plesiecki Mar 4, 2022
f24dfe3
Monitor bundle size with size-limit
plesiecki Mar 4, 2022
f5d0a16
Size limit action
plesiecki Mar 4, 2022
e7432e9
Monitor bundle size but without compression
plesiecki Mar 4, 2022
b38d9da
Save webpack stats for further analysis
plesiecki Mar 4, 2022
fd09fa9
Exclude locale from moment
plesiecki Mar 4, 2022
1e8ff03
Bundle polyfills just once
plesiecki Mar 5, 2022
665bfa0
Missing rangeBand method (#867)
adrianmroz-allegro Mar 7, 2022
ccf2565
Fix: Exclusion filter does not filter out 'null' (#869)
adrianmroz-allegro Mar 8, 2022
3126e49
Release 1.35.0-beta.0
adrianmroz-allegro Mar 8, 2022
8fd698c
New visualization contribution guidelines (#857)
kzadurska Mar 8, 2022
74a9a00
drag-and-drop polyfill chunk
plesiecki Mar 8, 2022
68ddc52
Set size limit for scripts
plesiecki Mar 8, 2022
e3adf0e
Markdown parser lib change, snarkdown instead of marked.
plesiecki Mar 8, 2022
795774b
babel/register instead of ts-node
plesiecki Mar 8, 2022
82a04a4
Split utils (#849)
adrianmroz-allegro Mar 9, 2022
0aad291
Dynamic import syntax highlighter from source to save on bundle size
plesiecki Mar 9, 2022
dc4714e
Extract a common configuration to keep things DRY
plesiecki Mar 9, 2022
808aa90
Split visualizations into chunks
plesiecki Mar 9, 2022
6d4cef8
Limit number of chunks
plesiecki Mar 10, 2022
080de9f
Use simpler file-loader instead of url-loader
plesiecki Mar 10, 2022
1ee4a53
Upgrade React package (#865)
kzadurska Mar 11, 2022
b3358af
TS for Cypress (#878)
plesiecki Mar 12, 2022
5565a1c
Fix Wepback's optimization configuration
plesiecki Mar 14, 2022
93e7e97
Webperf docs (#879)
plesiecki Mar 15, 2022
25a5c91
Fix mocha configuration for watching chanages within test files (#883)
plesiecki Mar 16, 2022
8190794
Drop base immutable (#881)
adrianmroz-allegro Mar 16, 2022
4b962e5
Show NoData card on BarChart when no split datums came from Druid (#885)
adrianmroz-allegro Mar 16, 2022
12c1cf9
Release 1.35.0-beta.1
adrianmroz-allegro Mar 16, 2022
a78295a
Use POJsOs to model Cluster. Same pattern as DataCube type. (#886)
adrianmroz-allegro Mar 17, 2022
2bed1e9
Release 1.35.0-beta.2
adrianmroz-allegro Mar 17, 2022
a3fb9e6
Typescript fixes in package.json (#887)
adrianmroz-allegro Mar 30, 2022
064e1c1
Memoize Viz Chunk so Suspense won't get new Promise every time. (#889)
adrianmroz-allegro Mar 31, 2022
921bef7
Release 1.35.0
adrianmroz-allegro Mar 31, 2022
e3528bc
Break words in markdown nodes. (#891)
adrianmroz-allegro Apr 6, 2022
9c251d5
Fine tune priority values for visualisation resolvers so Grid would b…
adrianmroz-allegro Apr 11, 2022
5a1cddd
Release 1.35.1
adrianmroz-allegro Apr 11, 2022
5cf5845
Bump moment from 2.20.1 to 2.29.2 (#892)
dependabot[bot] Apr 12, 2022
425bbcc
Bump lodash from 4.17.15 to 4.17.21 (#880)
dependabot[bot] Apr 12, 2022
b25bd43
Bump follow-redirects from 1.14.4 to 1.14.9 (#842)
dependabot[bot] Apr 12, 2022
70bf72d
Add GH TOKEN explicitly for github-script to authenticate dependant b…
mkuthan Apr 12, 2022
d18610a
Fix branch undeploy action (#896)
mkuthan Apr 12, 2022
260620f
Disable adding a Lighthouse PR comment (#895)
kzadurska Apr 12, 2022
24050f2
Bump async from 2.6.1 to 2.6.4 (#898)
dependabot[bot] Apr 29, 2022
cf5364d
Define write permission for creating the issue by dependant bot (#900)
mkuthan May 6, 2022
254306f
Update from Node 14 to Node 16 (and deprecate Node 12) (#901)
mkuthan May 9, 2022
c999fc1
Release 1.36.0
adrianmroz-allegro May 9, 2022
29ceac7
pin node version (#914)
adrianmroz-allegro Sep 21, 2022
4c3148a
fetch fulfills promises with 400/500 codes, we need to check ok prope…
adrianmroz-allegro Sep 23, 2022
0d6c506
Release 1.36.1
adrianmroz-allegro Sep 23, 2022
8d726e4
Documentation refactor (#920)
mkuthan Oct 17, 2022
086156f
vis sekeleton (#917)
adrianmroz-allegro Oct 20, 2022
8215332
custom messages (#919)
adrianmroz-allegro Oct 20, 2022
5d77473
Fix CSS in Filter menus (#922)
adrianmroz-allegro Oct 20, 2022
4ffe61f
Release 1.37.0
adrianmroz-allegro Oct 20, 2022
fa631b2
ellipsis mixin adds overflow-x hidden and that changes default overfl…
adrianmroz-allegro Nov 10, 2022
cd430f4
Release 1.38.0
adrianmroz-allegro Nov 10, 2022
e960406
sourceTimeBoundaryRefreshInterval setting for Cluster (#926)
adrianmroz-allegro Nov 10, 2022
c3cf602
Release 1.38.1
adrianmroz-allegro Nov 10, 2022
ee7e937
fix deleteDataCube function (#938)
adrianmroz-allegro Nov 15, 2022
1151f35
Release 1.38.2-beta.0
adrianmroz-allegro Nov 15, 2022
a0d738f
Release 1.38.2
adrianmroz-allegro Nov 16, 2022
3e325d4
feature/cli (#941)
adrianmroz-allegro Nov 16, 2022
56b79e4
Release 1.39.0-beta.0
adrianmroz-allegro Nov 16, 2022
7629159
fix program.error calls so they use thrown error messages (#942)
adrianmroz-allegro Nov 18, 2022
1dd0e80
Release 1.39.0-beta.1
adrianmroz-allegro Nov 18, 2022
6d9710a
Disable deployments for branches from forks (#944)
mkuthan Nov 21, 2022
75a6c7d
sass dependencies bump (#946)
piwysocki Nov 22, 2022
be76228
GH actions refactored into single CI workflow (#945)
mkuthan Nov 22, 2022
9d1bdd3
Updated setup-node GH action to the latest version (#949)
mkuthan Nov 22, 2022
867df8a
Deploy action bundled into CI workflow (#950)
mkuthan Nov 22, 2022
ef0d21a
Build on the latest Node 14.x and 16.x (#956)
mkuthan Nov 24, 2022
f8efc63
Update GCloud GH actions to the latest versions (#957)
mkuthan Nov 24, 2022
bd2e3c6
Dedicated lighthouse GH action (#959)
mkuthan Nov 24, 2022
88731e0
Dependabot and mergify configuration for Gh actions (#965)
mkuthan Nov 24, 2022
987773a
first attempt to fix build from the forks (#967)
mkuthan Nov 25, 2022
816a933
Reports enabled only for PRs
mkuthan Nov 25, 2022
e060c20
Fix build from forks
mkuthan Nov 25, 2022
e8ce77b
Update dependabot.yml
mkuthan Nov 25, 2022
d08dc39
Update dependabot.yml
mkuthan Nov 25, 2022
548996a
Update dependabot.yml
mkuthan Nov 25, 2022
d50b1a6
Update dependabot.yml
mkuthan Nov 25, 2022
6d4ceb6
Disable mergify for node updates (temporarily)
mkuthan Nov 25, 2022
b8823c4
Cypress updated to v9 (#961)
piwysocki Nov 26, 2022
b5fdc10
tslint - rules cleanup (#948)
piwysocki Nov 27, 2022
60e437d
Removed legacy create-react-class (#962)
piwysocki Nov 27, 2022
284eca0
e2e tests - migrate to Cypress v11 (#975)
piwysocki Nov 28, 2022
78ffdeb
tslint: enforce self closing of empty jsx elements (#972)
piwysocki Nov 28, 2022
0e0577b
Removed not used react-hot-loader (#963)
piwysocki Nov 28, 2022
9d223fb
removed warnings in npm install (#966)
piwysocki Nov 28, 2022
669c9ae
tslint: only-arrow-functions cleanup (#973)
piwysocki Nov 28, 2022
2d7b10d
tslint: no-var-keyword, prefer-const rules cleanup (#974)
piwysocki Nov 28, 2022
ae871d1
Bump helmet to 6.0.0 (#976)
piwysocki Nov 28, 2022
3a31cdb
sass-lint rules cleanup (#980)
piwysocki Nov 30, 2022
58b25f7
Bump nopt to v5 + eslint rules cleanup (#979)
piwysocki Nov 30, 2022
fb456f3
viz colors (#955)
adrianmroz-allegro Nov 30, 2022
86fe572
bugfix/viz colors (#981)
adrianmroz-allegro Dec 1, 2022
585d2e7
Replace fs.promise with fs-extra (#985)
piwysocki Dec 5, 2022
c9447eb
resolve with new split, not old one (#983)
adrianmroz-allegro Dec 5, 2022
d095ac8
Dependabot automation (#984)
mkuthan Dec 6, 2022
fc92d6c
Time series specific visualization controls (#986)
adrianmroz-allegro Dec 6, 2022
7dee346
tests for visualization manifests (#987)
adrianmroz-allegro Dec 6, 2022
eacc3ac
Release 1.39.0-beta.2
adrianmroz-allegro Dec 6, 2022
ef4cd9a
Bump unit tests packages (#978)
piwysocki Dec 6, 2022
d745076
Readme - slack badge added (#991)
piwysocki Dec 7, 2022
308bb40
bugfix/use viz colors on heatmap (#994)
adrianmroz-allegro Dec 9, 2022
3280c4b
Release 1.39.0-beta.3
adrianmroz-allegro Dec 9, 2022
d42e4dd
Bump cypress from 11.2.0 to 12.0.2 (#995)
dependabot[bot] Dec 14, 2022
e571f02
loggers (#996)
adrianmroz-allegro Dec 15, 2022
f2a1c08
Release 1.39.0-beta.4
adrianmroz-allegro Dec 15, 2022
ae5e917
Bump plywood to latest patch version (#993)
piwysocki Dec 19, 2022
e1d87ff
Bump cypress from 12.0.2 to 12.1.0 (#999)
dependabot[bot] Dec 20, 2022
d02cb03
Bump typescript to 3.5.3 (#992)
piwysocki Jan 3, 2023
c9900be
Release 1.39.0
adrianmroz-allegro Jan 4, 2023
9808c46
omit undefined values from cli (#1013)
adrianmroz-allegro Jan 10, 2023
07e18c2
feature/query endpoint backend (#1022)
adrianmroz-allegro Feb 8, 2023
f2d49c0
Use /query endpoint in visualisation (#1023)
adrianmroz-allegro Feb 8, 2023
4d0bd34
feature/boolean filter query endpoint (#1024)
adrianmroz-allegro Feb 8, 2023
bf46e7b
Query endpoint: Raw data modal (#1025)
adrianmroz-allegro Feb 8, 2023
4df5eb4
string filter queries (#1028)
adrianmroz-allegro Feb 13, 2023
20648b3
number filter query (#1029)
adrianmroz-allegro Feb 13, 2023
ee531e4
pinboard-query (#1030)
adrianmroz-allegro Feb 13, 2023
5d1438b
split query router (#1031)
adrianmroz-allegro Feb 13, 2023
d559bb2
Bugfix/add ignore case option for string filters (#1032)
adrianmroz-allegro Feb 13, 2023
53fb447
Release 1.40.0-beta.0
adrianmroz-allegro Feb 13, 2023
3cebc4a
Bump cypress from 12.1.0 to 12.5.1 (#1027)
dependabot[bot] Feb 15, 2023
fbf678b
vx replaced with visx (#1010)
piwysocki Feb 16, 2023
27cb187
Dead code removed (#1016)
piwysocki Feb 16, 2023
5ef0710
feature/rich query logger (#1034)
adrianmroz-allegro Feb 17, 2023
cea38d4
Release 1.40.0-beta.1
adrianmroz-allegro Feb 17, 2023
cf7f553
Bump github-pages from 227 to 228 in /docs (#1026)
dependabot[bot] Feb 17, 2023
41d85c4
bugfix/dont restrict mkurl (#1039)
adrianmroz-allegro Feb 20, 2023
ff9da5d
Release 1.40.0-beta.2
adrianmroz-allegro Feb 20, 2023
f044e3e
Bump typescript to 3.6.5 (#1038)
piwysocki Feb 21, 2023
c91928b
match @types with ts3.6 (#1009)
piwysocki Feb 22, 2023
c4a56a5
bump size limit for main bundle (#1046)
adrianmroz-allegro Mar 6, 2023
0956374
cypress - adding explicit parameter types (#1042)
piwysocki Mar 6, 2023
9bdff2e
more tests and better error messages (#1035)
adrianmroz-allegro Mar 6, 2023
e4f7b74
Fix audit critical issues (#998)
piwysocki Mar 7, 2023
ca501c2
Add more variables to query logs (#1049)
adrianmroz-allegro Mar 9, 2023
d2440fc
Release 1.40.0-beta.3
adrianmroz-allegro Mar 9, 2023
9078cd2
log iso strings (#1053)
adrianmroz-allegro Mar 16, 2023
22782a2
Release 1.40.0-beta.4
adrianmroz-allegro Mar 16, 2023
2e8ef88
Release 1.40.0-beta.5
adrianmroz-allegro Mar 16, 2023
ddd37a0
Bump visx to latest v1 (#1037)
piwysocki Mar 17, 2023
e4cb3b3
Bump cypress from 12.5.1 to 12.8.1 (#1054)
dependabot[bot] Mar 20, 2023
810a6a4
Release 1.40.0
adrianmroz-allegro Mar 31, 2023
77380e6
Add docs for limits configuration for dimension (#1058)
adrianmroz-allegro Apr 3, 2023
61f6792
Bump cypress from 12.8.1 to 12.9.0 (#1059)
dependabot[bot] Apr 6, 2023
97e1fef
No retry option should disable retry policy (#1064)
adrianmroz-allegro Apr 24, 2023
7238056
Release 1.40.1
adrianmroz-allegro Apr 24, 2023
b5f8ae5
Bump cypress from 12.9.0 to 12.10.0 (#1060)
dependabot[bot] Apr 25, 2023
3c53849
Bump cypress from 12.10.0 to 12.13.0 (#1072)
dependabot[bot] May 30, 2023
3fea1d3
Logger context (#1073)
adrianmroz-allegro Jun 5, 2023
d215b08
Release 1.40.2
adrianmroz-allegro Jun 5, 2023
2665f66
Merge tag '1.40.2' into merge-upstream-1-40-2
Oct 13, 2023
8147d48
Merge pull request #6 from skimhub/merge-upstream-1-40-2
rathko Nov 23, 2023
bd9cc7f
Merge branch 'master' into develop
rathko Jan 8, 2024
50a59d8
Changed naming from AVAILABLE_LIMITS to DEFAULT_LIMITS
Jan 8, 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
Prev Previous commit
Next Next commit
Add more variables to query logs (allegro#1049)
* Add more variables to query logs

* add custom logger for query viz

* basic tests
adrianmroz-allegro authored Mar 9, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ca501c21df7cf7b10703661a98d2b98b6b823f13
52 changes: 3 additions & 49 deletions src/server/routes/query/routes/visualization.ts
Original file line number Diff line number Diff line change
@@ -14,71 +14,25 @@
* limitations under the License.
*/

import { Duration } from "chronoshift";
import { Response } from "express";
import { Expression } from "plywood";
import makeGridQuery from "../../../../client/visualizations/grid/make-query";
import { Logger } from "../../../../common/logger/logger";
import { Essence } from "../../../../common/models/essence/essence";
import { FixedTimeFilterClause } from "../../../../common/models/filter-clause/filter-clause";
import { usedMeasures } from "../../../../common/models/series/used-measures";
import { Timekeeper } from "../../../../common/models/timekeeper/timekeeper";
import makeQuery from "../../../../common/utils/query/visualization-query";
import { executeQuery } from "../../../utils/query/execute-query";
import { logQueryInfo } from "../../../utils/query/log-query";
import { QueryRouterRequest } from "../query";

function getQuery(essence: Essence, timekeeper: Timekeeper): Expression {
return essence.visualization.name === "grid" ? makeGridQuery(essence, timekeeper) : makeQuery(essence, timekeeper);
}

function start(clause: FixedTimeFilterClause): string {
return clause.values.first().start.toUTCString();
}

function intervalLength(clause: FixedTimeFilterClause): number {
const timeRange = clause.values.first();
return timeRange.end.getTime() - timeRange.start.getTime();
}

function timeVariables(essence: Essence, timekeeper: Timekeeper): Record<string, unknown> {
const timeFilter = essence.currentTimeFilter(timekeeper);
const timeDimension = essence.getTimeDimension();
const timeSplit = essence.splits.findSplitForDimension(timeDimension);

const startTime = start(timeFilter);
const interval = intervalLength(timeFilter);

const variables: Record<string, unknown> = { startTime, interval };

if (timeSplit && timeSplit.bucket instanceof Duration) {
variables.granularity = timeSplit.bucket.getDescription();
}

if (essence.hasComparison()) {
const previousTimeFilter = essence.previousTimeFilter(timekeeper);
variables.shiftedStartTime = start(previousTimeFilter);
}

return variables;
}

function logQueryInfo(essence: Essence, timekeeper: Timekeeper, logger: Logger) {
const nonTimeFilters = essence.filter.removeClause(essence.getTimeDimension().name);

logger.log(`Visualization query ${essence.description(timekeeper)}`, {
...timeVariables(essence, timekeeper),
dataCube: essence.dataCube.name,
visualization: essence.visualization.name,
filters: nonTimeFilters.clauses.map(clause => clause.reference).toArray(),
splits: essence.splits.splits.map(split => split.reference).toArray(),
measures: essence.series.series.flatMap(usedMeasures).toSet().toArray()
});
}

export default async function visualizationRoute({ context }: QueryRouterRequest, res: Response) {
const { dataCube, essence, decorator, timekeeper, logger } = context;
logQueryInfo(essence, timekeeper, logger);
const query = getQuery(essence, timekeeper);
const queryTimeStart = Date.now();
const result = await executeQuery(dataCube, query, essence.timezone, decorator);
logQueryInfo(essence, timekeeper, logger.setLoggerId("turnilo-visualization-query"), Date.now() - queryTimeStart);
res.json({ result });
}
88 changes: 88 additions & 0 deletions src/server/utils/query/log-query.mocha.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* Copyright 2017-2022 Allegro.pl
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { expect } from "chai";
import Sinon, { spy } from "sinon";
import { Logger } from "../../../common/logger/logger";
import { VisStrategy } from "../../../common/models/essence/essence";
import { EssenceFixtures } from "../../../common/models/essence/essence.fixtures";
import { measureSeries } from "../../../common/models/series/series.fixtures";
import { timeSplitCombine } from "../../../common/models/split/split.fixtures";
import { TimeShift } from "../../../common/models/time-shift/time-shift";
import { TimekeeperFixtures } from "../../../common/models/timekeeper/timekeeper.fixtures";
import { logQueryInfo } from "./log-query";

describe("log-query-info", () => {
const logger: Logger & { log: Sinon.SinonSpy } = {} as any;

beforeEach(() => {
logger.log = spy();
});

const baseEssence = EssenceFixtures.wikiTotals().addSeries(measureSeries("added"));
const timekeeper = TimekeeperFixtures.wiki();
const executionTime = 42;

const expectedMessage = "Visualization query wiki_2016-04-29-12-40_2016-04-30-12-40";
const expectedBasicVariables: Record<string, unknown> = {
executionTime: 42,
startTime: 1461933600000,
startTimeMsAgo: 86391350,
interval: 86400000,
dataCube: "wiki",
visualization: "totals",
filters: ["commentLength"],
splits: [],
measures: ["added"]
};

it("Should log all basic variables", () => {
logQueryInfo(baseEssence, timekeeper, logger, executionTime);
expect(logger.log.calledWith(
expectedMessage,
expectedBasicVariables
)).to.be.true;
});

it("Should log additional time shift variables", () => {
const essence = baseEssence.set("timeShift", TimeShift.fromJS("P1D"));
logQueryInfo(essence, timekeeper, logger, executionTime);
expect(logger.log.calledWith(
expectedMessage,
{
...expectedBasicVariables,
timeShift: "P1D",
shiftedStartTime: 1461847200000,
shiftedStartTimeMsAgo: 172791350
}
)).to.be.true;
});

it("Should log additional time split variables", () => {
const essence = baseEssence.addSplit(timeSplitCombine("time", "P2D"), VisStrategy.FairGame);
logQueryInfo(essence, timekeeper, logger, executionTime);
expect(logger.log.calledWith(
expectedMessage,
{
...expectedBasicVariables,
visualization: "line-chart",
splits: ["time"],
granularity: "P2D"
}
)).to.be.true;
});

});
80 changes: 80 additions & 0 deletions src/server/utils/query/log-query.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Copyright 2017-2022 Allegro.pl
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { Duration } from "chronoshift";
import { Logger } from "../../../common/logger/logger";
import { getMaxTime } from "../../../common/models/data-cube/data-cube";
import { Essence } from "../../../common/models/essence/essence";
import { FixedTimeFilterClause } from "../../../common/models/filter-clause/filter-clause";
import { usedMeasures } from "../../../common/models/series/used-measures";
import { Timekeeper } from "../../../common/models/timekeeper/timekeeper";

function start(clause: FixedTimeFilterClause): Date {
return clause.values.first().start;
}

function intervalLength(start: Date, end: Date): number {
return end.getTime() - start.getTime();
}

function clauseInterval(clause: FixedTimeFilterClause): number {
const { end, start } = clause.values.first();
return intervalLength(start, end);
}

function timeVariables(essence: Essence, timekeeper: Timekeeper): Record<string, unknown> {
const maxTime = getMaxTime(essence.dataCube, timekeeper);
const timeFilter = essence.currentTimeFilter(timekeeper);
const timeDimension = essence.getTimeDimension();
const timeSplit = essence.splits.findSplitForDimension(timeDimension);

const startTime = start(timeFilter);
const interval = clauseInterval(timeFilter);

const variables: Record<string, unknown> = {
startTime: startTime.getTime(),
startTimeMsAgo: intervalLength(startTime, maxTime),
interval
};

if (timeSplit && timeSplit.bucket instanceof Duration) {
variables.granularity = timeSplit.bucket.toString();
}

if (essence.hasComparison()) {
const previousTimeFilter = essence.previousTimeFilter(timekeeper);
const shiftedStartTime = start(previousTimeFilter);
variables.shiftedStartTime = shiftedStartTime.getTime();
variables.shiftedStartTimeMsAgo = intervalLength(shiftedStartTime, maxTime);
variables.timeShift = essence.timeShift.toString();
}

return variables;
}

export function logQueryInfo(essence: Essence, timekeeper: Timekeeper, logger: Logger, executionTime: number) {
const nonTimeFilters = essence.filter.removeClause(essence.getTimeDimension().name);

logger.log(`Visualization query ${essence.description(timekeeper)}`, {
executionTime,
...timeVariables(essence, timekeeper),
dataCube: essence.dataCube.name,
visualization: essence.visualization.name,
filters: nonTimeFilters.clauses.map(clause => clause.reference).toArray(),
splits: essence.splits.splits.map(split => split.reference).toArray(),
measures: essence.series.series.flatMap(usedMeasures).toSet().toArray()
});
}