-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix page crash on invalid domain startup times
When the log file contains a "starting up" timestamp which `new Date()` cannot parse, the page oopsed with a `RangeError` from `distanceToNow()`. Change `domainGetStartTime()` to return a Date object instead of a raw string, to keep the knowledge of the date format/parsing entirely within the function. Check for invalid dates and return `null` in the error cases, which the confirmation dialog already handles. Also, fix the `grep` to look for the same pattern that the `.split()` uses, to avoid mismatches. In the confirmation dialog, rename `uptime` to `startTime`, as that's what it is -- uptime is a duration, which is only computed inside of the render function, but that state is an absolute time stamp. https://issues.redhat.com/browse/RHEL-19878
- Loading branch information
1 parent
8e04059
commit a7e93e8
Showing
3 changed files
with
28 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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