Skip to content

Sort of hostnames not correct #893

Open
@MalteKiefer

Description

Server Info (please complete the following information):

  • OS: Debian 11
  • Browser: Edge
  • RMM Version (as shown in top left of web UI): 0.10.5

Installation Method:

  • Standard
  • Docker

Agent Info (please complete the following information):

  • Agent version (as shown in the 'Summary' tab of the agent from web UI): 1.7.2
  • Agent OS: Windows 10

Describe the bug
There is a typical error in the sorting of the hostname.
Here is a snippet how to solve this in JS:

var collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'});
var myArray = ['1_Document', '11_Document', '2_Document'];
console.log(myArray.sort(collator.compare));
[
  "1_Document",
  "2_Document",
  "11_Document"
]

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    dev-triageNeeds triaging by devs for issue assignment

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions