diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a80b64..a957d12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,11 +16,11 @@ jobs: with: go-version: '1.25' - name: Build - run: cd apps/server && go build ./... + run: cd server && go build ./... - name: Vet - run: cd apps/server && go vet ./... + run: cd server && go vet ./... - name: Test - run: cd apps/server && go test ./... + run: cd server && go test ./... web: name: Web + core packages @@ -59,4 +59,4 @@ jobs: libxdo-dev - uses: dtolnay/rust-toolchain@stable - name: Cargo check - run: cd apps/desktop/src-tauri && cargo check + run: cd src-tauri && cargo check diff --git a/Makefile b/Makefile index a0ed23e..15efe71 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ test: $(MAKE) test-ui test-go: - cd apps/server && go test ./... + cd server && go test ./... test-ui: npm run test:ui --if-present diff --git a/docs/BACKLOG.md b/docs/BACKLOG.md index b08a3db..3be8a54 100644 --- a/docs/BACKLOG.md +++ b/docs/BACKLOG.md @@ -228,3 +228,13 @@ | 文档/官网口径统一:删「Web 自托管」形态卡与双形态表述;FAQ 明确「浏览器不能操作」 | 已做 | > 验收口径:以上「已做」项均经 桌面 App 实测(本地 MySQL/Redis 单机 + 3 主 Cluster)或单测覆盖(38 例全绿);测试侧复跑按 §11 流程。 + +## 23. 三项目状态收敛 + opsxdb 设置重构与 DataGrip 高亮(2026-10-14) + +| 项 | 状态 | +|----|------| +| 三项目基线提交(防再丢) | opsxdb 456fa69 / opsxapi 6452026 / opsxshell be151cb;迁移/官网拆分等改动已全部入库。目录还原事件教训=每完成一步立即 commit | +| opsxdb 设置重构(对齐 opsxshell) | 左导航:搜索框 + 图标/主标题/副文案三层 + 选中左强调条;宽 176→208;语言切换(自动/中文/English)进常规分区 | +| 「连接已断开」横幅移除 | 已做:整条顶部红色横幅删除(状态行已有提示,顶部横幅不友好);重连能力保留 | +| SQL 高亮 DataGrip 风 | 已做:关键字亮蓝加粗 / 字符串红 / 数字浅绿 / 注释灰斜体 / 标识符浅灰白;light 同构对齐 IntelliJ | +| opsxapi 迁移 | 回滚到可用基线 6452026(apps 布局保留)——用户确认只做 opsxdb;迁移半成品已弃 | diff --git a/index.html b/index.html new file mode 100644 index 0000000..da0ae42 --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + + OpsxDB + + +
+ + + diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..8accdbc --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/public/icons/databases/dameng.svg b/public/icons/databases/dameng.svg new file mode 100644 index 0000000..5315156 --- /dev/null +++ b/public/icons/databases/dameng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/elasticsearch.svg b/public/icons/databases/elasticsearch.svg new file mode 100644 index 0000000..0da0d70 --- /dev/null +++ b/public/icons/databases/elasticsearch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/gaussdb.svg b/public/icons/databases/gaussdb.svg new file mode 100644 index 0000000..f115a85 --- /dev/null +++ b/public/icons/databases/gaussdb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/influxdb.svg b/public/icons/databases/influxdb.svg new file mode 100644 index 0000000..a6ed507 --- /dev/null +++ b/public/icons/databases/influxdb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/kingbase.svg b/public/icons/databases/kingbase.svg new file mode 100644 index 0000000..9d7f076 --- /dev/null +++ b/public/icons/databases/kingbase.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/mariadb.svg b/public/icons/databases/mariadb.svg new file mode 100644 index 0000000..33794b1 --- /dev/null +++ b/public/icons/databases/mariadb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/mongodb.svg b/public/icons/databases/mongodb.svg new file mode 100644 index 0000000..8660ced --- /dev/null +++ b/public/icons/databases/mongodb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/mysql.svg b/public/icons/databases/mysql.svg new file mode 100644 index 0000000..853c55f --- /dev/null +++ b/public/icons/databases/mysql.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/oceanbase.svg b/public/icons/databases/oceanbase.svg new file mode 100644 index 0000000..2ace405 --- /dev/null +++ b/public/icons/databases/oceanbase.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/opengauss.svg b/public/icons/databases/opengauss.svg new file mode 100644 index 0000000..6f46971 --- /dev/null +++ b/public/icons/databases/opengauss.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/oracle.svg b/public/icons/databases/oracle.svg new file mode 100644 index 0000000..f5449b2 --- /dev/null +++ b/public/icons/databases/oracle.svg @@ -0,0 +1 @@ +Oracle \ No newline at end of file diff --git a/public/icons/databases/polardb.png b/public/icons/databases/polardb.png new file mode 100644 index 0000000..197ba75 Binary files /dev/null and b/public/icons/databases/polardb.png differ diff --git a/public/icons/databases/postgresql.svg b/public/icons/databases/postgresql.svg new file mode 100644 index 0000000..abacb8f --- /dev/null +++ b/public/icons/databases/postgresql.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/redis.svg b/public/icons/databases/redis.svg new file mode 100644 index 0000000..1981b34 --- /dev/null +++ b/public/icons/databases/redis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/sqlite.svg b/public/icons/databases/sqlite.svg new file mode 100644 index 0000000..dde0558 --- /dev/null +++ b/public/icons/databases/sqlite.svg @@ -0,0 +1,7 @@ + + SQLite + + + + + diff --git a/public/icons/databases/sqlserver.svg b/public/icons/databases/sqlserver.svg new file mode 100644 index 0000000..b23e83d --- /dev/null +++ b/public/icons/databases/sqlserver.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/tdsql.svg b/public/icons/databases/tdsql.svg new file mode 100644 index 0000000..65627ff --- /dev/null +++ b/public/icons/databases/tdsql.svg @@ -0,0 +1,15 @@ + + + + + + + Tencent Cloud + + + + + + + + diff --git a/public/icons/databases/tidb.svg b/public/icons/databases/tidb.svg new file mode 100644 index 0000000..ee0b723 --- /dev/null +++ b/public/icons/databases/tidb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/databases/zookeeper.svg b/public/icons/databases/zookeeper.svg new file mode 100644 index 0000000..a281bab --- /dev/null +++ b/public/icons/databases/zookeeper.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/icons/icon-512.png b/public/icons/icon-512.png new file mode 100644 index 0000000..165a23b Binary files /dev/null and b/public/icons/icon-512.png differ diff --git a/run.sh b/run.sh index 4467eda..4cd2ca0 100755 --- a/run.sh +++ b/run.sh @@ -10,14 +10,14 @@ # ./run.sh stop|restart|status|help # # 产品形态:浏览器 = 官网/docs;操作 = 桌面 Tauri。 -# apps/web 的 Vite 仅作桌面打包/devUrl 源,不要用浏览器当工作台。 +# src 的 Vite 仅作桌面打包/devUrl 源,不要用浏览器当工作台。 set -euo pipefail PROJECT_NAME="OpsxDB" SERVER_PORT="${OPSXDB_SERVER_PORT:-8788}" WEB_PORT="${OPSXDB_WEB_PORT:-5174}" -SERVER_DIR="apps/server" +SERVER_DIR="server" SERVER_BIN="opsxdb-server" SERVER_LABEL="com.opsx.db.server" WEB_LABEL="com.opsx.db.web" @@ -119,9 +119,9 @@ ensure_npm() { warning "缺少 node_modules,正在 npm install..." npm install fi - if [ ! -d "$SCRIPT_DIR/apps/desktop/node_modules" ]; then + if [ ! -d "$SCRIPT_DIR/node_modules" ]; then warning "desktop 缺少依赖,正在安装..." - npm --prefix "$SCRIPT_DIR/apps/desktop" install + npm install fi } @@ -183,7 +183,7 @@ start_vite_for_desktop() { ensure_npm kill_port "$WEB_PORT" # Vite 用 nohup:launchctl submit 在本机对 npm -w 经常交不出进程(web.log 空、40s 超时) - nohup /bin/bash -lc "export PATH=\"$NODE_BIN_DIR:/opt/homebrew/bin:/usr/local/bin:\$PATH\"; cd \"$SCRIPT_DIR\" && exec npm run dev -w @opsxdb/web" >>"$WEB_LOG" 2>&1 >"$WEB_LOG" 2>&1 void }) { const openConnectionList = useWorkspaceStore((s) => s.openConnectionList); const [drivers, setDrivers] = useState(null); + const [navSearch, setNavSearch] = useState(""); const [version, setVersion] = useState(""); useEffect(() => { @@ -99,19 +100,37 @@ export function SettingsModal({ onClose }: { onClose: () => void }) { return (
- {/* 左导航 */} -