proposal to output more than one tables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cliff |
New
|
Undecided
|
Unassigned |
Bug Description
Cliff provides great ways to draw table about one object (Show) or many equals objects. (List)
But, sometimes I have a difficult JSON that would be better to split into two or many tables.
For example, I have a daemon that fetches a data from services. Daemon provides API for getting information about current fetcher state (is fetching already started) and history (when was running)
A simple example of the answer:
{
"current_
"monitoring": false,
"storage": false,
},
"last_fetches": [
{
"date": "2017-08-
"service": "monitoring"
},
{
"date": "2017-08-
"service": "storage"
}
]
}
Would be great to draw like
+------
| Field | Value |
+------
| storage | false |
| monitoring | false |
+------
+------
| date | service |
+------
| 2017-08-01T12:00:00 | monitoring |
| 2017-08-01T12:00:00 | storage |
+------
But I haven't found a way to draw more than 1 table.
Now I have a custom command class that inherits from cliff.Command and cliff.TableForm atter.
This solution works fine for me, but I've lost possibility call different formatters