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

    • Blue Ocean 1.1-beta4, Blue Ocean 1.1

    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

          alobato Alvaro Lobato created issue -
          alobato Alvaro Lobato made changes -
          Field Original Value New Value
          Description The "Try Blue Ocean" button goes to the Blue Ocean url defined by BlueOceanWebURLBuilder|https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/BlueOceanWebURLBuilder.java#L70] this behaviour is not extensible and there is no way to define URLs for other Items.

          Also when you are in the classical view inside a folder that is the root item of an org, you should go to /blue/organization/org_name/ instead of /blue/ which could easily be done when this is extensible
          The "Try Blue Ocean" button goes to the Blue Ocean url defined by [BlueOceanWebURLBuilder | https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/BlueOceanWebURLBuilder.java#L70] this behaviour is not extensible and there is no way to define URLs for other Items.

          Also when you are in the classical view inside a folder that is the root item of an org, you should go to {{/blue/organization/org_name/}} instead of {{/blue/}} which could easily be done when this is extensible
          alobato Alvaro Lobato made changes -
          Summary Blue Ocean button url should be extensible and take into account the organization Blue Ocean button url should take into account organization root GroupItem
          alobato Alvaro Lobato made changes -
          Description The "Try Blue Ocean" button goes to the Blue Ocean url defined by [BlueOceanWebURLBuilder | https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/BlueOceanWebURLBuilder.java#L70] this behaviour is not extensible and there is no way to define URLs for other Items.

          Also when you are in the classical view inside a folder that is the root item of an org, you should go to {{/blue/organization/org_name/}} instead of {{/blue/}} which could easily be done when this is extensible
          The "Try Blue Ocean" button goes to the Blue Ocean url defined by [BlueOceanWebURLBuilder | https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/BlueOceanWebURLBuilder.java#L70] this
          When you are in the classical view inside a folder that is the root item of an org, you should go to {{/blue/organization/org_name/}} instead of {{/blue/}} which could easily be done when this is extensible

          This behaviour is not extensible and there is no way to define URLs for other Items not taken into account by [BlueOceanWebURLBuilder | https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/BlueOceanWebURLBuilder.java#L70]

          alobato Alvaro Lobato made changes -
          Labels cloudbees-internal-steel
          alobato Alvaro Lobato made changes -
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          vivek Vivek Pandey added a comment -

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

          vivek Vivek Pandey added a comment - alobato 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.
          alobato Alvaro Lobato added a comment - - edited vivek 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
          vivek Vivek Pandey added a comment -

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

          vivek Vivek Pandey added a comment - alobato 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.
          jamesdumay James Dumay made changes -
          Assignee Vivek Pandey [ vivek ]
          jamesdumay James Dumay made changes -
          Sprint Blue Ocean 1.1-beta3 [ 316 ]
          jamesdumay James Dumay made changes -
          Rank Ranked higher
          jamesdumay James Dumay made changes -
          Sprint Blue Ocean 1.1-beta4 [ 316 ] Blue Ocean 1.1-beta4, Blue Ocean 1.1-beta5 [ 316, 321 ]
          vivek Vivek Pandey made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          vivek Vivek Pandey made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          alobato Alvaro Lobato made changes -
          Summary Blue Ocean button url should take into account organization root GroupItem Make Blue Ocean link url resolution extensible by plugins and take into account Organizations
          alobato Alvaro Lobato made changes -
          Description The "Try Blue Ocean" button goes to the Blue Ocean url defined by [BlueOceanWebURLBuilder | https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/BlueOceanWebURLBuilder.java#L70] this
          When you are in the classical view inside a folder that is the root item of an org, you should go to {{/blue/organization/org_name/}} instead of {{/blue/}} which could easily be done when this is extensible

          This behaviour is not extensible and there is no way to define URLs for other Items not taken into account by [BlueOceanWebURLBuilder | https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/BlueOceanWebURLBuilder.java#L70]

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

          alobato Alvaro Lobato added a comment -

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

          alobato Alvaro Lobato added a comment - I've re-written the issue in a more generic way as agreed.
          alobato Alvaro Lobato made changes -
          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 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

          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

          jamesdumay James Dumay made changes -
          Priority Major [ 3 ] Blocker [ 1 ]
          jamesdumay James Dumay made changes -
          Rank Ranked higher
          vivek Vivek Pandey made changes -
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Resolved [ 5 ]
          jbriden Jenn Briden made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: