Add React frontend and Django backend code
- React components: Dashboard, MemoryCalendar, SearchBox, ToolList - Django backend structure - Package configuration files
This commit is contained in:
59
code/frontend/src/components/ToolList/index.js
Normal file
59
code/frontend/src/components/ToolList/index.js
Normal file
@@ -0,0 +1,59 @@
|
||||
import React from 'react';
|
||||
|
||||
function ToolList() {
|
||||
const tools = [
|
||||
{
|
||||
name: 'Git 版本控制',
|
||||
status: '🟢 运行中',
|
||||
description: '代码版本管理服务',
|
||||
access: [
|
||||
{ type: 'Web', url: 'http://localhost:18003' },
|
||||
{ type: 'Git', url: 'git://127.0.0.1:9418/monitor-dashboard.git' },
|
||||
{ type: 'HTTP', url: 'http://localhost:18003/monitor-dashboard.git' }
|
||||
],
|
||||
usage: [
|
||||
'克隆仓库:git clone http://localhost:18003/monitor-dashboard.git',
|
||||
'提交更改:git add . && git commit -m "说明"',
|
||||
'推送代码:git push origin master'
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="tool-list">
|
||||
<h1>🛠️ 工具列表</h1>
|
||||
{tools.map((tool, index) => (
|
||||
<div key={index} className="tool-card">
|
||||
<div className="tool-header">
|
||||
<h2>{tool.name}</h2>
|
||||
<span className="tool-status">{tool.status}</span>
|
||||
</div>
|
||||
<p className="tool-description">{tool.description}</p>
|
||||
|
||||
<div className="tool-access">
|
||||
<h3>访问方式:</h3>
|
||||
{tool.access.map((item, i) => (
|
||||
<div key={i} className="access-item">
|
||||
<span className="access-type">{item.type}:</span>
|
||||
<a href={item.url} target="_blank" rel="noopener noreferrer">
|
||||
{item.url}
|
||||
</a>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="tool-usage">
|
||||
<h3>使用方法:</h3>
|
||||
<ul>
|
||||
{tool.usage.map((item, i) => (
|
||||
<li key={i}><code>{item}</code></li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default ToolList;
|
||||
Reference in New Issue
Block a user