Skip to content

Commit

Permalink
Still make cursor editable if it is not set (#7969)
Browse files Browse the repository at this point in the history
Summary:
You still might want to manually set the cursor even if it is empty (e.g. when testing a sensor locally)

Test Plan: View sensor page with and without a cursor set
  • Loading branch information
gibsondan committed May 19, 2022
1 parent e168466 commit c7b2387
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions js_modules/dagit/packages/core/src/sensors/SensorDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,24 +168,24 @@ export const SensorDetails: React.FC<{
</td>
</tr>
) : null}
{cursor ? (
<tr>
<td>Cursor</td>
<td>
{isCursorEditing ? (
<EditCursorDialog
sensorSelector={sensorSelector}
cursor={cursor}
onClose={() => setCursorEditing(false)}
/>
) : null}
<Box flex={{direction: 'row', alignItems: 'center'}}>
<Box style={{fontFamily: FontFamily.monospace, marginRight: 10}}>{cursor}</Box>
<Button onClick={() => setCursorEditing(true)}>Edit</Button>
<tr>
<td>Cursor</td>
<td>
{isCursorEditing ? (
<EditCursorDialog
sensorSelector={sensorSelector}
cursor={cursor ? cursor : ''}
onClose={() => setCursorEditing(false)}
/>
) : null}
<Box flex={{direction: 'row', alignItems: 'center'}}>
<Box style={{fontFamily: FontFamily.monospace, marginRight: 10}}>
{cursor ? cursor : 'None'}
</Box>
</td>
</tr>
) : null}
<Button onClick={() => setCursorEditing(true)}>Edit</Button>
</Box>
</td>
</tr>
<tr>
<td>Frequency</td>
<td>{humanizeSensorInterval(sensor.minIntervalSeconds)}</td>
Expand Down

0 comments on commit c7b2387

Please sign in to comment.