-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
200 lines (193 loc) · 7.82 KB
/
index.html
File metadata and controls
200 lines (193 loc) · 7.82 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Disaster Relief Admin</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Sora:wght@400;600;700&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div class="bg-shape bg-one"></div>
<div class="bg-shape bg-two"></div>
<div class="app-shell">
<aside class="sidebar">
<h1>Relief Oracle Admin</h1>
<p class="muted">Admin Control Panel</p>
<nav id="nav"></nav>
</aside>
<main class="content">
<section class="screen active" id="screen-dashboard">
<div class="screen-head">
<h2>Admin Dashboard</h2>
<p class="muted">Real-time fund and disaster overview</p>
</div>
<div class="grid kpi-grid">
<article class="card hero-balance">
<p class="label">Total Fund Balance</p>
<h3 id="fund-balance-value">Loading...</h3>
<p class="muted" id="fund-balance-meta">Fetching from wallet backend</p>
</article>
<article class="card">
<p class="label">Active Members</p>
<h3 id="active-members-value">Loading...</h3>
</article>
<article class="card">
<p class="label">Last Disaster Event</p>
<h3>Flood Alert: Moderate</h3>
</article>
</div>
<button class="btn btn-primary nav-link" data-target="screen-scanner">
Scan for Disaster
</button>
</section>
<section class="screen" id="screen-scanner">
<div class="screen-head">
<h2>AI Oracle Scanner</h2>
<p class="muted">Signal discovery and verification</p>
</div>
<div class="card input-card">
<label for="keyword">Keyword / Location</label>
<div class="inline">
<input id="keyword" value="flood in Kelantan" />
<button class="btn btn-primary" id="run-scan">Run</button>
</div>
</div>
<div class="grid two-col">
<article class="card">
<p class="label">Scan Steps</p>
<ul class="steps" id="scan-steps">
<li>Fetching sources</li>
<li>Analyzing patterns</li>
<li>Scoring confidence</li>
</ul>
</article>
<article class="card">
<p class="label">Confidence</p>
<div class="bar-wrap">
<div class="bar" id="confidence-bar" style="width: 82%"></div>
</div>
<p class="big" id="confidence-text">82%</p>
<div class="badge ok" id="verdict">VERIFIED</div>
<div class="badge warn" id="severity">Severity: Moderate</div>
</article>
</div>
<article class="card">
<p class="label">Headlines Analyzed</p>
<ul class="headlines">
<li>River levels cross warning mark after overnight rain</li>
<li>District shelters on standby as floodwater rises</li>
<li>Meteorological office extends heavy rain advisory</li>
</ul>
</article>
<article class="card">
<p class="label">Oracle Result</p>
<p id="oracle-summary" class="muted">Run scan to fetch combined agent + model verdict.</p>
<div class="grid two-col">
<p><strong>News Agent:</strong> <span id="oracle-news-score">-</span></p>
<p><strong>ML Model:</strong> <span id="oracle-model-score">-</span></p>
<p><strong>Final Score:</strong> <span id="oracle-final-score">-</span></p>
<p><strong>Sources:</strong> <span id="oracle-sources-count">-</span></p>
<p><strong>Location:</strong> <span id="oracle-location">-</span></p>
<p><strong>Risk:</strong> <span id="oracle-risk">-</span></p>
</div>
<p><strong>Reason:</strong> <span id="oracle-reason">-</span></p>
<p><strong>Summary:</strong> <span id="oracle-summary-below">-</span></p>
</article>
<button class="btn btn-primary nav-link" data-target="screen-vote">
Send to Community Vote
</button>
</section>
<section class="screen" id="screen-vote">
<div class="screen-head">
<h2>Community Vote</h2>
<p class="muted">Human oversight before payout execution</p>
</div>
<div class="grid three-col">
<article class="card lock" id="oracle-gate">Oracle Gate: Pending</article>
<article class="card lock" id="community-gate">Community Gate: Waiting</article>
<article class="card lock" id="contract-gate">Contract Gate: Locked</article>
</div>
<article class="card">
<p class="label">Event Summary</p>
<p>Flood impact in Zone B. 42 households affected, road access disrupted.</p>
</article>
<article class="card">
<p class="label">YES / NO Progress (Threshold 60%)</p>
<div class="vote-track">
<div class="vote-yes" id="vote-yes" style="width: 0%"></div>
<div class="threshold">60%</div>
</div>
<p class="muted" id="vote-stats">YES 0% (0/10)</p>
</article>
<article class="card">
<p class="label">Members</p>
<div id="member-list"></div>
</article>
<button class="btn btn-primary nav-link" id="execute-btn" data-target="screen-payout" disabled>
Execute Payout
</button>
</section>
<section class="screen" id="screen-payout">
<div class="screen-head">
<h2>Payout Distribution</h2>
<p class="muted">Weighted and transparent allocations</p>
</div>
<article class="card">
<table>
<thead>
<tr>
<th>Member</th>
<th>Household</th>
<th>Severity</th>
<th>Weighted Score</th>
<th>Payout</th>
<th>Status</th>
</tr>
</thead>
<tbody id="payout-body"></tbody>
</table>
</article>
<article class="card">
<p class="label">Total Distributed</p>
<h3 id="total-distributed-value">SGD 0.00</h3>
<p class="pill">Funds sent via ILP</p>
</article>
<article class="card">
<p class="label">Payout Links</p>
<div id="payout-links-list" class="muted">No payout links generated yet.</div>
</article>
<button class="btn btn-primary nav-link" data-target="screen-audit">
View Audit Trail
</button>
</section>
<section class="screen" id="screen-audit">
<div class="screen-head">
<h2>Audit Trail</h2>
<p class="muted">Every step logged with hash-style IDs</p>
</div>
<article class="card">
<table>
<thead>
<tr>
<th>Timestamp</th>
<th>Action</th>
<th>Actor</th>
<th>Hash ID</th>
<th>Status</th>
</tr>
</thead>
<tbody id="audit-body"></tbody>
</table>
</article>
</section>
</main>
</div>
<script type="module" src="app.js"></script>
</body>
</html>