-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.html
More file actions
219 lines (188 loc) · 6.26 KB
/
Copy pathstatus.html
File metadata and controls
219 lines (188 loc) · 6.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Server Status - Server Access</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="style.css">
<style>
.status-container {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
padding: 20px;
}
.status-card {
background: var(--card-bg);
padding: 50px 40px;
border-radius: 20px;
text-align: center;
max-width: 500px;
width: 100%;
border: 2px solid var(--primary);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.status-icon {
font-size: 4rem;
margin-bottom: 20px;
}
.online { color: #28a745; }
.maintenance { color: #ffc107; } /* Yellow for maintenance */
.offline { color: var(--primary); } /* Orange for offline */
.checking { color: var(--secondary); }
.status-title {
font-size: 2.2rem;
margin-bottom: 15px;
color: var(--light);
}
.status-message {
font-size: 1.1rem;
color: var(--gray);
margin-bottom: 30px;
line-height: 1.6;
}
.maintenance-info {
background: rgba(255, 255, 255, 0.05);
padding: 20px;
border-radius: 10px;
margin: 25px 0;
text-align: left;
}
.maintenance-info h3 {
color: var(--primary);
margin-bottom: 10px;
display: flex;
align-items: center;
gap: 10px;
}
.maintenance-info ul {
padding-left: 20px;
color: var(--text);
}
.maintenance-info li {
margin-bottom: 8px;
}
.action-buttons {
display: flex;
gap: 15px;
justify-content: center;
flex-wrap: wrap;
margin-top: 30px;
}
.refresh-btn, .home-btn {
padding: 12px 25px;
border-radius: 25px;
text-decoration: none;
font-weight: bold;
transition: all 0.3s ease;
}
.refresh-btn {
background: var(--primary);
color: #000;
border: none;
cursor: pointer;
}
.home-btn {
background: var(--accent);
color: white;
}
.last-checked {
margin-top: 20px;
font-size: 0.85rem;
color: var(--gray);
}
.pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.6; }
100% { opacity: 1; }
}
</style>
</head>
<body>
<div class="status-container">
<div class="status-card">
<div class="status-icon checking pulse" id="statusIcon">
<i class="fas fa-sync-alt"></i>
</div>
<h1 class="status-title" id="statusTitle">Checking Server Status</h1>
<p class="status-message" id="statusMessage">
Please wait while we check the server status...
</p>
<div class="maintenance-info" id="maintenanceInfo" style="display: none;">
<h3><i class="fas fa-tools"></i> What's Happening?</h3>
<ul>
<li>Routine maintenance and updates</li>
<li>Database backups</li>
<li>Performance optimizations</li>
<li>Content updates</li>
</ul>
<p style="margin-top: 15px; color: var(--primary); font-weight: 500;">
<i class="fas fa-clock"></i> Usually back within 30-60 minutes
</p>
</div>
<div class="action-buttons">
<button class="refresh-btn" onclick="checkStatus()">
<i class="fas fa-redo"></i> Refresh Status
</button>
<a href="index.html" class="home-btn">
<i class="fas fa-home"></i> Back to Home
</a>
</div>
<div class="last-checked" id="lastChecked"></div>
</div>
</div>
<script>
const WORKER_URL = 'https://plex-vip-backend.jazeera21.workers.dev';
async function checkStatus() {
const icon = document.getElementById('statusIcon');
const title = document.getElementById('statusTitle');
const message = document.getElementById('statusMessage');
const maintenanceInfo = document.getElementById('maintenanceInfo');
const lastChecked = document.getElementById('lastChecked');
// Show checking state
icon.innerHTML = '<i class="fas fa-sync-alt"></i>';
icon.className = 'status-icon checking pulse';
title.textContent = 'Checking Server Status';
message.textContent = 'Please wait while we check the server status...';
maintenanceInfo.style.display = 'none';
try {
const response = await fetch(`${WORKER_URL}/status`);
const data = await response.json();
// Remove pulse animation
icon.classList.remove('pulse');
if (data.status === 'online') {
icon.innerHTML = '<i class="fas fa-check-circle"></i>';
icon.className = 'status-icon online';
title.textContent = 'Server is Online';
message.textContent = 'Great news! The server is up and running smoothly.';
maintenanceInfo.style.display = 'none';
} else {
icon.innerHTML = '<i class="fas fa-tools"></i>';
icon.className = 'status-icon offline';
title.textContent = 'Server Maintenance';
message.textContent = data.message || 'The server is currently undergoing maintenance.';
maintenanceInfo.style.display = 'block';
}
lastChecked.textContent = `Last checked: ${new Date().toLocaleString()}`;
} catch (error) {
icon.innerHTML = '<i class="fas fa-exclamation-triangle"></i>';
icon.className = 'status-icon offline';
title.textContent = 'Status Check Failed';
message.textContent = 'Unable to check server status. Please try again.';
maintenanceInfo.style.display = 'block';
lastChecked.textContent = `Last checked: ${new Date().toLocaleString()}`;
}
}
// Check status when page loads
document.addEventListener('DOMContentLoaded', checkStatus);
// Auto-refresh every 2 minutes
setInterval(checkStatus, 120000);
</script>
</body>
</html>