-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add " Interface IP" display capability + More modern CSS style #25
Conversation
- Improved the overall layout and styling of the interface table. - Added a cleaner and modern design using CSS. - Ensured all interfaces are displayed and properly aligned. - Added hover effects for buttons to enhance interactivity. - Updated the color scheme for better readability and aesthetics. - Maintained functionality while improving visual appeal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contributions, I really like the new style of the app!
Oh wow, I use TC and I really like the new design |
Co-authored-by: Markus Hofbauer <[email protected]>
Co-authored-by: Markus Hofbauer <[email protected]>
Changes were applied, let me know what you think :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last small comment, then we are ready to merge.
Display of IP addresses started causing issues after last edit, had to rollback to my initial contribution so UI will display IP correctly
@benjisho regarding the last rollback, could you please try subprocess.run? see https://stackoverflow.com/a/39187984 as a reference. It looks like we mainly care about running the command and getting the output back. |
use subprocess.run instead of subprocess.Popen for retrieving IP
I have replaced |
Looks good to me. Almost ready to merge. Let's just replace the old image with the new one. No need to keep the old image. |
seems that CI is now failing because |
I can take a look on Monday. If you want to take some action, you could create a separate PR where you do a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last small comment before we can merge
main.py
Outdated
result = subprocess.run( | ||
["ip", "-o", "-4", "addr", "show"], | ||
capture_output=True, | ||
text=True, | ||
check=True, | ||
) | ||
output = result.stdout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines are duplicated from above, can we make it a seperate one and reuse in both places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added new run_ip_command
function to handle this
@hofbi Seems tha CI is failing due to pre-commit update of package Can we ignore the issue? or shall we change the |
To finally get this PR merged, I suggest we downgrade pyupgrade to 3.16 which is the last version supporting python 3.8 Upgrading the entire thing would be a follow up PR. Here we could add support for Ubuntu 22.04 by switching to Python 3.10. |
Summary
This pull request enhances the
tcgui
project by adding the capability to display the IP addresses of each interface and updating the CSS to a more modern style.Changes
Interface IP Display:
CSS Update:
Benefits
Screenshots
Before:
After:
Testing