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

Add "Last Updated" Field to UI based on build time #542

Closed
wants to merge 2 commits into from

Conversation

FrederickGeek8
Copy link

@FrederickGeek8 FrederickGeek8 commented Jun 13, 2023

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 npm run dev on my local machine, this is the status page I get.
Screenshot 2023-06-13 at 12 52 20 PM

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.

@upptime-bot
Copy link
Member

⚠️ This PR has not seen any activity in the past 2 months so I'm marking it as stale. I'll close it if it doesn't see any activity in the coming week.

@upptime-bot upptime-bot added the wontfix This will not be worked on label Aug 13, 2023
@Zaid-maker
Copy link

This should be merge I guess @AnandChowdhary

@upptime-bot upptime-bot removed the wontfix This will not be worked on label Aug 16, 2023
@AnandChowdhary
Copy link
Member

What do you think of adding the last updated text in the footer, like so? I'm not sure I'm a huge fan of showing it so prominently as a heading.

CleanShot 2023-08-16 at 08 35 24@2x

@Andre601
Copy link
Contributor

Andre601 commented Aug 16, 2023

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

@FrederickGeek8
Copy link
Author

What do you think of adding the last updated text in the footer, like so? I'm not sure I'm a huge fan of showing it so prominently as a heading.

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?

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

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.

@Andre601
Copy link
Contributor

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.

@AnandChowdhary
Copy link
Member

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.

@upptime-bot
Copy link
Member

⚠️ This PR has not seen any activity in the past 2 months so I'm marking it as stale. I'll close it if it doesn't see any activity in the coming week.

@upptime-bot upptime-bot added the wontfix This will not be worked on label Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
5 participants