Implementation:Apache Druid SupervisorHistoryPanel
| Knowledge Sources | |
|---|---|
| Domains | Streaming_Ingestion, Operations, Troubleshooting |
| Last Updated | 2026-02-10 00:00 GMT |
Overview
Concrete React component for displaying supervisor spec version history with diff comparison capability.
Description
The SupervisorHistoryPanel component fetches the supervisor's spec history from GET /druid/indexer/v1/supervisor/{id}/history and renders it as a tabbed list of spec versions. Each tab shows the spec JSON via ShowValue component. A "Diff with previous" button opens a DiffDialog that compares adjacent spec versions to highlight changes.
The component uses json-bigint-native for correct handling of large numeric values in spec JSON.
Usage
Render this component in the SupervisorTableActionDialog's "History" tab. It requires only the supervisor ID to fetch history.
Code Reference
Source Location
- Repository: Apache Druid
- File: web-console/src/components/supervisor-history-panel/supervisor-history-panel.tsx
- Lines: L43-L97
Signature
interface SupervisorHistoryPanelProps {
supervisorId: string;
}
export const SupervisorHistoryPanel = React.memo(function SupervisorHistoryPanel(
props: SupervisorHistoryPanelProps,
): JSX.Element {
// Fetches GET /druid/indexer/v1/supervisor/{id}/history?count=100
// Renders tabbed spec versions with diff capability
});
Import
import { SupervisorHistoryPanel } from '../../components/supervisor-history-panel/supervisor-history-panel';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| supervisorId | string | Yes | Supervisor ID to fetch history for |
Outputs
| Name | Type | Description |
|---|---|---|
| Version tabs | visual | Tabbed list of spec versions with ISO timestamps |
| Spec JSON | visual | Full JSON display of each spec version |
| Diff view | visual | Side-by-side diff between adjacent spec versions |
Usage Examples
In Supervisor Action Dialog
<SupervisorHistoryPanel
supervisorId="my-kafka-supervisor"
/>
// Renders tabs: "2024-01-15 10:30", "2024-01-14 09:00", "2024-01-10 14:00"
// Each tab shows the full supervisor spec JSON
// "Diff with previous" button shows what changed between versions
History API
const history = await Api.instance.get(
'/druid/indexer/v1/supervisor/my-kafka-supervisor/history?count=100'
);
// history.data = [
// { version: '2024-01-15T10:30:00.000Z', spec: { type: 'kafka', ... } },
// { version: '2024-01-14T09:00:00.000Z', spec: { type: 'kafka', ... } },
// ]