Filtering targets in Machine Policy details

Hello,

I’ve just hit a bit of a UI glitch in the details page for individual Machine Policies. This is in a fairly old version of Octopus Server (v2018.9.10), so it’s possibly been fixed since then, but I don’t have a newer server available to check so I’m reporting it anyway just in case it is still present…

Basically, when using the search filter in the “Currently in use -> Deployment Targets” section of a Machine Policy details page, the search filter seems to apply after the current page of deployment targets is loaded. For example, if I have 10 pages-worth of deployment targets assigned to a policy and I enter a filter that matches a single target that appears on page 5 of the full target list, it still shows 10 page links for the list of targets, but the pages are all blank except for page 5 which shows the one matching target.

It looks like what’s happening is the list of deployment targets is being requested for the current page number via the Octopus API, and the targets on that page are then being filtered client-side, rather than filtering the deployment target list and then paginating through the matching targets.

To reproduce, create a Machine Policy with 20 deployment targets assigned and navigate to the “Currently in use -> Deployment targets” section of the Machine Policy details page. There will be two pages of deployment targets listed.

Let’s say the list of assigned deployment target looks like this:

Page 1

  • Target-A1
  • Target-A2
  • Target-A3
  • Target-A4
  • Target-A5
  • Target-B1
  • Target-B2
  • Target-B3
  • Target-B4
  • Target-B5

Page 2

  • Target-C1
  • Target-C2
  • Target-C3
  • Target-C4
  • Target-C5
  • Target-D1
  • Target-D2
  • Target-D3
  • Target-D4
  • Target-D5

If you now enter a filter of, say, “Target-C” it will still show two pages of results, but they will look like this:

Page 1

  • <blank>

Page 2

  • Target-C1
  • Target-C2
  • Target-C3
  • Target-C4
  • Target-C5

When you’ve got a Machine Policy with, say, 500+ deployment targets across 50 pages in the list it means the filter is pretty much useless. Even though it only displays the matching deployment targets, it still shows them on the page they’d naturally appear on with the full unfiltered list displayed, so you’ve got to click through 20-30 blank pages to find them - I could do that without using the filter and it would take the same amount of time :-S.

Hopefully this description makes sense, but let me know if you need more info, or even if it’s been fixed in the latest version.

Cheers,

Mike

Hi Mike,

Thanks for getting in touch! I’m sorry about the confusing behavior you’re hitting here. Thanks also for your report and the clear steps to reproduce this. Sure enough I’ve been able to reproduce this issue in latest, so unfortunately it’s still current. I’ve raised this bug report at the following link for you to track.

Please don’t hesitate to reach out if you have any questions or concerns in the future!

Best regards,

Kenny

Thanks Kenny.

Your description on the GitHub ticket is a lot more concise than mine, too :slight_smile:

Hi Mike,

You’re very welcome! I appreciate you reporting this issue, and please let us know if you have any questions or concerns in the future. :slight_smile:

Best regards,

Kenny