Skip to content

Commit

Permalink
Misc fixes for run status sensor UI (#21570)
Browse files Browse the repository at this point in the history
Summary:
- Instead of Failed Runs, say Targeted Runs - so it applies to run
success sensors / run started sensors / etc.
- Don't show "Requested" in the case where there are targeted runs,
there is a separate "Requested Runs" section below for that case

Test Plan:
View dialog for a regular sensor that launched runs, and a run status
sensor that reacted to runs

## Summary & Motivation

## How I Tested These Changes
  • Loading branch information
gibsondan authored and cmpadden committed May 6, 2024
1 parent ecb97e2 commit cecb75c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,19 @@ export const RunList = ({runIds}: {runIds: string[]}) => {
);
};

export const FailedRunList = ({originRunIds}: {originRunIds?: string[]}) => {
export const TargetedRunList = ({originRunIds}: {originRunIds?: string[]}) => {
if (!originRunIds || !originRunIds.length) {
return null;
}
return (
<Group direction="column" spacing={16}>
<Box padding={12} border={{side: 'bottom', color: Colors.textLighter()}}>
<Body>
Failed Runs
<Tooltip content="Failed runs this tick reacted on and reported back to.">
Targeted Runs
<Tooltip content="Runs this tick reacted on and reported back to.">
<Icon name="info" color={Colors.textLight()} />
</Tooltip>
</Body>

<RunList runIds={originRunIds} />
</Box>
<Box padding={12} margin={{bottom: 8}}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from '@dagster-io/ui-components';
import {useMemo, useState} from 'react';

import {FailedRunList, RunList} from './InstigationTick';
import {RunList, TargetedRunList} from './InstigationTick';
import {HISTORY_TICK_FRAGMENT} from './InstigationUtils';
import {HistoryTickFragment} from './types/InstigationUtils.types';
import {SelectedTickQuery, SelectedTickQueryVariables} from './types/TickDetailsDialog.types';
Expand Down Expand Up @@ -121,17 +121,15 @@ const TickDetailsDialogImpl = ({tickId, instigationSelector}: InnerProps) => {
</Box>
{activeTab === 'result' ? (
<div style={{height: '500px', overflowY: 'auto'}}>
{tick.runIds.length || tick.originRunIds.length ? (
{tick.runIds.length ? (
<>
<Box padding={{vertical: 12, horizontal: 24}} border="bottom">
<Subtitle2>Requested</Subtitle2>
<Subtitle2>Requested Runs</Subtitle2>
</Box>
{tick.runIds.length ? (
<RunList runIds={tick.runIds} />
) : (
<FailedRunList originRunIds={tick.originRunIds} />
)}
<RunList runIds={tick.runIds} />
</>
) : tick.originRunIds.length ? (
<TargetedRunList originRunIds={tick.originRunIds} />
) : null}
{addedPartitionRequests?.length ? (
<>
Expand Down

0 comments on commit cecb75c

Please sign in to comment.