1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-14 14:14:25 +00:00
gitea/templates/base
Yarden Shoham c70f65e83b
Auto-update the system status in admin dashboard (#29163)
- Refactor the system status list into its own template
- Change the backend to return only the system status if htmx initiated
the request
- `hx-get="{{$.Link}}/system_status`: reuse the backend handler
- `hx-swap="innerHTML"`: replace the `<div>`'s innerHTML (essentially
the new template)
- `hx-trigger="every 5s"`: call every 5 seconds
- `hx-indicator=".divider"`: the `is-loading` class shouldn't be added
to the div during the request, so set it on an element it has no effect
on
- Render "Since Last GC Time" with `<relative-time>`, so we send a
timestamp

# Auto-update in action GIF

![action](https://github.com/go-gitea/gitea/assets/20454870/c6e1f220-f0fb-4460-ac3b-59f315e30e29)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
2024-02-16 02:52:25 +00:00
..
alert_details.tmpl Enforce tab indentation in templates (#15289) 2021-04-10 23:46:37 -04:00
alert.tmpl Clean up polluted styles and remove dead CSS code (#24497) 2023-05-03 14:32:10 -04:00
disable_form_autofill.tmpl Disable form autofill (#17291) 2021-10-19 01:08:41 +03:00
footer_content.tmpl Fix more "locale" usages (#27259) 2023-09-25 20:42:40 +08:00
footer.tmpl Move the captcha script loader to the template which really needs it (#28718) 2024-01-07 15:41:46 +00:00
head_navbar.tmpl Fix more "locale" usages (#27259) 2023-09-25 20:42:40 +08:00
head_opengraph.tmpl Avoid unnecessary 500 panic when a commit doesn't exist (#28719) 2024-01-07 18:20:22 +08:00
head_script.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
head_style.tmpl Rename the default themes to gitea-light, gitea-dark, gitea-auto (#27419) 2023-10-06 09:46:36 +02:00
head.tmpl Auto-update the system status in admin dashboard (#29163) 2024-02-16 02:52:25 +00:00
modal_actions_confirm.tmpl cleanup locale function usage (#27227) 2023-09-24 20:31:58 +00:00
paginate.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00