Skip to content

Improve stage view#632

Merged
timja merged 45 commits intojenkinsci:mainfrom
timja:smaller-job-view
Apr 24, 2025
Merged

Improve stage view#632
timja merged 45 commits intojenkinsci:mainfrom
timja:smaller-job-view

Conversation

@timja
Copy link
Member

@timja timja commented Apr 20, 2025

What's changed:

  • Show up to 13 stages in the job view
  • Add date build ran and time taken
  • Remove table header
  • Remove stage name from job view and add tooltip instead
  • Compressed spacing on job view

TODO:

Fixes #349
Fixes #449
Closes #140
Related #317

Example pipeline:

for (i = 0; i < 20; i++) {
    stage("${i}"){
        echo "HI ${i}"    
    }
}

Before

image

After

image

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

</a>
<div>
<a
// style={{textOverflow: "ellipsis"}}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// style={{textOverflow: "ellipsis"}}

>
{run.displayName}
</a>
<div>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO may remove this wrapper

<span>{new Date(run.timestamp).toLocaleDateString()}</span>
</div>
<div>
<span className={"jenkins-subtitle"}>{total(run.duration)}</span>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jenkins-subtitle doesn't exist although I think there is something, ref jenkinsci/design-library-plugin#410

percentage={node.stage.completePercent}
skeleton={node.stage.skeleton}
/>,
<Tooltip
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for some reason only appears at the very bottom of the stage

@timja timja added the enhancement New feature or request label Apr 20, 2025
@timja
Copy link
Member Author

timja commented Apr 20, 2025

@janfaracik let me know any feedback please

@timja timja force-pushed the smaller-job-view branch from 851009d to 1ce2fb5 Compare April 20, 2025 19:04
tooltip = (
<div className="pgv-node-tooltip">
<div>{title}</div>
<div>{total(node.stage.totalDurationMillis)}</div>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only show this when collapsed? this could be useful on other graphs

@janfaracik
Copy link
Member

janfaracik commented Apr 24, 2025

Current counter UI (not 100% happy with it yet):

image

If we want to adjust how many are visible based on screen width I'd encourage moving this out to its own component, the existing one is already very complicated/confusing.

@timja timja marked this pull request as ready for review April 24, 2025 15:04
@timja timja requested a review from a team as a code owner April 24, 2025 15:04
@timja timja changed the title Improve Job view Improve stage view Apr 24, 2025
<div>
<MultiPipelineGraph />
<I18NProvider bundles={[ResourceBundleName.messages]}>
<MultiPipelineGraph />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just had a thought, you might need to update how the I18NProvider gets the locale, it might just be updating the jelly but it might also be a little more involved (maybe lifting locale evaluation outside the I18NProvider and passing it as a prop)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 803d0fc


const groupedRuns: Record<string, RunInfo[]> = runs.reduce(
(acc: Record<string, RunInfo[]>, run) => {
const date = new Date(run.timestamp).toLocaleDateString("en-US", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want this based on the users locale?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lewisbirks and others added 3 commits April 24, 2025 16:46
Signed-off-by: lewisbirks <22620804+lewisbirks@users.noreply.github.com>
@timja timja enabled auto-merge (squash) April 24, 2025 19:37
@timja timja merged commit da20b9b into jenkinsci:main Apr 24, 2025
17 checks passed
@timja timja deleted the smaller-job-view branch April 24, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Date Time to Graph View Pipelines Similar to Stage View Reduce vertical size of pipeline graphs on job page

3 participants