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

Tooltip with more accurate duration information #75

Closed
dennisdahlmann opened this issue Nov 5, 2018 · 3 comments
Closed

Tooltip with more accurate duration information #75

dennisdahlmann opened this issue Nov 5, 2018 · 3 comments

Comments

@dennisdahlmann
Copy link

Hi,
first of all thank you for the discrete panel, we are using it to monitor the state of a machine.

Is it possible to show a more accurate duration in the tooltip of the panel?
Your screenshot shows the problem:
screenshot-single-2
The duration is mentioned as "a day", but the 30 minutes are ignored.

Or see this example:
example2
Instead of "4 hours", "3 hours 30 minutes" would be better.

Do you think it is possible to add more accuracy to the duration information in the tooltip?
Maybe it is possible to configure the duration time units, e.g. "hour;minute;second" and all duration will be shown in this units, even if it is a higher unit (day) available. So for your screenshot example of "a day" it would be "24 hours 30 minutes".

BR

@ryantxu
Copy link
Contributor

ryantxu commented Nov 5, 2018

sounds good -- open to contributions

@NerdyProjects
Copy link

I have the same problem :-) I use discrete-panel to show running times for a heating system and the user should calculate the gas usage by reading the time of a certain state.

The duration is given by momentjs::humanize. There is an upstream feature request open as well - moment/moment#348.
One of the last comments posts a snippet that looks useful here. But I also feel a bit lazy to put this into place now...

@clink-aaron
Copy link
Contributor

The fix for this is done, and looks like it will go out with v0.0.9.

When does that release go live?

@ryantxu ryantxu closed this as completed Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants