clp
clp copied to clipboard
webui: Add timeline for visualizing results count aggregation; replace `Luxon` with `dayjs`.
References
- #309 integrated reducer server and added support for count aggregations.
- #331 added support for the time bucketed count aggregation.
Description
- Add timeline for visualizing results count aggregation.
- Replace datetime manipulation library
Luxonwithdayjs. - Avoid removing inserted collections in
SearchJobCollectionsManagerto avoid creating a new Meteor.Mongo.Collection object with a same name.
Validation performed
-
cd <PROJECT_ROOT>; task -
cd ./build/clp-package/sbin; ./start-clp.sh -
./compress.sh ~/samples/hive-24hr/i-00c90a0f/ - Opened the WebUI address in a browser.
- Started a query with string
1and observed the job finished without error. - Observed the timeline was displayed in default time range selection, which is from Unix epoch to a year from now.
- Hovering onto the one-and-only-one column showed a tooltip, which displayed logs count in the time bucket of desired size of 2 years.
- Dragged to zoom in. Kept zooming in until the time buckets are broken down into reasonable sizes and spanned across the whole timeline. Observed the full starting date time on the left bottom corner of the chart correctly reflected the start of the timeline.
- Kept zooming in until a single column was visible. Verified the timestamp of the one-and-only-one bucket was matching the ones in the results table.
AI @junhaoliao : PR column alignment changes to Chart.js .
Nice work. A few high level comments besides the inline ones:
- Can we set a min height for the bars in the graph? Right now sometimes the height is so low that even tool tips don't show up.
- Can we improve some of the docstrings to especially document object parameter types and callbacks? Right now, I find myself having to read through the implementation and the call sites to get a clear picture of how the method should be used.
- Perhaps we can make timelineConfig a class so that we don't have to document its non-trivial structure everywhere.
- Achieved by adding a
minBarLengthproperty into the dataset config. - Added a
types.jsfiles to document all non-trivial object definiitons.