Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deployment/knative/KNATIVE_SCALE_TO_ZERO.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,4 @@ If you need to revert to a standard Kubernetes Deployment:
- [Knative Autoscaling](https://knative.dev/docs/serving/autoscaling/)
- [Knative Installation Guide](https://knative.dev/docs/install/)
- [OpenShift Serverless Documentation](https://docs.openshift.com/serverless/)
- [Kubernetes Secrets](https://kubernetes.io/docs/concepts/configuration/secret/)
- [Kubernetes Secrets](https://kubernetes.io/docs/concepts/configuration/secret/)
1 change: 0 additions & 1 deletion deployment/knative/knative-serving.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,3 @@ spec:
metrics.backend-destination: "prometheus"
# Enable profiling
profiling.enable: "false"

12 changes: 6 additions & 6 deletions mcpgateway/services/plugin_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ def get_all_plugins(self) -> List[Dict[str, Any]]:
"description": plugin_config.description if plugin_config and plugin_config.description else "",
"author": plugin_config.author if plugin_config and plugin_config.author else "Unknown",
"version": plugin_config.version if plugin_config and plugin_config.version else "0.0.0",
"mode": plugin_ref.mode.value if plugin_ref.mode else "disabled",
"mode": plugin_ref.mode if isinstance(plugin_ref.mode, str) else plugin_ref.mode.value if plugin_ref.mode else "disabled",
"priority": plugin_ref.priority,
"hooks": [hook.value for hook in plugin_ref.hooks] if plugin_ref.hooks else [],
"hooks": [hook if isinstance(hook, str) else hook.value for hook in plugin_ref.hooks] if plugin_ref.hooks else [],
"tags": plugin_ref.tags or [],
"kind": plugin_config.kind if plugin_config and plugin_config.kind else "",
"namespace": plugin_config.namespace if plugin_config and plugin_config.namespace else "",
Expand Down Expand Up @@ -106,9 +106,9 @@ def get_all_plugins(self) -> List[Dict[str, Any]]:
"description": plugin_config.description or "",
"author": plugin_config.author or "Unknown",
"version": plugin_config.version or "0.0.0",
"mode": plugin_config.mode.value,
"mode": plugin_config.mode if isinstance(plugin_config.mode, str) else plugin_config.mode.value,
"priority": plugin_config.priority or 100,
"hooks": [hook.value for hook in plugin_config.hooks] if plugin_config.hooks else [],
"hooks": [hook if isinstance(hook, str) else hook.value for hook in plugin_config.hooks] if plugin_config.hooks else [],
"tags": plugin_config.tags or [],
"kind": plugin_config.kind or "",
"namespace": plugin_config.namespace or "",
Expand Down Expand Up @@ -151,9 +151,9 @@ def get_plugin_by_name(self, name: str) -> Optional[Dict[str, Any]]:
"description": plugin_config.description if plugin_config and plugin_config.description else "",
"author": plugin_config.author if plugin_config and plugin_config.author else "Unknown",
"version": plugin_config.version if plugin_config and plugin_config.version else "0.0.0",
"mode": plugin_ref.mode.value if plugin_ref.mode else "disabled",
"mode": plugin_ref.mode if isinstance(plugin_ref.mode, str) else plugin_ref.mode.value if plugin_ref.mode else "disabled",
"priority": plugin_ref.priority,
"hooks": [hook.value for hook in plugin_ref.hooks] if plugin_ref.hooks else [],
"hooks": [hook if isinstance(hook, str) else hook.value for hook in plugin_ref.hooks] if plugin_ref.hooks else [],
"tags": plugin_ref.tags or [],
"kind": plugin_config.kind if plugin_config and plugin_config.kind else "",
"namespace": plugin_config.namespace if plugin_config and plugin_config.namespace else "",
Expand Down
4 changes: 2 additions & 2 deletions mcpgateway/templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
</div>
</div>


</header>

<!-- Global notification container for flash messages -->
Expand Down Expand Up @@ -3502,7 +3502,7 @@ <h2 class="text-2xl font-bold dark:text-gray-200">MCP Prompts</h2>
<div id="prompts-pagination-controls"></div>
</div>



<div class="bg-white shadow rounded-lg p-6 dark:bg-gray-800">
<h3 class="text-lg font-bold mb-4 dark:text-gray-200">
Expand Down
12 changes: 12 additions & 0 deletions mcpgateway/templates/prompts_partial.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,20 @@
<td class="px-6 py-4 whitespace-nowrap text-sm w-12"><div class="relative group">{% set enabled = prompt.is_active %}<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full {% if enabled %}bg-green-100 text-green-800{% else %}bg-red-100 text-red-800{% endif %}">{% if enabled %}Active{% else %}Inactive{% endif %}</span></div></td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<div class="grid grid-cols-2 gap-x-2 gap-y-0 max-w-48">
<!-- Row 1: Test -->
<button
onclick="testPrompt('{{ prompt.id }}')"
class="col-span-2 flex items-center justify-center px-2 py-1 text-xs font-medium rounded-md text-purple-600 hover:text-purple-900 hover:bg-purple-50 dark:text-purple-400 dark:hover:bg-purple-900/20 transition-colors"
x-tooltip="'💡Test this Prompt with sample arguments'"
>
Test
</button>

<!-- Row 2: View | Edit -->
<button onclick="viewPrompt('{{ prompt.id }}')" class="flex items-center justify-center px-2 py-1 text-xs font-medium rounded-md text-indigo-600 hover:text-indigo-900 hover:bg-indigo-50 dark:text-indigo-400 dark:hover:bg-indigo-900/20 transition-colors">View</button>
<button onclick="editPrompt('{{ prompt.id }}')" class="flex items-center justify-center px-2 py-1 text-xs font-medium rounded-md text-green-600 hover:text-green-900 hover:bg-green-50 dark:text-green-400 dark:hover:bg-green-900/20 transition-colors">Edit</button>

<!-- Row 3 & 4: Activate/Deactivate | Delete -->
<div class="col-span-2 flex flex-col space-y-1">
<form method="POST" action="{{ root_path }}/admin/prompts/{{ prompt.id }}/toggle" class="contents" onsubmit="return handleToggleSubmit(event, 'prompts')">
<input type="hidden" name="activate" value="{{ 'false' if prompt.is_active else 'true' }}" />
Expand Down
Loading