diff --git a/Makefile b/Makefile index a4a0a596..d5509e85 100644 --- a/Makefile +++ b/Makefile @@ -18,14 +18,14 @@ test: ########## -# Docker # +# podman # ########## docker-build: - docker build -t twinproduction/gatus:latest . + podman build -t twinproduction/gatus:latest . docker-run: - docker run -p 8080:8080 --name gatus twinproduction/gatus:latest + podman run -p 8080:8080 --name gatus twinproduction/gatus:latest docker-build-and-run: docker-build docker-run diff --git a/README.md b/README.md index 59fc7e38..1b3e88f1 100644 --- a/README.md +++ b/README.md @@ -2305,6 +2305,7 @@ web: ![Uptime 1h](https://status.twin.sh/api/v1/endpoints/core_blog-external/uptimes/1h/badge.svg) ![Uptime 24h](https://status.twin.sh/api/v1/endpoints/core_blog-external/uptimes/24h/badge.svg) ![Uptime 7d](https://status.twin.sh/api/v1/endpoints/core_blog-external/uptimes/7d/badge.svg) +![Uptime 30d](https://status.twin.sh/api/v1/endpoints/core_blog-external/uptimes/30d/badge.svg) Gatus can automatically generate an SVG badge for one of your monitored endpoints. This allows you to put badges in your individual applications' README or even create your own status page if you @@ -2315,7 +2316,7 @@ The path to generate a badge is the following: /api/v1/endpoints/{key}/uptimes/{duration}/badge.svg ``` Where: -- `{duration}` is `30d` (alpha), `7d`, `24h` or `1h` +- `{duration}` is `30d`, `7d`, `24h` or `1h` - `{key}` has the pattern `_` in which both variables have ` `, `/`, `_`, `,` and `.` replaced by `-`. For instance, if you want the uptime during the last 24 hours from the endpoint `frontend` in the group `core`, @@ -2374,13 +2375,14 @@ See more information about the Shields.io badge endpoint [here](https://shields. ![Response time 1h](https://status.twin.sh/api/v1/endpoints/core_blog-external/response-times/1h/badge.svg) ![Response time 24h](https://status.twin.sh/api/v1/endpoints/core_blog-external/response-times/24h/badge.svg) ![Response time 7d](https://status.twin.sh/api/v1/endpoints/core_blog-external/response-times/7d/badge.svg) +![Response time 30d](https://status.twin.sh/api/v1/endpoints/core_blog-external/response-times/30d/badge.svg) The endpoint to generate a badge is the following: ``` /api/v1/endpoints/{key}/response-times/{duration}/badge.svg ``` Where: -- `{duration}` is `30d` (alpha), `7d`, `24h` or `1h` +- `{duration}` is `30d`, `7d`, `24h` or `1h` - `{key}` has the pattern `_` in which both variables have ` `, `/`, `_`, `,` and `.` replaced by `-`. @@ -2434,7 +2436,7 @@ The path to get raw uptime data for an endpoint is: /api/v1/endpoints/{key}/uptimes/{duration} ``` Where: -- `{duration}` is `30d` (alpha), `7d`, `24h` or `1h` +- `{duration}` is `30d`, `7d`, `24h` or `1h` - `{key}` has the pattern `_` in which both variables have ` `, `/`, `_`, `,` and `.` replaced by `-`. For instance, if you want the raw uptime data for the last 24 hours from the endpoint `frontend` in the group `core`, the URL would look like this: diff --git a/api/raw.go b/api/raw.go index 34fe6726..de6738ba 100644 --- a/api/raw.go +++ b/api/raw.go @@ -23,7 +23,7 @@ func UptimeRaw(c *fiber.Ctx) error { case "1h": from = time.Now().Add(-2 * time.Hour) // Because uptime metrics are stored by hour, we have to cheat a little default: - return c.Status(400).SendString("Durations supported: 30d,7d, 24h, 1h") + return c.Status(400).SendString("Durations supported: 30d, 7d, 24h, 1h") } key := c.Params("key") uptime, err := store.Get().GetUptimeByKey(key, from, time.Now()) diff --git a/config/ui/ui.go b/config/ui/ui.go index c735c313..baf2ee69 100644 --- a/config/ui/ui.go +++ b/config/ui/ui.go @@ -11,7 +11,7 @@ import ( const ( defaultTitle = "Health Dashboard | Gatus" defaultDescription = "Gatus is an advanced automated status page that lets you monitor your applications and configure alerts to notify you if there's an issue" - defaultHeader = "Health Status" + defaultHeader = "Health StatusAAAA" defaultLogo = "" defaultLink = "" defaultCustomCSS = "" diff --git a/web/app/src/views/Details.vue b/web/app/src/views/Details.vue index 18706475..d4555377 100644 --- a/web/app/src/views/Details.vue +++ b/web/app/src/views/Details.vue @@ -20,9 +20,13 @@

UPTIME


+
+

Last 30 days

+ 30d uptime badge +

Last 7 days

- 7d uptime badge + 7d uptime badge

Last 24 hours

@@ -36,9 +40,21 @@

RESPONSE TIME

-
- response time chart +
+ + + response time chart + response time chart
+
+

Last 30 days

+ 7d response time badge +

Last 7 days

7d response time badge @@ -174,8 +190,8 @@ export default { generateResponseTimeBadgeImageURL(duration) { return `${this.serverUrl}/api/v1/endpoints/${this.endpointStatus.key}/response-times/${duration}/badge.svg`; }, - generateResponseTimeChartImageURL() { - return `${this.serverUrl}/api/v1/endpoints/${this.endpointStatus.key}/response-times/24h/chart.svg`; + generateResponseTimeChartImageURL(duration) { + return `${this.serverUrl}/api/v1/endpoints/${this.endpointStatus.key}/response-times/${duration}/chart.svg`; }, changePage(page) { this.currentPage = page; @@ -193,6 +209,7 @@ export default { endpointStatus: {}, events: [], hourlyAverageResponseTime: {}, + selectedChartDuration: '24h', // Since this page isn't at the root, we need to modify the server URL a bit serverUrl: SERVER_URL === '.' ? '..' : SERVER_URL, currentPage: 1,