juju status --format=tabular

Bug #1424590 reported by Anastasia
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Anastasia

Bug Description

Subject: juju status --format=tabular
Date: Thu, 19 Feb 2015 08:07:27 +0400
From: John Meinel <email address hidden>
To: <email address hidden> <email address hidden>

I was wondering if we could change the sorting to be "numeric" aware
instead of just alphabetical.

Specifically if you have more than 10 units you get:
[Units]
ID STATE VERSION MACHINE PORTS PUBLIC-ADDRESS

ubuntu/0 started 1.18.4 1 ec2-54-220-86-118.eu-we...
ubuntu/1 started 1.18.4 2 ec2-54-155-143-100.eu-w...
ubuntu/10 started 1.18.4 1 ec2-54-220-86-118.eu-we...
ubuntu/100 started 1.18.4 1 ec2-54-220-86-118.eu-we...
ubuntu/101 started 1.18.4 2 ec2-54-155-143-100.eu-w...
ubuntu/102 started 1.18.4 3 ec2-54-74-157-229.eu-we...
ubuntu/103 started 1.18.4 4 ec2-54-220-194-242.eu-w...
ubuntu/104 started 1.18.4 5 ec2-54-246-53-159.eu-we...
ubuntu/11 started 1.18.4 2 ec2-54-155-143-100.eu-w...
...

Which is not ideal IMO. Since we *know* that units are in the form
SERVICE/NUMBER can we do numerical sorting on the second part of the field?

Martin Pool wrote a really nice natural order string comparison utility
which we could borrow:
http://sourcefrog.net/projects/natsort/

John
=:->

Changed in juju-core:
status: New → In Progress
assignee: nobody → Anastasia (anastasia-macmood)
Ian Booth (wallyworld)
Changed in juju-core:
milestone: none → 1.23
importance: Undecided → High
Revision history for this message
Dimiter Naydenov (dimitern) wrote :
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.23 → 1.23-beta1
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.