fix: downgrade node to 18.17.1
This commit is contained in:
1 parent
f149a8f49a
commit
23bb673fa8
12 files changed
+2084
-2006
No files matched your search
Generated
+2023
-1942
File diff suppressed because it is too large.
Load diff
+29
-30
@@ -10,36 +10,35 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-avatar": "^1.1.3",
|
||||
"@radix-ui/react-dialog": "^1.1.6",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
||||
"@radix-ui/react-form": "^0.1.2",
|
||||
"@radix-ui/react-icons": "^1.3.2",
|
||||
"@radix-ui/react-popover": "^1.1.6",
|
||||
"@radix-ui/react-select": "^2.1.6",
|
||||
"@radix-ui/react-switch": "^1.1.3",
|
||||
"@radix-ui/react-tabs": "^1.1.3",
|
||||
"@radix-ui/react-toast": "^1.2.6",
|
||||
"@radix-ui/themes": "^3.2.1",
|
||||
"axios": "^1.8.3",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-router-dom": "^7.3.0",
|
||||
"recharts": "^2.15.1"
|
||||
"@radix-ui/react-avatar": "^1.0.3",
|
||||
"@radix-ui/react-dialog": "^1.0.4",
|
||||
"@radix-ui/react-dropdown-menu": "^2.0.5",
|
||||
"@radix-ui/react-form": "^0.0.3",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@radix-ui/react-popover": "^1.0.6",
|
||||
"@radix-ui/react-select": "^1.2.2",
|
||||
"@radix-ui/react-switch": "^1.0.3",
|
||||
"@radix-ui/react-tabs": "^1.0.3",
|
||||
"@radix-ui/react-toast": "^1.1.4",
|
||||
"@radix-ui/themes": "^2.0.3",
|
||||
"axios": "^1.4.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router-dom": "^6.14.2",
|
||||
"recharts": "^2.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudflare/workers-types": "^4.20250317.0",
|
||||
"@eslint/js": "^9.21.0",
|
||||
"@types/react": "^19.0.10",
|
||||
"@types/react-dom": "^19.0.4",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"eslint": "^9.21.0",
|
||||
"eslint-plugin-react-hooks": "^5.1.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.19",
|
||||
"globals": "^15.15.0",
|
||||
"typescript": "~5.7.2",
|
||||
"typescript-eslint": "^8.24.1",
|
||||
"vite": "^6.2.0"
|
||||
},
|
||||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
||||
"@cloudflare/workers-types": "^4.20230821.0",
|
||||
"@types/react": "^18.2.15",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||
"@typescript-eslint/parser": "^6.2.0",
|
||||
"@vitejs/plugin-react": "^4.0.3",
|
||||
"eslint": "^8.44.0",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.3",
|
||||
"globals": "^13.20.0",
|
||||
"typescript": "~5.1.6",
|
||||
"vite": "^4.4.5"
|
||||
}
|
||||
}
|
||||
@@ -69,14 +69,13 @@ const HeartbeatGrid = ({ uptime, history = [] }: { uptime: number, history?: (Mo
|
||||
|
||||
// 每个点的大小
|
||||
const pointSize = 12;
|
||||
const gap = 2;
|
||||
|
||||
return (
|
||||
<Box>
|
||||
{/* 多行网格点 */}
|
||||
<Flex direction="column" gap={gap + "px"}>
|
||||
<Flex direction="column" gap="2">
|
||||
{Array.from({ length: rows }).map((_, rowIndex) => (
|
||||
<Flex key={rowIndex} gap={gap + "px"}>
|
||||
<Flex key={rowIndex} gap="2">
|
||||
{displayHistory.slice(rowIndex * pointsPerRow, (rowIndex + 1) * pointsPerRow).map((item, index) => (
|
||||
<Box
|
||||
key={`${rowIndex}-${index}`}
|
||||
|
||||
@@ -131,7 +131,7 @@ const EditAgent = () => {
|
||||
<Text as="label" size="2" mb="1" weight="bold">
|
||||
客户端名称 <Text size="2" color="red">*</Text>
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="name"
|
||||
value={formData.name}
|
||||
onChange={handleChange}
|
||||
|
||||
@@ -290,7 +290,7 @@ const EventsList = () => {
|
||||
|
||||
<Box style={{ flex: 2 }}>
|
||||
<Text as="div" size="2" mb="1" weight="bold">搜索</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
placeholder="搜索事件..."
|
||||
value={filters.search}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setFilters(prev => ({ ...prev, search: e.target.value }))}
|
||||
@@ -298,7 +298,7 @@ const EventsList = () => {
|
||||
<TextField.Slot>
|
||||
<MagnifyingGlassIcon height="16" width="16" />
|
||||
</TextField.Slot>
|
||||
</TextField.Root>
|
||||
</TextField.Input>
|
||||
</Box>
|
||||
</Flex>
|
||||
</Card>
|
||||
|
||||
@@ -121,7 +121,7 @@ const CreateMonitor = () => {
|
||||
<Text as="label" size="2" style={{ marginBottom: '4px', display: 'block' }}>
|
||||
监控名称 *
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="name"
|
||||
value={formData.name}
|
||||
onChange={handleChange}
|
||||
@@ -134,7 +134,7 @@ const CreateMonitor = () => {
|
||||
<Text as="label" size="2" style={{ marginBottom: '4px', display: 'block' }}>
|
||||
URL *
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="url"
|
||||
value={formData.url}
|
||||
onChange={handleChange}
|
||||
@@ -168,7 +168,7 @@ const CreateMonitor = () => {
|
||||
<Text as="label" size="2" style={{ marginBottom: '4px', display: 'block' }}>
|
||||
检查间隔(分钟)*
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="interval"
|
||||
type="number"
|
||||
value={formData.interval.toString()}
|
||||
@@ -185,7 +185,7 @@ const CreateMonitor = () => {
|
||||
<Text as="label" size="2" style={{ marginBottom: '4px', display: 'block' }}>
|
||||
超时时间(秒)*
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="timeout"
|
||||
type="number"
|
||||
value={formData.timeout.toString()}
|
||||
@@ -200,7 +200,7 @@ const CreateMonitor = () => {
|
||||
<Text as="label" size="2" style={{ marginBottom: '4px', display: 'block' }}>
|
||||
预期状态码 *
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="expectedStatus"
|
||||
type="number"
|
||||
value={formData.expectedStatus.toString()}
|
||||
@@ -228,14 +228,14 @@ const CreateMonitor = () => {
|
||||
{headers.map((header, index) => (
|
||||
<Table.Row key={index}>
|
||||
<Table.Cell>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
placeholder="Header Name"
|
||||
value={header.key}
|
||||
onChange={(e) => handleHeaderChange(index, 'key', e.target.value)}
|
||||
/>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
placeholder="Header Value"
|
||||
value={header.value}
|
||||
onChange={(e) => handleHeaderChange(index, 'value', e.target.value)}
|
||||
|
||||
@@ -215,7 +215,7 @@ const EditMonitor = () => {
|
||||
<Text as="label" size="2" style={{ marginBottom: '4px', display: 'block' }}>
|
||||
监控名称 *
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="name"
|
||||
value={formData.name}
|
||||
onChange={handleChange}
|
||||
@@ -228,7 +228,7 @@ const EditMonitor = () => {
|
||||
<Text as="label" size="2" style={{ marginBottom: '4px', display: 'block' }}>
|
||||
URL *
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="url"
|
||||
value={formData.url}
|
||||
onChange={handleChange}
|
||||
@@ -262,7 +262,7 @@ const EditMonitor = () => {
|
||||
<Text as="label" size="2" style={{ marginBottom: '4px', display: 'block' }}>
|
||||
检查间隔(分钟)*
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="interval"
|
||||
type="number"
|
||||
value={formData.interval.toString()}
|
||||
@@ -279,7 +279,7 @@ const EditMonitor = () => {
|
||||
<Text as="label" size="2" style={{ marginBottom: '4px', display: 'block' }}>
|
||||
超时时间(秒)*
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="timeout"
|
||||
type="number"
|
||||
value={formData.timeout.toString()}
|
||||
@@ -294,7 +294,7 @@ const EditMonitor = () => {
|
||||
<Text as="label" size="2" style={{ marginBottom: '4px', display: 'block' }}>
|
||||
预期状态码 *
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="expectedStatus"
|
||||
type="number"
|
||||
value={formData.expectedStatus.toString()}
|
||||
@@ -322,14 +322,14 @@ const EditMonitor = () => {
|
||||
{headers.map((header, index) => (
|
||||
<Table.Row key={index}>
|
||||
<Table.Cell>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
placeholder="Header Name"
|
||||
value={header.key}
|
||||
onChange={(e) => handleHeaderChange(index, 'key', e.target.value)}
|
||||
/>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
placeholder="Header Value"
|
||||
value={header.value}
|
||||
onChange={(e) => handleHeaderChange(index, 'value', e.target.value)}
|
||||
|
||||
@@ -268,7 +268,7 @@ const MonitorDetail = () => {
|
||||
<Text>{monitor.status === 'up' ? '正常' : monitor.status === 'down' ? '故障' : '等待检查'}</Text>
|
||||
</Flex>
|
||||
<Text>正常运行时间:</Text>
|
||||
<Box gridColumn="2">
|
||||
<Box style={{ gridColumn: "2" }}>
|
||||
<StatusBar status={monitor.status} uptime={monitor.uptime} history={monitor.history} />
|
||||
</Box>
|
||||
<Text>响应时间:</Text>
|
||||
|
||||
@@ -381,8 +381,7 @@ const StatusPageConfig = () => {
|
||||
<Text as="label" size="2" weight="medium" style={{ marginBottom: '6px', display: 'block' }}>
|
||||
状态页标题
|
||||
</Text>
|
||||
<TextField.Root
|
||||
name="title"
|
||||
<TextField.Input
|
||||
value={config.title}
|
||||
onChange={handleChange}
|
||||
placeholder="输入状态页标题"
|
||||
@@ -409,7 +408,7 @@ const StatusPageConfig = () => {
|
||||
公共访问URL
|
||||
</Text>
|
||||
<Flex gap="2">
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
value={config.publicUrl}
|
||||
readOnly
|
||||
style={{ flex: 1 }}
|
||||
@@ -505,7 +504,7 @@ const StatusPageConfig = () => {
|
||||
<Text as="label" size="2" weight="medium" style={{ marginBottom: '6px', display: 'block' }}>
|
||||
Logo URL (可选)
|
||||
</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
name="logoUrl"
|
||||
value={config.logoUrl}
|
||||
onChange={handleChange}
|
||||
|
||||
@@ -120,7 +120,7 @@ const UserProfile = () => {
|
||||
<Flex direction="column" gap="3">
|
||||
<Flex direction="column" gap="1">
|
||||
<Text size="2" weight="medium">用户名</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
value={username}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setUsername(e.target.value)}
|
||||
required
|
||||
@@ -129,7 +129,7 @@ const UserProfile = () => {
|
||||
|
||||
<Flex direction="column" gap="1">
|
||||
<Text size="2" weight="medium">电子邮箱</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
type="email"
|
||||
value={email}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setEmail(e.target.value)}
|
||||
@@ -153,7 +153,7 @@ const UserProfile = () => {
|
||||
<Flex direction="column" gap="3">
|
||||
<Flex direction="column" gap="1">
|
||||
<Text size="2" weight="medium">当前密码</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
type="password"
|
||||
value={currentPassword}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setCurrentPassword(e.target.value)}
|
||||
@@ -163,7 +163,7 @@ const UserProfile = () => {
|
||||
|
||||
<Flex direction="column" gap="1">
|
||||
<Text size="2" weight="medium">新密码</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
type="password"
|
||||
value={newPassword}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setNewPassword(e.target.value)}
|
||||
@@ -173,7 +173,7 @@ const UserProfile = () => {
|
||||
|
||||
<Flex direction="column" gap="1">
|
||||
<Text size="2" weight="medium">确认新密码</Text>
|
||||
<TextField.Root
|
||||
<TextField.Input
|
||||
type="password"
|
||||
value={confirmPassword}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setConfirmPassword(e.target.value)}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
@@ -19,8 +20,7 @@
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2023"],
|
||||
@@ -17,8 +18,7 @@
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
Reference in new issue
Block a user