Skip to content

Commit 975e968

Browse files
committed
added transport field in gateways panel
1 parent bd756c8 commit 975e968

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

mcpgateway/static/admin.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ document.addEventListener("DOMContentLoaded", function () {
318318
);
319319

320320
const requestTypeMap = {
321-
MCP: ["SSE", "STDIO"],
321+
MCP: ["SSE", "STREAMABLE", "STDIO"],
322322
REST: ["GET", "POST", "PUT", "DELETE"],
323323
};
324324

@@ -896,6 +896,10 @@ async function viewGateway(gatewayId) {
896896
<p><strong>Name:</strong> ${gateway.name}</p>
897897
<p><strong>URL:</strong> ${gateway.url}</p>
898898
<p><strong>Description:</strong> ${gateway.description || "N/A"}</p>
899+
<p><strong>Transport:</strong>
900+
${gateway.transport === "STREAMABLEHTTP" ? "Streamable HTTP" :
901+
gateway.transport === "SSE" ? "SSE" : "N/A"}
902+
</p>
899903
<p><strong>Status:</strong>
900904
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${gateway.isActive ? "bg-green-100 text-green-800" : "bg-red-100 text-red-800"}">
901905
${gateway.isActive ? "Active" : "Inactive"}
@@ -927,6 +931,7 @@ async function editGateway(gatewayId) {
927931
document.getElementById("edit-gateway-url").value = gateway.url;
928932
document.getElementById("edit-gateway-description").value =
929933
gateway.description || "";
934+
document.getElementById("edit-gateway-transport").value = gateway.transport;
930935
openModal("gateway-edit-modal");
931936
} catch (error) {
932937
console.error("Error fetching gateway details:", error);
@@ -1753,7 +1758,7 @@ function closeModal(modalId, clearId=null) {
17531758
}
17541759

17551760
const integrationRequestMap = {
1756-
MCP: ["SSE", "STDIO"],
1761+
MCP: ["SSE", "STREAMABLE", "STDIO"],
17571762
REST: ["GET", "POST", "PUT", "DELETE"],
17581763
};
17591764

mcpgateway/templates/admin.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,18 @@ <h3 class="text-lg font-bold mb-4">Add New Gateway</h3>
13941394
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500"
13951395
></textarea>
13961396
</div>
1397+
<div>
1398+
<label class="block text-sm font-medium text-gray-700"
1399+
>Transport Type</label
1400+
>
1401+
<select
1402+
name="transport"
1403+
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500"
1404+
>
1405+
<option value="SSE" selected>SSE</option>
1406+
<option value="STREAMABLEHTTP">Streamable HTTP</option>
1407+
</select>
1408+
</div>
13971409
<div>
13981410
<label class="block text-sm font-medium text-gray-700"
13991411
>Authentication Type</label
@@ -2259,6 +2271,19 @@ <h3 class="text-lg font-medium text-gray-900">Edit Gateway</h3>
22592271
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500"
22602272
></textarea>
22612273
</div>
2274+
<div>
2275+
<label class="block text-sm font-medium text-gray-700"
2276+
>Transport Type</label
2277+
>
2278+
<select
2279+
name="transport"
2280+
id="edit-gateway-transport"
2281+
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500"
2282+
>
2283+
<option value="SSE" selected>SSE</option>
2284+
<option value="STREAMABLEHTTP">Streamable HTTP</option>
2285+
</select>
2286+
</div>
22622287
<div>
22632288
<label class="block text-sm font-medium text-gray-700"
22642289
>Authentication Type</label

0 commit comments

Comments
 (0)