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

feat(server): add badge for overall status of status-page #2574

Merged
merged 5 commits into from
Jul 8, 2023

Conversation

sjoukedv
Copy link
Contributor

@sjoukedv sjoukedv commented Jan 9, 2023

Description

Fixes #1616

Adds an API route /api/status-page/:slug/badge which shows the badge similar to the overall status on the status page itself.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas
    (including JSDoc for methods)
  • My changes generate no new warnings
  • My code needed automated testing. I have added them (this is optional task)

Screenshots (if any)

e.g. /api/status-page/test/badge?label=<status-page> returns the following:

  • Up,
  • Down,
  • Degraded,
  • Maintenance,

I wish badge-maker supported SVG as messages so that we can use the same font-awesome icon as the badge label

@chakflying
Copy link
Collaborator

I think you don't need to include the yarn.lock file.

@juzhiyuan
Copy link
Contributor

The logic is clear to me 🙏

@sjoukedv
Copy link
Contributor Author

I think you don't need to include the yarn.lock file.

My bad that lockfile slipped in there.

@sjoukedv
Copy link
Contributor Author

I removed the lockfile and added yarn.lock to .gitignore as you commited the npm lockfile in this repo

@sjoukedv
Copy link
Contributor Author

@louislam can you review/merge this?

@louislam louislam added this to the 1.23.0 milestone Jun 24, 2023
@louislam
Copy link
Owner

louislam commented Jul 8, 2023

@louislam can you review/merge this?

Thanks for the pr. Tested and it is working.

@louislam louislam merged commit 80b5578 into louislam:master Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global Statuspage Badges
4 participants