feat: 实现Redis集成协议并重构项目控制台
refactor(backend): 重构后端服务以支持Redis协议 feat(backend): 添加Redis客户端和服务模块 feat(backend): 实现命令和日志路由处理Redis交互 refactor(frontend): 重构前端状态管理和组件结构 feat(frontend): 实现基于Redis的日志和命令功能 docs: 添加Redis集成协议文档 chore: 更新ESLint配置和依赖
This commit is contained in:
@@ -4,23 +4,22 @@
|
||||
<div class="selector-header">
|
||||
<h2>项目选择</h2>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 项目列表 -->
|
||||
<div class="project-list">
|
||||
<div
|
||||
v-for="project in projects"
|
||||
:key="project.id"
|
||||
class="project-item"
|
||||
:class="{ 'project-selected': selectedProjectId === project.id }"
|
||||
@click="selectProject(project)"
|
||||
>
|
||||
<div v-for="project in projects" :key="project.id" class="project-item"
|
||||
:class="{ 'project-selected': selectedProjectId === project.id }" @click="selectProject(project)">
|
||||
<!-- 项目状态指示器 -->
|
||||
<div class="project-status" :class="`status-${project.status}`"></div>
|
||||
|
||||
<div class="project-status" :class="`status-${project.status}`" />
|
||||
|
||||
<!-- 项目信息 -->
|
||||
<div class="project-info">
|
||||
<div class="project-name">{{ project.name }}</div>
|
||||
<div class="project-description">{{ project.description }}</div>
|
||||
<div class="project-name">
|
||||
{{ project.name }}
|
||||
</div>
|
||||
<div class="project-description">
|
||||
{{ project.description }}
|
||||
</div>
|
||||
<div class="project-meta">
|
||||
<span class="project-type" :class="`type-${project.type}`">
|
||||
{{ project.type === 'backend' ? '后端' : '前端' }}
|
||||
@@ -28,9 +27,9 @@
|
||||
<span class="project-status-text">{{ getStatusText(project.status) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 选择指示器 -->
|
||||
<div class="project-select-indicator" v-if="selectedProjectId === project.id">
|
||||
<div v-if="selectedProjectId === project.id" class="project-select-indicator">
|
||||
<span class="select-icon">✓</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,11 +41,11 @@
|
||||
import { ref } from 'vue';
|
||||
|
||||
// 定义props和emits
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
selectedProjectId: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['project-selected']);
|
||||
@@ -58,43 +57,43 @@ const projects = ref([
|
||||
name: '用户管理系统',
|
||||
type: 'backend',
|
||||
description: '基于Node.js的用户管理后端服务',
|
||||
status: 'running'
|
||||
status: 'running',
|
||||
},
|
||||
{
|
||||
id: 'proj-2',
|
||||
name: '数据可视化平台',
|
||||
type: 'frontend',
|
||||
description: '基于Vue.js的数据可视化前端应用',
|
||||
status: 'running'
|
||||
status: 'running',
|
||||
},
|
||||
{
|
||||
id: 'proj-3',
|
||||
name: '订单处理系统',
|
||||
type: 'backend',
|
||||
description: '高性能订单处理后端服务',
|
||||
status: 'stopped'
|
||||
status: 'stopped',
|
||||
},
|
||||
{
|
||||
id: 'proj-4',
|
||||
name: '移动端应用',
|
||||
type: 'frontend',
|
||||
description: '基于React Native的移动端应用',
|
||||
status: 'error'
|
||||
status: 'error',
|
||||
},
|
||||
{
|
||||
id: 'proj-5',
|
||||
name: 'API网关',
|
||||
type: 'backend',
|
||||
description: '微服务架构的API网关',
|
||||
status: 'running'
|
||||
status: 'running',
|
||||
},
|
||||
{
|
||||
id: 'proj-6',
|
||||
name: '管理后台',
|
||||
type: 'frontend',
|
||||
description: '基于Vue 3的管理后台系统',
|
||||
status: 'running'
|
||||
}
|
||||
status: 'running',
|
||||
},
|
||||
]);
|
||||
|
||||
// 选择项目
|
||||
@@ -107,7 +106,7 @@ const getStatusText = (status) => {
|
||||
const statusMap = {
|
||||
running: '运行中',
|
||||
stopped: '已停止',
|
||||
error: '错误'
|
||||
error: '错误',
|
||||
};
|
||||
return statusMap[status] || status;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user