diff --git a/pom.xml b/pom.xml index 4f1185ac..37ab38f9 100644 --- a/pom.xml +++ b/pom.xml @@ -59,7 +59,7 @@ 2.35 jenkinsci/pipeline-stage-view-plugin 2.361.x - 2.361.4 + 2.462.1 -SNAPSHOT 18.7.0 8.15.0 diff --git a/ui/src/main/js/view/templates/index.js b/ui/src/main/js/view/templates/index.js index 6cf8b453..e30d43ba 100644 --- a/ui/src/main/js/view/templates/index.js +++ b/ui/src/main/js/view/templates/index.js @@ -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) }); diff --git a/ui/src/main/js/view/templates/pipeline-staged.hbs b/ui/src/main/js/view/templates/pipeline-staged.hbs index 1a191446..a2c59d58 100644 --- a/ui/src/main/js/view/templates/pipeline-staged.hbs +++ b/ui/src/main/js/view/templates/pipeline-staged.hbs @@ -47,6 +47,7 @@
{{formatDate this.startTimeMillis 'month'}} {{formatDate this.startTimeMillis 'dom'}}
+
{{formatDate this.startTimeMillis 'year'}}
{{formatDate this.startTimeMillis 'time'}}
{{#if this._links.changesets}}
diff --git a/ui/src/test/resources/view/pipeline_staged/render/04_rest_api_runs_failed.html b/ui/src/test/resources/view/pipeline_staged/render/04_rest_api_runs_failed.html index cad5b9a6..facafeac 100644 --- a/ui/src/test/resources/view/pipeline_staged/render/04_rest_api_runs_failed.html +++ b/ui/src/test/resources/view/pipeline_staged/render/04_rest_api_runs_failed.html @@ -59,6 +59,7 @@

Stage View

1414318349569 1414318349569
+
1414318349569
1414318349569
No Changes
@@ -125,6 +126,7 @@

Stage View

1414318232950 1414318232950
+
1414318232950
1414318232950
No Changes
diff --git a/ui/src/test/resources/view/pipeline_staged/render/07_rest_api_runs_in_progress.html b/ui/src/test/resources/view/pipeline_staged/render/07_rest_api_runs_in_progress.html index 363ba148..ef624a81 100644 --- a/ui/src/test/resources/view/pipeline_staged/render/07_rest_api_runs_in_progress.html +++ b/ui/src/test/resources/view/pipeline_staged/render/07_rest_api_runs_in_progress.html @@ -43,6 +43,7 @@

Stage View

1414318232950 1414318232950
+
1414318232950
1414318232950
No Changes
diff --git a/ui/src/test/resources/view/pipeline_staged/render/expected.html b/ui/src/test/resources/view/pipeline_staged/render/expected.html index 59b132b0..bf082029 100644 --- a/ui/src/test/resources/view/pipeline_staged/render/expected.html +++ b/ui/src/test/resources/view/pipeline_staged/render/expected.html @@ -51,6 +51,7 @@

Stage View

1411556423000 1411556423000
+
1411556423000
1411556423000
No Changes
@@ -108,6 +109,7 @@

Stage View

1411556089000 1411556089000
+
1411556089000
1411556089000
No Changes
@@ -162,6 +164,7 @@

Stage View

1411552553000 1411552553000
+
1411552553000
1411552553000
No Changes