FourLabs-UN2 commited on
Commit
4965449
·
verified ·
1 Parent(s): 2daa630

Adicione que ao clicar em Details abra um modal com um botão com um olho e ao apertar o botão mostre uma URL da instância.

Browse files
Files changed (2) hide show
  1. README.md +9 -5
  2. index.html +484 -19
README.md CHANGED
@@ -1,10 +1,14 @@
1
  ---
2
- title: Instance Insight Portal
3
- emoji: 😻
4
- colorFrom: red
5
- colorTo: blue
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
1
  ---
2
+ title: Instance Insight Portal 👁️
3
+ colorFrom: gray
4
+ colorTo: pink
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://deepsite.hf.co).
14
+
index.html CHANGED
@@ -1,19 +1,484 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+
4
+
5
+
6
+ <!DOCTYPE html>
7
+ <html lang="en">
8
+ <head>
9
+ <meta charset="UTF-8">
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ <title>Mr. Mxyzptlk - Dashboard de Instâncias | Fourlabs</title>
12
+ <script src="https://cdn.tailwindcss.com"></script>
13
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
14
+ <link rel="icon" type="image/x-icon" href="/static/imgs/icon.svg">
15
+ <link rel="stylesheet" href="/static/style/dashboard.css">
16
+ <script src="https://unpkg.com/feather-icons"></script>
17
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
18
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
19
+ <script>
20
+ tailwind.config = {
21
+ theme: {
22
+ extend: {
23
+ colors: {
24
+ primary: '#21223a',
25
+ secondary: '#ff580f',
26
+ }
27
+ }
28
+ }
29
+ }
30
+ </script>
31
+ </head>
32
+ <body class="bg-gray-100">
33
+ <div class="flex h-screen overflow-hidden">
34
+ <!-- Sidebar -->
35
+ <div class="sidebar bg-primary text-white w-64 md:w-20 lg:w-64 fixed h-full overflow-y-auto">
36
+ <div class="p-4 border-b border-gray-700">
37
+ <div class="w-full flex flex-col items-center justify-center">
38
+ <img
39
+ alt="logo"
40
+ loading="lazy"
41
+ width="100"
42
+ height="100"
43
+ decoding="async"
44
+ data-nimg="1"
45
+ class="w-36"
46
+ src="/static/imgs/logo-branco-labs.svg"
47
+ style="color: transparent;margin-top: 8px;"
48
+ >
49
+ <p
50
+ class="text-[10px] text-white mt-2 text-center"
51
+ style="margin-top: -1px; margin-left: 12px;font-size: 9px;">
52
+ Inovação e experimentação
53
+ </p>
54
+ </div>
55
+ </div>
56
+
57
+ <div class="p-4">
58
+ <div class="flex items-center space-x-3 mb-6">
59
+ <div class="w-10 h-10 rounded-full bg-secondary flex items-center justify-center">
60
+ <span class="font-bold">MS</span>
61
+ </div>
62
+ <div class="lg:block hidden">
63
+ <h3 class="font-semibold">Marlon Sousa</h3>
64
+ <p class="text-xs text-gray-400">Admin</p>
65
+ </div>
66
+ </div>
67
+
68
+ <nav>
69
+ <ul class="space-y-2">
70
+ <li>
71
+ <a href="/"
72
+ class="sidebar-item flex items-center p-3 rounded-lg
73
+ active">
74
+ <i class="fa-solid fa-server text-secondary w-6 text-center"></i>
75
+ <span class="ml-3 lg:block hidden">Instances</span>
76
+ </a>
77
+ </li>
78
+ <li>
79
+ <a href="/chat/"
80
+ class="sidebar-item flex items-center p-3 rounded-lg
81
+ ">
82
+ <i class="fa-solid fa-comment text-secondary w-6 text-center"></i>
83
+ <span class="ml-3 lg:block hidden">Chat Model</span>
84
+ </a>
85
+ </li>
86
+ <li>
87
+ <a href="/"
88
+ class="sidebar-item flex items-center p-3 rounded-lg
89
+ ">
90
+ <i data-feather="activity" class="text-secondary w-5 h-5 mr-3"></i>
91
+ <span class="ml-3 lg:block hidden">Monitoring</span>
92
+ </a>
93
+ </li>
94
+ <li>
95
+ <a href="/settings/"
96
+ class="sidebar-item flex items-center p-3 rounded-lg
97
+ ">
98
+ <i class="fa-solid fa-screwdriver-wrench text-secondary w-6 text-center"></i>
99
+ <span class="ml-3 lg:block hidden">Configurações</span>
100
+ </a>
101
+ </li>
102
+ </ul>
103
+ </nav>
104
+ </div>
105
+
106
+ <div class="p-4 border-t border-gray-700">
107
+ <h3 class="text-sm font-medium mb-2 lg:block hidden">Documentos Recentes</h3>
108
+ <div class="agent-history">
109
+ <ul id="agent-history">
110
+
111
+ </ul>
112
+ </div>
113
+ </div>
114
+
115
+ <div class="absolute bottom-0 w-full p-4 border-t border-gray-700">
116
+ <form id="logout-form" method="POST" action="/account/logout/" class="hidden">
117
+ <input type="hidden" name="csrfmiddlewaretoken" value="JbiCJ0hDXZBxdpWd8qhGMWtRSghbpqK2t8Z4clh6OaHa5EZmiFPFefBjf3YALJQ7">
118
+ </form>
119
+
120
+ <a href="#" onclick="document.getElementById('logout-form').submit(); return false;" class="sidebar-item flex items-center p-3 rounded-lg">
121
+ <i class="fas fa-sign-out-alt text-secondary w-6 text-center"></i>
122
+ <span class="ml-3 lg:block hidden">Logout</span>
123
+ </a>
124
+ </div>
125
+ </div>
126
+
127
+ <!-- Main Content -->
128
+ <div class="flex-1 ml-0 md:ml-20 lg:ml-64 overflow-y-auto">
129
+ <!-- Top Navigation -->
130
+ <header class="bg-white shadow-sm">
131
+ <div class="flex items-center justify-between p-4">
132
+ <div class="flex items-center space-x-4">
133
+ <button id="mobileToggleSidebar" class="text-gray-600 lg:hidden block">
134
+ <i class="fas fa-bars text-xl"></i>
135
+ </button>
136
+ <h1 class="text-xl font-bold text-primary">Dashboard de Instâncias</h1>
137
+ </div>
138
+ <div class="flex items-center space-x-4">
139
+ <a href="/launch/" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-primary hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
140
+ <i data-feather="plus" class="mr-2 w-4 h-4"></i>
141
+ Launch New Instance
142
+ </a>
143
+ <div class="relative">
144
+ <button id="notificationsBtn" class="relative">
145
+ <i class="fas fa-bell text-xl text-gray-600"></i>
146
+ <span class="absolute -top-1 -right-1 bg-secondary text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">0</span>
147
+ </button>
148
+ <div id="notificationsDropdown" class="hidden absolute right-0 mt-2 w-80 bg-white rounded-md shadow-lg overflow-hidden z-50">
149
+ <div class="py-1">
150
+ <div class="px-4 py-2 border-b border-gray-200">
151
+ <h3 class="text-sm font-medium text-gray-700">Notifications</h3>
152
+ </div>
153
+
154
+ </div>
155
+ <div class="px-4 py-2 bg-gray-50 text-center">
156
+ <a href="#" class="text-sm font-medium text-secondary hover:text-primary">View all notifications</a>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ </div>
161
+ </div>
162
+ </header>
163
+
164
+ <!-- Dashboard Content -->
165
+
166
+
167
+ <main class="p-6 ">
168
+ <div class="mt-8 mb-6 gap-6">
169
+ <div class="grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4">
170
+ <div class="bg-white overflow-hidden shadow rounded-lg">
171
+ <div class="px-4 py-5 sm:p-6">
172
+ <div class="flex items-center">
173
+ <div class="flex-shrink-0 bg-primary rounded-md p-3 flex items-center justify-center">
174
+ <i class="fa-solid fa-server text-secondary text-2xl"></i>
175
+ </div>
176
+ <div class="ml-5 w-0 flex-1">
177
+ <dl>
178
+ <dt class="text-sm font-medium text-gray-500 truncate">Active LLM Models</dt>
179
+ <dd>
180
+ <div class="text-lg font-medium text-gray-900">1</div>
181
+ </dd>
182
+ </dl>
183
+ </div>
184
+ </div>
185
+ </div>
186
+ </div>
187
+ <div class="bg-white overflow-hidden shadow rounded-lg">
188
+ <div class="px-4 py-5 sm:p-6">
189
+ <div class="flex items-center">
190
+ <div class="flex-shrink-0 bg-secondary rounded-md p-3 flex items-center justify-center">
191
+ <i class="fa-solid fa-microchip text-primary text-2xl"></i>
192
+ </div>
193
+ <div class="ml-5 w-0 flex-1">
194
+ <dl>
195
+ <dt class="text-sm font-medium text-gray-500 truncate">LLM vCPUs Used</dt>
196
+ <dd>
197
+ <div class="text-lg font-medium text-gray-900">1</div>
198
+ </dd>
199
+ </dl>
200
+ </div>
201
+ </div>
202
+ </div>
203
+ </div>
204
+ <div class="bg-white overflow-hidden shadow rounded-lg">
205
+ <div class="px-4 py-5 sm:p-6">
206
+ <div class="flex items-center">
207
+ <div class="flex-shrink-0 bg-primary rounded-md p-3">
208
+ <i class="fa-solid fa-hard-drive text-white text-2xl"></i>
209
+ </div>
210
+ <div class="ml-5 w-0 flex-1">
211
+ <dl>
212
+ <dt class="text-sm font-medium text-gray-500 truncate">LLM Storage Used</dt>
213
+ <dd>
214
+ <div class="text-lg font-medium text-gray-900">8 GB</div>
215
+ </dd>
216
+ </dl>
217
+ </div>
218
+ </div>
219
+ </div>
220
+ </div>
221
+ <div class="bg-white overflow-hidden shadow rounded-lg">
222
+ <div class="px-4 py-5 sm:p-6">
223
+ <div class="flex items-center">
224
+ <div class="flex-shrink-0 bg-secondary rounded-md p-3">
225
+ <i class="fa-solid fa-dollar-sign text-white text-2xl"></i>
226
+ </div>
227
+ <div class="ml-5 w-0 flex-1">
228
+ <dl>
229
+ <dt class="text-sm font-medium text-gray-500 truncate">Estimated Cost</dt>
230
+ <dd>
231
+ <div class="text-lg font-medium text-gray-900">$86,4</div>
232
+ </dd>
233
+ </dl>
234
+ </div>
235
+ </div>
236
+ </div>
237
+ </div>
238
+ </div>
239
+ </div>
240
+
241
+ <div class="flex justify-between items-center mb-6 gap-6 mb-4">
242
+ <div class="flex items-center space-x-4">
243
+ <div class="relative">
244
+ <input type="text" placeholder="Search instances..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-primary focus:border-primary w-64">
245
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
246
+ <i data-feather="search" class="text-gray-400"></i>
247
+ </div>
248
+ </div>
249
+ <select class="border border-gray-300 rounded-lg px-3 py-2 focus:ring-primary focus:border-primary">
250
+ <option>All Regions</option>
251
+ <option>us-east-1</option>
252
+ <option>us-west-2</option>
253
+ <option>eu-west-1</option>
254
+ </select>
255
+ </div>
256
+ <div class="flex items-center space-x-2">
257
+ <button class="p-2 rounded-lg hover:bg-gray-100">
258
+ <i data-feather="refresh-cw"></i>
259
+ </button>
260
+ <button class="p-2 rounded-lg hover:bg-gray-100">
261
+ <i data-feather="filter"></i>
262
+ </button>
263
+ </div>
264
+ </div>
265
+
266
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
267
+ <!-- Instance Card 1 -->
268
+
269
+ <div class="instance-card bg-white overflow-hidden shadow rounded-lg transition-all duration-300 ease-in-out">
270
+ <div class="px-4 py-5 sm:px-6 border-b flex justify-between items-center">
271
+ <div>
272
+ <p class="mt-1 text-sm text-gray-500">Instance ID: 20526234-ac5b-4108-9d01-3588e10c0fb6</p>
273
+ </div>
274
+ <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
275
+ Running
276
+ </span>
277
+ </div>
278
+ <div class="px-4 py-5 sm:p-6 ">
279
+ <div class="col-span-2 text-center gap-4 mb-4">
280
+ <p class="text-sm font-medium text-gray-500">LLM Model</p>
281
+ <p class="mt-1 text-lg font-bold text-primary-600 bg-blue-50 px-4 py-2 rounded-lg">deepseek-r1:8b</p>
282
+ </div>
283
+
284
+ <div class="grid grid-cols-2 gap-4 mb-4">
285
+ <div>
286
+ <p class="text-sm font-medium text-gray-500 truncate">Public IP</p>
287
+ <p class="mt-1 text-sm text-gray-900"></p>
288
+ </div>
289
+ <div>
290
+ <p class="text-sm font-medium text-gray-500 truncate">Instance Type</p>
291
+ <p class="mt-1 text-sm text-gray-900"></p>
292
+ </div>
293
+
294
+ <div>
295
+ <p class="text-sm font-medium text-gray-500 truncate">Availability Zone</p>
296
+ <p class="mt-1 text-sm text-gray-900">southamerica-east1</p>
297
+ </div>
298
+ <div>
299
+ <p class="text-sm font-medium text-gray-500 truncate">Launch Time</p>
300
+ <p class="mt-1 text-sm text-gray-900">8 de Outubro de 2025 às 16:20</p>
301
+ </div>
302
+ </div>
303
+ </div>
304
+ <div class="bg-gray-50 px-4 py-4 sm:px-6 flex justify-between">
305
+ <div class="flex space-x-3">
306
+ <button class="inline-flex items-center px-3 py-1.5 border border-gray-300 shadow-sm text-xs font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
307
+ <i class="fa-solid fa-pause mr-1 w-3 h-3"></i>
308
+ Stop
309
+ </button>
310
+ <form action="/instances/022dc463-91df-4a35-b38b-f95fc61ef7a0/terminate/" method="post"
311
+ onsubmit="return confirm('Tem certeza que deseja terminar esta instância?');">
312
+ <input type="hidden" name="csrfmiddlewaretoken" value="JbiCJ0hDXZBxdpWd8qhGMWtRSghbpqK2t8Z4clh6OaHa5EZmiFPFefBjf3YALJQ7">
313
+ <button type="submit"
314
+ class="inline-flex items-center px-3 py-1.5 border border-gray-300 shadow-sm text-xs font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
315
+ <i class="fa-solid fa-trash mr-1 w-3 h-3"></i>
316
+ Terminate
317
+ </button>
318
+ </form>
319
+ </div>
320
+ <button onclick="openInstanceModal('20526234-ac5b-4108-9d01-3588e10c0fb6')" class="inline-flex items-center text-sm font-medium text-primary hover:text-primary-700">
321
+ Details
322
+ <i class="fa-solid fa-chevron-right mr-1 w-3 h-3"></i>
323
+ </button>
324
+ </div>
325
+ </div>
326
+
327
+ </div>
328
+
329
+ <!-- Pagination -->
330
+ <div class="flex items-center justify-between border-t border-gray-200 px-4 py-6 sm:px-6">
331
+ <div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
332
+ <div>
333
+ <p class="text-sm text-gray-700">
334
+ Showing
335
+ <span class="font-medium">1</span>
336
+ to
337
+ <span class="font-medium">1</span>
338
+ of
339
+ <span class="font-medium">1</span>
340
+ instances
341
+ </p>
342
+ </div>
343
+
344
+ <div>
345
+ <nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
346
+
347
+ <span class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-300 ring-1 ring-inset ring-gray-300">
348
+ <i class="fa-solid fa-chevron-left"></i>
349
+ </span>
350
+
351
+
352
+
353
+
354
+ <span class="relative z-10 inline-flex items-center bg-primary px-4 py-2 text-sm font-semibold text-white">
355
+ 1
356
+ </span>
357
+
358
+
359
+
360
+
361
+ <span class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-300 ring-1 ring-inset ring-gray-300">
362
+ <i class="fa-solid fa-chevron-right"></i>
363
+ </span>
364
+
365
+ </nav>
366
+ </div>
367
+ </div>
368
+ </div>
369
+ </main>
370
+
371
+
372
+ </div>
373
+ </div>
374
+ <!-- Instance Details Modal -->
375
+ <div id="instanceModal" class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full z-50 hidden">
376
+ <div class="relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white">
377
+ <div class="mt-3 text-center">
378
+ <h3 class="text-lg font-medium text-gray-900 mb-4">Instance Details</h3>
379
+
380
+ <div class="mt-2 px-7 py-3">
381
+ <div class="flex items-center justify-between mb-4">
382
+ <h4 class="text-sm font-medium text-gray-700">Instance URL</h4>
383
+ <button id="toggleUrlBtn" class="p-2 rounded-lg hover:bg-gray-100 text-primary">
384
+ <i class="fa-solid fa-eye"></i>
385
+ </button>
386
+ </div>
387
+
388
+ <div id="instanceUrlContainer" class="hidden">
389
+ <div class="bg-gray-50 p-3 rounded-lg">
390
+ <p class="text-sm font-mono text-gray-800 break-all">
391
+ https://api.deepseek-r1-8b.instance-20526234.fourlabs.ai
392
+ </p>
393
+ </div>
394
+
395
+ <div class="mt-4 grid grid-cols-2 gap-4">
396
+ <div>
397
+ <p class="text-xs font-medium text-gray-500">Instance ID</p>
398
+ <p class="text-sm text-gray-900" id="modalInstanceId"></p>
399
+ </div>
400
+ <div>
401
+ <p class="text-xs font-medium text-gray-500">Status</p>
402
+ <p class="text-sm text-green-600">Running</p>
403
+ </div>
404
+ <div>
405
+ <p class="text-xs font-medium text-gray-500">LLM Model</p>
406
+ <p class="text-sm text-gray-900">deepseek-r1:8b</p>
407
+ </div>
408
+ <div>
409
+ <p class="text-xs font-medium text-gray-500">Region</p>
410
+ <p class="text-sm text-gray-900">southamerica-east1</p>
411
+ </div>
412
+ </div>
413
+ </div>
414
+
415
+ <div class="items-center px-4 py-3">
416
+ <button id="closeModalBtn" class="px-4 py-2 bg-primary text-white text-base font-medium rounded-md w-full shadow-sm hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-primary">
417
+ Close
418
+ </button>
419
+ </div>
420
+ </div>
421
+ </div>
422
+ </div>
423
+
424
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
425
+ <script>
426
+ // Initialize Vanta.js background
427
+ VANTA.NET({
428
+ el: "#vanta-bg",
429
+ mouseControls: true,
430
+ touchControls: true,
431
+ gyroControls: false,
432
+ minHeight: 200.00,
433
+ minWidth: 200.00,
434
+ scale: 1.00,
435
+ scaleMobile: 1.00,
436
+ color: 0x3b82f6,
437
+ backgroundColor: 0xf8fafc,
438
+ points: 12.00,
439
+ maxDistance: 22.00,
440
+ spacing: 18.00
441
+ });
442
+ // Initialize feather icons
443
+ feather.replace();
444
+
445
+ // Pagination functionality
446
+ document.querySelectorAll('.pagination a').forEach(link => {
447
+ link.addEventListener('click', function(e) {
448
+ e.preventDefault();
449
+ // Here you would typically fetch the next page of results
450
+ // For demo purposes we'll just show an alert
451
+ if(this.textContent.trim() === '2' || this.textContent.trim() === '3') {
452
+ alert('Loading page ' + this.textContent.trim());
453
+ }
454
+ });
455
+ });
456
+
457
+ // Instance Modal Functions
458
+ function openInstanceModal(instanceId) {
459
+ document.getElementById('modalInstanceId').textContent = instanceId;
460
+ document.getElementById('instanceModal').classList.remove('hidden');
461
+ }
462
+
463
+ function closeInstanceModal() {
464
+ document.getElementById('instanceModal').classList.add('hidden');
465
+ document.getElementById('instanceUrlContainer').classList.add('hidden');
466
+ }
467
+
468
+ // Event Listeners
469
+ document.getElementById('closeModalBtn').addEventListener('click', closeInstanceModal);
470
+
471
+ document.getElementById('toggleUrlBtn').addEventListener('click', function() {
472
+ const urlContainer = document.getElementById('instanceUrlContainer');
473
+ urlContainer.classList.toggle('hidden');
474
+ });
475
+
476
+ // Close modal when clicking outside
477
+ document.getElementById('instanceModal').addEventListener('click', function(e) {
478
+ if (e.target === this) {
479
+ closeInstanceModal();
480
+ }
481
+ });
482
+ </script>
483
+ </body>
484
+ </html>