From b96630861642a0dd5645f4ff04e8415a0e725524 Mon Sep 17 00:00:00 2001 From: Yaroslav Afenkin <91559310+yaroslavafenkin@users.noreply.github.com> Date: Wed, 23 Oct 2024 17:03:50 +0300 Subject: [PATCH] [JENKINS-74008] Extract JavaScript block from `FixedWarningsDetail/index.jelly` --- .../FixedWarningsDetail/fixed-warnings-data-table.js | 5 +++++ .../analysis/core/model/FixedWarningsDetail/index.jelly | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 plugin/src/main/resources/io/jenkins/plugins/analysis/core/model/FixedWarningsDetail/fixed-warnings-data-table.js diff --git a/plugin/src/main/resources/io/jenkins/plugins/analysis/core/model/FixedWarningsDetail/fixed-warnings-data-table.js b/plugin/src/main/resources/io/jenkins/plugins/analysis/core/model/FixedWarningsDetail/fixed-warnings-data-table.js new file mode 100644 index 0000000000..947c2da8d0 --- /dev/null +++ b/plugin/src/main/resources/io/jenkins/plugins/analysis/core/model/FixedWarningsDetail/fixed-warnings-data-table.js @@ -0,0 +1,5 @@ +/* global jQuery3 */ +jQuery3('#fixed').DataTable({ + pagingType: 'numbers', // Page number button only + order: [[0, 'asc'], [1, 'asc']] // Sort by file name and line number +}); diff --git a/plugin/src/main/resources/io/jenkins/plugins/analysis/core/model/FixedWarningsDetail/index.jelly b/plugin/src/main/resources/io/jenkins/plugins/analysis/core/model/FixedWarningsDetail/index.jelly index 37195ef226..c6ca007b4a 100644 --- a/plugin/src/main/resources/io/jenkins/plugins/analysis/core/model/FixedWarningsDetail/index.jelly +++ b/plugin/src/main/resources/io/jenkins/plugins/analysis/core/model/FixedWarningsDetail/index.jelly @@ -57,13 +57,7 @@ - +