Skip to content

Commit e923081

Browse files
committed
Move machine and version fields to the top for visibility
1 parent 2ab138e commit e923081

File tree

1 file changed

+54
-54
lines changed

1 file changed

+54
-54
lines changed

apps/webapp/app/components/runs/v3/ReplayRunDialog.tsx

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -272,20 +272,50 @@ function ReplayForm({
272272
<TextLink to={docsPath("triggering#options")}>Read the docs.</TextLink>
273273
</Hint>
274274
<InputGroup>
275-
<Label variant="small">Delay</Label>
276-
<DurationPicker name={delaySeconds.name} id={delaySeconds.id} />
277-
<Hint>Delays run by a specific duration.</Hint>
278-
<FormError id={delaySeconds.errorId}>{delaySeconds.error}</FormError>
275+
<Label htmlFor={machine.id} variant="small">
276+
Machine
277+
</Label>
278+
<Select
279+
{...conform.select(machine)}
280+
variant="tertiary/small"
281+
placeholder="Select machine type"
282+
dropdownIcon
283+
items={machinePresets}
284+
defaultValue={replayData.machinePreset ?? undefined}
285+
>
286+
{machinePresets.map((machine) => (
287+
<SelectItem key={machine} value={machine}>
288+
{machine}
289+
</SelectItem>
290+
))}
291+
</Select>
292+
<Hint>Overrides the machine preset.</Hint>
293+
<FormError id={machine.errorId}>{machine.error}</FormError>
279294
</InputGroup>
280295
<InputGroup>
281-
<Label variant="small">TTL</Label>
282-
<DurationPicker
283-
name={ttlSeconds.name}
284-
id={ttlSeconds.id}
285-
defaultValueSeconds={replayData.ttlSeconds}
286-
/>
287-
<Hint>Expires the run if it hasn't started within the TTL.</Hint>
288-
<FormError id={ttlSeconds.errorId}>{ttlSeconds.error}</FormError>
296+
<Label htmlFor={version.id} variant="small">
297+
Version
298+
</Label>
299+
<Select
300+
{...conform.select(version)}
301+
defaultValue="latest"
302+
variant="tertiary/small"
303+
placeholder="Select version"
304+
dropdownIcon
305+
disabled={replayData.disableVersionSelection}
306+
>
307+
{replayData.latestVersions.map((version, i) => (
308+
<SelectItem key={version} value={i === 0 ? "latest" : version}>
309+
{version} {i === 0 && "(latest)"}
310+
</SelectItem>
311+
))}
312+
</Select>
313+
{replayData.disableVersionSelection ? (
314+
<Hint>Only the latest version is available in the development environment.</Hint>
315+
) : (
316+
<Hint>Runs task on a specific version.</Hint>
317+
)}
318+
<FormError id={version.errorId}>{version.error}</FormError>
289319
</InputGroup>
290320
<InputGroup>
291321
<Label htmlFor={queue.id} variant="small">
@@ -425,50 +455,20 @@ function ReplayForm({
425455
<FormError id={concurrencyKey.errorId}>{concurrencyKey.error}</FormError>
426456
</InputGroup>
427457
<InputGroup>
428-
<Label htmlFor={machine.id} variant="small">
429-
Machine
430-
</Label>
431-
<Select
432-
{...conform.select(machine)}
433-
variant="tertiary/small"
434-
placeholder="Select machine type"
435-
dropdownIcon
436-
items={machinePresets}
437-
defaultValue={replayData.machinePreset ?? undefined}
438-
>
439-
{machinePresets.map((machine) => (
440-
<SelectItem key={machine} value={machine}>
441-
{machine}
442-
</SelectItem>
443-
))}
444-
</Select>
445-
<Hint>Overrides the machine preset.</Hint>
446-
<FormError id={machine.errorId}>{machine.error}</FormError>
458+
<Label variant="small">Delay</Label>
459+
<DurationPicker name={delaySeconds.name} id={delaySeconds.id} />
460+
<Hint>Delays run by a specific duration.</Hint>
461+
<FormError id={delaySeconds.errorId}>{delaySeconds.error}</FormError>
447462
</InputGroup>
448463
<InputGroup>
449-
<Label htmlFor={version.id} variant="small">
450-
Version
451-
</Label>
452-
<Select
453-
{...conform.select(version)}
454-
defaultValue="latest"
455-
variant="tertiary/small"
456-
placeholder="Select version"
457-
dropdownIcon
458-
disabled={replayData.disableVersionSelection}
459-
>
460-
{replayData.latestVersions.map((version, i) => (
461-
<SelectItem key={version} value={i === 0 ? "latest" : version}>
462-
{version} {i === 0 && "(latest)"}
463-
</SelectItem>
464-
))}
465-
</Select>
466-
{replayData.disableVersionSelection ? (
467-
<Hint>Only the latest version is available in the development environment.</Hint>
468-
) : (
469-
<Hint>Runs task on a specific version.</Hint>
470-
)}
471-
<FormError id={version.errorId}>{version.error}</FormError>
464+
<Label variant="small">TTL</Label>
465+
<DurationPicker
466+
name={ttlSeconds.name}
467+
id={ttlSeconds.id}
468+
defaultValueSeconds={replayData.ttlSeconds}
469+
/>
470+
<Hint>Expires the run if it hasn't started within the TTL.</Hint>
471+
<FormError id={ttlSeconds.errorId}>{ttlSeconds.error}</FormError>
472472
</InputGroup>
473473
<FormError>{form.error}</FormError>
474474
</Fieldset>

0 commit comments

Comments
 (0)