// unified-query/QueryControlRow.tsx — 查询控制行(引擎徽标 + 输入框 + 查询按钮 + Live Tail) import { Play, Loader2, Radio } from 'lucide-react'; import { QueryAutocompleteInput } from '../QueryAutocompleteInput'; import { useTranslation } from 'react-i18next'; interface QueryControlRowProps { badge: { label: string; dotColor: string }; query: string; onQueryChange: (q: string) => void; effEngine: 'loki' | 'elasticsearch'; metaQueryPlaceholder: string; labelNames: string[]; labelValues: string[]; mappingFields: string[]; onRequestLabelValues: (label: string) => void; loading: boolean; liveTail: boolean; hasSource: boolean; onRun: () => void; onToggleLiveTail: () => void; } export function QueryControlRow({ badge, query, onQueryChange, effEngine, metaQueryPlaceholder, labelNames, labelValues, mappingFields, onRequestLabelValues, loading, liveTail, hasSource, onRun, onToggleLiveTail, }: QueryControlRowProps) { const { t } = useTranslation(); const canQuery = hasSource && query.trim().length > 0; return (