mirror of
https://github.com/tormachris/cf-workers-status-page.git
synced 2025-09-21 16:35:15 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
66bab8d9c7 | |||
81b35546c3 |
6
.github/workflows/deploy.yml
vendored
6
.github/workflows/deploy.yml
vendored
@ -1,7 +1,6 @@
|
|||||||
name: Deploy
|
name: Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@ -27,8 +26,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||||
preCommands: |
|
preCommands: |
|
||||||
wrangler kv:namespace create KV_STATUS_PAGE || true
|
wrangler kv:namespace create KV_STATUS_PAGE
|
||||||
export KV_NAMESPACE_ID=$(npx @cloudflare/wrangler@1 kv:namespace list 2> >(tee stderr.log >&2) | head -1 | node -pe "JSON.parse(fs.readFileSync('/dev/stdin').toString()).find(kv => kv.title.includes('KV_STATUS_PAGE')).id")
|
apt-get update && apt-get install -y jq
|
||||||
|
export KV_NAMESPACE_ID=$(wrangler kv:namespace list | jq -c 'map(select(.title | contains("KV_STATUS_PAGE")))' | jq -r ".[0].id")
|
||||||
echo "[env.production]" >> wrangler.toml
|
echo "[env.production]" >> wrangler.toml
|
||||||
echo "kv_namespaces = [{binding=\"KV_STATUS_PAGE\", id=\"${KV_NAMESPACE_ID}\"}]" >> wrangler.toml
|
echo "kv_namespaces = [{binding=\"KV_STATUS_PAGE\", id=\"${KV_NAMESPACE_ID}\"}]" >> wrangler.toml
|
||||||
[ -z "$SECRET_SLACK_WEBHOOK_URL" ] && echo "Secret SECRET_SLACK_WEBHOOK_URL not set, creating dummy one..." && SECRET_SLACK_WEBHOOK_URL="default-gh-action-secret" || true
|
[ -z "$SECRET_SLACK_WEBHOOK_URL" ] && echo "Secret SECRET_SLACK_WEBHOOK_URL not set, creating dummy one..." && SECRET_SLACK_WEBHOOK_URL="default-gh-action-secret" || true
|
||||||
|
40
config.yaml
40
config.yaml
@ -1,6 +1,6 @@
|
|||||||
settings:
|
settings:
|
||||||
title: 'Status Page'
|
title: 'Killzone Gaming Status'
|
||||||
url: 'https://status.tormakristof.eu' # used for Slack messages
|
url: 'https://status-page.eidam.dev' # used for Slack messages
|
||||||
logo: logo-192x192.png # image in ./public/ folder
|
logo: logo-192x192.png # image in ./public/ folder
|
||||||
daysInHistogram: 90 # number of days you want to display in histogram
|
daysInHistogram: 90 # number of days you want to display in histogram
|
||||||
collectResponseTimes: true # collects avg response times from CRON locations
|
collectResponseTimes: true # collects avg response times from CRON locations
|
||||||
@ -15,11 +15,37 @@ settings:
|
|||||||
dayInHistogramNotOperational: ' incident(s)' # xx incident(s) recorded
|
dayInHistogramNotOperational: ' incident(s)' # xx incident(s) recorded
|
||||||
|
|
||||||
monitors:
|
monitors:
|
||||||
- id: webgateway # unique identifier
|
- id: www-kzg-gg # unique identifier
|
||||||
name: webgateway.tormakristof.eu
|
name: kzg.gg | Killzone Gaming Forums
|
||||||
description: 'On-prem webgateway status' # default=empty
|
description: '' # default=empty
|
||||||
url: 'https://tormakristof.eu/' # URL to fetch
|
url: 'https://kzg.gg' # URL to fetch
|
||||||
method: GET # default=GET
|
method: GET # default=GET
|
||||||
expectStatus: 301 # operational status, default=200
|
expectStatus: 200 # operational status, default=200
|
||||||
followRedirect: false # should fetch follow redirects, default=false
|
followRedirect: false # should fetch follow redirects, default=false
|
||||||
|
linkable: false # allows the title to be a link, default=true
|
||||||
|
|
||||||
|
- id: www-bans-kzg-gg
|
||||||
|
name: bans.kzg.gg | Killzone Gaming SourceBans
|
||||||
|
description: 'Built for anything connected to the Internet.'
|
||||||
|
url: 'https://stats.kzg.gg'
|
||||||
|
method: GET
|
||||||
|
expectStatus: 200
|
||||||
linkable: true # allows the title to be a link, default=true
|
linkable: true # allows the title to be a link, default=true
|
||||||
|
|
||||||
|
- id: stats-kzg-gg
|
||||||
|
name: stats.kzg.gg | Killzone Gaming Statistics
|
||||||
|
url: 'https://stats.kzg.gg'
|
||||||
|
method: GET
|
||||||
|
expectStatus: 200
|
||||||
|
|
||||||
|
- id: steamid-kzg-gg
|
||||||
|
name: steamid.kzg.gg | Killzone Gaming SteamID
|
||||||
|
url: 'https://steamid.kzg.gg'
|
||||||
|
method: GET
|
||||||
|
expectStatus: 200
|
||||||
|
|
||||||
|
- id: shorturl-kzg-gg
|
||||||
|
name: kzg.link | Killzone Gaming URL Shortner
|
||||||
|
url: 'https://kzg.link'
|
||||||
|
method: GET
|
||||||
|
expectStatus: 200
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^10.0.2",
|
"autoprefixer": "^10.0.2",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
"postcss": "^8.2.13",
|
"postcss": "^8.2.10",
|
||||||
"postcss-cli": "^8.3.0",
|
"postcss-cli": "^8.3.0",
|
||||||
"prettier": "^2.2.0",
|
"prettier": "^2.2.0",
|
||||||
"tailwindcss": "^2.0.1",
|
"tailwindcss": "^2.0.1",
|
||||||
|
@ -64,7 +64,7 @@ export async function notifySlack(monitor, operational) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function notifyTelegram(monitor, operational) {
|
export async function notifyTelegram(monitor, operational) {
|
||||||
const text = `Monitor *${monitor.name.replaceAll(
|
const text = `Monitor *${monitor.name.replace(
|
||||||
'-',
|
'-',
|
||||||
'\\-',
|
'\\-',
|
||||||
)}* changed status to *${getOperationalLabel(operational)}*
|
)}* changed status to *${getOperationalLabel(operational)}*
|
||||||
|
26
yarn.lock
26
yarn.lock
@ -2874,9 +2874,9 @@ events@^3.0.0:
|
|||||||
integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==
|
integrity sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==
|
||||||
|
|
||||||
eventsource@^1.0.7:
|
eventsource@^1.0.7:
|
||||||
version "1.1.1"
|
version "1.0.7"
|
||||||
resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.1.1.tgz#4544a35a57d7120fba4fa4c86cb4023b2c09df2f"
|
resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0"
|
||||||
integrity sha512-qV5ZC0h7jYIAOhArFJgSfdyz6rALJyb270714o7ZtNnw2WSJ+eexhKtE0O8LYPRsHZHf2osHKZBxGPvm3kPkCA==
|
integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
original "^1.0.0"
|
original "^1.0.0"
|
||||||
|
|
||||||
@ -4609,9 +4609,9 @@ nan@^2.12.1:
|
|||||||
integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
|
integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
|
||||||
|
|
||||||
nanoid@^3.1.12, nanoid@^3.1.22:
|
nanoid@^3.1.12, nanoid@^3.1.22:
|
||||||
version "3.3.4"
|
version "3.1.23"
|
||||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
|
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81"
|
||||||
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
|
integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==
|
||||||
|
|
||||||
nanomatch@^1.2.9:
|
nanomatch@^1.2.9:
|
||||||
version "1.2.13"
|
version "1.2.13"
|
||||||
@ -5862,10 +5862,10 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2
|
|||||||
source-map "^0.6.1"
|
source-map "^0.6.1"
|
||||||
supports-color "^6.1.0"
|
supports-color "^6.1.0"
|
||||||
|
|
||||||
postcss@^8.1.6, postcss@^8.2.13:
|
postcss@^8.1.6, postcss@^8.2.10:
|
||||||
version "8.2.13"
|
version "8.2.10"
|
||||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.13.tgz#dbe043e26e3c068e45113b1ed6375d2d37e2129f"
|
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.10.tgz#ca7a042aa8aff494b334d0ff3e9e77079f6f702b"
|
||||||
integrity sha512-FCE5xLH+hjbzRdpbRb1IMCvPv9yZx2QnDarBEYSN0N0HYk+TcXsEhwdFcFb+SRWOKzKGErhIEbBK2ogyLdTtfQ==
|
integrity sha512-b/h7CPV7QEdrqIxtAf2j31U5ef05uBDuvoXv6L51Q4rcS1jdlXAVKJv+atCFdUXYl9dyTHGyoMzIepwowRJjFw==
|
||||||
dependencies:
|
dependencies:
|
||||||
colorette "^1.2.2"
|
colorette "^1.2.2"
|
||||||
nanoid "^3.1.22"
|
nanoid "^3.1.22"
|
||||||
@ -7256,9 +7256,9 @@ urix@^0.1.0:
|
|||||||
integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
|
integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
|
||||||
|
|
||||||
url-parse@^1.4.3:
|
url-parse@^1.4.3:
|
||||||
version "1.5.10"
|
version "1.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1"
|
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b"
|
||||||
integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==
|
integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
querystringify "^2.1.1"
|
querystringify "^2.1.1"
|
||||||
requires-port "^1.0.0"
|
requires-port "^1.0.0"
|
||||||
|
Reference in New Issue
Block a user