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

Sort list of available dashboards alphabetically

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When selecting a dashboard using the list box, the order of portlets is somewhat random. It would be nice if the portlets would be sorted alphabetically by the localized name.

        Attachments

          Issue Links

            Activity

            drulli Ulli Hafner created issue -
            Hide
            mambu Marco Ambu added a comment -

            Any hints?

            I tried with the following but the list is always empty.

             
            public DescriptorExtensionList<DashboardPortlet, Descriptor<DashboardPortlet>> getDashboardPortletDescriptors() {
                DescriptorExtensionList<DashboardPortlet, Descriptor<DashboardPortlet>> list = DashboardPortlet.all();
            //    Collections.sort(list);
                Collections.sort(list, new Comparator<Descriptor<DashboardPortlet>>() {
                  public int compare(Descriptor<DashboardPortlet> p1, Descriptor<DashboardPortlet> p2) {
                    return p1.getDisplayName().compareTo(p2.getDisplayName());
                  }
                });
                return list;
              }
            
            Show
            mambu Marco Ambu added a comment - Any hints? I tried with the following but the list is always empty. public DescriptorExtensionList<DashboardPortlet, Descriptor<DashboardPortlet>> getDashboardPortletDescriptors() { DescriptorExtensionList<DashboardPortlet, Descriptor<DashboardPortlet>> list = DashboardPortlet.all(); // Collections.sort(list); Collections.sort(list, new Comparator<Descriptor<DashboardPortlet>>() { public int compare(Descriptor<DashboardPortlet> p1, Descriptor<DashboardPortlet> p2) { return p1.getDisplayName().compareTo(p2.getDisplayName()); } }); return list; }
            Hide
            drulli Ulli Hafner added a comment -

            I haven't yet used such a list in the code, maybe that's a good question for the dev list.

            Show
            drulli Ulli Hafner added a comment - I haven't yet used such a list in the code, maybe that's a good question for the dev list.
            Hide
            mambu Marco Ambu added a comment -

            If we change the selection mechanism, we may solve this problem too.

            Show
            mambu Marco Ambu added a comment - If we change the selection mechanism, we may solve this problem too.
            mambu Marco Ambu made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-6036 [ JENKINS-6036 ]
            sogabe sogabe made changes -
            Assignee Peter Hayes [ petehayes ] sogabe [ sogabe ]
            Show
            sogabe sogabe added a comment - See https://github.com/jenkinsci/dashboard-view-plugin/commit/cbc20ccc00ee160ed9490dcd1bcbe74338033769
            sogabe sogabe made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 136384 ] JNJira + In-Review [ 187181 ]

              People

              • Assignee:
                sogabe sogabe
                Reporter:
                drulli Ulli Hafner
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: