fix: check wizard config for initialized flag instead of backend health
- App checks wizard API for harborforge.json config with initialized=true - If not initialized, show embedded setup wizard (talks to wizard API via CORS) - Setup saves config with initialized:true to wizard config volume - After restart, backend reads config and starts, frontend sees initialized=true - Remove VITE_API_BASE build arg (not needed, api.ts uses /api relative path) - Fix Object.entries null crash in DashboardPage
This commit is contained in:
@@ -28,7 +28,7 @@ export default function DashboardPage() {
|
||||
<span className="stat-number">{stats.total_issues}</span>
|
||||
<span className="stat-label">总 Issues</span>
|
||||
</div>
|
||||
{Object.entries(stats.by_status).map(([k, v]) => (
|
||||
{Object.entries(stats.by_status || {}).map(([k, v]) => (
|
||||
<div className="stat-card" key={k} style={{ borderLeftColor: statusColors[k] || '#ccc' }}>
|
||||
<span className="stat-number">{v}</span>
|
||||
<span className="stat-label">{k}</span>
|
||||
@@ -39,7 +39,7 @@ export default function DashboardPage() {
|
||||
<div className="section">
|
||||
<h3>按优先级</h3>
|
||||
<div className="bar-chart">
|
||||
{Object.entries(stats.by_priority).map(([k, v]) => (
|
||||
{Object.entries(stats.by_priority || {}).map(([k, v]) => (
|
||||
<div className="bar-row" key={k}>
|
||||
<span className="bar-label">{k}</span>
|
||||
<div className="bar" style={{
|
||||
|
||||
Reference in New Issue
Block a user