fix(ui): 前端用户可见文案 opsx-loki → lokistack

修正用户能看到/会复制走的旧名(你反馈的 K8s 示例 token 命令在内):

1. 界面标题(4 处)
   App.tsx            浏览器标题栏
   Layout.tsx         侧边栏 logo / 页面标题 fallback / 移动端导航
   login/index.tsx    登录页大标题
   settings/index.tsx 「关于 lokistack」

2. 集群接入示例(用户直接复制到集群执行,5 处)
   ClusterFormDialog.tsx:
     Role / ServiceAccount 名: opsx-loki       → lokistack
     token Secret 名:         opsx-loki-token  → lokistack-token
     取 token 命令:           get secret opsx-loki-token → lokistack-token

3. 文档
   docs/deployment/README.md, host-nginx.md  旧名全量修正
   README.md 迁移章节之外的示例命令修正;
             迁移章节(从 opsx-loki 升级)保留旧名作历史对照

【刻意不改】
  a) localStorage key(9 个)
     opsxloki.auth.{token,refresh-token,user}
     opsxloki.theme.mode / layout.collapsed / chunk-reloaded
     opsxloki.logs.{query-history,range-history}
     原因:改了所有在线用户立即掉登录,主题/折叠/查询历史全丢。
     要改必须配套迁移(参考 main.tsx 中 lokideploy.* → opsxloki.* 的写法)。

  b) 数据文件名 opsxloki.json(后端硬编码,改了读不到 DB)

  c) Go module 路径 opsxloki/...(159 处 import)
     属编译期内部标识,最终用户不可见;改名需全仓重构 + go.mod 变更。
This commit is contained in:
opsx committed 2026-10-26 17:30:30 +00:00
1 parent 3c9388658b
commit d0b9b6b71d
8 files changed
+43 -43

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ function useDocumentTitle() {
const location = useLocation()
useEffect(() => {
const title = findRouteMeta(location.pathname)?.title
document.title = title && location.pathname !== '/login' ? `${title} · opsx-loki` : 'opsx-loki'
document.title = title && location.pathname !== '/login' ? `${title} · lokistack` : 'lokistack'
}, [location.pathname])
}
+3 -3
View File
@@ -78,7 +78,7 @@ function SidebarLogo({ collapsed }: { collapsed: boolean }) {
<div className="w-8 h-8 rounded-lg border border-sidebar-primary/30 bg-sidebar-primary/15 flex items-center justify-center">
<Activity className="w-5 h-5 text-sidebar-primary" />
</div>
<span className="font-bold text-lg tracking-tight">opsx-loki</span>
<span className="font-bold text-lg tracking-tight">lokistack</span>
</div>
)}
</div>
@@ -140,7 +140,7 @@ const Layout = memo(function Layout({ children }: { children: React.ReactNode })
const user = getUser()
// 顶栏标题来自路由 meta
const pageTitle = findRouteMeta(location.pathname)?.title || 'opsx-loki'
const pageTitle = findRouteMeta(location.pathname)?.title || 'lokistack'
// 折叠状态持久化(仅桌面端语义)
useEffect(() => {
@@ -190,7 +190,7 @@ const Layout = memo(function Layout({ children }: { children: React.ReactNode })
<Sheet open={mobileOpen} onOpenChange={setMobileOpen}>
<SheetContent side="left" className="bg-sidebar text-sidebar-accent-foreground border-none p-0 w-72">
<SheetHeader className="sr-only">
<SheetTitle className="text-white">opsx-loki 导航</SheetTitle>
<SheetTitle className="text-white">lokistack 导航</SheetTitle>
</SheetHeader>
<div className="flex flex-col h-full">
<SidebarLogo collapsed={false} />
@@ -270,13 +270,13 @@ metadata:
apiVersion: v1
kind: ServiceAccount
metadata:
name: opsx-loki
name: lokistack
namespace: log
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: opsx-loki
name: lokistack
namespace: log
rules:
- apiGroups: [""]
@@ -292,29 +292,29 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: opsx-loki
name: lokistack
namespace: log
subjects:
- kind: ServiceAccount
name: opsx-loki
name: lokistack
namespace: log
roleRef:
kind: Role
name: opsx-loki
name: lokistack
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Secret
metadata:
name: opsx-loki-token
name: lokistack-token
namespace: log
annotations:
kubernetes.io/service-account.name: opsx-loki
kubernetes.io/service-account.name: lokistack
type: kubernetes.io/service-account-token
EOF
# 2) 取出长期 Token(不自动过期),粘贴到 Token 输入框
kubectl -n log get secret opsx-loki-token -o jsonpath='{.data.token}' | base64 -d`}</pre>
kubectl -n log get secret lokistack-token -o jsonpath='{.data.token}' | base64 -d`}</pre>
<p>
上面的 Namespace 由管理员创建,平台 Token 本身没有任何集群级权限。
只有确实需要平台自建命名空间时,才额外授予
+1 -1
View File
@@ -90,7 +90,7 @@ const Login = memo(function Login() {
<div className="inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-primary mb-3">
<Activity className="w-8 h-8 text-primary-foreground" />
</div>
<h1 className="text-2xl font-bold text-foreground">opsx-loki</h1>
<h1 className="text-2xl font-bold text-foreground">lokistack</h1>
<p className="text-sm text-muted-foreground mt-1">Kubernetes Loki 日志部署平台</p>
</div>
+1 -1
View File
@@ -152,7 +152,7 @@ const SettingsPage = memo(function SettingsPage() {
<CardHeader className="pb-3">
<CardTitle className="text-base flex items-center gap-2">
<SettingsIcon className="w-4 h-4" />
关于 opsx-loki
关于 lokistack
</CardTitle>
</CardHeader>
<CardContent>