-
Notifications
You must be signed in to change notification settings - Fork 594
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
OCPBUGS-23749: Improve PipelineRun list page responsiveness #13469
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import { Tooltip } from '@patternfly/react-core'; | |
import { ArchiveIcon } from '@patternfly/react-icons'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { TableData, RowFunctionArgs } from '@console/internal/components/factory'; | ||
import { Timestamp, ResourceLink } from '@console/internal/components/utils'; | ||
import { Timestamp, ResourceLink, truncateMiddle } from '@console/internal/components/utils'; | ||
import { referenceForModel } from '@console/internal/module/k8s'; | ||
import { | ||
DELETED_RESOURCE_IN_K8S_ANNOTATION, | ||
|
@@ -31,15 +31,17 @@ const pipelinerunReference = referenceForModel(PipelineRunModel); | |
type PLRStatusProps = { | ||
obj: PipelineRunKind; | ||
taskRuns: TaskRunKind[]; | ||
iconOnly?: boolean; | ||
}; | ||
|
||
const PLRStatus: React.FC<PLRStatusProps> = ({ obj, taskRuns }) => { | ||
const PLRStatus: React.FC<PLRStatusProps> = ({ obj, taskRuns, iconOnly = false }) => { | ||
return ( | ||
<PipelineRunStatus | ||
status={pipelineRunFilterReducer(obj)} | ||
title={pipelineRunTitleFilterReducer(obj)} | ||
pipelineRun={obj} | ||
taskRuns={taskRuns} | ||
iconOnly={iconOnly} | ||
/> | ||
); | ||
}; | ||
|
@@ -54,7 +56,7 @@ const PipelineRunRow: React.FC<RowFunctionArgs<PipelineRunKind>> = ({ obj, custo | |
<TableData className={tableColumnClasses.name}> | ||
<ResourceLink | ||
kind={pipelinerunReference} | ||
name={obj.metadata.name} | ||
name={truncateMiddle(obj.metadata.name, { length: 12 })} | ||
namespace={obj.metadata.namespace} | ||
data-test-id={obj.metadata.name} | ||
nameSuffix={ | ||
|
@@ -85,15 +87,20 @@ const PipelineRunRow: React.FC<RowFunctionArgs<PipelineRunKind>> = ({ obj, custo | |
<PipelineRunVulnerabilities pipelineRun={obj} condensed /> | ||
</TableData> | ||
<TableData className={tableColumnClasses.status}> | ||
<PLRStatus obj={obj} taskRuns={PLRTaskRuns} /> | ||
<PLRStatus obj={obj} taskRuns={PLRTaskRuns} iconOnly /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</TableData> | ||
<TableData className={tableColumnClasses.taskStatus}> | ||
<LinkedPipelineRunTaskStatus pipelineRun={obj} taskRuns={PLRTaskRuns} /> | ||
</TableData> | ||
<TableData className={tableColumnClasses.started}> | ||
<Timestamp timestamp={obj.status && obj.status.startTime} /> | ||
<div className="opp-pipeline-run-list__started-timestamp"> | ||
<Timestamp timestamp={obj.status && obj.status.startTime} omitSuffix />{' '} | ||
<div> {t('pipelines-plugin~ago')}</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</div> | ||
</TableData> | ||
<TableData className={tableColumnClasses.duration}> | ||
{pipelineRunDuration(obj, false)} | ||
</TableData> | ||
<TableData className={tableColumnClasses.duration}>{pipelineRunDuration(obj)}</TableData> | ||
<TableData className={tableColumnClasses.actions}> | ||
<ResourceKebabWithUserLabel | ||
actions={getPipelineRunKebabActions(operatorVersion, taskRuns)} | ||
|
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resource link
name
is also used as link! So the link tries to open:http://localhost:13469/k8s/ns/christoph/tekton.dev~v1~PipelineRun/nodein…uie93
Which results for sure in a 404 Not found error when the user clicks on this link. 😨