mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-09 08:04:57 +08:00
feat: update mcp form label (#8327)
Some checks are pending
SonarCloud Scan / SonarCloud (push) Waiting to run
Some checks are pending
SonarCloud Scan / SonarCloud (push) Waiting to run
This commit is contained in:
parent
0022a9b508
commit
9050680115
6 changed files with 27 additions and 26 deletions
|
@ -2605,8 +2605,8 @@ const message = {
|
|||
},
|
||||
mcp: {
|
||||
server: 'MCP Server',
|
||||
create: 'Add Server',
|
||||
edit: 'Edit Server',
|
||||
create: 'Add MCP Server',
|
||||
edit: 'Edit MCP Server',
|
||||
commandHelper: 'For example: npx -y {0}',
|
||||
baseUrl: 'External Access Path',
|
||||
baseUrlHelper: 'For example: https://127.0.0.1:8080',
|
||||
|
|
|
@ -2439,14 +2439,14 @@ const message = {
|
|||
whiteListHelper: '限制僅白名單中的 IP 可瀏覽',
|
||||
},
|
||||
mcp: {
|
||||
server: 'MCP 伺服器',
|
||||
create: '添加伺服器',
|
||||
edit: '編輯伺服器',
|
||||
server: 'MCP Server',
|
||||
create: '创建 MCP Server',
|
||||
edit: '編輯 MCP Server',
|
||||
commandHelper: '例如:npx -y {0}',
|
||||
baseUrl: '外部訪問路徑',
|
||||
baseUrlHelper: '例如:https://127.0.0.1:8080',
|
||||
ssePath: 'SSE 路徑',
|
||||
ssePathHelper: '例如:/sse,注意不要與其他伺服器重複',
|
||||
ssePathHelper: '例如:/sse,注意不要與其他 Server 重複',
|
||||
environment: '環境變數',
|
||||
envKey: '變數名',
|
||||
envValue: '變數值',
|
||||
|
@ -2456,7 +2456,7 @@ const message = {
|
|||
domainHelper: '例如:192.168.1.1 或者 example.com',
|
||||
bindDomain: '綁定網站',
|
||||
commandPlaceHolder: '當前僅支持 npx 和二進制啟動的命令',
|
||||
importMcpJson: '導入 MCP 伺服器配置',
|
||||
importMcpJson: '導入 MCP Server配置',
|
||||
importMcpJsonError: 'mcpServers 結構不正確',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -2441,14 +2441,14 @@ const message = {
|
|||
whiteListHelper: '限制仅白名单中的 IP 可访问',
|
||||
},
|
||||
mcp: {
|
||||
server: 'MCP 服务器',
|
||||
create: '添加服务器',
|
||||
edit: '编辑服务器',
|
||||
server: 'MCP Server',
|
||||
create: '创建 MCP Server',
|
||||
edit: '编辑 MCP Server',
|
||||
commandHelper: '例如:npx -y {0}',
|
||||
baseUrl: '外部访问路径',
|
||||
baseUrlHelper: '例如:https://127.0.0.1:8080',
|
||||
ssePath: 'SSE 路径',
|
||||
ssePathHelper: '例如:/sse,注意不要与其他服务器重复',
|
||||
ssePathHelper: '例如:/sse,注意不要与其他 Server 重复',
|
||||
environment: '环境变量',
|
||||
envKey: '变量名',
|
||||
envValue: '变量值',
|
||||
|
@ -2458,7 +2458,7 @@ const message = {
|
|||
domainHelper: '例如:192.168.1.1 或者 example.com',
|
||||
bindDomain: '绑定网站',
|
||||
commandPlaceHolder: '当前仅支持 npx 和二进制启动的命令',
|
||||
importMcpJson: '导入 MCP 服务器配置',
|
||||
importMcpJson: '导入 MCP Server 配置',
|
||||
importMcpJsonError: 'mcpServers 结构不正确',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -19,15 +19,6 @@ const databaseRouter = {
|
|||
requiresAuth: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/ai/gpu',
|
||||
name: 'GPU',
|
||||
component: () => import('@/views/ai/gpu/index.vue'),
|
||||
meta: {
|
||||
title: 'ai_tools.gpu.gpu',
|
||||
requiresAuth: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/ai/mcp',
|
||||
name: 'MCPServer',
|
||||
|
@ -37,6 +28,15 @@ const databaseRouter = {
|
|||
requiresAuth: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/ai/gpu',
|
||||
name: 'GPU',
|
||||
component: () => import('@/views/ai/gpu/index.vue'),
|
||||
meta: {
|
||||
title: 'ai_tools.gpu.gpu',
|
||||
requiresAuth: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
@ -8,11 +8,9 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import i18n from '@/lang';
|
||||
|
||||
const buttons = [
|
||||
{
|
||||
label: i18n.global.t('container.server'),
|
||||
label: 'Servers',
|
||||
path: '/ai/mcp/servers',
|
||||
},
|
||||
];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<RouterMenu />
|
||||
<LayoutContent :title="$t('container.server')" v-loading="loading">
|
||||
<LayoutContent :title="'Servers'" v-loading="loading">
|
||||
<template #toolbar>
|
||||
<div class="flex flex-wrap gap-3">
|
||||
<el-button type="primary" @click="openCreate">
|
||||
|
@ -189,7 +189,10 @@ const openDetail = (row: AI.McpServer) => {
|
|||
};
|
||||
|
||||
const openCreate = () => {
|
||||
const maxPort = Math.max(...items.value.map((item) => item.port));
|
||||
let maxPort = 8000;
|
||||
if (items.value && items.value.length > 0) {
|
||||
maxPort = Math.max(...items.value.map((item) => item.port));
|
||||
}
|
||||
createRef.value.acceptParams({ port: maxPort + 1 });
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue