takeout
takeout copied to clipboard
Add categories on json list
Hi @mattstauffer , first implementation of #143 could be like this:
![Screenshot 2020-10-01 at 17 30 16](https://user-images.githubusercontent.com/4376886/94830386-cfa85900-040b-11eb-9a37-e6b239c57130.png)
The json is:
{
"Cache": [
[
{
"container_id": "3aac7ef4477f",
"names": "TO--memcached--1.6.7",
"status": "Up 7 hours",
"ports": "0.0.0.0:11211->11211\\/tcp"
}
]
],
"Database": [
[
{
"container_id": "4dc197902954",
"names": "TO--mariadb--focal",
"status": "Up 7 hours",
"ports": "0.0.0.0:3342->3306\\/tcp"
}
],
[
{
"container_id": "0daed47e14a5",
"names": "TO--postgresql--13.0",
"status": "Up 3 days",
"ports": "0.0.0.0:5647->5432\\/tcp"
}
]
],
"Mail": [
[
{
"container_id": "202e824629b1",
"names": "TO--mailhog--v1.0.1",
"status": "Up 7 hours",
"ports": "0.0.0.0:8025->8025\\/tcp, 0.0.0.0:2341->1025\\/tcp"
}
]
]
}
I decided to group container by category as i've done in the principal menu #88 (PR #135) but we can discuss about it.
I think that isn't useful category column in list output.
Hi @mattstauffer now PR is updated. All tests pass.
This PR needs #157 .
🥺
@danielebarbaro Whoops, sorry!
- I think I'd prefer we use the lowercase version of the categories, but I'd be up to someone telling me the uppercase is better.
- My natural inclination would be just to add it to each item in the list rather than grouping them this way. @mpociot as the first person who's talked about possibly consuming this data, what do you think?
hi @mpociot , what you think about this implementation?
I think I'd prefer we use the lowercase version of the categories, but I'd be up to someone telling me the uppercase is better.
oookkeeeei 🧐 🤓
My natural inclination would be just to add it to each item in the list rather than grouping them this way. @mpociot as the first person who's talked about possibly consuming this data, what do you think?
I prefer grouping to "select" only one group a time 💪🏻
@danielebarbaro OK, I'm going to say definitely throw them into the main body of each entry, and give a flat response of entries.
@josecanhelp had a great idea as well: To add the category under a meta
key, so it's separated from the rest.
Thanks!
Cool, if you need any help i can support you . I noticed your last PR merges and i saw Base Alias && Full Alias , well done @josecanhelp 🥇
@danielebarbaro If you're up to code the change, I'd love it! If you don't have time, please let me know.
@danielebarbaro If you're up to code the change, I'd love it! If you don't have time, please let me know.
i'm always on the cutting edge 🏄🏼♂️. i will rewrite the PR with the new changes
Hi @mattstauffer , PR updated but i have some doubts to discuss.
![Screenshot 2020-11-10 at 15 49 26](https://user-images.githubusercontent.com/4376886/98689578-5b4ac900-236c-11eb-88c7-eed55be6d8b6.png)
-
takeout list --json
have different output fromtakeout list
is it what we want?
My opinion is to have same output (add category column on list) and with #173 filter base alias, full alias and category fields Maybe category can be always present 🧐
- Full Alias and Base Alias are lowercase, category isn't.
My opinion is to have same output :) convert category to lowercase and use ucfirst() on menu (takeout enable
).
- behind the scenes i use container name to get the right category however, i would like to use
base_alias
My opinion is: container name isn't clean to parse, base alias is "more confident" to use
🙋🏻♂️
takeout list --json have different output from takeout list is it what we want? Yep!
Full Alias and Base Alias are lowercase, category isn't. I agree, let's strtolower the category
behind the scenes i use container name to get the right category however, i would like to use base_alias Makes sense!
@danielebarbaro Thanks for all your hard work on this!
@danielebarbaro OK, I'm finally getting back into my open source tasks. Taking a look now!