@milabench/bujang 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +1 -0
- package/dist/index.js +7828 -7044
- package/dist/index.js.map +1 -1
- package/dist/theme.css +26 -0
- package/dist/types.d.ts +63 -10
- package/dist/views/AgentActivityView.d.ts +2 -1
- package/dist/views/JobArtifacts.d.ts +1 -0
- package/dist/views/JobDataOverview.d.ts +4 -3
- package/dist/views/JobSubmit.d.ts +1 -0
- package/dist/views/JobsTable.d.ts +57 -0
- package/dist/views/OverviewPanels.d.ts +38 -9
- package/dist/views/SettingsView.d.ts +4 -0
- package/dist/views/dataCharts.d.ts +11 -7
- package/package.json +1 -1
- package/src/api.ts +9 -2
- package/src/components/SshConnectDialog.tsx +1 -1
- package/src/theme.css +26 -0
- package/src/types.ts +48 -6
- package/src/views/AgentActivityView.tsx +14 -5
- package/src/views/JobArtifacts.tsx +1 -1
- package/src/views/JobDataOverview.tsx +125 -138
- package/src/views/JobLogs.tsx +18 -8
- package/src/views/JobMarks.tsx +1 -1
- package/src/views/JobSubmit.tsx +27 -21
- package/src/views/JobsTable.tsx +746 -0
- package/src/views/JobsView.tsx +83 -518
- package/src/views/OverviewPanels.tsx +940 -88
- package/src/views/PipelineEditor.tsx +1 -1
- package/src/views/PipelinesView.tsx +3 -0
- package/src/views/ScheduleDialog.tsx +1 -1
- package/src/views/ScheduledJobsView.tsx +2 -2
- package/src/views/SettingsView.tsx +80 -18
- package/src/views/SweepDialog.tsx +1 -1
- package/src/views/dataCharts.tsx +21 -11
|
@@ -692,7 +692,7 @@ export const PipelineBuilder: React.FC<{
|
|
|
692
692
|
<Dialog.Root open={isOpen} onOpenChange={(details) => { if (!details.open) onClose(); }} size="cover">
|
|
693
693
|
<Dialog.Backdrop />
|
|
694
694
|
<Dialog.Positioner>
|
|
695
|
-
<Dialog.Content maxW="1100px" h="min(760px, 90vh)" display="flex" flexDirection="column">
|
|
695
|
+
<Dialog.Content className="bujang-dialog" maxW="1100px" h="min(760px, 90vh)" display="flex" flexDirection="column">
|
|
696
696
|
<Dialog.Header py={3} px={4} borderBottom="1px solid" borderColor="var(--color-border)">
|
|
697
697
|
<HStack gap={3} w="100%" pr={8} align="flex-start">
|
|
698
698
|
<Input
|
|
@@ -42,6 +42,7 @@ import type {
|
|
|
42
42
|
PipelineRunStep,
|
|
43
43
|
PipelineRunState
|
|
44
44
|
} from '../types';
|
|
45
|
+
import { AgentBadge } from './AgentActivityView';
|
|
45
46
|
import { PipelineBuilder } from './PipelineEditor';
|
|
46
47
|
import type { PipelineTemplateFileData } from './PipelineEditor';
|
|
47
48
|
import { usePageTitle } from '../hooks/usePageTitle';
|
|
@@ -175,6 +176,7 @@ const PipelineRunProgress: React.FC<{ runId: string }> = ({ runId }) => {
|
|
|
175
176
|
<HStack gap={3} flexWrap="wrap">
|
|
176
177
|
<Heading size="md" color="var(--color-text)">{run.name || runId}</Heading>
|
|
177
178
|
<Badge colorPalette={runStateColor(run.status, run.state)} size="lg">{label}</Badge>
|
|
179
|
+
<AgentBadge tag={run.agent} />
|
|
178
180
|
<Text fontFamily="mono" fontSize="sm" color="var(--color-text-muted)">{runId}</Text>
|
|
179
181
|
<Spacer />
|
|
180
182
|
<Text fontSize="xs" color="var(--color-text-muted)">
|
|
@@ -741,6 +743,7 @@ export const PipelineDetailsView: React.FC = () => {
|
|
|
741
743
|
>
|
|
742
744
|
<HStack gap={2}>
|
|
743
745
|
<Badge size="sm" colorPalette={runStateColor(run.status, state ?? undefined)}>{runLabel(run, state)}</Badge>
|
|
746
|
+
<AgentBadge tag={run.agent} />
|
|
744
747
|
<Spacer />
|
|
745
748
|
<Text fontSize="xs" color="var(--color-text-muted)" title={formatStarted(run.started)}>
|
|
746
749
|
{formatAgo(run.started)}
|
|
@@ -32,7 +32,7 @@ const ScheduleDialog: React.FC<ScheduleDialogProps> = ({ onClose, onSave, isSavi
|
|
|
32
32
|
<Dialog.Root open onOpenChange={(details) => { if (!details.open) onClose(); }} size="md">
|
|
33
33
|
<Dialog.Backdrop />
|
|
34
34
|
<Dialog.Positioner>
|
|
35
|
-
<Dialog.Content>
|
|
35
|
+
<Dialog.Content className="bujang-dialog">
|
|
36
36
|
<Dialog.Header py={3} px={4} borderBottom="1px solid" borderColor="var(--color-border)">
|
|
37
37
|
<Dialog.Title fontSize="md" color="var(--color-text)">Schedule this job</Dialog.Title>
|
|
38
38
|
</Dialog.Header>
|
|
@@ -176,7 +176,7 @@ const TemplateSyncDialog: React.FC<{
|
|
|
176
176
|
>
|
|
177
177
|
<Dialog.Backdrop />
|
|
178
178
|
<Dialog.Positioner>
|
|
179
|
-
<Dialog.Content maxW="95vw" maxH="95vh" overflow="hidden" display="flex" flexDirection="column">
|
|
179
|
+
<Dialog.Content className="bujang-dialog" maxW="95vw" maxH="95vh" overflow="hidden" display="flex" flexDirection="column">
|
|
180
180
|
<Dialog.Header>
|
|
181
181
|
<Dialog.Title>
|
|
182
182
|
Update "{job?.name}" from template {job?.source_template ? <Code>{job.source_template}</Code> : null}
|
|
@@ -348,7 +348,7 @@ const EditScheduledJobDialog: React.FC<{
|
|
|
348
348
|
>
|
|
349
349
|
<Dialog.Backdrop />
|
|
350
350
|
<Dialog.Positioner>
|
|
351
|
-
<Dialog.Content maxW="95vw" maxH="95vh" overflow="hidden" display="flex" flexDirection="column">
|
|
351
|
+
<Dialog.Content className="bujang-dialog" maxW="95vw" maxH="95vh" overflow="hidden" display="flex" flexDirection="column">
|
|
352
352
|
<Dialog.Header>
|
|
353
353
|
<Dialog.Title>Edit scheduled job</Dialog.Title>
|
|
354
354
|
<Dialog.CloseTrigger />
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
LuSettings,
|
|
32
32
|
LuTerminal,
|
|
33
33
|
LuTrash2,
|
|
34
|
+
LuTable,
|
|
34
35
|
} from 'react-icons/lu';
|
|
35
36
|
import {
|
|
36
37
|
deleteSlurmSecret,
|
|
@@ -53,7 +54,7 @@ import type {
|
|
|
53
54
|
SettingsSecrets,
|
|
54
55
|
SshCheckResult,
|
|
55
56
|
SshPlan,
|
|
56
|
-
SshPluginStatus,
|
|
57
|
+
SshHostMerge, SshPluginStatus,
|
|
57
58
|
SshSettings,
|
|
58
59
|
SshTestResponse,
|
|
59
60
|
} from '../types';
|
|
@@ -84,6 +85,7 @@ const Section = LinkableCard;
|
|
|
84
85
|
/** The cards of the page, in order: their ids are the URL hashes (/settings#ssh) */
|
|
85
86
|
const SECTIONS: { id: string; label: string }[] = [
|
|
86
87
|
{ id: 'general', label: 'General' },
|
|
88
|
+
{ id: 'display', label: 'Display' },
|
|
87
89
|
{ id: 'ssh', label: 'SSH' },
|
|
88
90
|
{ id: 'secrets', label: 'Secrets' },
|
|
89
91
|
{ id: 'folders', label: 'Folders' },
|
|
@@ -232,6 +234,43 @@ const GeneralCard: React.FC<{ info: SettingsInfo }> = ({ info }) => {
|
|
|
232
234
|
);
|
|
233
235
|
};
|
|
234
236
|
|
|
237
|
+
// ─── Display ────────────────────────────────────────────────────────
|
|
238
|
+
|
|
239
|
+
/** jobs_merged: one table for the active and the persisted jobs on the Jobs page; saved at once */
|
|
240
|
+
export const DisplayCard: React.FC<{ info: SettingsInfo }> = ({ info }) => {
|
|
241
|
+
const queryClient = useQueryClient();
|
|
242
|
+
const field = info.fields.jobs_merged;
|
|
243
|
+
const editable = info.writable && !!info.user_file.path && !field.overridden;
|
|
244
|
+
const save = useMutation({
|
|
245
|
+
mutationFn: (value: boolean) => updateSettings({ jobs_merged: value }),
|
|
246
|
+
onSuccess: (out) => queryClient.setQueryData(SETTINGS_KEY, out.settings),
|
|
247
|
+
onError: fail('Could not save jobs_merged'),
|
|
248
|
+
});
|
|
249
|
+
return (
|
|
250
|
+
<Section id="display" icon={<LuTable />} title="Display" subtitle="Saved to the user file, applies now.">
|
|
251
|
+
<Field.Root>
|
|
252
|
+
<HStack justify="space-between" w="100%" wrap="wrap" gap={2}>
|
|
253
|
+
<Checkbox.Root
|
|
254
|
+
checked={field.value !== false}
|
|
255
|
+
disabled={!editable || save.isPending}
|
|
256
|
+
onCheckedChange={(e) => save.mutate(!!e.checked)}
|
|
257
|
+
>
|
|
258
|
+
<Checkbox.HiddenInput />
|
|
259
|
+
<Checkbox.Control />
|
|
260
|
+
<Checkbox.Label color="var(--color-text)" fontSize="sm">
|
|
261
|
+
One table for the active and the persisted jobs (jobs_merged)
|
|
262
|
+
</Checkbox.Label>
|
|
263
|
+
</Checkbox.Root>
|
|
264
|
+
<FieldBadges field={field} />
|
|
265
|
+
</HStack>
|
|
266
|
+
<Field.HelperText color="var(--color-text-muted)">
|
|
267
|
+
Jobs page. Unchecked: a table for the active jobs and one for the persisted jobs.
|
|
268
|
+
</Field.HelperText>
|
|
269
|
+
</Field.Root>
|
|
270
|
+
</Section>
|
|
271
|
+
);
|
|
272
|
+
};
|
|
273
|
+
|
|
235
274
|
// ─── Folders ────────────────────────────────────────────────────────
|
|
236
275
|
|
|
237
276
|
/** show_examples: list the example scripts and pipelines (built-in, *_example*); saved at once */
|
|
@@ -542,16 +581,49 @@ const DiffView: React.FC<{ diff: string }> = ({ diff }) => (
|
|
|
542
581
|
</Box>
|
|
543
582
|
);
|
|
544
583
|
|
|
584
|
+
/** The hosts of a plugin the user has entries for: whose options are used (the user's win) */
|
|
585
|
+
const HostMerges: React.FC<{ hosts: SshHostMerge[]; plugin: string }> = ({ hosts, plugin }) => {
|
|
586
|
+
const merged = hosts.filter(h => h.source !== null && Object.keys(h.yours).length > 0);
|
|
587
|
+
if (!merged.length) return null;
|
|
588
|
+
const options = (values: Record<string, string>) =>
|
|
589
|
+
Object.entries(values).map(([key, value]) => `${key} ${value}`).join(', ') || '—';
|
|
590
|
+
return (
|
|
591
|
+
<Box overflowX="auto">
|
|
592
|
+
<Text fontSize="sm" color="var(--color-text)" mb={1}>
|
|
593
|
+
Merged with your own entries, which win and are not changed:
|
|
594
|
+
</Text>
|
|
595
|
+
<Table.Root size="sm" variant="outline">
|
|
596
|
+
<Table.Header>
|
|
597
|
+
<Table.Row>
|
|
598
|
+
{['Host', 'Yours', `From ${plugin}`].map(h => <Table.ColumnHeader key={h}>{h}</Table.ColumnHeader>)}
|
|
599
|
+
</Table.Row>
|
|
600
|
+
</Table.Header>
|
|
601
|
+
<Table.Body>
|
|
602
|
+
{merged.map(h => (
|
|
603
|
+
<Table.Row key={h.alias}>
|
|
604
|
+
<Table.Cell fontFamily="mono" fontSize="xs">
|
|
605
|
+
{h.alias}{h.source !== h.alias && <Text color="var(--color-text-muted)">your Host {h.source}</Text>}
|
|
606
|
+
</Table.Cell>
|
|
607
|
+
<Table.Cell fontFamily="mono" fontSize="xs">{options(h.yours)}</Table.Cell>
|
|
608
|
+
<Table.Cell fontFamily="mono" fontSize="xs" color="var(--color-text-muted)">{options(h.plugin)}</Table.Cell>
|
|
609
|
+
</Table.Row>
|
|
610
|
+
))}
|
|
611
|
+
</Table.Body>
|
|
612
|
+
</Table.Root>
|
|
613
|
+
</Box>
|
|
614
|
+
);
|
|
615
|
+
};
|
|
616
|
+
|
|
545
617
|
const PluginBlock: React.FC<{
|
|
546
618
|
plugin: SshPluginStatus;
|
|
547
619
|
file: string;
|
|
548
620
|
writable: boolean;
|
|
549
621
|
onChanged: () => void;
|
|
550
622
|
}> = ({ plugin, file, writable, onChanged }) => {
|
|
551
|
-
const [values, setValues] = useState<Record<string, string>>(plugin.values);
|
|
623
|
+
const [values, setValues] = useState<Record<string, string>>({ ...plugin.inferred, ...plugin.values });
|
|
552
624
|
const [dedupe, setDedupe] = useState(false);
|
|
553
625
|
const [plan, setPlan] = useState<SshPlan | null>(null);
|
|
554
|
-
useEffect(() => { setValues(plugin.values); setPlan(null); }, [plugin, file]);
|
|
626
|
+
useEffect(() => { setValues({ ...plugin.inferred, ...plugin.values }); setPlan(null); }, [plugin, file]);
|
|
555
627
|
|
|
556
628
|
const request = (action: 'install' | 'remove') => ({
|
|
557
629
|
file,
|
|
@@ -605,18 +677,7 @@ const PluginBlock: React.FC<{
|
|
|
605
677
|
{plugin.duplicates} more bujang:{plugin.name} block(s) in the file: dedupe removes them.
|
|
606
678
|
</Text>
|
|
607
679
|
)}
|
|
608
|
-
{
|
|
609
|
-
<Box>
|
|
610
|
-
<Text fontSize="sm" color="var(--color-text)">
|
|
611
|
-
Entries outside the block define the same hosts; ssh uses the first value it finds:
|
|
612
|
-
</Text>
|
|
613
|
-
{plugin.conflicts.map(c => (
|
|
614
|
-
<Text key={`${c.line}-${c.alias}`} fontSize="xs" fontFamily="mono" color="var(--color-text-muted)">
|
|
615
|
-
line {c.line}: {c.text}
|
|
616
|
-
</Text>
|
|
617
|
-
))}
|
|
618
|
-
</Box>
|
|
619
|
-
)}
|
|
680
|
+
<HostMerges hosts={plan?.action === 'install' ? plan.hosts : plugin.hosts} plugin={plugin.name} />
|
|
620
681
|
|
|
621
682
|
{plugin.placeholders.length > 0 && (
|
|
622
683
|
<Grid templateColumns={{ base: '1fr', md: 'repeat(2, minmax(0, 1fr))' }} gap={3}>
|
|
@@ -636,15 +697,15 @@ const PluginBlock: React.FC<{
|
|
|
636
697
|
</Grid>
|
|
637
698
|
)}
|
|
638
699
|
|
|
639
|
-
<HStack gap={3} wrap="wrap">
|
|
700
|
+
{plugin.duplicates > 0 && <HStack gap={3} wrap="wrap">
|
|
640
701
|
<Checkbox.Root checked={dedupe} onCheckedChange={(e) => { setDedupe(!!e.checked); setPlan(null); }}>
|
|
641
702
|
<Checkbox.HiddenInput />
|
|
642
703
|
<Checkbox.Control />
|
|
643
704
|
<Checkbox.Label color="var(--color-text)" fontSize="sm">
|
|
644
|
-
Dedupe: drop the
|
|
705
|
+
Dedupe: drop the other copies of the block
|
|
645
706
|
</Checkbox.Label>
|
|
646
707
|
</Checkbox.Root>
|
|
647
|
-
</HStack>
|
|
708
|
+
</HStack>}
|
|
648
709
|
|
|
649
710
|
<HStack gap={2} wrap="wrap">
|
|
650
711
|
<Button size="sm" colorPalette="blue" variant="outline" disabled={missing.length > 0}
|
|
@@ -1090,6 +1151,7 @@ export const SettingsView: React.FC = () => {
|
|
|
1090
1151
|
<VStack align="stretch" gap={6}>
|
|
1091
1152
|
{!info.writable && <ReadOnlyNote reason={info.read_only_reason} />}
|
|
1092
1153
|
<GeneralCard info={info} />
|
|
1154
|
+
<DisplayCard info={info} />
|
|
1093
1155
|
<SshCard info={info} />
|
|
1094
1156
|
<SecretsCard writable={info.writable} />
|
|
1095
1157
|
<FoldersCard info={info} />
|
|
@@ -373,7 +373,7 @@ const SweepDialog: React.FC<SweepDialogProps> = ({
|
|
|
373
373
|
<Dialog.Root open={isOpen} onOpenChange={(details) => { if (!details.open) onClose(); }} size="cover">
|
|
374
374
|
<Dialog.Backdrop />
|
|
375
375
|
<Dialog.Positioner>
|
|
376
|
-
<Dialog.Content maxW="1200px" h="min(760px, 90vh)" display="flex" flexDirection="column">
|
|
376
|
+
<Dialog.Content className="bujang-dialog" maxW="1200px" h="min(760px, 90vh)" display="flex" flexDirection="column">
|
|
377
377
|
<Dialog.Header py={3} px={4} borderBottom="1px solid" borderColor="var(--color-border)">
|
|
378
378
|
<Dialog.Title fontSize="md" color="var(--color-text)">Sweep: a pipeline from this job</Dialog.Title>
|
|
379
379
|
</Dialog.Header>
|
package/src/views/dataCharts.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Charts of the JSONL data of a job: the chart builder, its Vega-Lite spec, and the chart itself. */
|
|
2
2
|
import React, { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { Alert, Box } from '@chakra-ui/react';
|
|
4
|
-
import type { JobData, JobDataField, JobDataRole,
|
|
4
|
+
import type { JobData, JobDataField, JobDataRole, OverviewBlock } from '../types';
|
|
5
5
|
import { useColorMode } from '../hooks/useColorMode';
|
|
6
6
|
|
|
7
7
|
/** Rows fetched for a chart (the server caps at 500k) */
|
|
@@ -15,7 +15,7 @@ export const MARKS = ['point', 'line', 'bar', 'tick', 'boxplot', 'area', 'rect']
|
|
|
15
15
|
export const AGGREGATES = ['', 'mean', 'median', 'sum', 'min', 'max', 'count'] as const;
|
|
16
16
|
/** Events listed first: the plotted ones (the server gives each event its role) */
|
|
17
17
|
export const ROLE_ORDER: Record<JobDataRole, number> = { metric: 0, other: 1, log: 2 };
|
|
18
|
-
/** The keys of a `bujang.
|
|
18
|
+
/** The keys of a `bujang.instrumentation` line around its data: never a category of a chart */
|
|
19
19
|
export const ENVELOPE_FIELDS = new Set(['type', 'event', 'level', 'logger', 'message', 'exception']);
|
|
20
20
|
|
|
21
21
|
export interface Builder {
|
|
@@ -175,7 +175,8 @@ export const VegaChart: React.FC<{ spec: Record<string, unknown>; rows: Record<s
|
|
|
175
175
|
}, [spec, rows, colorMode]);
|
|
176
176
|
|
|
177
177
|
return (
|
|
178
|
-
|
|
178
|
+
// room for the chart while it loads
|
|
179
|
+
<Box w="100%" minH={`${Math.min(typeof spec.height === 'number' ? spec.height + 20 : spec.height ? 100 : 340, 340)}px`}>
|
|
179
180
|
{error && (
|
|
180
181
|
<Alert.Root status="error" mb={2}>
|
|
181
182
|
<Alert.Indicator />
|
|
@@ -190,15 +191,24 @@ export const VegaChart: React.FC<{ spec: Record<string, unknown>; rows: Record<s
|
|
|
190
191
|
);
|
|
191
192
|
};
|
|
192
193
|
|
|
193
|
-
/** The
|
|
194
|
-
export const
|
|
195
|
-
|
|
194
|
+
/** The events of a panel (`event`: comma separated, "" for the records without event) */
|
|
195
|
+
export const panelEvents = (event?: string): string[] => {
|
|
196
|
+
const list = (event || '').split(',').map((e) => e.trim()).filter(Boolean);
|
|
197
|
+
return list.length ? list : [''];
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/** The files that have rows of `event` (comma separated events) */
|
|
201
|
+
export const filesWithEvent = (files: JobData['files'], event: string): JobData['files'] => {
|
|
202
|
+
const events = panelEvents(event);
|
|
203
|
+
return files.filter((f) => f.events?.some((e) => events.includes(e.event)));
|
|
204
|
+
};
|
|
196
205
|
|
|
197
|
-
/** The fields of `event` in `files`, merged (counts added, ranges widened, values joined) */
|
|
206
|
+
/** The fields of `event` (comma separated events) in `files`, merged (counts added, ranges widened, values joined) */
|
|
198
207
|
export const mergeFields = (files: JobData['files'], event: string): JobDataField[] => {
|
|
199
208
|
const merged = new Map<string, JobDataField>();
|
|
209
|
+
const events = panelEvents(event);
|
|
200
210
|
files.forEach((f) =>
|
|
201
|
-
f.events?.filter((e) => e.event
|
|
211
|
+
f.events?.filter((e) => events.includes(e.event)).forEach((e) =>
|
|
202
212
|
e.fields.forEach((field) => {
|
|
203
213
|
const prev = merged.get(field.name);
|
|
204
214
|
if (!prev) {
|
|
@@ -218,7 +228,7 @@ export const mergeFields = (files: JobData['files'], event: string): JobDataFiel
|
|
|
218
228
|
};
|
|
219
229
|
|
|
220
230
|
/** The files a panel reads (`files`: comma separated paths or globs, all when empty) */
|
|
221
|
-
export const panelFiles = (files:
|
|
231
|
+
export const panelFiles = <T extends { path: string }, >(files: T[], patterns?: string): T[] => {
|
|
222
232
|
const wanted = (patterns || '').split(',').map((p) => p.trim()).filter(Boolean);
|
|
223
233
|
if (!wanted.length) return files;
|
|
224
234
|
const glob = (p: string) => new RegExp(`^${p.replace(/[.+^${}()|\\]/g, '\\$&').replace(/\*/g, '[^/]*').replace(/\?/g, '.')}$`);
|
|
@@ -226,7 +236,7 @@ export const panelFiles = (files: JobData['files'], patterns?: string): JobData[
|
|
|
226
236
|
};
|
|
227
237
|
|
|
228
238
|
/** A chart panel of a layout from the builder (only what differs from the defaults) */
|
|
229
|
-
export const panelOfBuilder = (b: Builder, event: string, title?: string):
|
|
239
|
+
export const panelOfBuilder = (b: Builder, event: string, title?: string): OverviewBlock => ({
|
|
230
240
|
kind: 'chart',
|
|
231
241
|
title: title || event || 'records',
|
|
232
242
|
event,
|
|
@@ -243,7 +253,7 @@ export const panelOfBuilder = (b: Builder, event: string, title?: string): Overv
|
|
|
243
253
|
});
|
|
244
254
|
|
|
245
255
|
/** The builder of a chart panel; null when the panel gives no field (the page guesses them) */
|
|
246
|
-
export const builderOfPanel = (p: Extract<
|
|
256
|
+
export const builderOfPanel = (p: Extract<OverviewBlock, { kind: 'chart' }>): Builder | null => {
|
|
247
257
|
if (!p.x && !p.y && p.aggregate !== 'count') return null;
|
|
248
258
|
return {
|
|
249
259
|
...EMPTY_BUILDER,
|