Issue #1844 - declare table headers before sorting the table rows in qpid-queue-count.
Former-commit-id:281978cc5d
[formerly7c16aacfb0
] [formerly71b443b525
] [formerly 40351767ac7c9bd0b2ebe78fe8f3b837a2adb96a [formerly71b443b525
[formerlyda7371618c
]]] [formerlyb956f09b37
[formerly71b443b525
[formerlyda7371618c
] [formerlyb956f09b37
[formerly 4f86b9cf6cf5e586199a08d2a470e232b1a8da1e]]]] Former-commit-id:b956f09b37
Former-commit-id: 291926249823c18b5f4fe1d556c4be7bde6a8eae [formerly 4a8b6fea39baccc5dd63c8a36e86b062fc4c0368] [formerly77e2399fcf
[formerly063f0ed761
]] Former-commit-id:77e2399fcf
Former-commit-id:212dd227cc
This commit is contained in:
parent
92069d673e
commit
602277c2b2
1 changed files with 8 additions and 7 deletions
|
@ -159,7 +159,14 @@ try:
|
|||
# evaluate the JSON
|
||||
jsonStr = response.read()
|
||||
jsonObjArray = json.loads(jsonStr)
|
||||
|
||||
|
||||
# table header
|
||||
heads = []
|
||||
heads.append(Header("queue"))
|
||||
heads.append(Header("msg", Header.KMG))
|
||||
heads.append(Header("bytes", Header.KMG))
|
||||
heads.append(Header("cons", Header.KMG))
|
||||
|
||||
# create rows of queues to display
|
||||
rows = []
|
||||
for staticDict in jsonObjArray:
|
||||
|
@ -180,12 +187,6 @@ try:
|
|||
|
||||
# prepare to build & display the table
|
||||
disp = Display(prefix=" ")
|
||||
# table header
|
||||
heads = []
|
||||
heads.append(Header("queue"))
|
||||
heads.append(Header("msg", Header.KMG))
|
||||
heads.append(Header("bytes", Header.KMG))
|
||||
heads.append(Header("cons", Header.KMG))
|
||||
disp.formattedTable("Queues", heads, dispRows)
|
||||
except KeyboardInterrupt:
|
||||
print
|
||||
|
|
Loading…
Add table
Reference in a new issue