-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
108 lines (97 loc) · 3.73 KB
/
test.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Page - Unixify</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
}
.status-box {
border: 1px solid #ccc;
padding: 10px;
margin-top: 10px;
background-color: #f5f5f5;
}
button {
padding: 8px 16px;
background-color: #0d6efd;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #0a58ca;
}
</style>
</head>
<body>
<h1>Unixify Template Test</h1>
<p>This page will check what's happening with the templates and static files.</p>
<div>
<button onclick="checkMainApp()">Check Main App</button>
<button onclick="checkCaddyApp()">Check Caddy App</button>
</div>
<div id="mainStatus" class="status-box">
<h3>Main App Status</h3>
<p>Click the button above to check.</p>
</div>
<div id="caddyStatus" class="status-box">
<h3>Caddy App Status</h3>
<p>Click the button above to check.</p>
</div>
<script>
function checkMainApp() {
const resultDiv = document.getElementById('mainStatus');
resultDiv.innerHTML = '<h3>Main App Status</h3><p>Checking...</p>';
fetch('http://localhost:8080/', { mode: 'no-cors' })
.then(() => {
resultDiv.innerHTML = `
<h3>Main App Status</h3>
<p>Main app is reachable.</p>
<p>To manually check:</p>
<ul>
<li>Visit <a href="http://localhost:8080" target="_blank">http://localhost:8080</a></li>
<li>Check if theme button is visible in top-right</li>
<li>Check if footer says "UNIX Team Management System"</li>
</ul>
`;
})
.catch(error => {
resultDiv.innerHTML = `
<h3>Main App Status</h3>
<p>Error: ${error.message}</p>
<p>The main app might not be running or is not accessible.</p>
`;
});
}
function checkCaddyApp() {
const resultDiv = document.getElementById('caddyStatus');
resultDiv.innerHTML = '<h3>Caddy App Status</h3><p>Checking...</p>';
fetch('http://localhost:8081/', { mode: 'no-cors' })
.then(() => {
resultDiv.innerHTML = `
<h3>Caddy App Status</h3>
<p>Caddy app is reachable.</p>
<p>To manually check:</p>
<ul>
<li>Visit <a href="http://localhost:8081" target="_blank">http://localhost:8081</a></li>
<li>Check if theme button is visible in top-right</li>
<li>Check if footer says "UNIX Team Management System"</li>
</ul>
`;
})
.catch(error => {
resultDiv.innerHTML = `
<h3>Caddy App Status</h3>
<p>Error: ${error.message}</p>
<p>The Caddy app might not be running or is not accessible.</p>
`;
});
}
</script>
</body>
</html>