Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33622

Classic job configuration page shown for Multibranch projects

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The classic job configuration page is shown for Multibranch projects (and implementations of Organization Folder) instead of the new page.

        Attachments

          Issue Links

            Activity

            amuniz Antonio Muñiz created issue -
            amuniz Antonio Muñiz made changes -
            Field Original Value New Value
            Assignee Jesse Glick [ jglick ]
            Hide
            danielbeck Daniel Beck added a comment -

            gus reiber If this new config UI style is opt-in, we need documentation for plugin developers what they need to do (preferably in a way that doesn't require depending on Jenkins 2) to enable this for their config forms.

            Show
            danielbeck Daniel Beck added a comment - gus reiber If this new config UI style is opt-in, we need documentation for plugin developers what they need to do (preferably in a way that doesn't require depending on Jenkins 2) to enable this for their config forms.
            danielbeck Daniel Beck made changes -
            Labels 2.0 2.0 2.0-planned
            gusreiber gus reiber made changes -
            Assignee gus reiber [ gusreiber ]
            Hide
            gusreiber gus reiber added a comment -

            yup. later.

            Show
            gusreiber gus reiber added a comment - yup. later.
            Hide
            swashbuck1r Spike Washburn added a comment -

            Disconcerting behavior: if you create a new Multi-branch pipeline, you do not get the new config page styles when looking at

            Concerns: we don't want plugins to have to take a 2.0 dependencies to get nice config pages when running on a 2.0 Jenkins.

            Expectation: Every item type that has a configuration screen will need to be explicitly updated to support the new tab styling.

            Root cause: there is no common page/form/tag that is inherited by all item configuration pages (it is copied).

            Decision: this is not a blocker for Jenkins 2 beta/ga (as long as they aren't worse than they used to be).

            Show
            swashbuck1r Spike Washburn added a comment - Disconcerting behavior: if you create a new Multi-branch pipeline, you do not get the new config page styles when looking at Concerns: we don't want plugins to have to take a 2.0 dependencies to get nice config pages when running on a 2.0 Jenkins. Expectation: Every item type that has a configuration screen will need to be explicitly updated to support the new tab styling. Root cause: there is no common page/form/tag that is inherited by all item configuration pages (it is copied). Decision: this is not a blocker for Jenkins 2 beta/ga (as long as they aren't worse than they used to be).
            swashbuck1r Spike Washburn made changes -
            Labels 2.0 2.0-planned 2.0
            Hide
            swashbuck1r Spike Washburn added a comment -

            Antonio Muñiz - please verify that the config pages of other item types to verify that they behave as they used to.

            Show
            swashbuck1r Spike Washburn added a comment - Antonio Muñiz - please verify that the config pages of other item types to verify that they behave as they used to.
            Hide
            jglick Jesse Glick added a comment -

            I checked freestyle, standalone Pipeline, and multibranch Pipeline and all seemed as expected—the job types use the new UI, the multibranch used the old UI but still looked fine.

            Show
            jglick Jesse Glick added a comment - I checked freestyle, standalone Pipeline, and multibranch Pipeline and all seemed as expected—the job types use the new UI, the multibranch used the old UI but still looked fine.
            jglick Jesse Glick made changes -
            Component/s cloudbees-folder-plugin [ 18137 ]
            Component/s core [ 15593 ]
            Component/s workflow-plugin [ 18820 ]
            Labels 2.0 2.0 ui workflow
            Hide
            amuniz Antonio Muñiz added a comment -

            Yes, double checked.

            Show
            amuniz Antonio Muñiz added a comment - Yes, double checked.
            hrmpw Patrick Wolf made changes -
            Labels 2.0 ui workflow 2.0 community-bee ui workflow
            Hide
            swashbuck1r Spike Washburn added a comment -

            Recap: anything inheriting from Job gets the config UI enhancements. Other types (like Folder-based types) will need to update their configure.jelly to add this enhancement. This enhancement may be problematic for non-Job types that want to support Jenkins 1.x and 2.x.

            Show
            swashbuck1r Spike Washburn added a comment - Recap: anything inheriting from Job gets the config UI enhancements. Other types (like Folder-based types) will need to update their configure.jelly to add this enhancement. This enhancement may be problematic for non-Job types that want to support Jenkins 1.x and 2.x.
            swashbuck1r Spike Washburn made changes -
            Assignee gus reiber [ gusreiber ] Jesse Glick [ jglick ]
            Hide
            jglick Jesse Glick added a comment -
            Show
            jglick Jesse Glick added a comment - If fixing, check https://github.com/jenkinsci/workflow-cps-plugin/pull/13 .
            Hide
            mjdetullio Matthew DeTullio added a comment -

            Based on the relevant diff for the Job configure.jelly, it seems it would indeed be difficult to support both the 1.x and 2.x UI. Besides the additional JS/CSS includes, there are some additional div elements for Bootstrap, and sidepanel.jelly is no longer included.

            It appears some logic would be necessary to detect the Jenkins version (does not seem like a good idea to me) and decide whether to display a 1.x layout or 2.x layout. You could maybe get away with adding in the extra elements and styling changes and have it still look the same on 1.x, but sidepanel.jelly is a different story.

            diff --git a/core/src/main/resources/hudson/model/Job/configure.jelly b/core/src/main/resources/hudson/model/Job/configure.jelly
            index ec2a5b6..ac39d60 100644
            --- a/core/src/main/resources/hudson/model/Job/configure.jelly
            +++ b/core/src/main/resources/hudson/model/Job/configure.jelly
            @@ -27,40 +27,51 @@ THE SOFTWARE.
             -->
             <?jelly escape-by-default='true'?>
             <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
            -  <l:layout title="${it.displayName} Config" norefresh="true" permission="${it.EXTENDED_READ}">
            -    <st:include page="sidepanel.jelly" />
            -    <f:breadcrumb-config-outline />
            +
            +  <l:layout norefresh="true" type="one-column" permission="${it.EXTENDED_READ}" title="${it.displayName} Config">
            +
            +    <l:js src="jsbundles/config-scrollspy.js" />
            +    <l:css src="jsbundles/config-scrollspy.css" />
            +
                 <l:main-panel>
            -      <div class="behavior-loading">${%LOADING}</div>
            -      <f:form method="post" action="configSubmit" name="config">
            -        <j:set var="descriptor" value="${it.descriptor}" />
            -        <j:set var="instance" value="${it}" />
            +    <div class="container">
            +      <div class="row">
            +        <div class="col-md-offset-2 col-md-20">
            +
            +          <div class="behavior-loading">${%LOADING}</div>
            +
            +          <f:form method="post" action="configSubmit" name="config" tableClass="config-table scrollspy">
            +            <j:set var="descriptor" value="${it.descriptor}" />
            +            <j:set var="instance" value="${it}" />
            
            ... snip indentation changes ...
            
            +        </div>
            +      </div>
            +    </div>
                 </l:main-panel>
               </l:layout>
             </j:jelly>
            
            Show
            mjdetullio Matthew DeTullio added a comment - Based on the relevant diff for the Job configure.jelly, it seems it would indeed be difficult to support both the 1.x and 2.x UI. Besides the additional JS/CSS includes, there are some additional div elements for Bootstrap, and sidepanel.jelly is no longer included. It appears some logic would be necessary to detect the Jenkins version (does not seem like a good idea to me) and decide whether to display a 1.x layout or 2.x layout. You could maybe get away with adding in the extra elements and styling changes and have it still look the same on 1.x, but sidepanel.jelly is a different story. diff --git a/core/src/main/resources/hudson/model/Job/configure.jelly b/core/src/main/resources/hudson/model/Job/configure.jelly index ec2a5b6..ac39d60 100644 --- a/core/src/main/resources/hudson/model/Job/configure.jelly +++ b/core/src/main/resources/hudson/model/Job/configure.jelly @@ -27,40 +27,51 @@ THE SOFTWARE. --> <?jelly escape-by-default= 'true' ?> <j:jelly xmlns:j = "jelly:core" xmlns:st = "jelly:stapler" xmlns:d = "jelly:define" xmlns:l = "/lib/layout" xmlns:t = "/lib/hudson" xmlns:f = "/lib/form" xmlns:i = "jelly:fmt" > - <l:layout title= "${it.displayName} Config" norefresh= "true" permission= "${it.EXTENDED_READ}" > - <st:include page= "sidepanel.jelly" /> - <f:breadcrumb-config-outline /> + + <l:layout norefresh= "true" type= "one-column" permission= "${it.EXTENDED_READ}" title= "${it.displayName} Config" > + + <l:js src= "jsbundles/config-scrollspy.js" /> + <l:css src= "jsbundles/config-scrollspy.css" /> + <l:main-panel> - <div class= "behavior-loading" > ${%LOADING} </div> - <f:form method= "post" action= "configSubmit" name= "config" > - <j:set var= "descriptor" value= "${it.descriptor}" /> - <j:set var= "instance" value= "${it}" /> + <div class= "container" > + <div class= "row" > + <div class= "col-md-offset-2 col-md-20" > + + <div class= "behavior-loading" > ${%LOADING} </div> + + <f:form method= "post" action= "configSubmit" name= "config" tableClass= "config-table scrollspy" > + <j:set var= "descriptor" value= "${it.descriptor}" /> + <j:set var= "instance" value= "${it}" /> ... snip indentation changes ... + </div> + </div> + </div> </l:main-panel> </l:layout> </j:jelly>
            Hide
            mjdetullio Matthew DeTullio added a comment -

            Adding link to https://github.com/jenkinsci/cloudbees-folder-plugin/pull/67 as demonstration. PR has technical details on issues with the implementation.

            Show
            mjdetullio Matthew DeTullio added a comment - Adding link to https://github.com/jenkinsci/cloudbees-folder-plugin/pull/67 as demonstration. PR has technical details on issues with the implementation.
            mjdetullio Matthew DeTullio made changes -
            Remote Link This issue links to "PR 67 (Web Link)" [ 14610 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 169581 ] JNJira + In-Review [ 183554 ]
            abayer Andrew Bayer made changes -
            Labels 2.0 community-bee ui workflow 2.0 community-bee pipeline ui workflow
            abayer Andrew Bayer made changes -
            Labels 2.0 community-bee pipeline ui workflow 2.0 community-bee pipeline ui
            Hide
            jglick Jesse Glick added a comment -

            It appears some logic would be necessary to detect the Jenkins version (does not seem like a good idea to me)

            This is what I think needs to be done, unless we bite the bullet and update the baseline to 2.7.3.

            Show
            jglick Jesse Glick added a comment - It appears some logic would be necessary to detect the Jenkins version (does not seem like a good idea to me) This is what I think needs to be done, unless we bite the bullet and update the baseline to 2.7.3.
            jglick Jesse Glick made changes -
            Assignee Jesse Glick [ jglick ] Matthew DeTullio [ mjdetullio ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Assignee Matthew DeTullio [ mjdetullio ] Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 115 (Web Link)" [ 18226 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Matthew DeTullio
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java
            src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure.jelly
            src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure2.jelly
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/2ae71549c53d15a39707082d2cd284f3a4923b0a
            Log:
            [HACK]JENKINS-33622 Get 2.x UI to show on config page.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Matthew DeTullio Path: src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure.jelly src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure2.jelly http://jenkins-ci.org/commit/cloudbees-folder-plugin/2ae71549c53d15a39707082d2cd284f3a4923b0a Log: [HACK] JENKINS-33622 Get 2.x UI to show on config page.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure.jelly
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/d1b44b6a29a71f028079de67bce30f34cd3e3f85
            Log:
            Merge pull request #115 from jglick/new-UI-JENKINS-33622

            JENKINS-33622 Update to Jenkins 2.x configuration page style

            Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/afddb64d3704...d1b44b6a29a7

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure.jelly http://jenkins-ci.org/commit/cloudbees-folder-plugin/d1b44b6a29a71f028079de67bce30f34cd3e3f85 Log: Merge pull request #115 from jglick/new-UI- JENKINS-33622 JENKINS-33622 Update to Jenkins 2.x configuration page style Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/afddb64d3704...d1b44b6a29a7
            jglick Jesse Glick made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "Page (Jenkins Wiki)" [ 19732 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                amuniz Antonio Muñiz
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: