forked from red-hat-data-services/odh-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update layout in the pipelines and runs node side panel
- Loading branch information
1 parent
5e854fe
commit 8ee1ed5
Showing
4 changed files
with
66 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 19 additions & 12 deletions
31
...src/concepts/pipelines/content/pipelinesDetails/taskDetails/TaskDetailsPrintKeyValues.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,32 @@ | ||
import * as React from 'react'; | ||
import { Grid, GridItem, Truncate } from '@patternfly/react-core'; | ||
import { | ||
DescriptionList, | ||
DescriptionListDescription, | ||
DescriptionListGroup, | ||
DescriptionListTerm, | ||
} from '@patternfly/react-core'; | ||
|
||
type TaskDetailsPrintKeyValuesProps = { | ||
items: { label: string; value: React.ReactNode }[]; | ||
}; | ||
|
||
const TaskDetailsPrintKeyValues: React.FC<TaskDetailsPrintKeyValuesProps> = ({ items }) => ( | ||
<Grid hasGutter> | ||
<DescriptionList | ||
isHorizontal | ||
isCompact | ||
horizontalTermWidthModifier={{ | ||
default: '16ch', | ||
}} | ||
> | ||
{items.map((result, i) => ( | ||
<React.Fragment key={`item-${i}`}> | ||
<GridItem span={6}> | ||
<b> | ||
<Truncate content={result.label} /> | ||
</b> | ||
</GridItem> | ||
<GridItem span={6} data-testid={`${result.label}-item`}> | ||
<DescriptionListGroup key={`item-${i}`}> | ||
<DescriptionListTerm>{result.label}</DescriptionListTerm> | ||
<DescriptionListDescription data-testid={`${result.label}-item`}> | ||
{result.value} | ||
</GridItem> | ||
</React.Fragment> | ||
</DescriptionListDescription> | ||
</DescriptionListGroup> | ||
))} | ||
</Grid> | ||
</DescriptionList> | ||
); | ||
|
||
export default TaskDetailsPrintKeyValues; |