Files
QuantEngineByItz/tools/setup_host.sh
kjh2064 2ee759fed1 feat(ui): Complete Dashboard high-fidelity implementation and Playwright testing
Dashboard 고도화:
  - KPI 카드 4개 (Active Positions, Portfolio Value, Signal Quality, System Status)
  - Market Overview 섹션 (Market Status + System Health)
  - Performance Metrics 그리드 (YTD Return, Sharpe Ratio, Max Drawdown 등)
  - Algorithm Status 테이블 (P0~P6 진행 상황)
  - Live Signal Feed 테이블 (최근 5개 신호)

UI 완성도: 91/100 (우수)
  - Page Load: 15/15 (HTTP 200, 1.2s)
  - MudBlazor Components: 20/20 (Layout, AppBar, Card, Table, Chip 등)
  - Layout Structure: 20/20 (3단계 구조, Grid responsive)
  - Dashboard Content: 15/15 (KPI + 시장현황 + 성과 + 알고리즘 + 신호)
  - Navigation: 8/15 (기본 구현, 추가 페이지 필요)
  - Responsive Design: 10/10 (Mobile/Tablet/Desktop)
  - Accessibility: 3/5 (HTML meta 설정, ARIA 개선 필요)

Playwright 자동화 테스트:
  - test_ui_completeness.py: 종합 평가 스크립트
  - test_ui_with_details.py: 상세 DOM 분석 스크립트
  - DOM 요소: h4(1) h5(4) h6(12) / Card(9) Table(2) Chip(15)
  - 성능: Load ~1200ms, Memory ~12MB

UI Completeness Report:
  - 전체 평가 문서 생성
  - 성공 항목 (레이아웃, 컴포넌트, 콘텐츠, 반응형)
  - 개선 사항 (네비게이션 추가 페이지, 접근성)
  - 다음 단계 권장사항

기술:
  - MudBlazor 6.10.0 (Material Design)
  - Blazor Server (InteractiveServer)
  - PostgreSQL Dapper ORM
  - Program.cs: AddMudServices() 추가

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-25 18:05:57 +09:00

87 lines
2.4 KiB
Bash

#!/bin/bash
# Host Setup Script for Quant Engine (.NET 10 & Nginx)
# Must be executed with sudo privileges
set -e
NGINX_CONF="/etc/nginx/sites-available/gitea-ip.conf"
SERVICE_FILE="/etc/systemd/system/quantengine.service"
echo "========================================="
echo "Configuring Host Infrastructure Services"
echo "========================================="
# 1. Update Nginx Site Config
if [ -f "$NGINX_CONF" ]; then
if ! grep -q "location /quant/" "$NGINX_CONF"; then
echo "Injecting /quant/ proxy pass block into Nginx..."
python3 -c "
p = '$NGINX_CONF'
c = open(p).read()
sub = ''' # Blazor Web App (Quant Engine)
location /quant/ {
proxy_pass http://127.0.0.1:5000/;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection \"Upgrade\";
proxy_set_header Host \$host;
proxy_cache_bypass \$http_upgrade;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
}
'''
c = c.replace('location / {', sub + ' location / {')
open(p, 'w').write(c)
"
else
echo "Nginx /quant/ block already exists."
fi
else
echo "ERROR: Nginx conf not found at $NGINX_CONF"
exit 1
fi
# 2. Write Systemd Service File
echo "Writing systemd service file..."
cat > "$SERVICE_FILE" << 'EOF'
[Unit]
Description=Quant Engine Blazor Admin Web App (.NET 10)
After=network.target
[Service]
WorkingDirectory=/home/kjh2064/quantengine_active
ExecStart=/usr/bin/dotnet /home/kjh2064/quantengine_active/QuantEngine.Web.dll
Restart=always
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=quantengine
User=kjh2064
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=ASPNETCORE_URLS=http://127.0.0.1:5000
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
EOF
# 3. Reload Daemons
echo "Reloading systemd daemon..."
systemctl daemon-reload
systemctl enable quantengine
# 4. Run Deploy Script to populate active directory
echo "Executing deployment script..."
chmod +x /home/kjh2064/tmp/deploy.sh
bash /home/kjh2064/tmp/deploy.sh
# 5. Reload Nginx
echo "Testing Nginx config and reloading..."
nginx -t
systemctl reload nginx
echo "========================================="
echo "Host Configuration Successful!"
echo "========================================="