Skip to content

Commit 3070d3d

Browse files
author
cbiselli
committed
added maintenance mode
1 parent 4e15783 commit 3070d3d

File tree

5 files changed

+95
-0
lines changed

5 files changed

+95
-0
lines changed

www/common_lib.inc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4037,6 +4037,17 @@ function ReportSaaSTest($test_json, $node_id, $test_id)
40374037
}
40384038
}
40394039

4040+
/**
4041+
* Handle redirect in read-only mode
4042+
*/
4043+
function CheckMaintenanceMode()
4044+
{
4045+
if (Util::getSetting('maintenance_mode')) {
4046+
require_once INCLUDES_PATH . '/Maintenance.inc';
4047+
exit();
4048+
}
4049+
}
4050+
40404051
/**
40414052
* Handle redirect in read-only mode
40424053
*/

www/cpauth/account.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
require_once(__DIR__ . '/../common.inc');
66

7+
CheckMaintenanceMode();
8+
79
use WebPageTest\Util;
810
use WebPageTest\Exception\ClientException;
911
use WebPageTest\Handlers\Account as AccountHandler;

www/home.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use WebPageTest\Util\SettingsFileReader;
1111
use WebPageTest\Util\Timers;
1212

13+
CheckMaintenanceMode();
14+
1315
RedirectIfReadOnly();
1416

1517
$Timers = new Timers();

www/runtest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
}
4848
require_once('common.inc');
4949

50+
CheckMaintenanceMode();
51+
5052
use WebPageTest\Util;
5153
use WebPageTest\Util\Cache;
5254
use WebPageTest\Template;

www/src/Maintenance.inc

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width,initial-scale=1" />
6+
<title>Catchpoint — Maintenance</title>
7+
<meta name="robots" content="noindex, nofollow" />
8+
<style>
9+
html,body{height:100%}
10+
body{
11+
margin:0;
12+
font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
13+
background: linear-gradient(180deg, #081018 0%, #0B1824 100%); /* dark gradient */
14+
color:#f0f6fc;
15+
display:flex;
16+
align-items:center;
17+
justify-content:center;
18+
padding:20px;
19+
}
20+
.card{
21+
max-width:640px;
22+
width:100%;
23+
text-align:center;
24+
background:rgba(255,255,255,0.04);
25+
border:1px solid rgba(255,255,255,0.08);
26+
padding:40px 28px;
27+
border-radius:16px;
28+
box-shadow:0 8px 28px rgba(0,0,0,0.6);
29+
}
30+
.logo-wrapper{
31+
display: flex;
32+
justify-content: center;
33+
margin-bottom: 22px;
34+
height: 50px;
35+
}
36+
.logo{
37+
width: 300px;
38+
height: 50px;
39+
}
40+
h1{
41+
margin:0 0 14px 0;
42+
font-size:22px;
43+
color:#00C1DE; /* Catchpoint cyan */
44+
}
45+
p{
46+
margin:0 0 20px 0;
47+
color:#c9d1d9;
48+
line-height:1.55;
49+
}
50+
a{
51+
color:#00C1DE;
52+
text-decoration:none;
53+
}
54+
</style>
55+
</head>
56+
<body>
57+
<main class="card" role="main">
58+
<div class="logo-wrapper">
59+
<div class="logo">
60+
<a href="https://www.catchpoint.com" class="cp-header_logo" aria-label="Catchpoint Home"><svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 966 159">
61+
<path d="M954.52 109.94a5.59 5.59 0 0 1 1.68-4.05 5.85 5.85 0 0 1 4.05-1.68 5.58 5.58 0 0 1 4.05 1.68 5.85 5.85 0 0 1 1.68 4.05 5.59 5.59 0 0 1-1.68 4.05 5.85 5.85 0 0 1-4.05 1.68 5.59 5.59 0 0 1-4.05-1.68 5.85 5.85 0 0 1-1.68-4.05Zm1.57 0a4.54 4.54 0 0 0 1.21 3.07c.38.39.82.7 1.33.93a3.83 3.83 0 0 0 3.24 0 4.15 4.15 0 0 0 2.22-2.31 4.54 4.54 0 0 0-.89-4.76 4.3 4.3 0 0 0-1.33-.93 3.83 3.83 0 0 0-3.24 0 4.15 4.15 0 0 0-2.22 2.31 4.54 4.54 0 0 0-.32 1.69Zm1.96-3.07h2.13l.68.03c.29.02.57.09.85.22.28.12.52.32.72.58.21.26.31.63.31 1.12 0 .31-.04.56-.12.76-.08.2-.19.36-.32.49a1.2 1.2 0 0 1-.45.29c-.17.07-.34.11-.52.13l1.54 2.39h-1.62l-1.37-2.31h-.26v2.31h-1.57v-6.01Zm1.56 2.49h.63l.3-.02c.11-.01.2-.04.3-.08a.6.6 0 0 0 .23-.19c.06-.09.09-.21.09-.36a.64.64 0 0 0-.1-.36.53.53 0 0 0-.22-.19.94.94 0 0 0-.3-.08l-.3-.02h-.63v1.3ZM948.65 46.64V22.63h-20.39v24.01h-8.33V64.7h8.33v51.08h20.39V64.7h9.68V46.64h-9.68ZM889.75 44.92c-5.97 0-11.27 1.87-17.18 6.16v-4.45h-20.39v69.15h20.39V85.34c0-6.17-.01-11.51 2.86-16.08 2.17-3.42 5.48-5.3 9.29-5.3 7.05 0 8.98 4.09 8.98 19.02v32.8h20.39V69.26c.01-14.1-10.23-24.34-24.34-24.34Z" fill="#fff"></path>
62+
<path d="M830.7 12.09c-6.25 0-11.34 4.89-11.34 10.9 0 6.69 5.09 12.13 11.35 12.13s11.35-5.09 11.35-11.35c0-6.44-5.1-11.68-11.35-11.68Z" fill="#fff"></path>
63+
<path d="M840.96 46.64h-20.4v69.15h20.4V46.64ZM775.82 44.92c-19.7 0-35.74 16.31-35.74 36.35 0 20.32 15.75 36.23 35.86 36.23 20.45 0 36.47-15.97 36.47-36.35.01-19.98-16.41-36.23-36.59-36.23Zm.25 53.04c-9.25 0-15.47-6.76-15.47-16.81 0-9.67 6.5-16.69 15.47-16.69 9.47 0 15.84 6.76 15.84 16.81-.01 9.83-6.52 16.69-15.84 16.69ZM700.48 44.92a29 29 0 0 0-18.41 6.32v-4.6h-20.39v92.91h20.39v-28.2a28.15 28.15 0 0 0 18.04 6.15c18.6 0 33.16-15.91 33.16-36.23.01-20.72-14.09-36.35-32.79-36.35Zm-3.3 19.05c9.18 0 15.59 7.07 15.59 17.18 0 10.03-6.56 17.31-15.59 17.31-9.32 0-15.84-7.17-15.84-17.43 0-10.21 6.37-17.06 15.84-17.06ZM625.27 44.92c-5.9 0-11.44 1.96-17.18 6.13V21.53h-20.4v94.26h20.4V84.75c-.01-5.93-.03-11.05 2.74-15.36 2.23-3.5 5.53-5.42 9.3-5.42 6.97 0 9.1 4.44 9.1 19.02v32.8h20.39V70.74c-.01-15.68-9.57-25.82-24.35-25.82ZM544.4 63.97c6.08 0 10.23 1.88 14.82 6.71l1.09 1.15 16.96-9.32-1.27-1.86c-6.9-10.14-18.15-15.72-31.71-15.72-22.48 0-38.8 15.34-38.8 36.47 0 20.92 16.2 36.11 38.55 36.11 13.3 0 23.79-4.84 31.15-14.4l1.32-1.72-16.21-11.12-1.2 1.48c-3.57 4.45-8.76 6.71-15.42 6.71-10.57 0-17.67-6.76-17.67-16.81-.01-10.58 7.39-17.68 18.4-17.68ZM493.54 22.63h-20.4v24.01h-8.32V64.7h8.33v51.08h20.39V64.7h9.68V46.64h-9.68V22.63ZM437.86 51.24a28.97 28.97 0 0 0-18.41-6.32c-18.63 0-32.67 15.63-32.67 36.35 0 20.32 14.5 36.23 33.04 36.23a28 28 0 0 0 18.04-6.1v4.39h20.39V46.64h-20.4v4.6Zm-15.1 47.21c-8.96 0-15.47-7.28-15.47-17.31 0-10.12 6.36-17.18 15.47-17.18 9.32 0 15.84 7.02 15.84 17.06 0 10.27-6.51 17.43-15.84 17.43ZM346.56 63.97c6.07 0 10.22 1.88 14.81 6.71l1.09 1.15 16.95-9.32-1.26-1.86c-6.89-10.14-18.15-15.72-31.71-15.72-22.48 0-38.8 15.34-38.8 36.47 0 20.92 16.21 36.11 38.56 36.11 13.31 0 23.79-4.84 31.15-14.4l1.32-1.72-16.22-11.12-1.19 1.48c-3.58 4.45-8.77 6.71-15.43 6.71-10.57 0-17.67-6.76-17.67-16.81 0-10.58 7.39-17.68 18.4-17.68Z" fill="#fff"></path>
64+
<path d="M63.76 150.45a4.67 4.67 0 1 0 6.6 0 4.79 4.79 0 0 0-6.6 0ZM39.38 141.08a5.12 5.12 0 1 0 7.24 0 5.25 5.25 0 0 0-7.24 0ZM19.66 124.58a5.5 5.5 0 1 0 7.78 0 5.65 5.65 0 0 0-7.78 0ZM6.87 102.59a5.71 5.71 0 1 0 8.06 0 5.82 5.82 0 0 0-8.06 0ZM1.88 76.34a6.1 6.1 0 1 0 10.41 4.32c0-1.63-.64-3.16-1.79-4.31a6.22 6.22 0 0 0-8.62-.01ZM27.4 77.04a5.12 5.12 0 0 0 3.61 8.73 5.1 5.1 0 0 0 3.61-8.72 5.22 5.22 0 0 0-7.22-.01ZM33.86 51.84a5.6 5.6 0 0 0 3.94 9.53 5.5 5.5 0 0 0 3.94-1.64 5.54 5.54 0 0 0-.01-7.88 5.7 5.7 0 0 0-7.87-.01ZM51.06 33.98a6.04 6.04 0 0 0 4.26 10.3c1.6 0 3.12-.63 4.26-1.77a5.98 5.98 0 0 0 0-8.52 6.17 6.17 0 0 0-8.52-.01ZM75.73 26.89a6.4 6.4 0 0 0 9.04 9.04 6.35 6.35 0 0 0-.01-9.04 6.52 6.52 0 0 0-9.03 0ZM100.49 33.09a6.85 6.85 0 1 0 9.68 0 7 7 0 0 0-9.68 0ZM118.14 50.94a6.85 6.85 0 1 0 9.68 0 7 7 0 0 0-9.68 0ZM52.54 77.57a4.37 4.37 0 1 0 6.18-.01 4.49 4.49 0 0 0-6.18.01ZM34.4 102.36a4.8 4.8 0 1 0 6.78 0 4.91 4.91 0 0 0-6.78 0ZM52.53 120.36a4.38 4.38 0 1 0 6.18.01 4.45 4.45 0 0 0-6.18-.01ZM77.47 126.98a4.26 4.26 0 1 0 6.02 0 4.36 4.36 0 0 0-6.02 0ZM64.41 56.01a4.83 4.83 0 1 0 6.82 0 4.94 4.94 0 0 0-6.82 0ZM89.18 55.8a5.07 5.07 0 1 0 7.15.01 5.17 5.17 0 0 0-7.15-.01ZM125.3 76.28a6.19 6.19 0 1 0 8.75 0 6.34 6.34 0 0 0-8.74 0ZM101.96 76.28a6.19 6.19 0 1 0 8.74 0 6.34 6.34 0 0 0-8.74 0ZM65.05 99.4a3.81 3.81 0 0 0 2.69 6.5c1.02 0 1.97-.4 2.69-1.12a3.78 3.78 0 0 0-.01-5.38 3.9 3.9 0 0 0-5.37 0ZM6.28 50.24a6.5 6.5 0 1 0 9.18 0 6.63 6.63 0 0 0-9.18 0ZM18.87 28.15a6.96 6.96 0 0 0 9.82 9.83 6.92 6.92 0 0 0 0-9.82 7.1 7.1 0 0 0-9.82-.01ZM37.95 11.68a7.21 7.21 0 0 0 10.18 10.19 7.16 7.16 0 0 0 0-10.18 7.36 7.36 0 0 0-10.18-.01ZM61.69 2.44a7.62 7.62 0 0 0 10.76 10.77 7.56 7.56 0 0 0 2.23-5.38c0-2.03-.8-3.95-2.23-5.38a7.79 7.79 0 0 0-10.76-.01ZM88.08 2.25a7.88 7.88 0 1 0 11.16-.01 8.1 8.1 0 0 0-11.16.01ZM111.71 10.91a8.43 8.43 0 1 0 11.9 0 8.61 8.61 0 0 0-11.9 0ZM130.84 26.7a8.76 8.76 0 1 0 12.37-.01 8.98 8.98 0 0 0-12.37.01ZM143.44 48.56a9.18 9.18 0 0 0 6.48 15.65c2.45 0 4.75-.95 6.48-2.69a9.1 9.1 0 0 0 2.68-6.48c0-2.45-.95-4.75-2.69-6.48a9.38 9.38 0 0 0-12.95 0ZM147.74 73.85a9.6 9.6 0 0 0 6.78 16.38c2.56 0 4.97-1 6.78-2.81a9.53 9.53 0 0 0 2.81-6.78c0-2.56-1-4.97-2.81-6.78a9.8 9.8 0 0 0-13.56-.01ZM90.46 150.27a4.67 4.67 0 1 0 6.6 0 4.78 4.78 0 0 0-6.6 0ZM171.72 7.99a4.67 4.67 0 1 0-6.6 0 4.78 4.78 0 0 0 6.6 0ZM196.11 17.36a5.12 5.12 0 1 0-7.24 0 5.25 5.25 0 0 0 7.24 0ZM214.75 32.33a5.5 5.5 0 1 0-7.78 0 5.63 5.63 0 0 0 7.78 0ZM230.36 59.87a5.71 5.71 0 1 0-8.06 0 5.84 5.84 0 0 0 8.06 0ZM233.6 85.02a6.1 6.1 0 1 0-10.41-4.32c0 1.63.64 3.16 1.79 4.31a6.22 6.22 0 0 0 8.62.01ZM208.08 84.32a5.12 5.12 0 0 0-3.61-8.73 5.1 5.1 0 0 0-3.61 8.72 5.22 5.22 0 0 0 7.22.01ZM201.63 106.6a5.6 5.6 0 0 0-3.94-9.53 5.5 5.5 0 0 0-3.94 1.64 5.54 5.54 0 0 0 .01 7.88 5.7 5.7 0 0 0 7.87.01ZM184.43 124.46a6.04 6.04 0 0 0-4.26-10.3c-1.6 0-3.12.63-4.26 1.77a5.98 5.98 0 0 0 0 8.52 6.15 6.15 0 0 0 8.52.01ZM159.75 131.56a6.4 6.4 0 0 0-9.04-9.04 6.35 6.35 0 0 0 .01 9.04 6.54 6.54 0 0 0 9.03 0ZM135 125.35a6.85 6.85 0 1 0-9.68 0 7 7 0 0 0 9.68 0ZM117.35 110.01a6.85 6.85 0 1 0-9.68 0 7 7 0 0 0 9.68 0ZM182.95 83.79a4.37 4.37 0 1 0-6.18.01 4.49 4.49 0 0 0 6.18-.01ZM201.09 56.08a4.8 4.8 0 1 0-6.78 0 4.9 4.9 0 0 0 6.78 0ZM182.96 38.09a4.38 4.38 0 1 0-6.18-.01 4.47 4.47 0 0 0 6.18.01ZM158.01 31.46a4.26 4.26 0 1 0-6.02 0 4.36 4.36 0 0 0 6.02 0ZM171.07 102.43a4.83 4.83 0 1 0-6.82 0 4.94 4.94 0 0 0 6.82 0ZM146.31 102.64a5.07 5.07 0 1 0-7.15-.01 5.17 5.17 0 0 0 7.15.01ZM170.43 59.04a3.81 3.81 0 0 0-2.69-6.5c-1.02 0-1.97.4-2.69 1.12a3.77 3.77 0 0 0 .01 5.38 3.88 3.88 0 0 0 5.37 0ZM229.21 108.2a6.5 6.5 0 1 0-9.18 0 6.63 6.63 0 0 0 9.18 0ZM216.62 130.29a6.96 6.96 0 0 0-9.82-9.83 6.92 6.92 0 0 0 0 9.82 7.1 7.1 0 0 0 9.82.01ZM197.54 146.76a7.21 7.21 0 0 0-10.18-10.19 7.16 7.16 0 0 0 0 10.18 7.34 7.34 0 0 0 10.18.01ZM173.79 156a7.62 7.62 0 0 0-10.76-10.77 7.56 7.56 0 0 0-2.23 5.38c0 2.03.79 3.95 2.23 5.38a7.79 7.79 0 0 0 10.76.01ZM147.41 156.19a7.88 7.88 0 1 0-11.16.01 8.1 8.1 0 0 0 11.16-.01ZM124.65 148.72a8.43 8.43 0 1 0-11.9 0 8.61 8.61 0 0 0 11.9 0ZM105.53 135.64a8.76 8.76 0 1 0-12.37.01 8.96 8.96 0 0 0 12.37-.01ZM92.05 112.43a9.18 9.18 0 0 0-6.48-15.65c-2.45 0-4.75.95-6.48 2.69a9.1 9.1 0 0 0-2.68 6.48c0 2.45.95 4.75 2.69 6.48a9.38 9.38 0 0 0 12.95 0ZM87.74 87.51a9.6 9.6 0 0 0-6.78-16.38c-2.56 0-4.97 1-6.78 2.81a9.53 9.53 0 0 0-2.81 6.78c0 2.56 1 4.97 2.81 6.78a9.8 9.8 0 0 0 13.56.01ZM145.03 8.17a4.67 4.67 0 1 0-6.6 0 4.77 4.77 0 0 0 6.6 0Z" fill="#fff"></path>
65+
</svg></a>
66+
</div>
67+
</div>
68+
69+
<h1>We’re performing scheduled maintenance</h1>
70+
<p>
71+
Our site is temporarily unavailable while we make improvements.<br/>
72+
Sorry for the interruption — we’ll be back shortly.<br/>
73+
If you need immediate assistance, contact
74+
<a href="mailto:[email protected]">[email protected]</a>.
75+
</p>
76+
</main>
77+
</body>
78+
</html>

0 commit comments

Comments
 (0)