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

Enhancement: Add Year to Job Run Timestamp in pipeline-stage-view-plugin #347

Merged
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>
jglick marked this conversation as resolved.
Show resolved Hide resolved
<changelist>-SNAPSHOT</changelist>
<node.version>18.7.0</node.version>
<npm.version>8.15.0</npm.version>
Expand Down
3 changes: 3 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,9 @@ registerHBSHelper('formatDate', function (date, toFormat) {
if (toFormat == 'time') {
return theDate.toLocaleTimeString(userLocale, {hour: '2-digit',minute: '2-digit', hour12: false });
}
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