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

Make Blue Ocean link url resolution extensible by plugins and take into account Organizations

    XMLWordPrintable

    Details

    • Sprint:
      Blue Ocean 1.1-beta4, Blue Ocean 1.1
    • Similar Issues:

      Description

      The Blue Ocean link from the classical view should be customizable by plugins. Plugins should be able to define or override the url mapping for a given ModelObject.

      Also by default this link should take into account when an organization has been defined and if this organization root Item is different from the root of the Jenkins instance

        Attachments

          Activity

          Hide
          vivek Vivek Pandey added a comment -

          Alvaro Lobato I am trying to understand this, so when you are in org folder and click on 'Try Blue Ocean', then it redirects to /blue URL? 

          Looking at the code, BlueOceanWebURLBuilder is computing org name using OrganizationFactory.], In this case if it can find OrganiationResolver then it can compute url correctly.

          Show
          vivek Vivek Pandey added a comment - Alvaro Lobato I am trying to understand this, so when you are in org folder and click on 'Try Blue Ocean', then it redirects to /blue URL?  Looking at the code, BlueOceanWebURLBuilder is computing org name using OrganizationFactory .], In this case if it can find OrganiationResolver then it can compute url correctly.
          Show
          alobato Alvaro Lobato added a comment - - edited Vivek Pandey Yes, for Jobs, Runs and Multibranches, for the rest will return null URL which defaults to /blue without org. https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/BlueOceanWebURLBuilder.java#L133 https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/BlueOceanWebURLBuilder.java#L91
          Hide
          vivek Vivek Pandey added a comment -

          Alvaro Lobato Ah, this we can fix easily if we handle instance of ModifiableTopLevelItemGroup. ModifiableTopLevelItemGroup maps to BlueOrganization, which is handled via OrganizationFactory extension, so this should just work in your case.

          Show
          vivek Vivek Pandey added a comment - Alvaro Lobato Ah, this we can fix easily if we handle instance of ModifiableTopLevelItemGroup. ModifiableTopLevelItemGroup maps to BlueOrganization, which is handled via OrganizationFactory extension, so this should just work in your case.
          Hide
          alobato Alvaro Lobato added a comment -

          I've re-written the issue in a more generic way as agreed.

          Show
          alobato Alvaro Lobato added a comment - I've re-written the issue in a more generic way as agreed.

            People

            • Assignee:
              vivek Vivek Pandey
              Reporter:
              alobato Alvaro Lobato
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: