Commit Graph
14173 Commits
Author SHA1 Message Date
Vincent Latombe 4693b251dc Make widgets really pluggable
Introduce a `HasWidgets` interface holding generic facilities to look up applicable widgets, as well as binding widgets to relative urls based on their url names.
The following classes are concerned
* View
* Job
* ComputerSet
* Computer

Introduce a generic `WidgetFactory` to allow plugins to contribute widgets to the mentioned types.

This deprecates the pattern of annotating Widget implementations with @Extension, in favor of typed `WidgetFactory` annotated implementation.

Moved views `ajaxExecutors` and `ajaxBuildQueue` back to the widgets they belong to. The specific logic is now in the `WidgetFactory` implementations (as `ajax` view).

Add a `getUrl` method to Widget. This allows to resolve custom widget views under `widget/<widgetName>` both under the Jenkins root object, jobs and views.

`<t:queue>` and `<t:executors>` taglibs usage outside of widget context is now deprecated. Instead, implement a WidgetFactory passing the relevant data.
2023-05-04 17:43:59 +02:00
4963094f4e [JENKINS-70729] Rework clouds management into multiple pages (#7658)
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2023-04-28 19:23:09 +01:00
Jesse Glick 458c6865d2 [JENKINS-71139] Fail fast when serializing invalid XML 1.1 data (#7875)
* [JENKINS-71139] Reproducing `XStream2` problem with NUL

* Arguably better to switch from “quirks” to XML 1.1 mode, failing during write not just read
2023-04-25 21:04:43 -06:00
Jan FaracikandDaniel Beck 54eb759b74 Update link dropdown menus to use new Tippy dropdowns (#7474)
* Squashed commit of the following:

commit 0fafc6f2b50c817c11a6149fb4374bfb1a1d486a
Merge: 9046da814f d3d1c88d29
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sun Dec 4 21:31:15 2022 +0000

    Merge branch 'master' into add-model-link-dropdowns

commit 9046da814f3aa26ec19ece970b25a29375377bfa
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sun Dec 4 21:31:09 2022 +0000

    Reset

commit 5f81d254112c7179f9c83e7dd3650aa9ba0b0c37
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sat Nov 26 00:56:02 2022 +0000

    Update prototype.js

commit dab47993c6c5f9bd77e83d392c737f3d6d3ba830
Merge: b166f016a3 221ff946b3
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Nov 25 22:32:28 2022 +0000

    Merge branch 'master' into add-model-link-dropdowns

commit b166f016a3e81b3787702e061cb7793a79295a49
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Nov 25 20:11:45 2022 +0000

    Add support for breadcrumb-config-outline

commit cc05b743192bdfbf68d1399f77a32583f2a65182
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Nov 23 23:03:40 2022 +0000

    Imports

commit d23b82247e9e2defb5501622f4c3a2b3c4ee95c7
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Nov 23 23:02:25 2022 +0000

    Tidy up JS

commit a578f6aa1f1b35db83a3543417b87381f636c3c7
Merge: f48e7ef370 51e084a01a
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Nov 23 11:13:00 2022 +0000

    Merge branch 'master' into add-model-link-dropdowns

commit f48e7ef370b7e807689b2edea81d137ca1e7dddb
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Nov 23 09:57:41 2022 +0000

    Update dropdowns.less

commit 8e54b2d9f17afd8c9d7ccf9f481ad1c571ed43d2
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Nov 23 00:54:33 2022 +0000

    Init

commit 0a161523b2e195dc89c75296111a0be0a9f9319e
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Mon Nov 21 19:56:48 2022 +0000

    Update yarn.lock

commit 8aa08f0fc1ac4e5d2c082e3e9b96344cb255257b
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Mon Nov 21 19:40:26 2022 +0000

    Fix

commit 7a2668ccfde9ec79dfb1fd20d0da70fb4817b1d7
Merge: faf3888e27 df89aa6855
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Mon Nov 21 19:39:51 2022 +0000

    Merge branch 'master' into add-dropdown-button

commit faf3888e279e5ffb2ec99f47506548c435659c76
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Sep 23 23:57:35 2022 +0100

    Update overflowButton.jelly

commit 2c33dee5ec1f6cbcad335f12db58e84966af1ade
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Sep 23 23:55:31 2022 +0100

    Remove unused method, fix docs

commit ed8c2b02e13306e810da721c69486011cfd80308
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Sep 23 23:48:51 2022 +0100

    Fix link appearance

commit 9d04e8092ff8bab60b76bdfb41d2431a6737ce6c
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Sep 23 23:45:40 2022 +0100

    Fix up

commit 109dda954e29d8f85d5dcbaf9b630ce02d17648b
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Sep 23 23:22:10 2022 +0100

    Small cleanup

commit 0f27194eba82073f513b205da991b6a729b40bb0
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Sep 23 23:19:39 2022 +0100

    Lint

commit e63c95620cec8f26fca33605389e5bac751471ac
Merge: dccceff218 7cb5eb78c0
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Sep 23 23:18:39 2022 +0100

    Merge branch 'master' into add-dropdown-button

commit dccceff2185fb4870f1c4639579d472866975cb7
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 27 19:21:39 2022 +0100

    Update dropdowns.less

commit 373b8d90a056453ebb8ccdbe613a8d2eb5c0be51
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 27 19:20:40 2022 +0100

    Update table.jelly

commit 62dff833f3593981c093c0a2a63291cae0adda26
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 27 19:19:51 2022 +0100

    Update index.jelly

commit 9bacedaac4b02d0b7786d22e06277903c2556c62
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 27 19:19:32 2022 +0100

    Update rowSelectionController.jelly

commit 06591b1e01f6eb51721edce588f9f818ee9a4cad
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 27 19:18:30 2022 +0100

    Update row selection controller to use new dropdown component

commit 21b5844fde72cf81d0ff4a57358a9e35d98c8afb
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 27 19:02:52 2022 +0100

    Restyle

commit 9966fe79472fdd7b9229143089d4161a6ddf0ab6
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 27 18:49:06 2022 +0100

    WB

commit 81b073a7143256b6369470794f947b6d989bd957
Merge: 8b58f7234b 315b2f410c
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 27 18:29:11 2022 +0100

    Merge branch 'master' into add-dropdown-button

commit 8b58f7234b96acb0263f02d54cffc3e1fe4705e1
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 20 08:41:48 2022 +0100

    Replace icon with hand made divs

commit 22908c71d286dbb907acc52df1cea49f7966c5d9
Merge: fb89bc5891 b3320ca766
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Tue Jul 19 23:28:58 2022 +0100

    Merge branch 'new-buttons-1-dashboard' into add-dropdown-button

commit fb89bc5891ba15558fef93ddad30e881c7a08175
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Tue Jul 19 23:28:37 2022 +0100

    Init

commit b3320ca766
Merge: 1fa24ea550 f52d99a0e5
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jul 14 09:50:06 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit 1fa24ea550
Merge: 8598f99f00 a990ebcda4
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 13 00:02:33 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit 8598f99f00
Author: Alexander Brandes <mc.cache@web.de>
Date:   Mon Jul 11 15:11:36 2022 +0200

    style: Address stylelint violations

commit fd4da119c4
Merge: 0480268a50 aba1c17ede
Author: Alexander Brandes <mc.cache@web.de>
Date:   Sun Jul 10 23:30:55 2022 +0200

    Merge branch 'master' into new-buttons-1-dashboard

commit 0480268a50
Merge: 9b145b1ae4 ab0bb84958
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sat Jul 9 21:52:43 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit 9b145b1ae4
Merge: 418ab063b2 03617e0b43
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Jul 8 19:44:20 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit 418ab063b2
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jul 7 22:41:32 2022 +0100

    Update buttons-deprecated.less

commit 2798afa6df
Merge: 296e309afc 6de288f424
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jul 7 22:40:35 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit 296e309afc
Merge: 1e646ff7ee 22dcefcd8f
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jul 7 14:50:14 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit 1e646ff7ee
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 6 22:59:13 2022 +0100

    Use rem, fix cursor for dashboard icon size

commit 21d4c73d9e
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 6 22:56:05 2022 +0100

    Update with master, make minor changes

commit 1d59bd4a21
Merge: f6fc19bd3e 644a261e78
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jul 6 22:48:59 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit f6fc19bd3e
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sun Jun 26 22:58:12 2022 +0100

    Update dashboard.less

commit 665daa0b85
Merge: a57f13ac88 c60ea9210c
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sun Jun 26 22:52:33 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit a57f13ac88
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Mon Jun 20 19:01:18 2022 +0100

    Update simple-page.less

commit 2d3695d163
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sun Jun 19 22:24:32 2022 +0100

    Update theme.less

commit 361f06c7ef
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sun Jun 19 22:22:48 2022 +0100

    Split out vars

commit 205336fe9f
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sun Jun 19 21:48:33 2022 +0100

    Move files about, fix focus state, fix colors

commit 204bafbef1
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sun Jun 19 21:00:57 2022 +0100

    Update buttons to support colors

commit 1d4be07f52
Merge: c4075772f0 2391319f45
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sun Jun 19 20:01:19 2022 +0100

    Merge branch 'move-manage-jenkins-less' into new-buttons-1-dashboard

commit c4075772f0
Merge: 0c8d538242 65fcda1350
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sun Jun 19 20:01:02 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit 2391319f45
Merge: c9e2823d4a ac66b476d9
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jun 16 17:47:45 2022 +0100

    Merge branch 'master' into move-manage-jenkins-less

commit c9e2823d4a
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jun 16 17:35:37 2022 +0100

    Update colors

commit c78dfd6b50
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jun 16 17:33:47 2022 +0100

    Update theme.less

commit 0996e759d6
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jun 16 17:32:52 2022 +0100

    Update theme.less

commit e57bc28553
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jun 16 17:29:15 2022 +0100

    Update theme.less

commit 69c1633e1e
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jun 16 17:00:06 2022 +0100

    Update style.less

commit e21d4e7ccb
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jun 15 19:03:50 2022 +0100

    Update breadcrumbs to use new item mixin

commit 90fc4ba147
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jun 15 18:57:51 2022 +0100

    Rename mixin

commit 28d06386ce
Merge: d1f42acfd5 65fcda1350
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Tue Jun 14 23:35:10 2022 +0100

    Merge branch 'master' into move-manage-jenkins-less

commit d1f42acfd5
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Jun 10 11:13:58 2022 +0100

    Update table.less

commit 13d5729892
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Thu Jun 9 10:03:01 2022 +0100

    Move from px to rem

commit 68f5425a7b
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jun 8 16:40:41 2022 +0100

    Update theme.less

commit 929e2d5e5a
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jun 8 16:28:06 2022 +0100

    Update mixins.less

commit 8c4b4662a2
Merge: 8b22270188 77a36fcee9
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jun 8 16:27:25 2022 +0100

    Merge branch 'master' into move-manage-jenkins-less

commit 8b22270188
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jun 8 16:19:42 2022 +0100

    Update theme.less

commit e925490722
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Jun 8 16:17:02 2022 +0100

    Add mixin for items

commit 0c8d538242
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Sat Jun 4 00:15:05 2022 +0100

    Update button styling

commit 45c9d078be
Merge: e9cb78a924 77a36fcee9
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Fri Jun 3 23:38:49 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit d579dc5ae2
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Tue May 17 00:52:29 2022 +0100

    Update section.less

commit 43e4f5c48a
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Tue May 17 00:29:22 2022 +0100

    Init

commit e9cb78a924
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Apr 20 21:01:06 2022 +0100

    Add backplate to table size toggles

commit 8cbfe00561
Merge: 41d45b5e1f b28d225d61
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Wed Apr 20 20:30:39 2022 +0100

    Merge branch 'master' into new-buttons-1-dashboard

commit 41d45b5e1f
Author: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date:   Mon Apr 18 12:50:17 2022 +0100

    Initial

* Remove old import

* Simplify code

* Update rowSelectionController.jelly

* Update inpage-jumplist.js

* Escape menu item labels

* Temp commenting out

* More HTMLUnit fixes

* Revert "Temp commenting out"

This reverts commit d61d94332f.

* Add support for left/right keyboard nav in menus, fix keyboard priority in submenus, add scroll into view, remove old menu target element

* Send error to console rather than displaying it in dropdown

* Use 'auto' for overscroll-y

* Remove Util.escape(...) from withDisplayName builder

* Remove unused import

* Show 'No items' placeholder for menus with no items

* Keep dropdown parent links active when expanded

* Update jumplists.js

* Potential fix for failing tests

* Update utils.js

* Update utils.js

* Add badge support to dropdown menus

* Remove font weight from badge

* Merge master

---------

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2023-04-25 09:41:05 +02:00
Basil Crow 9ce1ff4e7c Remove AntClassLoader (#7846) 2023-04-25 09:39:41 +02:00
Alexander Brandes dc80ce743f Fill in todo annotations (#7848) 2023-04-17 11:05:07 +02:00
291f5edcc5 Add updates count badge to Updates sidebar item (#7084)
* Init

* Update core/src/main/resources/lib/layout/task.jelly

Co-authored-by: Alexander Brandes <brandes.alexander@web.de>

* Remove duplicated class

* Update core/src/main/resources/lib/layout/task.jelly

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Add support for badges in menus + manage jenkins page

* Update index.jelly

* Update ModelObjectWithContextMenu.java

* Merge with #6995

* Add tooltip in task links

* Add tooltip support to badges

* Lint

* Escape badge tooltip/text in menus

* Use xmlEscape for escaping attributes

* Support nulls

* Update breadcrumbs.js

* Update breadcrumbs.js

---------

Co-authored-by: Alexander Brandes <brandes.alexander@web.de>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2023-04-16 20:57:51 +02:00
29e6edcc47 [JENKINS-70630] - Fix HTTP2 missing header (#7701)
* JENKINS-70630 - fix HTTP2 missing header

* JENKINS-70630 - remove port

* Simplify assignment of currentRequestHost

https://github.com/jenkinsci/jenkins/pull/7701#discussion_r1133365472

* Make it compile

---------

Co-authored-by: Carlos Monteiro <carlos.monteiro@inmarsat.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2023-04-08 09:17:43 -06:00
Benoit Lacelle c48728d0f4 Use String#isEmpty where possible (#7690) 2023-04-08 08:04:47 -07:00
Basil Crow ce3f6a8fd4 [JENKINS-69129] Support escaped emoji characters in XML files (#7778)
* [JENKINS-69129] Support escaped emoji characters in XML files

* Java 17

* Matching https://github.com/x-stream/xstream/blob/49ed8eb97c8551db0c8c5fa466f02d068862c272/xstream/src/java/com/thoughtworks/xstream/io/xml/SimpleStaxDriver.java#L55
2023-04-03 13:45:49 +02:00
Jesse Glick 374b95d778 Javadoc correction for AsynchronousExecution (#7787) 2023-04-01 13:56:22 -06:00
Tim Jacomb fdb63eae90 JENKINS-70730 Don't remove id inside symbol (#7689)
JENKINS-70730 Don't remove id in symbol
2023-03-28 10:28:31 +02:00
Jesse Glick c51b53771a Tune down warnings from ProcessTree (#7681) 2023-03-17 09:36:02 +00:00
Jesse Glick 3fe425f29d Let TokenBasedRememberMeServices2 tolerate Authentication.principal not UserDetails (#7724) 2023-03-17 09:34:54 +00:00
Vincent Latombe 28f592df56 Restrict JnlpSlaveRestarterInstaller to DumbSlave (#7693) 2023-03-17 09:34:47 +00:00
Alexander Brandes c98beece64 Remove space before colon in Jenkins#setInstallState() (#7736) 2023-03-17 09:34:14 +00:00
af09d67bb4 [JENKINS-69853] User experimental flags (#7299)
* [JENKINS-69853] User experimental flags

* Applying feedbacks from Tim

* Improve default wording + padding + title

* Remove the "UI"

* Correct Spotbugs

---------

Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2023-03-12 10:52:04 +01:00
6c076b99bf [JENKINS-69955] Make websocket connection idleTimeout configurable (#7670)
* [JENKINS-69955] Make websocket connection idleTimeout configurable and adjust the default

* [JENKINS-69955] Do not cache JettyWebSocketServerContainer

* [JENKINS-69955] AtomicBoolean is not needed

* [JENKINS-69955] remove unused import

---------

Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2023-03-12 10:44:53 +01:00
Jesse Glick 3a07a2c2f8 Make StopBuildsCommand work even if the last build is not running (#7679) 2023-03-10 22:04:37 +00:00
Daniel Beck 8ec86287cb Derestrict VirtualFile#list(String,String,boolean) again 2023-03-05 15:23:59 +01:00
Yaroslav Afenkin ecccc26a39 Merge branch 'security-master' 2023-02-28 17:03:58 +02:00
Mark Waite a7b36ef111 [JENKINS-70599] restore installNecessaryPlugins redirect destination (#7653)
* Test redirect from installNecessaryPlugins

Jenkins LTS versions prior to 2.375.1 redirected to an existing URL.
Jenkins 2.375.1 - 2.375.3 redirect to a non-existent URL.

Test that the old behavior is restored.

* [JENKINS-70599] restore installNecessaryPlugins redirect destination

The installNecessaryPlugins API end point previously redirected to the
"/updateCenter" URL.  When the side bar was added to the plugin
manager, the redirect was changed to "/updates".  Unfortunately, there
is no page at "/updates", while there is a page at "/updateCenter".

This restores the redirect for the installNecessaryPlugins API call.

If the redirect is not restored, calls to the API that follow the redirect
fail with a page not found (HTTP 404).

I did not find any callers to that API from inside Jenkins core.

Change introduced in 6db88c3f5b

* Use default HttpClient version

The HttpClient documentation notes that if the default is selected but
not supported, then the client will automatically downgrade to HTTP 1.1.
Browsers only support HTTP 2 over TLS, but that's not a requirement of
the HTTP 2 specification.

https://http2.github.io/faq/#does-http2-require-encryption

* Adjust test timeouts based on actual test results

Tests on ci.jenkins.io showed that installNecessaryPluginsTest completes
as follows:

* 9.4 seconds Windows JDK 17
* 0.8 seconds Linux JDK 11
* 1.0 seconds Linux JDK 17
* 1.1 seconds Linux JDK 19

With those timings, it seems reasonable to set the crumb request to
timeout in not more than 7 seconds and the plugin installation request
to timeout in not more than 20 seconds.  That will waste a little less
time in execution if there is a problem and still leaves room for low
performance systems.

* Redirect to newer pluginManager URL
2023-02-25 01:45:23 -05:00
Kevin-CB 554587b06d [SECURITY-3058] 2023-02-23 07:59:19 +00:00
Kevin-CB d034626fd5 [SECURITY-2399] 2023-02-23 07:59:13 +00:00
Yaroslav Afenkin 59ac866d99 [SECURITY-3037] 2023-02-23 07:59:06 +00:00
Daniel Beck b70f4cb589 [SECURITY-3030] 2023-02-23 07:59:00 +00:00
Kevin-CB f39c11fa27 [SECURITY-2823] 2023-02-23 07:58:53 +00:00
Jeff Thompson 40663588ee [SECURITY-2120] 2023-02-23 07:58:46 +00:00
Jeff ThompsonandKevin-CB 80452662b3 [SECURITY-1807]
Co-authored-by: Kevin-CB <kguerroudj@cloudbees.com>
2023-02-23 07:58:40 +00:00
19896b3034 Updating the descriptions for the escape/encode functions (#7606)
* Updating the descriptions for the escape/encode functions

Adding explanations and examples to the encode and escape functions

* Updated description for encode 

I have edited some of the descriptions to bring them in line with the documentation over on husdon.Util

* Changed leading and trailing spaces on encode

I left one space at the end and added a note to say how a blank space is rendered

* Removed trailing whitespace to satisfy checkstyle

* Preserve formatting and escape HTML tags

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Changed escaping on examples so they rendered properly in the javadoc

I was tempted to use {@literal &amp;} notation but this added blank spaces, making the examples look strange.  Instead I have used the &amp;amp; notation.

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/Functions.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

---------

Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2023-02-09 11:35:55 +01:00
Vincent Latombe 8b64efc5a2 Fix computer links in some cases (#7608)
* Computer links are incorrect in some cases

https://github.com/jenkinsci/jenkins/pull/6907 computes computer urls based on
privilege, which can cause inconsistent breadcrumb update as a result.

$jenkinsUrl/manage/computer/ is typically the URL you access when
browsing "Manage Jenkins > Configure Nodes and Clouds"

vs.

$jenkinsURl/computer/ which can be accessed by clicking on "Build
Executor Status"

* Fix RSSTest
2023-02-09 11:31:40 +01:00
Jesse Glick 27358385b7 Messaging tweaks for InstallUncaughtExceptionHandler (#7622) 2023-02-06 15:01:00 -07:00
Daniel BeckandDaniel Beck 6b4dd606bf [JENKINS-70533] Skip submitting telemetry when exception is thrown (#7618)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2023-02-06 15:00:36 -07:00
Jesse Glick e0aee591d0 [JENKINS-70531] Apply timeout on WebSocket write operations (#7596)
* Apply timeout on WebSocket write operations
* https://github.com/jenkinsci/remoting/pull/621 released
2023-02-05 07:19:09 -07:00
Vincent Latombe 9d73b84158 Compute agents log directory consistently with other tasks (#7595)
This ensures any custom value provided by system property hudson.triggers.SafeTimerTask.logsTargetDir (or any future way to change logs location) is honored including for agents
2023-01-26 10:08:23 +01:00
Jesse Glick 932a632812 Introduce SubTask.getOwnerExecutable (#7599)
* Introduce `SubTask.getOwnerExecutable`

* Javadoc
2023-01-26 10:07:45 +01:00
YaroslavandYaroslav Afenkin 5503dd1165 Encode cloud name in Cloud#getUrl (#7573)
Co-authored-by: Yaroslav Afenkin <yaroslavafenkin@users.noreply.github.com>
2023-01-25 09:44:51 +01:00
Allan BurdajewiczandBasil Crow 5755957b3a [JENKINS-70334] Fix and simplify TcpSlaveAgentListenerRescheduler (#7547)
Co-authored-by: Basil Crow <me@basilcrow.com>
2023-01-20 00:07:32 -08:00
Jesse GlickandAlexander Brandes bedd4fe1ca [JENKINS-62332] Remove plugin update GUI “A newer version than being offered for installation exists…” (#7362)
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2023-01-17 08:08:51 +00:00
Alexander Brandes 4602160a5c Fill in todo annotations (#7585) 2023-01-16 20:32:29 +01:00
Jesse Glick 387ae0ce7a [JENKINS-70414] Missing agent-side Channel.close from PingThread.onDead (#7580) 2023-01-16 13:47:34 +01:00
5522f6008c Allow formatted markup for node descriptions (#6511)
Co-authored-by: Adrien Lecharpentier <adrien.lecharpentier@gmail.com>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
Co-authored-by: Basil Crow <me@basilcrow.com>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2023-01-02 18:10:17 +00:00
622e4c6ebb [JENKINS-69339] badge icon for Management links (#6995)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Basil Crow <me@basilcrow.com>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2023-01-02 18:08:44 +00:00
dependabot[bot] 3965fec72e Upgrade XStream from 1.4.19 to 1.4.20 (#7548)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-27 10:40:47 -08:00
Mark WaiteandBasil Crow 89bca6705f Set hex value to null if value is null
Retain internal consistency in the code.

Since value is set to null if it is an empty string,
it makes sense to set valueHex to null if value
is null.

Co-authored-by: Basil Crow <me@basilcrow.com>
2022-12-23 13:02:18 -07:00
Mark Waite fd2f7e817b Avoid URICheckEncodingMonitor empty value NPE
https://community.jenkins.io/t/reverse-proxy-test-does-not-handle-url-correctly/1294/9
reports that an empty value returned to the URI encoding check monitor
will report a null pointer exception.  An empty value is unexpected in
that context, but it is easy to check for null and avoid the null
pointer exception.

No Jira ticket was opened for the issue.  I can open a Jira ticket if
that is required.
2022-12-23 10:10:28 -07:00
53e59bb011 Expose org.jenkins.ui.symbol.Symbol (#6659)
* Expose org.jenkins.ui.symbol.Symbol

* Exposes the existing IconSet#getSymbol for plugins by adding a builder
pattern and moving it to its own package and class to separate the
symbol framework from the Icon one.
* Added coverage to the existing method including symbol lookup from
  plugins

* Fixes JENKINS-68805 and pick up #6685

* Clean up

* Rename method since the intent slightly changed

* Simplify

* Make this compile

* Remove support for legacy names

* Fix reviews

* Add assertions for the symbol content used for testing

* Read science svg from filesystem

* Add withRaw to parse a raw selector

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
Co-authored-by: Basil Crow <me@basilcrow.com>
2022-12-20 11:25:42 +01:00
Mark Waite 9254655aff Merge pull request #7523 from jglick/newBuild
[JENKINS-23152] More robust handling of build number collisions
2022-12-19 11:40:53 -07:00
0ddfd46d48 [JENKINS-70240] Support non-HTTP URLs in PluginManager#doCheckUpdateSiteUrl (#7524)
Co-authored-by: Julie Heard <55280278+julieheard@users.noreply.github.com>
Co-authored-by: Basil Crow <me@basilcrow.com>
2022-12-17 08:31:29 -08:00
Jesse Glick 2e9fff21ca Better null safety for createProject (#7521) 2022-12-16 16:08:22 +01:00