-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add "Last Updated" Field to UI based on build time #542
Conversation
|
This should be merge I guess @AnandChowdhary |
Just so I understand it right.... does this only update with each time changes are pushed to the gh page? Because I feel like this wouldn't be a good aproach, since it wouldn't reflect when the actual uptime was last updated... which is what I suggested in a discussion |
That seems great. The reason I put it as a header to contrast the "Live Status" which is clearly a misnomer. Maybe there is some rewording we could do to reflect the delayed state of the "live" status?
I opened this PR a while ago and have honestly forgotten most of how this system works. If the gh-page needs to be updated to reflect the uptime status of a domain, then is that not accurate? I suppose maybe if you're pushing changes that don't trigger an update of the up time status, then that could maybe be a problem. But in a normal use case, when does the webpage update but the up time status does not? What would be a better approach? I'm not sure what discussion you're talking about. It does not appear in the discussion I linked in the PR description. |
From what I know does upptime update the actual status page (the source) every 12 hours? Meanwhile the uptime of the endpoints is pulled from the gh repo using commit history for the statistics to display which is why there is a loading animation. So, if the "last updated" date is made when the site is build will it not be accurately reflecting the most recent uptime check. |
Yes, the "live" status is "live" because we make a fetch request to see the status "live" as of the GitHub repository, which is actually live +- few minutes. So the "last updated" should reflect the last GitHub commit, not the most recent time the static site was generated. |
|
Hi there. This PR adds a "Last Updated" field to the '"Live" Status' title in the web UI based on the last time the repository was builr. I'm not sure if there is a better way to go about this. I have Svelte fetching the current time as a ISO string during the preprocessing step, and writing it to the
config.json
. Then, on the client side I convert it to their locale time.Closes upptime/upptime#798
Where I run
![Screenshot 2023-06-13 at 12 52 20 PM](https://private-user-images.githubusercontent.com/774597/245588992-ed34029a-2ea1-40a4-9e20-caf693f0700e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1OTIwOTUsIm5iZiI6MTcxOTU5MTc5NSwicGF0aCI6Ii83NzQ1OTcvMjQ1NTg4OTkyLWVkMzQwMjlhLTJlYTEtNDBhNC05ZTIwLWNhZjY5M2YwNzAwZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOFQxNjIzMTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zYTA4ODVkZWM1M2ZjOWFmZmI3ODU1MTQ4N2I5OTVjMzBmYTQzMTdkYjkzZDU1MDZkNDZjZTRkM2RlNzBjZTMwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.tQ71JNUZ3p_L7cGR1ExljfaarYjbZlMtujcZpsLGm9k)
npm run dev
on my local machine, this is the status page I get.Feel free to squash and merge this PR. I accidentally has an auto-formatter on and so I had to make an additional commit to restore the small formatting changes.