-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-dashboard.html
More file actions
194 lines (179 loc) · 6.7 KB
/
test-dashboard.html
File metadata and controls
194 lines (179 loc) · 6.7 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard Test</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background: #f5f5f5;
}
.test-section {
background: white;
margin: 20px 0;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.status {
padding: 10px;
border-radius: 4px;
margin: 10px 0;
}
.success {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.error {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
.info {
background: #d1ecf1;
color: #0c5460;
border: 1px solid #bee5eb;
}
button {
background: #007bff;
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
margin: 5px;
}
button:hover {
background: #0056b3;
}
</style>
</head>
<body>
<h1>🧪 Oracle Instance Creator Dashboard Test</h1>
<div class="test-section">
<h2>File Structure Validation</h2>
<div id="file-structure-results">
<p>Checking dashboard file structure...</p>
</div>
</div>
<div class="test-section">
<h2>CSS/JS Loading Test</h2>
<div id="asset-loading-results">
<p>Testing asset loading...</p>
</div>
</div>
<div class="test-section">
<h2>Dashboard Preview</h2>
<p>Open the dashboard in a new window to test functionality:</p>
<button onclick="window.open('docs/dashboard/index.html', '_blank')">
🚀 Open Dashboard
</button>
<button onclick="window.open('docs/index.html', '_blank')">
📱 Open Landing Page
</button>
</div>
<div class="test-section">
<h2>GitHub Pages Setup</h2>
<div class="info">
<h4>📋 Setup Instructions:</h4>
<ol>
<li>Go to repository <strong>Settings → Pages</strong></li>
<li>Set source to <strong>"Deploy from a branch"</strong></li>
<li>Select branch <strong>"main"</strong> or <strong>"master"</strong></li>
<li>Set folder to <strong>"/docs"</strong></li>
<li>Click <strong>"Save"</strong></li>
<li>Dashboard will be available at: <br>
<code>https://[username].github.io/[repo-name]/</code>
</li>
</ol>
</div>
</div>
<div class="test-section">
<h2>Configuration Test</h2>
<div class="info">
<h4>🔑 GitHub Token Requirements:</h4>
<ul>
<li><code>repo</code> - Full control of repositories</li>
<li><code>workflow</code> - Update GitHub Action workflows</li>
<li><code>actions:read</code> - Read access to Actions</li>
</ul>
</div>
<div class="info">
<h4>📊 Dashboard Features:</h4>
<ul>
<li>✅ Real-time instance status monitoring</li>
<li>✅ Success rate analytics with pattern visualization</li>
<li>✅ Free tier usage tracking (2,000 min/month limit)</li>
<li>✅ Workflow run history and logs</li>
<li>✅ AD performance metrics</li>
<li>✅ Regional scheduling optimization</li>
<li>✅ Manual workflow controls</li>
<li>✅ Data export capabilities</li>
<li>✅ Auto-refresh every 30 seconds</li>
<li>✅ Responsive mobile-friendly design</li>
</ul>
</div>
</div>
<script>
// Test file structure
const files = [
'docs/dashboard/index.html',
'docs/dashboard/css/dashboard.css',
'docs/dashboard/js/dashboard.js',
'docs/index.html',
'docs/_config.yml',
'docs/README.md'
];
async function testFileStructure() {
const results = document.getElementById('file-structure-results');
let html = '<h4>File Structure Check:</h4>';
for (const file of files) {
try {
const response = await fetch(file, { method: 'HEAD' });
if (response.ok) {
html += `<div class="status success">✅ ${file} - Found</div>`;
} else {
html += `<div class="status error">❌ ${file} - Not found (${response.status})</div>`;
}
} catch (error) {
html += `<div class="status error">❌ ${file} - Error: ${error.message}</div>`;
}
}
results.innerHTML = html;
}
async function testAssetLoading() {
const results = document.getElementById('asset-loading-results');
const assets = [
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css',
'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap',
'https://cdn.jsdelivr.net/npm/chart.js',
'https://cdn.jsdelivr.net/npm/date-fns@2.29.3/index.min.js'
];
let html = '<h4>External Asset Loading:</h4>';
for (const asset of assets) {
try {
const response = await fetch(asset, { method: 'HEAD' });
if (response.ok) {
html += `<div class="status success">✅ ${asset.split('/').pop()} - Accessible</div>`;
} else {
html += `<div class="status error">❌ ${asset.split('/').pop()} - Failed (${response.status})</div>`;
}
} catch (error) {
html += `<div class="status error">❌ ${asset.split('/').pop()} - Error: ${error.message}</div>`;
}
}
results.innerHTML = html;
}
// Run tests when page loads
document.addEventListener('DOMContentLoaded', () => {
testFileStructure();
testAssetLoading();
});
</script>
</body>
</html>