mirror of
https://github.com/tormachris/cf-workers-status-page.git
synced 2026-04-02 15:05:36 +02:00
Compare commits
1 Commits
f0ec1c016a
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d26f14f313 |
26
config.yaml
26
config.yaml
@@ -1,6 +1,6 @@
|
|||||||
settings:
|
settings:
|
||||||
title: 'Status Page'
|
title: 'Status Page'
|
||||||
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,25 @@ settings:
|
|||||||
dayInHistogramNotOperational: ' incident(s)' # xx incident(s) recorded
|
dayInHistogramNotOperational: ' incident(s)' # xx incident(s) recorded
|
||||||
|
|
||||||
monitors:
|
monitors:
|
||||||
- id: webgateway # unique identifier
|
- id: workers-cloudflare-com # unique identifier
|
||||||
name: webgateway.tormakristof.eu
|
name: workers.cloudflare.com
|
||||||
description: 'On-prem webgateway status' # default=empty
|
description: 'You write code. They handle the rest.' # default=empty
|
||||||
url: 'https://tormakristof.eu/' # URL to fetch
|
url: 'https://workers.cloudflare.com/' # 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-cloudflare-com
|
||||||
|
name: www.cloudflare.com
|
||||||
|
description: 'Built for anything connected to the Internet.'
|
||||||
|
url: 'https://www.cloudflare.com'
|
||||||
|
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: blog-cloudflare-com
|
||||||
|
name: The Cloudflare Blog
|
||||||
|
url: 'https://blog.cloudflare.com/'
|
||||||
|
method: GET
|
||||||
|
expectStatus: 200
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { locations } from '../functions/locations'
|
import { locations } from '../functions/helpers'
|
||||||
|
|
||||||
export default function MonitorDayAverage({ location, avg }) {
|
export default function MonitorDayAverage({ location, avg }) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import config from '../../config.yaml'
|
import config from '../../config.yaml'
|
||||||
import { locations } from '../functions/locations'
|
import { locations } from '../functions/helpers'
|
||||||
|
|
||||||
const classes = {
|
const classes = {
|
||||||
green:
|
green:
|
||||||
|
|||||||
@@ -141,8 +141,8 @@ export async function processCronTrigger(event) {
|
|||||||
// Save allOperational to false
|
// Save allOperational to false
|
||||||
monitorsState.lastUpdate.allOperational = false
|
monitorsState.lastUpdate.allOperational = false
|
||||||
|
|
||||||
// Increment failed checks on status change or first fail of the day (maybe call it .incidents instead?)
|
// Increment failed checks, only on status change (maybe call it .incidents instead?)
|
||||||
if (monitorStatusChanged || monitorsState.monitors[monitor.id].checks[checkDay].fails == 0) {
|
if (monitorStatusChanged) {
|
||||||
monitorsState.monitors[monitor.id].checks[checkDay].fails++
|
monitorsState.monitors[monitor.id].checks[checkDay].fails++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,13 @@ import { useEffect, useState } from 'react'
|
|||||||
|
|
||||||
const kvDataKey = 'monitors_data_v1_1'
|
const kvDataKey = 'monitors_data_v1_1'
|
||||||
|
|
||||||
|
export const locations = {
|
||||||
|
WAW: 'Warsaw',
|
||||||
|
SCL: 'Santiago de Chile',
|
||||||
|
MEL: 'Melbourne',
|
||||||
|
SIN: 'Singapore',
|
||||||
|
}
|
||||||
|
|
||||||
export async function getKVMonitors() {
|
export async function getKVMonitors() {
|
||||||
// trying both to see performance difference
|
// trying both to see performance difference
|
||||||
return KV_STATUS_PAGE.get(kvDataKey, 'json')
|
return KV_STATUS_PAGE.get(kvDataKey, 'json')
|
||||||
@@ -27,7 +34,6 @@ export async function notifySlack(monitor, operational) {
|
|||||||
const payload = {
|
const payload = {
|
||||||
attachments: [
|
attachments: [
|
||||||
{
|
{
|
||||||
fallback: `Monitor ${monitor.name} changed status to ${getOperationalLabel(operational)}`,
|
|
||||||
color: operational ? '#36a64f' : '#f2c744',
|
color: operational ? '#36a64f' : '#f2c744',
|
||||||
blocks: [
|
blocks: [
|
||||||
{
|
{
|
||||||
@@ -64,7 +70,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)}*
|
||||||
|
|||||||
@@ -1,226 +0,0 @@
|
|||||||
export const locations = {
|
|
||||||
ADL: 'Adelaide',
|
|
||||||
AKL: 'Auckland',
|
|
||||||
ALG: 'Algiers',
|
|
||||||
AMM: 'Amman',
|
|
||||||
AMS: 'Amsterdam',
|
|
||||||
ARI: 'Arica',
|
|
||||||
ARN: 'Stockholm',
|
|
||||||
ASU: 'Asunción',
|
|
||||||
ATH: 'Athens',
|
|
||||||
ATL: 'Atlanta',
|
|
||||||
BAH: 'Manama',
|
|
||||||
BCN: 'Barcelona',
|
|
||||||
BEG: 'Belgrade',
|
|
||||||
BEL: 'Belém',
|
|
||||||
BEY: 'Beirut',
|
|
||||||
BGW: 'Baghdad',
|
|
||||||
BKK: 'Bangkok',
|
|
||||||
BLR: 'Bangalore',
|
|
||||||
BNA: 'Nashville',
|
|
||||||
BNE: 'Brisbane',
|
|
||||||
BNU: 'Blumenau',
|
|
||||||
BOG: 'Bogotá',
|
|
||||||
BOM: 'Mumbai',
|
|
||||||
BOS: 'Boston',
|
|
||||||
BRU: 'Brussels',
|
|
||||||
BSB: 'Brasilia',
|
|
||||||
BUD: 'Budapest',
|
|
||||||
BUF: 'Buffalo',
|
|
||||||
BWN: 'Bandar Seri Begawan',
|
|
||||||
CAN: 'Guangzhou',
|
|
||||||
CBR: 'Canberra',
|
|
||||||
CCU: 'Kolkata',
|
|
||||||
CDG: 'Paris',
|
|
||||||
CEB: 'Cebu',
|
|
||||||
CFC: 'Caçador',
|
|
||||||
CGK: 'Jakarta',
|
|
||||||
CGO: 'Zhengzhou',
|
|
||||||
CGP: 'Chittagong',
|
|
||||||
CKG: 'Chongqing',
|
|
||||||
CLT: 'Charlotte',
|
|
||||||
CMB: 'Colombo',
|
|
||||||
CMH: 'Columbus',
|
|
||||||
CMN: 'Casablanca',
|
|
||||||
CNF: 'Belo Horizonte',
|
|
||||||
CPH: 'Copenhagen',
|
|
||||||
CPT: 'Cape Town',
|
|
||||||
CSX: 'Zhuzhou',
|
|
||||||
CTU: 'Chengdu',
|
|
||||||
CUR: 'Willemstad',
|
|
||||||
CWB: 'Curitiba',
|
|
||||||
DAC: 'Dhaka',
|
|
||||||
DAR: 'Dar Es Salaam',
|
|
||||||
DEL: 'New Delhi',
|
|
||||||
DEN: 'Denver',
|
|
||||||
DFW: 'Dallas',
|
|
||||||
DKR: 'Dakar',
|
|
||||||
DME: 'Moscow',
|
|
||||||
DMM: 'Dammam',
|
|
||||||
DOH: 'Doha',
|
|
||||||
DTW: 'Detroit',
|
|
||||||
DUB: 'Dublin',
|
|
||||||
DUR: 'Durban',
|
|
||||||
DUS: 'Düsseldorf',
|
|
||||||
DXB: 'Dubai',
|
|
||||||
EDI: 'Edinburgh',
|
|
||||||
EVN: 'Yerevan',
|
|
||||||
EWR: 'Newark',
|
|
||||||
EZE: 'Buenos Aires',
|
|
||||||
FCO: 'Rome',
|
|
||||||
FLN: 'Florianopolis',
|
|
||||||
FOR: 'Fortaleza',
|
|
||||||
FRA: 'Frankfurt',
|
|
||||||
GIG: 'Rio de Janeiro',
|
|
||||||
GND: 'St. George’s',
|
|
||||||
GOT: 'Gothenburg',
|
|
||||||
GRU: 'São Paulo',
|
|
||||||
GUA: 'Guatemala City',
|
|
||||||
GVA: 'Geneva',
|
|
||||||
GYD: 'Baku',
|
|
||||||
GYE: 'Guayaquil',
|
|
||||||
HAM: 'Hamburg',
|
|
||||||
HAN: 'Hanoi',
|
|
||||||
HEL: 'Helsinki',
|
|
||||||
HKG: 'Hong Kong ',
|
|
||||||
HNL: 'Honolulu',
|
|
||||||
HRE: 'Harare',
|
|
||||||
HYD: 'Hyderabad',
|
|
||||||
IAD: 'Ashburn',
|
|
||||||
IAH: 'Houston',
|
|
||||||
ICN: 'Seoul',
|
|
||||||
IND: 'Indianapolis',
|
|
||||||
ISB: 'Islamabad',
|
|
||||||
IST: 'Istanbul',
|
|
||||||
ITJ: 'Itajaí',
|
|
||||||
JAX: 'Jacksonville',
|
|
||||||
JIB: 'Djibouti City',
|
|
||||||
JNB: 'Johannesburg',
|
|
||||||
JSR: 'Jashore',
|
|
||||||
KBP: 'Kyiv',
|
|
||||||
KEF: 'Reykjavík',
|
|
||||||
KGL: 'Kigali',
|
|
||||||
KHI: 'Karachi',
|
|
||||||
KIV: 'Chișinău',
|
|
||||||
KIX: 'Osaka',
|
|
||||||
KJA: 'Krasnoyarsk',
|
|
||||||
KTM: 'Kathmandu',
|
|
||||||
KUL: 'Kuala Lumpur',
|
|
||||||
KWI: 'Kuwait City',
|
|
||||||
LAD: 'Luanda',
|
|
||||||
LAS: 'Las Vegas',
|
|
||||||
LAX: 'Los Angeles',
|
|
||||||
LCA: 'Nicosia',
|
|
||||||
LED: 'Saint Petersburg',
|
|
||||||
LHE: 'Lahore',
|
|
||||||
LHR: 'London',
|
|
||||||
LIM: 'Lima',
|
|
||||||
LIS: 'Lisbon',
|
|
||||||
LOS: 'Lagos',
|
|
||||||
LUX: 'Luxembourg City',
|
|
||||||
MAA: 'Chennai',
|
|
||||||
MAD: 'Madrid',
|
|
||||||
MAN: 'Manchester',
|
|
||||||
MBA: 'Mombasa',
|
|
||||||
MCI: 'Kansas City',
|
|
||||||
MCT: 'Muscat',
|
|
||||||
MDE: 'Medellín',
|
|
||||||
MEL: 'Melbourne',
|
|
||||||
MEM: 'Memphis',
|
|
||||||
MEX: 'Mexico City',
|
|
||||||
MFE: 'McAllen',
|
|
||||||
MFM: 'Macau ',
|
|
||||||
MGM: 'Montgomery',
|
|
||||||
MIA: 'Miami',
|
|
||||||
MLE: 'Malé',
|
|
||||||
MNL: 'Manila',
|
|
||||||
MPM: 'Maputo',
|
|
||||||
MRS: 'Marseille',
|
|
||||||
MRU: 'Port Louis',
|
|
||||||
MSP: 'Minneapolis',
|
|
||||||
MUC: 'Munich',
|
|
||||||
MXP: 'Milan',
|
|
||||||
NAG: 'Nagpur',
|
|
||||||
NBG: 'Ningbo',
|
|
||||||
NBO: 'Nairobi',
|
|
||||||
NOU: 'Noumea',
|
|
||||||
NRT: 'Tokyo',
|
|
||||||
OMA: 'Omaha',
|
|
||||||
ORD: 'Chicago',
|
|
||||||
ORF: 'Norfolk',
|
|
||||||
OSL: 'Oslo',
|
|
||||||
OTP: 'Bucharest',
|
|
||||||
PAP: 'Port',
|
|
||||||
PBH: 'Thimphu',
|
|
||||||
PBM: 'Paramaribo',
|
|
||||||
PDX: 'Portland',
|
|
||||||
PER: 'Perth',
|
|
||||||
PHL: 'Philadelphia',
|
|
||||||
PHX: 'Phoenix',
|
|
||||||
PIT: 'Pittsburgh',
|
|
||||||
PMO: 'Palermo',
|
|
||||||
PNH: 'Phnom Penh',
|
|
||||||
POA: 'Porto Alegre',
|
|
||||||
PRG: 'Prague',
|
|
||||||
PTY: 'Panama City',
|
|
||||||
QRO: 'Queretaro',
|
|
||||||
QWJ: 'Americana',
|
|
||||||
RAO: 'Ribeirao Preto',
|
|
||||||
RGN: 'Yangon',
|
|
||||||
RIC: 'Richmond',
|
|
||||||
RIX: 'Riga',
|
|
||||||
ROB: 'Monrovia',
|
|
||||||
RUH: 'Riyadh',
|
|
||||||
RUN: 'Réunion',
|
|
||||||
SAN: 'San Diego',
|
|
||||||
SCL: 'Santiago',
|
|
||||||
SEA: 'Seattle',
|
|
||||||
SGN: 'Ho Chi Minh City',
|
|
||||||
SHA: 'Shanghai',
|
|
||||||
SIN: 'Singapore',
|
|
||||||
SJC: 'San Jose',
|
|
||||||
SJO: 'San José',
|
|
||||||
SJP: 'São José do Rio Preto',
|
|
||||||
SKG: 'Thessaloniki',
|
|
||||||
SLC: 'Salt Lake City',
|
|
||||||
SMF: 'Sacramento',
|
|
||||||
SOD: 'Sorocaba',
|
|
||||||
SOF: 'Sofia',
|
|
||||||
SSA: 'Salvador',
|
|
||||||
STL: 'St. Louis',
|
|
||||||
SVX: 'Yekaterinburg',
|
|
||||||
SYD: 'Sydney',
|
|
||||||
SZV: 'Suzhou',
|
|
||||||
TBS: 'Tbilisi',
|
|
||||||
TGU: 'Tegucigalpa',
|
|
||||||
TLH: 'Tallahassee',
|
|
||||||
TLL: 'Tallinn',
|
|
||||||
TLV: 'Tel Aviv',
|
|
||||||
TNA: 'Jinan',
|
|
||||||
TNR: 'Antananarivo',
|
|
||||||
TPA: 'Tampa',
|
|
||||||
TPE: 'Taipei ',
|
|
||||||
TSN: 'Tianjin',
|
|
||||||
TUN: 'Tunis',
|
|
||||||
TXL: 'Berlin',
|
|
||||||
UIO: 'Quito',
|
|
||||||
ULN: 'Ulaanbaatar',
|
|
||||||
URT: 'Surat Thani',
|
|
||||||
VCP: 'Campinas',
|
|
||||||
VIE: 'Vienna',
|
|
||||||
VNO: 'Vilnius',
|
|
||||||
VTE: 'Vientiane',
|
|
||||||
WAW: 'Warsaw',
|
|
||||||
WUH: 'Wuhan',
|
|
||||||
WUX: 'Wuxi',
|
|
||||||
XIY: 'Xi’an',
|
|
||||||
YUL: 'Montréal',
|
|
||||||
YVR: 'Vancouver',
|
|
||||||
YWG: 'Winnipeg',
|
|
||||||
YXE: 'Saskatoon',
|
|
||||||
YYC: 'Calgary',
|
|
||||||
YYZ: 'Toronto',
|
|
||||||
ZAG: 'Zagreb',
|
|
||||||
ZDM: 'Ramallah ',
|
|
||||||
ZRH: 'Zürich',
|
|
||||||
}
|
|
||||||
@@ -3,10 +3,9 @@ workers_dev = true
|
|||||||
account_id = ""
|
account_id = ""
|
||||||
type = "webpack"
|
type = "webpack"
|
||||||
webpack_config = "node_modules/flareact/webpack"
|
webpack_config = "node_modules/flareact/webpack"
|
||||||
compatibility_date = "2021-07-23"
|
|
||||||
|
|
||||||
[triggers]
|
[triggers]
|
||||||
crons = ["*/2 * * * *"]
|
crons = ["* * * * *"]
|
||||||
|
|
||||||
[site]
|
[site]
|
||||||
bucket = "out"
|
bucket = "out"
|
||||||
|
|||||||
@@ -6994,9 +6994,9 @@ tapable@^1.0.0, tapable@^1.1.3:
|
|||||||
integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==
|
integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==
|
||||||
|
|
||||||
tar@^6.0.2:
|
tar@^6.0.2:
|
||||||
version "6.0.5"
|
version "6.1.11"
|
||||||
resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.5.tgz#bde815086e10b39f1dcd298e89d596e1535e200f"
|
resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621"
|
||||||
integrity sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==
|
integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==
|
||||||
dependencies:
|
dependencies:
|
||||||
chownr "^2.0.0"
|
chownr "^2.0.0"
|
||||||
fs-minipass "^2.0.0"
|
fs-minipass "^2.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user