fix: Remove deploy status, autorefresh, and refresh button from Orchestrator
- Remove DeployStatus component import and usage - Remove autoRefresh checkbox and refreshing state - Remove refresh button - Simplify header layout 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
@@ -23,7 +23,6 @@ import {
|
|||||||
ArrowUpCircle,
|
ArrowUpCircle,
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { StoreOrchestratorPanel } from '../components/StoreOrchestratorPanel';
|
import { StoreOrchestratorPanel } from '../components/StoreOrchestratorPanel';
|
||||||
import { DeployStatus } from '../components/DeployStatus';
|
|
||||||
|
|
||||||
interface CrawlHealth {
|
interface CrawlHealth {
|
||||||
status: 'ok' | 'degraded' | 'stale' | 'error';
|
status: 'ok' | 'degraded' | 'stale' | 'error';
|
||||||
@@ -99,26 +98,16 @@ export function OrchestratorDashboard() {
|
|||||||
const [stores, setStores] = useState<StoreInfo[]>([]);
|
const [stores, setStores] = useState<StoreInfo[]>([]);
|
||||||
const [totalStores, setTotalStores] = useState(0);
|
const [totalStores, setTotalStores] = useState(0);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [autoRefresh, setAutoRefresh] = useState(true);
|
|
||||||
const [selectedStore, setSelectedStore] = useState<StoreInfo | null>(null);
|
const [selectedStore, setSelectedStore] = useState<StoreInfo | null>(null);
|
||||||
const [panelTab, setPanelTab] = useState<'control' | 'trace' | 'profile' | 'module' | 'debug'>('control');
|
const [panelTab, setPanelTab] = useState<'control' | 'trace' | 'profile' | 'module' | 'debug'>('control');
|
||||||
const [crawlHealth, setCrawlHealth] = useState<CrawlHealth | null>(null);
|
const [crawlHealth, setCrawlHealth] = useState<CrawlHealth | null>(null);
|
||||||
const [analyticsHealth, setAnalyticsHealth] = useState<AnalyticsHealth | null>(null);
|
const [analyticsHealth, setAnalyticsHealth] = useState<AnalyticsHealth | null>(null);
|
||||||
const [refreshing, setRefreshing] = useState(false);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loadData();
|
loadData();
|
||||||
|
}, [selectedState]);
|
||||||
|
|
||||||
if (autoRefresh) {
|
const loadData = async () => {
|
||||||
const interval = setInterval(() => loadData(false), 30000);
|
|
||||||
return () => clearInterval(interval);
|
|
||||||
}
|
|
||||||
}, [autoRefresh, selectedState]);
|
|
||||||
|
|
||||||
const loadData = async (isManualRefresh = false) => {
|
|
||||||
if (isManualRefresh) {
|
|
||||||
setRefreshing(true);
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
// stateParam is undefined for "All States", or the state code for specific state
|
// stateParam is undefined for "All States", or the state code for specific state
|
||||||
const [metricsData, statesData, storesData, crawlHealthData, analyticsHealthData] = await Promise.all([
|
const [metricsData, statesData, storesData, crawlHealthData, analyticsHealthData] = await Promise.all([
|
||||||
@@ -139,7 +128,6 @@ export function OrchestratorDashboard() {
|
|||||||
console.error('Failed to load orchestrator data:', error);
|
console.error('Failed to load orchestrator data:', error);
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
setRefreshing(false);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -259,37 +247,13 @@ export function OrchestratorDashboard() {
|
|||||||
<Layout>
|
<Layout>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex items-center justify-between">
|
<div>
|
||||||
<div>
|
<h1 className="text-2xl font-bold text-gray-900">Orchestrator Dashboard</h1>
|
||||||
<h1 className="text-2xl font-bold text-gray-900">Orchestrator Dashboard</h1>
|
<p className="text-sm text-gray-600 mt-1">
|
||||||
<p className="text-sm text-gray-600 mt-1">
|
Crawler observability and per-store monitoring
|
||||||
Crawler observability and per-store monitoring
|
</p>
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center gap-3">
|
|
||||||
<label className="flex items-center gap-2 text-sm text-gray-600">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
className="checkbox checkbox-sm"
|
|
||||||
checked={autoRefresh}
|
|
||||||
onChange={(e) => setAutoRefresh(e.target.checked)}
|
|
||||||
/>
|
|
||||||
Auto-refresh (30s)
|
|
||||||
</label>
|
|
||||||
<button
|
|
||||||
onClick={() => loadData(true)}
|
|
||||||
disabled={refreshing}
|
|
||||||
className="btn btn-sm btn-outline gap-2"
|
|
||||||
>
|
|
||||||
<RefreshCw className={`w-4 h-4 ${refreshing ? 'animate-spin' : ''}`} />
|
|
||||||
{refreshing ? 'Refreshing...' : 'Refresh'}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Deploy Status Panel */}
|
|
||||||
<DeployStatus />
|
|
||||||
|
|
||||||
{/* Metrics Cards - Clickable - Responsive: 2→3→4→7 columns */}
|
{/* Metrics Cards - Clickable - Responsive: 2→3→4→7 columns */}
|
||||||
{metrics && (
|
{metrics && (
|
||||||
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-7 gap-3 md:gap-4">
|
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-7 gap-3 md:gap-4">
|
||||||
|
|||||||
Reference in New Issue
Block a user