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

            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.
            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.
            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

              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: