Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix width of option in pipeline table #136

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions src/components/pipeline/PipelineTable.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Checkbox, MenuItem } from '@blueprintjs/core';
import { Checkbox, MenuItem, Tooltip } from '@blueprintjs/core';
import { Select } from '@blueprintjs/select';
import styled from '@emotion/styled';
import {
Expand Down Expand Up @@ -173,20 +173,30 @@ function PipelineTable({ identifier }: PipelineTableProps) {
<Table.Header>
<ValueRenderers.Header value="#" />
<ValueRenderers.Header value="Type" />
<ValueRenderers.Header value="Options" />
<ValueRenderers.Header value="Enabled" />
<ValueRenderers.Header value="Time (ms)" />
<ValueRenderers.Header value="Actions" />
</Table.Header>
{pipeline.map((operation, index) => (
<Table.Row key={operation.identifier}>
<ValueRenderers.Number value={index + 1} />
<ValueRenderers.Text value={operation.type} style={pointerStyle} />
{'options' in operation ? (
<ValueRenderers.Object value={operation.options} />
) : (
<ValueRenderers.Text value="N/A" />
)}
<ValueRenderers.Component style={pointerStyle}>
<Tooltip
position="right"
interactionKind="hover"
content={
<ValueRenderers.Component>
<div style={{ whiteSpace: 'pre-wrap' }}>
{'options' in operation
? JSON.stringify(operation.options, null, 2)
: 'N/A'}
</div>
</ValueRenderers.Component>
}
>
{operation.type}
</Tooltip>
</ValueRenderers.Component>
<ValueRenderers.Component>
<Checkbox
checked={operation.isActive}
Expand Down
Loading