Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
d27f3c5c
Commit
d27f3c5c
authored
Dec 22, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '宿主管理redis配置'
parent
98ab8fb4
Pipeline
#83433
failed with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
147 additions
and
2 deletions
+147
-2
数据库.png
src/assets/images/icons/数据库.png
+0
-0
DatabaseConfig.jsx
src/pages/database/databaseConfig/DatabaseConfig.jsx
+2
-2
index.jsx
src/pages/platformCenter/hostmanager/index.jsx
+4
-0
index.jsx
src/pages/platformCenter/hostmanager/redisConfig/index.jsx
+141
-0
index.less
src/pages/platformCenter/hostmanager/redisConfig/index.less
+0
-0
No files found.
src/assets/images/icons/数据库.png
0 → 100644
View file @
d27f3c5c
This diff was suppressed by a .gitattributes entry.
src/pages/database/databaseConfig/DatabaseConfig.jsx
View file @
d27f3c5c
...
...
@@ -29,9 +29,9 @@ const DatabaseConnectConfig = props => {
<
div
style=
{
{
marginBottom
:
'15px'
}
}
>
<
MySQLTable
/>
</
div
>
<
div
style=
{
{
marginBottom
:
'15px'
}
}
>
{
/*
<div style={{ marginBottom: '15px' }}>
<Redis />
</
div
>
</div>
*/
}
<
MasterTable
/>
</
Card
>
</
div
>
...
...
src/pages/platformCenter/hostmanager/index.jsx
View file @
d27f3c5c
...
...
@@ -8,6 +8,7 @@ import GCKConfig from './gckConfig/index';
import
ETLConfig
from
'./ETLConfig/index'
;
import
ProxyConfig
from
'./proxyConfig/ProxyConfig'
;
import
GateConfig
from
'./gateWay/gateWay'
;
import
RedisConfig
from
'./redisConfig/index'
;
const
{
TabPane
}
=
Tabs
;
...
...
@@ -30,6 +31,9 @@ const HostManager = () => {
<
TabPane
tab=
"物联配置"
key=
"3"
>
{
activeKey
===
'3'
?
<
IotConfig
setActiveKey=
{
setActiveKey
}
/>
:
null
}
</
TabPane
>
<
TabPane
tab=
"Redis配置"
key=
"7"
>
{
activeKey
===
'7'
?
<
RedisConfig
/>
:
null
}
</
TabPane
>
<
TabPane
tab=
"消息配置"
key=
"4"
>
{
activeKey
===
'4'
?
<
MessageConfig
/>
:
null
}
</
TabPane
>
...
...
src/pages/platformCenter/hostmanager/redisConfig/index.jsx
0 → 100644
View file @
d27f3c5c
/* eslint-disable react/jsx-no-undef */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Card
,
Form
,
Input
,
Button
,
Select
,
Divider
,
Spin
,
message
}
from
'antd'
;
import
{
InfoCircleFilled
}
from
'@ant-design/icons'
;
import
styles
from
'./index.less'
;
import
dataBase
from
'../../../../assets/images/icons/数据库.png'
;
import
{
SaveSysConfigurate
,
SysConfiguration
}
from
'@/services/hostmanager/hostmanager'
;
const
{
Item
}
=
Form
;
const
RedisConfig
=
props
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 加载
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
getData
();
},
[]);
const
getData
=
()
=>
{
SysConfiguration
({
moduleName
:
'Redis配置'
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
let
data
=
res
.
data
&&
JSON
.
parse
(
res
.
data
);
form
.
setFieldsValue
(
data
);
}
});
};
const
onFinish
=
values
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
let
obj
=
form
.
getFieldsValue
();
SaveSysConfigurate
({
configName
:
'Redis配置'
,
configValue
:
JSON
.
stringify
(
obj
),
}).
then
(
resData
=>
{
if
(
resData
.
code
===
0
)
{
message
.
success
(
'配置保存成功'
);
}
else
{
message
.
error
(
resData
.
msg
);
}
});
}
});
};
return
(
<
div
className=
{
styles
.
iot_container
}
>
<
Card
style=
{
{
width
:
'100%'
,
height
:
'calc(100vh - 130px)'
}
}
>
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
Form
form=
{
form
}
name=
"basic"
initialValues=
{
{
remember
:
true
,
configValue
:
'V4'
}
}
onFinish=
{
onFinish
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
}
}
>
<
img
src=
{
dataBase
}
style=
{
{
height
:
'16px'
}
}
alt=
""
/>
<
span
style=
{
{
marginLeft
:
'10px'
,
fontWeight
:
'bold'
}
}
>
Redis数据库
</
span
>
</
div
>
<
Divider
/>
<
Item
label=
"IP"
name=
"ip"
rules=
{
[{
required
:
true
,
message
:
'请输入IP'
}]
}
style=
{
{
marginLeft
:
'20px'
}
}
>
<
Input
placeholder=
"请输入IP"
allowClear
style=
{
{
marginLeft
:
'30px'
,
width
:
'300px'
}
}
/>
</
Item
>
<
Item
label=
"端口"
name=
"port"
rules=
{
[{
required
:
true
,
message
:
'请输入端口'
}]
}
style=
{
{
marginLeft
:
'20px'
}
}
>
<
Input
placeholder=
"请输入端口号"
allowClear
style=
{
{
marginLeft
:
'15px'
,
width
:
'300px'
}
}
/>
</
Item
>
<
Item
label=
"数据库"
name=
"dbName"
rules=
{
[{
required
:
true
,
message
:
'请输入数据库名'
}]
}
style=
{
{
marginLeft
:
'20px'
}
}
>
<
Select
placeholder=
"请选择数据库名"
style=
{
{
marginLeft
:
'2px'
,
width
:
'300px'
}
}
options=
{
[
{
value
:
'0'
,
label
:
'0'
},
{
value
:
'1'
,
label
:
'1'
},
{
value
:
'2'
,
label
:
'2'
},
{
value
:
'3'
,
label
:
'3'
},
{
value
:
'4'
,
label
:
'4'
},
{
value
:
'5'
,
label
:
'5'
},
{
value
:
'6'
,
label
:
'6'
},
{
value
:
'7'
,
label
:
'7'
},
{
value
:
'8'
,
label
:
'8'
},
{
value
:
'9'
,
label
:
'9'
},
{
value
:
'10'
,
label
:
'10'
},
{
value
:
'11'
,
label
:
'11'
},
{
value
:
'12'
,
label
:
'12'
},
{
value
:
'13'
,
label
:
'13'
},
{
value
:
'14'
,
label
:
'14'
},
{
value
:
'15'
,
label
:
'15'
},
]
}
/>
</
Item
>
<
Item
label=
"密码"
name=
"key"
rules=
{
[{
required
:
true
,
message
:
'请输入密码'
}]
}
style=
{
{
marginLeft
:
'18px'
}
}
>
<
Input
.
Password
placeholder=
"请输入密码"
allowClear
style=
{
{
marginLeft
:
'18px'
,
width
:
'300px'
}
}
/>
</
Item
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
style=
{
{
marginLeft
:
'152px'
}
}
>
保存
</
Button
>
</
Form
.
Item
>
</
Form
>
</
Spin
>
</
Card
>
</
div
>
);
};
export
default
RedisConfig
;
src/pages/platformCenter/hostmanager/redisConfig/index.less
0 → 100644
View file @
d27f3c5c
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment