From 27a22a88a011f57a70e0fb86977ca88f2ab71ee4 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Sat, 27 May 2023 13:00:13 +0200 Subject: [PATCH 1/2] Shorten the name of the tabs. --- .../metrics/steps/CoverageViewModel/index.jelly | 8 ++++---- .../metrics/steps/CoverageViewModel/index.properties | 11 ++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/plugin/src/main/resources/io/jenkins/plugins/coverage/metrics/steps/CoverageViewModel/index.jelly b/plugin/src/main/resources/io/jenkins/plugins/coverage/metrics/steps/CoverageViewModel/index.jelly index 90faa8daa..fb8e3c29b 100644 --- a/plugin/src/main/resources/io/jenkins/plugins/coverage/metrics/steps/CoverageViewModel/index.jelly +++ b/plugin/src/main/resources/io/jenkins/plugins/coverage/metrics/steps/CoverageViewModel/index.jelly @@ -21,7 +21,7 @@
diff --git a/plugin/src/main/resources/io/jenkins/plugins/coverage/metrics/steps/CoverageViewModel/index.properties b/plugin/src/main/resources/io/jenkins/plugins/coverage/metrics/steps/CoverageViewModel/index.properties index ef930187f..4709a14f3 100644 --- a/plugin/src/main/resources/io/jenkins/plugins/coverage/metrics/steps/CoverageViewModel/index.properties +++ b/plugin/src/main/resources/io/jenkins/plugins/coverage/metrics/steps/CoverageViewModel/index.properties @@ -1,7 +1,4 @@ -coverage.details.title=Coverage details by {0} -reason.1=\ - You did not enable storing of source files (see parameter 'sourceFiles'). -reason.2=\ - Code Coverage API plugin did not find the source files. -reason.3=\ - You do not have sufficient permissions to view source files. +tab.name.overview=Overview +tab.name.files=Files +tab.name.lines=Modified Lines +tab.name.indirect=Indirect Changes From ab9a7536fd44e1be2b94681bf787a2b1d442de77 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Thu, 1 Jun 2023 22:15:32 +0200 Subject: [PATCH 2/2] Make IDs for toggles in table unique. --- .../src/main/resources/coverage/coverage-table.jelly | 10 +++++----- .../main/resources/coverage/coverage-table.properties | 3 +++ plugin/src/main/webapp/js/view-model.js | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 plugin/src/main/resources/coverage/coverage-table.properties diff --git a/plugin/src/main/resources/coverage/coverage-table.jelly b/plugin/src/main/resources/coverage/coverage-table.jelly index 90e99c319..6f5ea195b 100644 --- a/plugin/src/main/resources/coverage/coverage-table.jelly +++ b/plugin/src/main/resources/coverage/coverage-table.jelly @@ -25,7 +25,7 @@
- + @@ -33,7 +33,7 @@
- + @@ -50,7 +50,7 @@
-
${%Please select a file in the table to open the source code}
+
${%select.row}
@@ -58,7 +58,7 @@
-
${%No source code available for this file}
+
${%no.sourcecode}
@@ -67,7 +67,7 @@
- + diff --git a/plugin/src/main/resources/coverage/coverage-table.properties b/plugin/src/main/resources/coverage/coverage-table.properties new file mode 100644 index 000000000..05a680862 --- /dev/null +++ b/plugin/src/main/resources/coverage/coverage-table.properties @@ -0,0 +1,3 @@ +changed.files=Show only changed files +select.row=Please select a file in the table to open the source code +no.sourcecode=No source code available for this file diff --git a/plugin/src/main/webapp/js/view-model.js b/plugin/src/main/webapp/js/view-model.js index 55ac31900..d094e5638 100644 --- a/plugin/src/main/webapp/js/view-model.js +++ b/plugin/src/main/webapp/js/view-model.js @@ -462,7 +462,7 @@ const CoverageChartGenerator = function ($) { initializeSourceCodeSelection('change-coverage'); initializeSourceCodeSelection('indirect-coverage'); - $('input[name="changed"]').on('change', function () { + $('input[id ^= "changed"]').on('change', function () { const showChanged = $(this).prop('checked'); $('table.data-table').each(function () { const table = $(this).DataTable();