Fix history charts on views/designs never showing the continuation-to-now dash - #3458
Open
Salvialf wants to merge 1 commit into
Open
Fix history charts on views/designs never showing the continuation-to-now dash#3458Salvialf wants to merge 1 commit into
Salvialf wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
plan.js/view.jsgraph widgets) configured with the "Tous" (all) period never showed the dashed "continue to now" segment that indicates stale data, even when the underlying command's last value was genuinely more than a minute old.cmd.ajax.php'sgetHistoryaction only resolveddateEndto the current time for a relative date range (e.g. "7 days") or when an explicitdateEndwas provided. WithdateRange=alland no explicit dates (exactly what these widgets send),dateEndstayed unresolved, so the client received an empty value,new Date('')produced an Invalid Date in JS, and the staleness check (diffms > 60000) always evaluated to false.dateStart/dateEndresolution block ingetHistory, which had grown into a hard-to-follow sequence of overlapping conditions (including a latent, never-actually-reachable bug where a JSONdateRangewith anendbut nostartkey would feed the raw JSON string intoDateTime::modify()).dateEndis still leftnullfor the actual history query when nothing resolves it, sohistory::allowFuturekeeps working exactly as before (a genuinely unbounded query, not artificially capped at "now"). Only the value returned to the client for the staleness check defaults to "now" when otherwise unresolved.dateRangecombined with an explicitdateEndbut no explicitdateStart), where the computeddateStartis now relative to that explicitdateEndinstead of always relative to "now". Arguably the more correct behavior either way.