GithubHelp home page GithubHelp logo

Comments (8)

MichaIng avatar MichaIng commented on May 29, 2024 2

Okay, however it shouldn't be a big issue that in 1 of 60 cases the minutes are omitted, especially since it is not live updated but only when when re-navigating to that page.

from dietpi-dashboard.

Joulinar avatar Joulinar commented on May 29, 2024 2

It's not a problem to open new issues for your ideas. Best is one issue per idea. We will assign the correct label.

from dietpi-dashboard.

MichaIng avatar MichaIng commented on May 29, 2024

Many thanks for your suggestion.

You used the stable version, right? This has been addressed already with: 9bd3033
Some pages are not constantly reloading data now. Since the seconds timer is pretty overkill on the management page, now only minutes are shown, and the page needs to be reloaded or or navigation button clicked again to have the values updated.

from dietpi-dashboard.

echtfrank avatar echtfrank commented on May 29, 2024

OK, thanks for the quick reply. Yes, I'm on stable. I didn't notice it was already addressed. And indeed seconds is an overkill.
Nevertheless, I think you should explicitly state zero-values here. How does uptime count further? Is there a maximum number for #hours? What is displayed after that? Or do you use, hour, day, weeks, months, yerars and so on?

from dietpi-dashboard.

MichaIng avatar MichaIng commented on May 29, 2024

Leading and trailing zero units are omitted completely by the used humanizeDuration function. Would be pretty ugly either to show 0 years 0 months 0 weeks 6 days 13 hours 42 minutes 0 seconds 😄. Those are added on demand and as of the rounding to minutes that it done now, the seconds are omitted implicitly in every case. What I agree with, it could be beneficial to keep showing 0 minutes, to make clear that minutes is the precision shown.

Here the documentation of the module: https://github.com/EvanHahn/HumanizeDuration.js
This could be tried:

((uptime = humanizeDuration(socketData.uptime * 60000, { units: ['y', 'mo', 'w', 'd', 'h', 'm'] })),

Leading zero units are not shown by this, but with some luck tailing ones are. Otherwise I do not see an option to define the minimum unit to show, respectively whether to show zero value units or not.

from dietpi-dashboard.

ravenclaw900 avatar ravenclaw900 commented on May 29, 2024

No, it doesn't look like trailing units are shown, even with that.

from dietpi-dashboard.

ravenclaw900 avatar ravenclaw900 commented on May 29, 2024

@echtfrank
Can this be closed then?

from dietpi-dashboard.

echtfrank avatar echtfrank commented on May 29, 2024

Hi, sorry for my late reaction. Yes, absolutely can this be closed. thanks for the background information.
I have other ideas for the dashboard. I am new to Github. What is the preferred method posting new ideas?
I don't want to open an 'issue' for an 'idea'...

from dietpi-dashboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.