Major changes: - New frontend (platform/web/): Vite + React 18 + TypeScript + Tailwind - 4-module navigation: 数据送标 / 模型管理 / 车队管理 / 系统管理 - Data catalog with charts (DMS/ADAS/Lane 3-tab view) - Quality review workflow (标注质检): Good/Fine/Bad scoring with auto-advance - Audit enhancements: batch operations, rejection categories, Feishu notifications - Operation audit log (操作日志) - World model simulation studio (仿真工坊) - Dataset version management with snapshots and diff - ADAS 7-class dataset integration (138K images organized + compressed) - User management with Feishu integration and pagination - CRUD/search/filter on all pages, card layout redesign - PIL-optimized image overlay rendering - Auto-snapshot on build, in_review workflow stage - Removed embedded algorithm code (now in workspace)
61 lines
1.8 KiB
Bash
Executable File
61 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build HSAP standalone frontend from platform/web/ and deploy to platform/ui-hsap/dist/
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
echo "[web] Installing dependencies..."
|
|
cd "$ROOT/platform/web"
|
|
npm ci --silent
|
|
|
|
echo "[web] Building..."
|
|
npm run build
|
|
|
|
DIST="$ROOT/platform/ui-hsap/dist"
|
|
|
|
# Copy Label Studio Editor legacy build for /annotate/
|
|
EDITOR_SRC="${LABEL_STUDIO_DIST:-${ROOT}/../workspace/BK2/label-studio/web/dist/apps/hsap-platform}"
|
|
if [ -d "$EDITOR_SRC" ]; then
|
|
mkdir -p "$DIST/annotate"
|
|
cp -r "$EDITOR_SRC"/* "$DIST/annotate/"
|
|
|
|
# Copy webpack chunks to dist root (webpack publicPath="/" loads them from root)
|
|
for f in editor.js 849.js 710.js 408.js 63.js main.css editor.css; do
|
|
[ -f "$DIST/annotate/$f" ] && cp "$DIST/annotate/$f" "$DIST/$f"
|
|
done
|
|
|
|
# Custom annotate index.html
|
|
cat > "$DIST/annotate/index.html" << 'HTMLEOF'
|
|
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>HSAP · 标注编辑器</title>
|
|
<base href="/" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="stylesheet" href="/annotate/main.css" />
|
|
<link rel="stylesheet" href="/annotate/editor.css" />
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script>
|
|
(function() {
|
|
var p = new URLSearchParams(location.search);
|
|
var cid = p.get('c');
|
|
if (cid) {
|
|
history.replaceState(null, '', '/labeling/campaigns/' + cid + '/annotate');
|
|
}
|
|
})();
|
|
</script>
|
|
<script src="/annotate/main.js"></script>
|
|
</body>
|
|
</html>
|
|
HTMLEOF
|
|
echo "[web] Annotate editor (legacy LS) deployed from $EDITOR_SRC"
|
|
else
|
|
echo "[web] ⚠ annotate editor source not found at $EDITOR_SRC"
|
|
fi
|
|
|
|
echo "[web] Build complete → $DIST"
|
|
echo "[web] Files:"
|
|
ls -lh "$DIST/index.html" "$DIST/assets/" | head -8
|