Spaces:
Running
Running
Update index.html
Browse files- index.html +160 -198
index.html
CHANGED
|
@@ -2,10 +2,7 @@
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0
|
| 6 |
-
<meta name="description" content="Advanced Agent System for Task Processing and Database Integration">
|
| 7 |
-
<meta name="keywords" content="agent system, task processing, database, automation">
|
| 8 |
-
<meta name="author" content="Jamille Feedam">
|
| 9 |
<title>Advanced Agent System - Task Processing & Database Integration</title>
|
| 10 |
<style>
|
| 11 |
* {
|
|
@@ -19,37 +16,30 @@
|
|
| 19 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 20 |
min-height: 100vh;
|
| 21 |
color: #333;
|
| 22 |
-
line-height: 1.6;
|
| 23 |
}
|
| 24 |
|
| 25 |
.container {
|
| 26 |
max-width: 1400px;
|
| 27 |
margin: 0 auto;
|
| 28 |
-
padding:
|
| 29 |
}
|
| 30 |
|
| 31 |
.header {
|
| 32 |
text-align: center;
|
| 33 |
-
margin-bottom:
|
| 34 |
color: white;
|
| 35 |
-
padding: 20px;
|
| 36 |
}
|
| 37 |
|
| 38 |
.header h1 {
|
| 39 |
-
font-size:
|
| 40 |
margin-bottom: 10px;
|
| 41 |
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
|
| 42 |
}
|
| 43 |
|
| 44 |
-
.header p {
|
| 45 |
-
font-size: clamp(0.9rem, 2vw, 1.1rem);
|
| 46 |
-
opacity: 0.9;
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
.system-status {
|
| 50 |
background: rgba(255,255,255,0.95);
|
| 51 |
border-radius: 15px;
|
| 52 |
-
padding:
|
| 53 |
margin-bottom: 20px;
|
| 54 |
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
|
| 55 |
backdrop-filter: blur(10px);
|
|
@@ -57,45 +47,40 @@
|
|
| 57 |
|
| 58 |
.status-grid {
|
| 59 |
display: grid;
|
| 60 |
-
grid-template-columns: repeat(auto-fit, minmax(
|
| 61 |
-
gap:
|
| 62 |
-
margin-bottom:
|
| 63 |
}
|
| 64 |
|
| 65 |
.status-card {
|
| 66 |
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
|
| 67 |
color: white;
|
| 68 |
-
padding:
|
| 69 |
border-radius: 10px;
|
| 70 |
text-align: center;
|
| 71 |
-
transition: transform 0.2s;
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
.status-card:hover {
|
| 75 |
-
transform: translateY(-2px);
|
| 76 |
}
|
| 77 |
|
| 78 |
.status-card h3 {
|
| 79 |
-
font-size:
|
| 80 |
margin-bottom: 5px;
|
| 81 |
}
|
| 82 |
|
| 83 |
.status-card .value {
|
| 84 |
-
font-size:
|
| 85 |
font-weight: bold;
|
| 86 |
}
|
| 87 |
|
| 88 |
.main-grid {
|
| 89 |
display: grid;
|
| 90 |
-
grid-template-columns:
|
| 91 |
-
gap:
|
| 92 |
margin-bottom: 20px;
|
| 93 |
}
|
| 94 |
|
| 95 |
.panel {
|
| 96 |
background: rgba(255,255,255,0.95);
|
| 97 |
border-radius: 15px;
|
| 98 |
-
padding:
|
| 99 |
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
|
| 100 |
backdrop-filter: blur(10px);
|
| 101 |
}
|
|
@@ -103,14 +88,14 @@
|
|
| 103 |
.panel h2 {
|
| 104 |
color: #4a5568;
|
| 105 |
margin-bottom: 15px;
|
| 106 |
-
font-size:
|
| 107 |
border-bottom: 2px solid #e2e8f0;
|
| 108 |
padding-bottom: 8px;
|
| 109 |
}
|
| 110 |
|
| 111 |
.task-form {
|
| 112 |
display: grid;
|
| 113 |
-
gap:
|
| 114 |
}
|
| 115 |
|
| 116 |
.form-group {
|
|
@@ -122,7 +107,6 @@
|
|
| 122 |
font-weight: 600;
|
| 123 |
margin-bottom: 5px;
|
| 124 |
color: #4a5568;
|
| 125 |
-
font-size: 0.9rem;
|
| 126 |
}
|
| 127 |
|
| 128 |
.form-group input,
|
|
@@ -133,7 +117,6 @@
|
|
| 133 |
border-radius: 8px;
|
| 134 |
font-size: 14px;
|
| 135 |
transition: border-color 0.3s;
|
| 136 |
-
min-height: 44px; /* Touch-friendly */
|
| 137 |
}
|
| 138 |
|
| 139 |
.form-group input:focus,
|
|
@@ -141,11 +124,10 @@
|
|
| 141 |
.form-group textarea:focus {
|
| 142 |
outline: none;
|
| 143 |
border-color: #4299e1;
|
| 144 |
-
box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
|
| 145 |
}
|
| 146 |
|
| 147 |
.btn {
|
| 148 |
-
padding: 12px
|
| 149 |
border: none;
|
| 150 |
border-radius: 8px;
|
| 151 |
font-size: 14px;
|
|
@@ -154,10 +136,6 @@
|
|
| 154 |
transition: all 0.3s;
|
| 155 |
text-transform: uppercase;
|
| 156 |
letter-spacing: 0.5px;
|
| 157 |
-
min-height: 44px; /* Touch-friendly */
|
| 158 |
-
display: inline-flex;
|
| 159 |
-
align-items: center;
|
| 160 |
-
justify-content: center;
|
| 161 |
}
|
| 162 |
|
| 163 |
.btn-primary {
|
|
@@ -176,57 +154,47 @@
|
|
| 176 |
}
|
| 177 |
|
| 178 |
.btn:hover {
|
| 179 |
-
transform: translateY(-
|
| 180 |
-
box-shadow: 0
|
| 181 |
-
}
|
| 182 |
-
|
| 183 |
-
.btn:active {
|
| 184 |
-
transform: translateY(0);
|
| 185 |
}
|
| 186 |
|
| 187 |
.task-list {
|
| 188 |
max-height: 400px;
|
| 189 |
overflow-y: auto;
|
| 190 |
-
scrollbar-width: thin;
|
| 191 |
}
|
| 192 |
|
| 193 |
.task-item {
|
| 194 |
background: #f7fafc;
|
| 195 |
border: 1px solid #e2e8f0;
|
| 196 |
border-radius: 8px;
|
| 197 |
-
padding:
|
| 198 |
margin-bottom: 10px;
|
| 199 |
transition: all 0.3s;
|
| 200 |
}
|
| 201 |
|
| 202 |
.task-item:hover {
|
| 203 |
background: #edf2f7;
|
| 204 |
-
transform: translateX(
|
| 205 |
}
|
| 206 |
|
| 207 |
.task-header {
|
| 208 |
display: flex;
|
| 209 |
-
justify-content: space-between;
|
| 210 |
align-items: center;
|
| 211 |
margin-bottom: 8px;
|
| 212 |
-
flex-wrap: wrap;
|
| 213 |
-
gap: 5px;
|
| 214 |
}
|
| 215 |
|
| 216 |
.task-id {
|
| 217 |
font-weight: 600;
|
| 218 |
color: #2d3748;
|
| 219 |
-
font-size: 0.9rem;
|
| 220 |
-
word-break: break-all;
|
| 221 |
}
|
| 222 |
|
| 223 |
.task-status {
|
| 224 |
padding: 4px 8px;
|
| 225 |
border-radius: 4px;
|
| 226 |
-
font-size:
|
| 227 |
font-weight: 600;
|
| 228 |
text-transform: uppercase;
|
| 229 |
-
white-space: nowrap;
|
| 230 |
}
|
| 231 |
|
| 232 |
.status-queued { background: #fef5e7; color: #c05621; }
|
|
@@ -236,36 +204,34 @@
|
|
| 236 |
|
| 237 |
.agents-grid {
|
| 238 |
display: grid;
|
| 239 |
-
grid-template-columns: repeat(auto-fill, minmax(
|
| 240 |
-
gap:
|
| 241 |
-
margin-bottom: 15px;
|
| 242 |
}
|
| 243 |
|
| 244 |
.agent-card {
|
| 245 |
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
|
| 246 |
border-radius: 10px;
|
| 247 |
-
padding:
|
| 248 |
text-align: center;
|
| 249 |
transition: transform 0.3s;
|
| 250 |
}
|
| 251 |
|
| 252 |
.agent-card:hover {
|
| 253 |
-
transform: scale(1.
|
| 254 |
}
|
| 255 |
|
| 256 |
.agent-name {
|
| 257 |
font-weight: 600;
|
| 258 |
margin-bottom: 5px;
|
| 259 |
color: #2d3748;
|
| 260 |
-
font-size: 0.9rem;
|
| 261 |
}
|
| 262 |
|
| 263 |
.agent-status {
|
| 264 |
-
font-size:
|
| 265 |
-
padding:
|
| 266 |
border-radius: 4px;
|
| 267 |
display: inline-block;
|
| 268 |
-
margin-bottom:
|
| 269 |
}
|
| 270 |
|
| 271 |
.status-active { background: #c6f6d5; color: #22543d; }
|
|
@@ -275,23 +241,22 @@
|
|
| 275 |
background: #1a202c;
|
| 276 |
color: #e2e8f0;
|
| 277 |
border-radius: 8px;
|
| 278 |
-
padding:
|
| 279 |
-
max-height:
|
| 280 |
overflow-y: auto;
|
| 281 |
font-family: 'Courier New', monospace;
|
| 282 |
-
font-size:
|
| 283 |
line-height: 1.4;
|
| 284 |
}
|
| 285 |
|
| 286 |
.log-entry {
|
| 287 |
-
margin-bottom:
|
| 288 |
padding: 2px 0;
|
| 289 |
-
word-wrap: break-word;
|
| 290 |
}
|
| 291 |
|
| 292 |
.log-timestamp {
|
| 293 |
color: #718096;
|
| 294 |
-
margin-right:
|
| 295 |
}
|
| 296 |
|
| 297 |
.log-level-info { color: #63b3ed; }
|
|
@@ -301,12 +266,12 @@
|
|
| 301 |
|
| 302 |
.database-panel {
|
| 303 |
grid-column: 1 / -1;
|
| 304 |
-
margin-top:
|
| 305 |
}
|
| 306 |
|
| 307 |
.db-actions {
|
| 308 |
display: flex;
|
| 309 |
-
gap:
|
| 310 |
margin-bottom: 15px;
|
| 311 |
flex-wrap: wrap;
|
| 312 |
}
|
|
@@ -340,32 +305,19 @@
|
|
| 340 |
width: 100%;
|
| 341 |
border-collapse: collapse;
|
| 342 |
margin-top: 15px;
|
| 343 |
-
font-size: 12px;
|
| 344 |
-
overflow-x: auto;
|
| 345 |
-
display: block;
|
| 346 |
-
white-space: nowrap;
|
| 347 |
-
}
|
| 348 |
-
|
| 349 |
-
.data-table thead,
|
| 350 |
-
.data-table tbody {
|
| 351 |
-
display: table;
|
| 352 |
-
width: 100%;
|
| 353 |
}
|
| 354 |
|
| 355 |
.data-table th,
|
| 356 |
.data-table td {
|
| 357 |
border: 1px solid #e2e8f0;
|
| 358 |
-
padding:
|
| 359 |
text-align: left;
|
| 360 |
-
word-break: break-word;
|
| 361 |
}
|
| 362 |
|
| 363 |
.data-table th {
|
| 364 |
background: #f7fafc;
|
| 365 |
font-weight: 600;
|
| 366 |
color: #4a5568;
|
| 367 |
-
position: sticky;
|
| 368 |
-
top: 0;
|
| 369 |
}
|
| 370 |
|
| 371 |
.modal {
|
|
@@ -377,7 +329,6 @@
|
|
| 377 |
height: 100%;
|
| 378 |
background: rgba(0,0,0,0.5);
|
| 379 |
z-index: 1000;
|
| 380 |
-
padding: 20px;
|
| 381 |
}
|
| 382 |
|
| 383 |
.modal-content {
|
|
@@ -387,9 +338,9 @@
|
|
| 387 |
transform: translate(-50%, -50%);
|
| 388 |
background: white;
|
| 389 |
border-radius: 15px;
|
| 390 |
-
padding:
|
| 391 |
-
max-width:
|
| 392 |
-
width:
|
| 393 |
max-height: 80vh;
|
| 394 |
overflow-y: auto;
|
| 395 |
}
|
|
@@ -398,7 +349,7 @@
|
|
| 398 |
display: flex;
|
| 399 |
justify-content: space-between;
|
| 400 |
align-items: center;
|
| 401 |
-
margin-bottom:
|
| 402 |
border-bottom: 2px solid #e2e8f0;
|
| 403 |
padding-bottom: 10px;
|
| 404 |
}
|
|
@@ -409,112 +360,29 @@
|
|
| 409 |
font-size: 24px;
|
| 410 |
cursor: pointer;
|
| 411 |
color: #a0aec0;
|
| 412 |
-
min-width: 44px;
|
| 413 |
-
min-height: 44px;
|
| 414 |
}
|
| 415 |
|
| 416 |
.close-btn:hover {
|
| 417 |
color: #4a5568;
|
| 418 |
}
|
| 419 |
|
| 420 |
-
.loading-spinner {
|
| 421 |
-
display: none;
|
| 422 |
-
width: 20px;
|
| 423 |
-
height: 20px;
|
| 424 |
-
border: 2px solid #f3f3f3;
|
| 425 |
-
border-top: 2px solid #3498db;
|
| 426 |
-
border-radius: 50%;
|
| 427 |
-
animation: spin 1s linear infinite;
|
| 428 |
-
margin: 0 auto;
|
| 429 |
-
}
|
| 430 |
-
|
| 431 |
-
@keyframes spin {
|
| 432 |
-
0% { transform: rotate(0deg); }
|
| 433 |
-
100% { transform: rotate(360deg); }
|
| 434 |
-
}
|
| 435 |
-
|
| 436 |
-
.notification {
|
| 437 |
-
position: fixed;
|
| 438 |
-
top: 20px;
|
| 439 |
-
right: 20px;
|
| 440 |
-
padding: 12px 20px;
|
| 441 |
-
border-radius: 8px;
|
| 442 |
-
color: white;
|
| 443 |
-
font-weight: 600;
|
| 444 |
-
z-index: 1001;
|
| 445 |
-
transform: translateX(100%);
|
| 446 |
-
transition: transform 0.3s;
|
| 447 |
-
}
|
| 448 |
-
|
| 449 |
-
.notification.show {
|
| 450 |
-
transform: translateX(0);
|
| 451 |
-
}
|
| 452 |
-
|
| 453 |
-
.notification.success { background: #48bb78; }
|
| 454 |
-
.notification.error { background: #f56565; }
|
| 455 |
-
.notification.warning { background: #ed8936; }
|
| 456 |
-
.notification.info { background: #4299e1; }
|
| 457 |
-
|
| 458 |
-
/* Mobile optimizations */
|
| 459 |
@media (max-width: 768px) {
|
| 460 |
-
.container {
|
| 461 |
-
padding: 5px;
|
| 462 |
-
}
|
| 463 |
-
|
| 464 |
.main-grid {
|
| 465 |
grid-template-columns: 1fr;
|
| 466 |
-
gap: 10px;
|
| 467 |
}
|
| 468 |
|
| 469 |
.status-grid {
|
| 470 |
grid-template-columns: repeat(2, 1fr);
|
| 471 |
}
|
| 472 |
|
| 473 |
-
.header {
|
| 474 |
-
|
| 475 |
-
}
|
| 476 |
-
|
| 477 |
-
.panel {
|
| 478 |
-
padding: 12px;
|
| 479 |
-
}
|
| 480 |
-
|
| 481 |
-
.db-actions {
|
| 482 |
-
flex-direction: column;
|
| 483 |
-
}
|
| 484 |
-
|
| 485 |
-
.db-actions .btn {
|
| 486 |
-
width: 100%;
|
| 487 |
-
margin-bottom: 5px;
|
| 488 |
-
}
|
| 489 |
-
|
| 490 |
-
.task-header {
|
| 491 |
-
flex-direction: column;
|
| 492 |
-
align-items: flex-start;
|
| 493 |
-
}
|
| 494 |
-
|
| 495 |
-
.agents-grid {
|
| 496 |
-
grid-template-columns: 1fr;
|
| 497 |
-
}
|
| 498 |
-
|
| 499 |
-
.data-table {
|
| 500 |
-
font-size: 10px;
|
| 501 |
-
}
|
| 502 |
-
}
|
| 503 |
-
|
| 504 |
-
@media (max-width: 480px) {
|
| 505 |
-
.status-grid {
|
| 506 |
-
grid-template-columns: 1fr;
|
| 507 |
-
}
|
| 508 |
-
|
| 509 |
-
.form-group input,
|
| 510 |
-
.form-group select,
|
| 511 |
-
.form-group textarea {
|
| 512 |
-
font-size: 16px; /* Prevent zoom on iOS */
|
| 513 |
}
|
| 514 |
}
|
| 515 |
</style>
|
| 516 |
</head>
|
| 517 |
<body>
|
|
|
|
| 518 |
<div class="container">
|
| 519 |
<div class="header">
|
| 520 |
<h1>🤖 Advanced Agent System</h1>
|
|
@@ -586,10 +454,7 @@
|
|
| 586 |
</select>
|
| 587 |
</div>
|
| 588 |
|
| 589 |
-
<button type="submit" class="btn btn-primary">
|
| 590 |
-
<span>Create Task</span>
|
| 591 |
-
<div class="loading-spinner" id="create-spinner"></div>
|
| 592 |
-
</button>
|
| 593 |
</form>
|
| 594 |
</div>
|
| 595 |
|
|
@@ -628,22 +493,20 @@
|
|
| 628 |
</div>
|
| 629 |
|
| 630 |
<div id="db-content">
|
| 631 |
-
<
|
| 632 |
-
<
|
| 633 |
-
<
|
| 634 |
-
<
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
|
| 639 |
-
|
| 640 |
-
|
| 641 |
-
|
| 642 |
-
|
| 643 |
-
|
| 644 |
-
|
| 645 |
-
</table>
|
| 646 |
-
</div>
|
| 647 |
</div>
|
| 648 |
</div>
|
| 649 |
|
|
@@ -670,4 +533,103 @@
|
|
| 670 |
</div>
|
| 671 |
<button class="btn btn-primary" onclick="executeQuery()">Execute Query</button>
|
| 672 |
<div id="query-results"></div>
|
| 673 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
|
|
|
|
| 6 |
<title>Advanced Agent System - Task Processing & Database Integration</title>
|
| 7 |
<style>
|
| 8 |
* {
|
|
|
|
| 16 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 17 |
min-height: 100vh;
|
| 18 |
color: #333;
|
|
|
|
| 19 |
}
|
| 20 |
|
| 21 |
.container {
|
| 22 |
max-width: 1400px;
|
| 23 |
margin: 0 auto;
|
| 24 |
+
padding: 20px;
|
| 25 |
}
|
| 26 |
|
| 27 |
.header {
|
| 28 |
text-align: center;
|
| 29 |
+
margin-bottom: 30px;
|
| 30 |
color: white;
|
|
|
|
| 31 |
}
|
| 32 |
|
| 33 |
.header h1 {
|
| 34 |
+
font-size: 2.5rem;
|
| 35 |
margin-bottom: 10px;
|
| 36 |
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
|
| 37 |
}
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
.system-status {
|
| 40 |
background: rgba(255,255,255,0.95);
|
| 41 |
border-radius: 15px;
|
| 42 |
+
padding: 20px;
|
| 43 |
margin-bottom: 20px;
|
| 44 |
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
|
| 45 |
backdrop-filter: blur(10px);
|
|
|
|
| 47 |
|
| 48 |
.status-grid {
|
| 49 |
display: grid;
|
| 50 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 51 |
+
gap: 15px;
|
| 52 |
+
margin-bottom: 20px;
|
| 53 |
}
|
| 54 |
|
| 55 |
.status-card {
|
| 56 |
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
|
| 57 |
color: white;
|
| 58 |
+
padding: 15px;
|
| 59 |
border-radius: 10px;
|
| 60 |
text-align: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
}
|
| 62 |
|
| 63 |
.status-card h3 {
|
| 64 |
+
font-size: 1.1rem;
|
| 65 |
margin-bottom: 5px;
|
| 66 |
}
|
| 67 |
|
| 68 |
.status-card .value {
|
| 69 |
+
font-size: 1.5rem;
|
| 70 |
font-weight: bold;
|
| 71 |
}
|
| 72 |
|
| 73 |
.main-grid {
|
| 74 |
display: grid;
|
| 75 |
+
grid-template-columns: 1fr 1fr;
|
| 76 |
+
gap: 20px;
|
| 77 |
margin-bottom: 20px;
|
| 78 |
}
|
| 79 |
|
| 80 |
.panel {
|
| 81 |
background: rgba(255,255,255,0.95);
|
| 82 |
border-radius: 15px;
|
| 83 |
+
padding: 20px;
|
| 84 |
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
|
| 85 |
backdrop-filter: blur(10px);
|
| 86 |
}
|
|
|
|
| 88 |
.panel h2 {
|
| 89 |
color: #4a5568;
|
| 90 |
margin-bottom: 15px;
|
| 91 |
+
font-size: 1.3rem;
|
| 92 |
border-bottom: 2px solid #e2e8f0;
|
| 93 |
padding-bottom: 8px;
|
| 94 |
}
|
| 95 |
|
| 96 |
.task-form {
|
| 97 |
display: grid;
|
| 98 |
+
gap: 15px;
|
| 99 |
}
|
| 100 |
|
| 101 |
.form-group {
|
|
|
|
| 107 |
font-weight: 600;
|
| 108 |
margin-bottom: 5px;
|
| 109 |
color: #4a5568;
|
|
|
|
| 110 |
}
|
| 111 |
|
| 112 |
.form-group input,
|
|
|
|
| 117 |
border-radius: 8px;
|
| 118 |
font-size: 14px;
|
| 119 |
transition: border-color 0.3s;
|
|
|
|
| 120 |
}
|
| 121 |
|
| 122 |
.form-group input:focus,
|
|
|
|
| 124 |
.form-group textarea:focus {
|
| 125 |
outline: none;
|
| 126 |
border-color: #4299e1;
|
|
|
|
| 127 |
}
|
| 128 |
|
| 129 |
.btn {
|
| 130 |
+
padding: 12px 24px;
|
| 131 |
border: none;
|
| 132 |
border-radius: 8px;
|
| 133 |
font-size: 14px;
|
|
|
|
| 136 |
transition: all 0.3s;
|
| 137 |
text-transform: uppercase;
|
| 138 |
letter-spacing: 0.5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
}
|
| 140 |
|
| 141 |
.btn-primary {
|
|
|
|
| 154 |
}
|
| 155 |
|
| 156 |
.btn:hover {
|
| 157 |
+
transform: translateY(-2px);
|
| 158 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
}
|
| 160 |
|
| 161 |
.task-list {
|
| 162 |
max-height: 400px;
|
| 163 |
overflow-y: auto;
|
|
|
|
| 164 |
}
|
| 165 |
|
| 166 |
.task-item {
|
| 167 |
background: #f7fafc;
|
| 168 |
border: 1px solid #e2e8f0;
|
| 169 |
border-radius: 8px;
|
| 170 |
+
padding: 15px;
|
| 171 |
margin-bottom: 10px;
|
| 172 |
transition: all 0.3s;
|
| 173 |
}
|
| 174 |
|
| 175 |
.task-item:hover {
|
| 176 |
background: #edf2f7;
|
| 177 |
+
transform: translateX(5px);
|
| 178 |
}
|
| 179 |
|
| 180 |
.task-header {
|
| 181 |
display: flex;
|
| 182 |
+
justify-content: space-between; /* Fixed this */
|
| 183 |
align-items: center;
|
| 184 |
margin-bottom: 8px;
|
|
|
|
|
|
|
| 185 |
}
|
| 186 |
|
| 187 |
.task-id {
|
| 188 |
font-weight: 600;
|
| 189 |
color: #2d3748;
|
|
|
|
|
|
|
| 190 |
}
|
| 191 |
|
| 192 |
.task-status {
|
| 193 |
padding: 4px 8px;
|
| 194 |
border-radius: 4px;
|
| 195 |
+
font-size: 12px;
|
| 196 |
font-weight: 600;
|
| 197 |
text-transform: uppercase;
|
|
|
|
| 198 |
}
|
| 199 |
|
| 200 |
.status-queued { background: #fef5e7; color: #c05621; }
|
|
|
|
| 204 |
|
| 205 |
.agents-grid {
|
| 206 |
display: grid;
|
| 207 |
+
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
| 208 |
+
gap: 15px;
|
|
|
|
| 209 |
}
|
| 210 |
|
| 211 |
.agent-card {
|
| 212 |
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
|
| 213 |
border-radius: 10px;
|
| 214 |
+
padding: 15px;
|
| 215 |
text-align: center;
|
| 216 |
transition: transform 0.3s;
|
| 217 |
}
|
| 218 |
|
| 219 |
.agent-card:hover {
|
| 220 |
+
transform: scale(1.05);
|
| 221 |
}
|
| 222 |
|
| 223 |
.agent-name {
|
| 224 |
font-weight: 600;
|
| 225 |
margin-bottom: 5px;
|
| 226 |
color: #2d3748;
|
|
|
|
| 227 |
}
|
| 228 |
|
| 229 |
.agent-status {
|
| 230 |
+
font-size: 12px;
|
| 231 |
+
padding: 4px 8px;
|
| 232 |
border-radius: 4px;
|
| 233 |
display: inline-block;
|
| 234 |
+
margin-bottom: 10px;
|
| 235 |
}
|
| 236 |
|
| 237 |
.status-active { background: #c6f6d5; color: #22543d; }
|
|
|
|
| 241 |
background: #1a202c;
|
| 242 |
color: #e2e8f0;
|
| 243 |
border-radius: 8px;
|
| 244 |
+
padding: 15px;
|
| 245 |
+
max-height: 300px;
|
| 246 |
overflow-y: auto;
|
| 247 |
font-family: 'Courier New', monospace;
|
| 248 |
+
font-size: 12px;
|
| 249 |
line-height: 1.4;
|
| 250 |
}
|
| 251 |
|
| 252 |
.log-entry {
|
| 253 |
+
margin-bottom: 5px;
|
| 254 |
padding: 2px 0;
|
|
|
|
| 255 |
}
|
| 256 |
|
| 257 |
.log-timestamp {
|
| 258 |
color: #718096;
|
| 259 |
+
margin-right: 10px;
|
| 260 |
}
|
| 261 |
|
| 262 |
.log-level-info { color: #63b3ed; }
|
|
|
|
| 266 |
|
| 267 |
.database-panel {
|
| 268 |
grid-column: 1 / -1;
|
| 269 |
+
margin-top: 20px;
|
| 270 |
}
|
| 271 |
|
| 272 |
.db-actions {
|
| 273 |
display: flex;
|
| 274 |
+
gap: 10px;
|
| 275 |
margin-bottom: 15px;
|
| 276 |
flex-wrap: wrap;
|
| 277 |
}
|
|
|
|
| 305 |
width: 100%;
|
| 306 |
border-collapse: collapse;
|
| 307 |
margin-top: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 308 |
}
|
| 309 |
|
| 310 |
.data-table th,
|
| 311 |
.data-table td {
|
| 312 |
border: 1px solid #e2e8f0;
|
| 313 |
+
padding: 8px 12px;
|
| 314 |
text-align: left;
|
|
|
|
| 315 |
}
|
| 316 |
|
| 317 |
.data-table th {
|
| 318 |
background: #f7fafc;
|
| 319 |
font-weight: 600;
|
| 320 |
color: #4a5568;
|
|
|
|
|
|
|
| 321 |
}
|
| 322 |
|
| 323 |
.modal {
|
|
|
|
| 329 |
height: 100%;
|
| 330 |
background: rgba(0,0,0,0.5);
|
| 331 |
z-index: 1000;
|
|
|
|
| 332 |
}
|
| 333 |
|
| 334 |
.modal-content {
|
|
|
|
| 338 |
transform: translate(-50%, -50%);
|
| 339 |
background: white;
|
| 340 |
border-radius: 15px;
|
| 341 |
+
padding: 30px;
|
| 342 |
+
max-width: 600px;
|
| 343 |
+
width: 90%;
|
| 344 |
max-height: 80vh;
|
| 345 |
overflow-y: auto;
|
| 346 |
}
|
|
|
|
| 349 |
display: flex;
|
| 350 |
justify-content: space-between;
|
| 351 |
align-items: center;
|
| 352 |
+
margin-bottom: 20px;
|
| 353 |
border-bottom: 2px solid #e2e8f0;
|
| 354 |
padding-bottom: 10px;
|
| 355 |
}
|
|
|
|
| 360 |
font-size: 24px;
|
| 361 |
cursor: pointer;
|
| 362 |
color: #a0aec0;
|
|
|
|
|
|
|
| 363 |
}
|
| 364 |
|
| 365 |
.close-btn:hover {
|
| 366 |
color: #4a5568;
|
| 367 |
}
|
| 368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 369 |
@media (max-width: 768px) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 370 |
.main-grid {
|
| 371 |
grid-template-columns: 1fr;
|
|
|
|
| 372 |
}
|
| 373 |
|
| 374 |
.status-grid {
|
| 375 |
grid-template-columns: repeat(2, 1fr);
|
| 376 |
}
|
| 377 |
|
| 378 |
+
.header h1 {
|
| 379 |
+
font-size: 2rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 380 |
}
|
| 381 |
}
|
| 382 |
</style>
|
| 383 |
</head>
|
| 384 |
<body>
|
| 385 |
+
<!-- Your existing HTML body content stays the same -->
|
| 386 |
<div class="container">
|
| 387 |
<div class="header">
|
| 388 |
<h1>🤖 Advanced Agent System</h1>
|
|
|
|
| 454 |
</select>
|
| 455 |
</div>
|
| 456 |
|
| 457 |
+
<button type="submit" class="btn btn-primary">Create Task</button>
|
|
|
|
|
|
|
|
|
|
| 458 |
</form>
|
| 459 |
</div>
|
| 460 |
|
|
|
|
| 493 |
</div>
|
| 494 |
|
| 495 |
<div id="db-content">
|
| 496 |
+
<table class="data-table" id="data-table">
|
| 497 |
+
<thead>
|
| 498 |
+
<tr>
|
| 499 |
+
<th>ID</th>
|
| 500 |
+
<th>Type</th>
|
| 501 |
+
<th>Status</th>
|
| 502 |
+
<th>Created</th>
|
| 503 |
+
<th>Updated</th>
|
| 504 |
+
<th>Actions</th>
|
| 505 |
+
</tr>
|
| 506 |
+
</thead>
|
| 507 |
+
<tbody id="data-table-body">
|
| 508 |
+
</tbody>
|
| 509 |
+
</table>
|
|
|
|
|
|
|
| 510 |
</div>
|
| 511 |
</div>
|
| 512 |
|
|
|
|
| 533 |
</div>
|
| 534 |
<button class="btn btn-primary" onclick="executeQuery()">Execute Query</button>
|
| 535 |
<div id="query-results"></div>
|
| 536 |
+
</div>
|
| 537 |
+
</div>
|
| 538 |
+
|
| 539 |
+
<script>
|
| 540 |
+
// Complete Task Processing Engine Implementation
|
| 541 |
+
class TaskProcessingEngine {
|
| 542 |
+
constructor(agentSystem) {
|
| 543 |
+
this.agentSystem = agentSystem;
|
| 544 |
+
this.processors = new Map();
|
| 545 |
+
this.init();
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
async init() {
|
| 549 |
+
this.processors.set('single', new SingleTaskProcessor());
|
| 550 |
+
this.processors.set('workflow', new WorkflowProcessor());
|
| 551 |
+
this.processors.set('batch', new BatchProcessor());
|
| 552 |
+
this.processors.set('scheduled', new ScheduledProcessor());
|
| 553 |
+
this.processors.set('monitoring', new MonitoringProcessor());
|
| 554 |
+
}
|
| 555 |
+
|
| 556 |
+
async processTask(task) {
|
| 557 |
+
const processor = this.processors.get(task.type) || this.processors.get('single');
|
| 558 |
+
return await processor.execute(task, this.agentSystem);
|
| 559 |
+
}
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
// Base Processor Class
|
| 563 |
+
class BaseProcessor {
|
| 564 |
+
async execute(task, agentSystem) {
|
| 565 |
+
// Simulate processing time
|
| 566 |
+
await new Promise(resolve => setTimeout(resolve, Math.random() * 2000 + 1000));
|
| 567 |
+
|
| 568 |
+
return {
|
| 569 |
+
processed: true,
|
| 570 |
+
result: `Task "${task.description}" completed successfully`,
|
| 571 |
+
timestamp: new Date().toISOString()
|
| 572 |
+
};
|
| 573 |
+
}
|
| 574 |
+
}
|
| 575 |
+
|
| 576 |
+
// Specific Processor Implementations
|
| 577 |
+
class SingleTaskProcessor extends BaseProcessor {
|
| 578 |
+
async execute(task, agentSystem) {
|
| 579 |
+
agentSystem.log(`Processing single task: ${task.id}`, 'info');
|
| 580 |
+
const result = await super.execute(task, agentSystem);
|
| 581 |
+
result.type = 'single_task';
|
| 582 |
+
return result;
|
| 583 |
+
}
|
| 584 |
+
}
|
| 585 |
+
|
| 586 |
+
class WorkflowProcessor extends BaseProcessor {
|
| 587 |
+
async execute(task, agentSystem) {
|
| 588 |
+
agentSystem.log(`Processing workflow: ${task.id}`, 'info');
|
| 589 |
+
|
| 590 |
+
const steps = ['Step 1: Initialize', 'Step 2: Process', 'Step 3: Finalize'];
|
| 591 |
+
const stepResults = [];
|
| 592 |
+
|
| 593 |
+
for (let i = 0; i < steps.length; i++) {
|
| 594 |
+
agentSystem.log(`Executing ${steps[i]}`, 'info');
|
| 595 |
+
await new Promise(resolve => setTimeout(resolve, 800));
|
| 596 |
+
stepResults.push(`${steps[i]} completed`);
|
| 597 |
+
}
|
| 598 |
+
|
| 599 |
+
return {
|
| 600 |
+
processed: true,
|
| 601 |
+
result: 'Workflow completed successfully',
|
| 602 |
+
steps: stepResults,
|
| 603 |
+
timestamp: new Date().toISOString()
|
| 604 |
+
};
|
| 605 |
+
}
|
| 606 |
+
}
|
| 607 |
+
|
| 608 |
+
class BatchProcessor extends BaseProcessor {
|
| 609 |
+
async execute(task, agentSystem) {
|
| 610 |
+
agentSystem.log(`Processing batch task: ${task.id}`, 'info');
|
| 611 |
+
|
| 612 |
+
const batchSize = 5;
|
| 613 |
+
const processed = [];
|
| 614 |
+
|
| 615 |
+
for (let i = 0; i < batchSize; i++) {
|
| 616 |
+
agentSystem.log(`Processing batch item ${i + 1}/${batchSize}`, 'info');
|
| 617 |
+
await new Promise(resolve => setTimeout(resolve, 500));
|
| 618 |
+
processed.push(`Item ${i + 1} processed`);
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
return {
|
| 622 |
+
processed: true,
|
| 623 |
+
result: `Batch processing completed - ${batchSize} items processed`,
|
| 624 |
+
items: processed,
|
| 625 |
+
timestamp: new Date().toISOString()
|
| 626 |
+
};
|
| 627 |
+
}
|
| 628 |
+
}
|
| 629 |
+
|
| 630 |
+
class ScheduledProcessor extends BaseProcessor {
|
| 631 |
+
async execute(task, agentSystem) {
|
| 632 |
+
agentSystem.log(`Processing scheduled task: ${task.id}`, 'info');
|
| 633 |
+
const result = await super.execute(task, agentSystem);
|
| 634 |
+
result.type = 'scheduled_task';
|
| 635 |
+
result.scheduledFor = task.parameters?.scheduledTime || 'immediate
|