refactor: update grid component props and optimize docker setup
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
// import type { AgentCategory } from '@/constants/agent';
|
||||
import type { Edge, Node } from '@xyflow/react';
|
||||
import type { IReference, Message } from './chat';
|
||||
|
||||
export interface ICategorizeItem {
|
||||
name: string;
|
||||
description?: string;
|
||||
@@ -30,11 +34,6 @@ export interface ISwitchForm {
|
||||
no: string;
|
||||
}
|
||||
|
||||
|
||||
import type { AgentCategory } from '@/constants/agent';
|
||||
import type { Edge, Node } from '@xyflow/react';
|
||||
import type { IReference, Message } from './chat';
|
||||
|
||||
export type DSLComponents = Record<string, IOperator>;
|
||||
|
||||
export interface DSL {
|
||||
@@ -157,7 +156,7 @@ export interface IAgentForm {
|
||||
delay_after_error: number;
|
||||
visual_files_var: string;
|
||||
max_rounds: number;
|
||||
exception_method: Nullable<'comment' | 'go'>;
|
||||
// exception_method: Nullable<'comment' | 'go'>;
|
||||
exception_comment: any;
|
||||
exception_goto: any;
|
||||
tools: Array<{
|
||||
@@ -275,5 +274,5 @@ export interface IPipeLineListRequest {
|
||||
keywords?: string;
|
||||
orderby?: string;
|
||||
desc?: boolean;
|
||||
canvas_category?: AgentCategory;
|
||||
// canvas_category?: AgentCategory;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MessageType } from '@/constants/chat';
|
||||
// import { MessageType } from '@/constants/chat';
|
||||
|
||||
export interface PromptConfig {
|
||||
empty_response: string;
|
||||
@@ -89,7 +89,7 @@ export interface IConversation {
|
||||
|
||||
export interface Message {
|
||||
content: string;
|
||||
role: MessageType;
|
||||
// role: MessageType;
|
||||
doc_ids?: string[];
|
||||
prompt?: string;
|
||||
id?: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Edge, Node } from '@xyflow/react';
|
||||
import type { Edge, Node } from '@xyflow/react';
|
||||
import type { IReference, Message } from './chat';
|
||||
|
||||
export type DSLComponents = Record<string, IOperator>;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export enum McpServerType {
|
||||
Sse = 'sse',
|
||||
StreamableHttp = 'streamable-http',
|
||||
}
|
||||
// export enum McpServerType {
|
||||
// Sse = 'sse',
|
||||
// StreamableHttp = 'streamable-http',
|
||||
// }
|
||||
|
||||
export interface IMcpServerVariable {
|
||||
key: string;
|
||||
@@ -12,7 +12,7 @@ export interface IMcpServerInfo {
|
||||
id: string;
|
||||
name: string;
|
||||
url: string;
|
||||
server_type: McpServerType;
|
||||
// server_type: McpServerType;
|
||||
description?: string;
|
||||
variables?: IMcpServerVariable[];
|
||||
headers: Map<string, string>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IExportedMcpServer } from '@/interfaces/database/mcp';
|
||||
// import { IExportedMcpServer } from '@/interfaces/database/mcp';
|
||||
|
||||
export interface ITestMcpRequestBody {
|
||||
server_type: string;
|
||||
@@ -9,8 +9,8 @@ export interface ITestMcpRequestBody {
|
||||
}
|
||||
|
||||
export interface IImportMcpServersRequestBody {
|
||||
mcpServers: Record<
|
||||
string,
|
||||
Pick<IExportedMcpServer, 'type' | 'url' | 'authorization_token'>
|
||||
>;
|
||||
// mcpServers: Record<
|
||||
// string,
|
||||
// Pick<IExportedMcpServer, 'type' | 'url' | 'authorization_token'>
|
||||
// >;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ const MetricValue = styled(Typography)(({ theme }) => ({
|
||||
lineHeight: 1.2,
|
||||
}));
|
||||
|
||||
const TrendIndicator = styled(Box)<{ trend: 'up' | 'down' }>(({ trend, theme }) => ({
|
||||
const TrendIndicator = styled(Box)<{ trend: string }>(({ trend, theme }) => ({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '0.25rem',
|
||||
@@ -245,7 +245,7 @@ const Dashboard: React.FC = () => {
|
||||
|
||||
{/* 关键指标卡片 */}
|
||||
<Grid container spacing={3} sx={{ mb: 3 }}>
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<MetricCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -270,7 +270,7 @@ const Dashboard: React.FC = () => {
|
||||
</MetricCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<MetricCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -295,7 +295,7 @@ const Dashboard: React.FC = () => {
|
||||
</MetricCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<MetricCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -320,7 +320,7 @@ const Dashboard: React.FC = () => {
|
||||
</MetricCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<MetricCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -362,7 +362,7 @@ const Dashboard: React.FC = () => {
|
||||
</Button>
|
||||
</Box>
|
||||
<KnowledgeGridView
|
||||
knowledgeBases={mockKnowledgeBases}
|
||||
knowledgeBases={mockKnowledgeBases as any}
|
||||
maxItems={3}
|
||||
showSeeAll={true}
|
||||
onSeeAll={handleSeeAllKnowledgeBases}
|
||||
@@ -372,7 +372,7 @@ const Dashboard: React.FC = () => {
|
||||
|
||||
{/* 系统状态 */}
|
||||
<Grid container spacing={3} sx={{ mb: 3 }}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Grid size={{xs:12,md:6}}>
|
||||
<Card sx={{ border: '1px solid #E5E5E5' }}>
|
||||
<CardContent>
|
||||
<Typography variant="h6" fontWeight={600} mb={2}>
|
||||
@@ -403,7 +403,7 @@ const Dashboard: React.FC = () => {
|
||||
</Card>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} md={6}>
|
||||
<Grid size={{xs:12,md:6}}>
|
||||
<Card sx={{ border: '1px solid #E5E5E5' }}>
|
||||
<CardContent>
|
||||
<Typography variant="h6" fontWeight={600} mb={2}>
|
||||
@@ -479,15 +479,6 @@ const Dashboard: React.FC = () => {
|
||||
</TableContainer>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* 用户数据调试组件 - 仅在开发环境显示 */}
|
||||
{process.env.NODE_ENV === 'development' && (
|
||||
<Card sx={{ border: '1px solid #E5E5E5', mt: 3 }}>
|
||||
<CardContent>
|
||||
<UserDataDebug />
|
||||
</CardContent>
|
||||
</Card>
|
||||
)}
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -193,7 +193,7 @@ const MCP: React.FC = () => {
|
||||
<>
|
||||
{/* 状态概览 */}
|
||||
<Grid container spacing={3} sx={{ mb: 3 }}>
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<StatusCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -211,7 +211,7 @@ const MCP: React.FC = () => {
|
||||
</StatusCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<StatusCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -229,7 +229,7 @@ const MCP: React.FC = () => {
|
||||
</StatusCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<StatusCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -247,7 +247,7 @@ const MCP: React.FC = () => {
|
||||
</StatusCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<StatusCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -359,7 +359,7 @@ const MCP: React.FC = () => {
|
||||
</Alert>
|
||||
<Grid container spacing={2}>
|
||||
{mockMCPServers.map((server) => (
|
||||
<Grid item xs={12} md={6} key={server.id}>
|
||||
<Grid size={{xs:12,md:6}} key={server.id}>
|
||||
<Card variant="outlined">
|
||||
<CardContent>
|
||||
<Typography variant="subtitle1" fontWeight={600} mb={1}>
|
||||
@@ -389,7 +389,7 @@ const MCP: React.FC = () => {
|
||||
|
||||
{tabValue === 2 && (
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Grid size={{xs:12,md:6}}>
|
||||
<Card sx={{ border: '1px solid #E5E5E5' }}>
|
||||
<CardContent>
|
||||
<Typography variant="h6" fontWeight={600} mb={2}>
|
||||
@@ -418,7 +418,7 @@ const MCP: React.FC = () => {
|
||||
</Card>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} md={6}>
|
||||
<Grid size={{xs:12,md:6}}>
|
||||
<Card sx={{ border: '1px solid #E5E5E5' }}>
|
||||
<CardContent>
|
||||
<Typography variant="h6" fontWeight={600} mb={2}>
|
||||
|
||||
@@ -226,7 +226,7 @@ const ModelsResources: React.FC = () => {
|
||||
<>
|
||||
{/* 模型概览卡片 */}
|
||||
<Grid container spacing={3} sx={{ mb: 3 }}>
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<ResourceCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -244,7 +244,7 @@ const ModelsResources: React.FC = () => {
|
||||
</ResourceCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<ResourceCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -262,7 +262,7 @@ const ModelsResources: React.FC = () => {
|
||||
</ResourceCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<ResourceCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -280,7 +280,7 @@ const ModelsResources: React.FC = () => {
|
||||
</ResourceCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<ResourceCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -385,7 +385,7 @@ const ModelsResources: React.FC = () => {
|
||||
<>
|
||||
{/* 资源概览卡片 */}
|
||||
<Grid container spacing={3} sx={{ mb: 3 }}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<Grid size={{xs:12,sm:6,md:4}}>
|
||||
<ResourceCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -403,7 +403,7 @@ const ModelsResources: React.FC = () => {
|
||||
</ResourceCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<Grid size={{xs:12,sm:6,md:4}}>
|
||||
<ResourceCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
@@ -421,7 +421,7 @@ const ModelsResources: React.FC = () => {
|
||||
</ResourceCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<Grid size={{xs:12,sm:6,md:4}}>
|
||||
<ResourceCard>
|
||||
<CardContent>
|
||||
<Box display="flex" alignItems="center" justifyContent="space-between">
|
||||
|
||||
@@ -155,7 +155,7 @@ const PipelineConfig: React.FC = () => {
|
||||
</PageHeader>
|
||||
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={12} md={6}>
|
||||
<Grid size={{xs:12,md:6}}>
|
||||
<ConfigCard>
|
||||
<CardContent>
|
||||
<Typography variant="h6" fontWeight={600} mb={2}>
|
||||
@@ -223,7 +223,7 @@ const PipelineConfig: React.FC = () => {
|
||||
</ConfigCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} md={6}>
|
||||
<Grid size={{xs:12,md:6}}>
|
||||
<ConfigCard>
|
||||
<CardContent>
|
||||
<Typography variant="h6" fontWeight={600} mb={2}>
|
||||
@@ -283,7 +283,7 @@ const PipelineConfig: React.FC = () => {
|
||||
</ConfigCard>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12}>
|
||||
<Grid size={{xs:12,md:6}}>
|
||||
<ConfigCard>
|
||||
<CardContent>
|
||||
<Typography variant="h6" fontWeight={600} mb={2}>
|
||||
@@ -291,7 +291,7 @@ const PipelineConfig: React.FC = () => {
|
||||
</Typography>
|
||||
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<Box textAlign="center" p={2} bgcolor="#F8F9FA" borderRadius="6px">
|
||||
<Typography variant="h4" color="primary" fontWeight={600}>
|
||||
1,234
|
||||
@@ -301,7 +301,7 @@ const PipelineConfig: React.FC = () => {
|
||||
</Typography>
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<Box textAlign="center" p={2} bgcolor="#F8F9FA" borderRadius="6px">
|
||||
<Typography variant="h4" color="success.main" fontWeight={600}>
|
||||
98.5%
|
||||
@@ -311,7 +311,7 @@ const PipelineConfig: React.FC = () => {
|
||||
</Typography>
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<Box textAlign="center" p={2} bgcolor="#F8F9FA" borderRadius="6px">
|
||||
<Typography variant="h4" color="warning.main" fontWeight={600}>
|
||||
2.3s
|
||||
@@ -321,7 +321,7 @@ const PipelineConfig: React.FC = () => {
|
||||
</Typography>
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6} md={3}>
|
||||
<Grid size={{xs:12,sm:6,md:3}}>
|
||||
<Box textAlign="center" p={2} bgcolor="#F8F9FA" borderRadius="6px">
|
||||
<Typography variant="h4" color="info.main" fontWeight={600}>
|
||||
156
|
||||
|
||||
Reference in New Issue
Block a user