Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Updated to podman 2.0.3 json format #14

Closed
wants to merge 2 commits into from
Closed

✨ Updated to podman 2.0.3 json format #14

wants to merge 2 commits into from

Conversation

rmarting
Copy link

@rmarting rmarting commented Jul 30, 2020

podman 2.0.3 json format includes a set of differences in the schema (e.g: Names as an array, State instead of Status, ...).

This commit includes some changes to update them.

With these minimal changes the gnome extension works successfully again with podman 2.0.3. Some extra staff should be done to manage:

  • Show Created attribute with some human readable format.
  • Show Ports array in a human readable format.

Some changes are described in the following issues in podman:

podman 2.0.3 json format includes a set of differences in the schema (e.g: Names as an array, State instead of Status, ...). This commit includes some changes to update them.
Using locale configuration of the user to show the creation timestamp

| branch | gnome-shell version |
| --- | --- |
| master | 3.36.1 |
| 3.36 | 3.36.4 |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The podman version is something that needs handling as well. I'm thinking on adding per podman release json parsing handling. Some people may newer version of gnome but old podman versions and vice versa.

@rgolangh
Copy link
Owner

@rmarting thank yo so much for this. This is not the first time podman breaks. Hopefully this is
going to be more stable (Id instead of ID, State/Status and so on)

Important note about indentation - its deliberately like that and taken from many source code examples in the gnome-shell repo.

@rgolangh rgolangh closed this Aug 10, 2020
@rgolangh rgolangh reopened this Aug 10, 2020
this.menu.addMenuItem(new PopupMenuItem("Id", container.Id));
this.menu.addMenuItem(new PopupMenuItem("Image", container.Image));
this.menu.addMenuItem(new PopupMenuItem("Command", container.Command));
this.menu.addMenuItem(new PopupMenuItem("Created", timeConverter(container.Created)));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can actually just use CreatedAt

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rmarting
Copy link
Author

Do you think that my changes could be integrated for a new release of the extension? TBH I am not following the latest changes in Podman space, and I am not an expert in gnome-extension life cycle ... so you, as owner, could choose the best approach. If I could help you in other thing, I am glad to do it.

@rgolangh
Copy link
Owner

rgolangh commented Sep 3, 2020

I'm going to close this in favour of something bit more generic #15 - thanks a lot for this PR!
Hopefully it would help to keep up with future changes and still leave the extension in tact.

@rmarting
Copy link
Author

rmarting commented Sep 3, 2020

Cool Roy! Your approach is more clean than my initial proposal. I like it!
It was a pleassure to contribute into your gnome-extensión (my first time at all) 😆

@rmarting rmarting closed this Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants