Commit a492834
* feat: Bulk Import Tools modal wiring and backend implementation
- Add modal UI in admin.html with bulk import button and dialog
- Implement modal open/close/ESC functionality in admin.js
- Add POST /admin/tools/import endpoint with rate limiting
- Support both JSON textarea and file upload inputs
- Validate JSON structure and enforce 200 tool limit
- Return detailed success/failure information per tool
- Include loading states and comprehensive error handling
Refs IBM#737
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* fix: Remove duplicate admin_import_tools function and fix HTML formatting
- Remove duplicate admin_import_tools function definition
- Fix HTML placeholder attribute to use double quotes
- Add missing closing div tag
- Fix flake8 blank line issues
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* feat: Complete bulk import backend with file upload support and enhanced docs
- Add file upload support to admin_import_tools endpoint
- Fix response format to match frontend expectations
- Add UI usage documentation with modal instructions
- Update API docs to show all three input methods
- Enhance bulk import guide with UI and API examples
Backend improvements:
- Support tools_file form field for JSON file uploads
- Proper file content parsing with error handling
- Response includes imported/failed counts and details
- Frontend-compatible response format for UI display
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* Bulk import
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* fix: Remove conflicting inline script and fix bulk import functionality
- Remove conflicting inline JavaScript that was preventing form submission
- Fix indentation in setupBulkImportModal function
- Ensure bulk import modal uses proper admin.js implementation
- Restore proper form submission handling for bulk import
This fixes the issue where bulk import appeared to do nothing.
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* fix: Integrate bulk import setup with main initialization
- Add setupBulkImportModal() to main initialization sequence
- Remove duplicate DOMContentLoaded listener
- Ensure bulk import doesn't interfere with other tab functionality
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* fix: JavaScript formatting issues in bulk import modal
- Fix multiline querySelector formatting
- Fix multiline Error constructor formatting
- Ensure prettier compliance for web linting
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* debug: Temporarily disable bulk import setup to test tabs
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* fix: Remove duplicate setupFormValidation call and delay bulk import setup
- Remove duplicate setupFormValidation() call that could cause conflicts
- Use setTimeout to delay bulk import modal setup after other initialization
- Add better null safety to form element queries
- This should fix tab switching issues
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* fix: Restore proper initialization sequence for tab functionality
- Remove setTimeout delay for bulk import setup
- Keep bulk import setup in main initialization but with error handling
- Ensure tab navigation isn't affected by bulk import modal setup
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* fix: Correct HTML structure and restore tab navigation
- Move bulk import modal to correct location after tools panel
- Remove extra closing div that was breaking HTML structure
- Ensure proper page-level modal placement
- Restore tab navigation functionality for all tabs
This fixes the broken Global Resources, Prompts, Gateways, Roots, and Metrics tabs.
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* feat: Add configurable bulk import settings
Configuration additions:
- MCPGATEWAY_BULK_IMPORT_MAX_TOOLS (default: 200)
- MCPGATEWAY_BULK_IMPORT_RATE_LIMIT (default: 10)
Implementation:
- config.py: Add new settings with defaults
- admin.py: Use configurable rate limit and batch size
- .env.example: Document all bulk import environment variables
- admin.html: Use dynamic max tools value in UI text
- CLAUDE.md: Document configuration options for developers
- docs: Update bulk import guide with configuration details
This makes bulk import fully configurable for different deployment scenarios.
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* Update docs
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
---------
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
1 parent fa8e3ea commit a492834
File tree
7 files changed
+426
-32
lines changed- docs/docs/manage
- mcpgateway
- static
- templates
7 files changed
+426
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | | - | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | | - | |
| 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 | + | |
20 | 56 | | |
21 | 57 | | |
22 | 58 | | |
23 | 59 | | |
24 | 60 | | |
25 | | - | |
| 61 | + | |
26 | 62 | | |
| 63 | + | |
27 | 64 | | |
28 | 65 | | |
29 | 66 | | |
30 | 67 | | |
31 | 68 | | |
32 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
33 | 88 | | |
34 | 89 | | |
35 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1568 | 1568 | | |
1569 | 1569 | | |
1570 | 1570 | | |
| 1571 | + | |
1571 | 1572 | | |
1572 | 1573 | | |
1573 | 1574 | | |
| |||
4375 | 4376 | | |
4376 | 4377 | | |
4377 | 4378 | | |
4378 | | - | |
| 4379 | + | |
4379 | 4380 | | |
4380 | 4381 | | |
4381 | 4382 | | |
| |||
4418 | 4419 | | |
4419 | 4420 | | |
4420 | 4421 | | |
4421 | | - | |
4422 | | - | |
4423 | | - | |
4424 | | - | |
4425 | | - | |
4426 | | - | |
4427 | | - | |
4428 | | - | |
| 4422 | + | |
| 4423 | + | |
| 4424 | + | |
| 4425 | + | |
| 4426 | + | |
| 4427 | + | |
| 4428 | + | |
| 4429 | + | |
| 4430 | + | |
| 4431 | + | |
| 4432 | + | |
| 4433 | + | |
| 4434 | + | |
| 4435 | + | |
| 4436 | + | |
| 4437 | + | |
| 4438 | + | |
| 4439 | + | |
| 4440 | + | |
| 4441 | + | |
| 4442 | + | |
| 4443 | + | |
4429 | 4444 | | |
4430 | 4445 | | |
4431 | 4446 | | |
4432 | 4447 | | |
4433 | | - | |
| 4448 | + | |
4434 | 4449 | | |
4435 | 4450 | | |
4436 | 4451 | | |
| |||
4463 | 4478 | | |
4464 | 4479 | | |
4465 | 4480 | | |
4466 | | - | |
4467 | | - | |
4468 | | - | |
4469 | | - | |
4470 | | - | |
4471 | | - | |
4472 | | - | |
| 4481 | + | |
| 4482 | + | |
| 4483 | + | |
| 4484 | + | |
| 4485 | + | |
| 4486 | + | |
| 4487 | + | |
| 4488 | + | |
| 4489 | + | |
| 4490 | + | |
| 4491 | + | |
| 4492 | + | |
| 4493 | + | |
| 4494 | + | |
| 4495 | + | |
| 4496 | + | |
4473 | 4497 | | |
4474 | | - | |
| 4498 | + | |
| 4499 | + | |
| 4500 | + | |
| 4501 | + | |
| 4502 | + | |
| 4503 | + | |
| 4504 | + | |
| 4505 | + | |
| 4506 | + | |
| 4507 | + | |
4475 | 4508 | | |
4476 | 4509 | | |
4477 | 4510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| |||
0 commit comments