refactor: simplify sidebar graph context
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
|||||||
import AdminLogin from "./AdminLogin";
|
import AdminLogin from "./AdminLogin";
|
||||||
import AdminLoginV2 from "./AdminLoginV2";
|
import AdminLoginV2 from "./AdminLoginV2";
|
||||||
import Brand from "./Brand";
|
import Brand from "./Brand";
|
||||||
import { displayProjectName, getProjectContext, whoami, type KgProjectContext } from "./api";
|
import { getProjectContext, whoami, type KgProjectContext } from "./api";
|
||||||
import ProjectContextBar from "./ProjectContextBar";
|
import ProjectContextBar from "./ProjectContextBar";
|
||||||
import ProjectLanding from "./ProjectLanding";
|
import ProjectLanding from "./ProjectLanding";
|
||||||
import DataCenterPanel from "./panels/data-platform/DataCenterPanel";
|
import DataCenterPanel from "./panels/data-platform/DataCenterPanel";
|
||||||
@@ -27,14 +27,6 @@ import UserManagement from "./panels/system/UserManagement";
|
|||||||
import InterfaceCenterPanel from "./panels/system/InterfaceCenterPanel";
|
import InterfaceCenterPanel from "./panels/system/InterfaceCenterPanel";
|
||||||
|
|
||||||
const { Sider, Content } = Layout;
|
const { Sider, Content } = Layout;
|
||||||
const RUNTIME_CONTEXT = {
|
|
||||||
tenant: "CityGraph-new2",
|
|
||||||
project: "CityGraph-new2",
|
|
||||||
dbSchema: "kg_admin_new2",
|
|
||||||
graph: "guiyang_new2",
|
|
||||||
port: "8102",
|
|
||||||
};
|
|
||||||
|
|
||||||
const MENU_ITEMS = [
|
const MENU_ITEMS = [
|
||||||
{ key: "/projects", icon: <ProjectOutlined />, label: "图谱中心" },
|
{ key: "/projects", icon: <ProjectOutlined />, label: "图谱中心" },
|
||||||
{ key: "/data", icon: <DatabaseOutlined />, label: "数据中心" },
|
{ key: "/data", icon: <DatabaseOutlined />, label: "数据中心" },
|
||||||
@@ -158,9 +150,7 @@ export default function App() {
|
|||||||
<div className="sider-footer">
|
<div className="sider-footer">
|
||||||
{!collapsed && (
|
{!collapsed && (
|
||||||
<div className="ctx-row">
|
<div className="ctx-row">
|
||||||
<Tag color="blue">new2 · {RUNTIME_CONTEXT.port}</Tag>
|
{projectContext.graphName && <Tag color="green">{projectContext.graphName}</Tag>}
|
||||||
<Tag color="green">项目 · {displayProjectName(projectContext.projectId)}</Tag>
|
|
||||||
<Tag color="purple">Schema · {RUNTIME_CONTEXT.dbSchema}</Tag>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className={`footer-actions${collapsed ? " collapsed" : ""}`}>
|
<div className={`footer-actions${collapsed ? " collapsed" : ""}`}>
|
||||||
|
|||||||
Reference in New Issue
Block a user