cloudera / hue

Open source SQL Query Assistant service for Databases/Warehouses
https://cloudera.com
Apache License 2.0
1.18k stars 369 forks source link

timeline error #383

Closed hofst closed 3 years ago

hofst commented 8 years ago

I just stumbled across a problem. Until now, timelines worked without a problem with all my solr indices (CHD 5.7). But with a newly created index (only 10 documents, about 50 fields), the timeline stopped working with a javascript error:

The Firefox console shows: asd

And the timeline dashboards never finishes: capture

hofst commented 8 years ago

workaround: it's working again after recreating from scratch in a new dashboard. My suspicion is that Hue got confused over the scheme over time (solr schemalessTemplate)

romainr commented 8 years ago

It is not oral though, if it happens again feel free to send a way to repro.

Coincidentally, we are currently improving the schemaless support https://github.com/cloudera/hue/commit/509733ea3b0dee47a4e5d83b523a341f67baa582, so far we mostly did for defied schemas

hofst commented 8 years ago

Just reproduced the issue (still cloudera 5.7):

hofst commented 8 years ago

@romainr

This issue keeps reoccuring in multiple dashboards and I would be really happy, if we could find a workaround other than recreating the whole dashboards. I attached an exported (corrupted) dashboard that shows the errorenous behaviour.

test_hue.txt

EDIT: Fixed the issue by manually adding "\"field\": \"time_tdt\"" inside of timefilter. It appears that hue determines the time-field at dashboard creation time. If no (dynamic) time field is present, it will corrupt the dashboard and cause javascript errors from that point on.

romainr commented 8 years ago

So at dashboard creation there was a time_tdt field, but not it is gone?

I can see for adding a check to reset the time filter instead of bugging

hofst commented 8 years ago

So at dashboard creation there was a time_tdt field, but not it is gone?

That's true for some cases. More general, the timefilter field appears to be selected automatically at dashbaord creation time. If there is no time field present at that time (e.g., a completely dynamic index is initially empty) or the time field temporarily disappears (e.g., a completely dynamic index temporarily becomes empty), then the dashboard gets corrupted, because the timefilter field is removed with no way to reset it manually.

I think the solution is to copy the behavior of elasticsearch/kibana: Give the user the option to set the timefilter field at index creation time and let him modify the field manually later. This also has the advantage that the user can correct an incorrectly guessed field later.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity and is not "roadmap" labeled or part of any milestone. Remove stale label or comment or this will be closed in 5 days.