[
https://issues.jboss.org/browse/WFCORE-459?page=com.atlassian.jira.plugin...
]
Alexey Loubyansky commented on WFCORE-459:
------------------------------------------
Let's start with what we have. The default behaviour of ls -l wrt attributes is that
it adds the rows (an attribute is a row) into the table in the order they appear in the
response of read-resource. But before printing the table it sorts the rows by attribute
name, so they appear in the alphabetical order.
So, if the plan is to return attributes ordered by groups in the response of read-resource
(it was mentioned as a possibility in the thread) then we'll just need to skip the
sorting in the CLI handler. If the CLI still has to re-order the result, sorting by
another column won't be difficult at all (it's not yet supported but it's a
change practically in one line).
Adding another column. That's currently supported actually. It's described in the
help of ls, see --attribute-description-property. The default/hardcoded properties
displayed are name, value and type. But a user may extend that by simply adding the
property name as an argument, e.g. ls -l --nillable --storage.
So, if the group column should be displayed on demand then we don't need to change
anything here. If it should be added to the default properties displayed, it will be
another simple line of code.
So, overall, this issue is not problematic. A possible complication is if we decide to
give the user a choice and let him specify how to sort the table, which won't be that
difficult to do, it's just more than one line of code :)
I'll be fine with either doing it myself or letting somebody contribute the change.
Account for attribute groups in CLI behavior
--------------------------------------------
Key: WFCORE-459
URL:
https://issues.jboss.org/browse/WFCORE-459
Project: WildFly Core
Issue Type: Feature Request
Components: CLI
Reporter: Brian Stansberry
Assignee: Alexey Loubyansky
Fix For: 1.0.0.Beta1
See
http://lists.jboss.org/pipermail/wildfly-dev/2014-December/003414.html
This JIRA is for reflecting the attribute group notion in CLI behavior.
I think this is just reflecting it in the output of the "ls -l" command,
although there may be other places I'm not thinking of. For "ls -l" simplest
is just to add a GROUP column to the right, and then sort the attributes by group and then
by name, but perhaps something else is better.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)