Skip to content

Commit

Permalink
Added year to job run timestamp in pipeline-stage-view-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepData-Diver committed Sep 4, 2024
1 parent 44ec60f commit 3db60df
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<revision>2.35</revision>
<gitHubRepo>jenkinsci/pipeline-stage-view-plugin</gitHubRepo>
<bom>2.361.x</bom>
<jenkins.version>2.361.4</jenkins.version>
<jenkins.version>2.462.1</jenkins.version>
<changelist>-SNAPSHOT</changelist>
<node.version>18.7.0</node.version>
<npm.version>8.15.0</npm.version>
Expand Down
4 changes: 4 additions & 0 deletions ui/src/main/js/view/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ registerHBSHelper('formatDate', function (date, toFormat) {
if (toFormat == 'time') {
return theDate.toLocaleTimeString(userLocale, {hour: '2-digit',minute: '2-digit', hour12: false });
}
// New case for 'year'
if (toFormat == 'year') {
return theDate.toLocaleDateString(userLocale, {year: 'numeric'});
}
return theDate.toLocaleDateString(userLocale, options)
});

Expand Down
1 change: 1 addition & 0 deletions ui/src/main/js/view/templates/pipeline-staged.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<div class="stage-start-box">
<div class="stage-start-time">
<div class="date">{{formatDate this.startTimeMillis 'month'}} {{formatDate this.startTimeMillis 'dom'}}</div>
<div class="year">{{formatDate this.startTimeMillis 'year'}}</div>
<div class="time">{{formatDate this.startTimeMillis 'time'}}</div>
</div>
{{#if this._links.changesets}}<div class="changeset-box" cbwf-controller="run-changesets" objectUrl="{{this._links.changesets.href}}"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ <h2>Stage View</h2>
<div class="stage-start-box">
<div class="stage-start-time">
<div class="date">1414318349569 1414318349569</div>
<div class="year">1414318349569</div>
<div class="time">1414318349569</div>
</div>
<div class="changeset-box no-changes">No Changes</div>
Expand Down Expand Up @@ -125,6 +126,7 @@ <h2>Stage View</h2>
<div class="stage-start-box">
<div class="stage-start-time">
<div class="date">1414318232950 1414318232950</div>
<div class="year">1414318232950</div>
<div class="time">1414318232950</div>
</div>
<div class="changeset-box no-changes">No Changes</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ <h2>Stage View</h2>
<div class="stage-start-box">
<div class="stage-start-time">
<div class="date">1414318232950 1414318232950</div>
<div class="year">1414318232950</div>
<div class="time">1414318232950</div>
</div>
<div class="changeset-box no-changes">No Changes</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ <h2>Stage View</h2>
<div class="stage-start-box">
<div class="stage-start-time">
<div class="date">1411556423000 1411556423000</div>
<div class="year">1411556423000</div>
<div class="time">1411556423000</div>
</div>
<div class="changeset-box no-changes">No Changes</div>
Expand Down Expand Up @@ -108,6 +109,7 @@ <h2>Stage View</h2>
<div class="stage-start-box">
<div class="stage-start-time">
<div class="date">1411556089000 1411556089000</div>
<div class="year">1411556089000</div>
<div class="time">1411556089000</div>
</div>
<div class="changeset-box no-changes">No Changes</div>
Expand Down Expand Up @@ -162,6 +164,7 @@ <h2>Stage View</h2>
<div class="stage-start-box">
<div class="stage-start-time">
<div class="date">1411552553000 1411552553000</div>
<div class="year">1411552553000</div>
<div class="time">1411552553000</div>
</div>
<div class="changeset-box no-changes">No Changes</div>
Expand Down

0 comments on commit 3db60df

Please sign in to comment.