feat: add the system/python/storage information that's already at the top of config to the top of updatepackage#952
Conversation
… top of config to the top of updatepackage
There was a problem hiding this comment.
Pull request overview
Adds the same environment/version header shown on the Configuration page to the Package Management (“updatepackage”) page so admins/developers can quickly see docassemble version, underlying Python version, and remaining disk space while managing packages.
Changes:
- Display a top-of-page header on
update_package.htmlwith version/Python/disk information. - Compute and pass
config_version,underlying_python_version, andfree_disk_spacefromupdate_package()inserver.py.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docassemble_webapp/docassemble/webapp/templates/pages/update_package.html | Adds a header line showing version/Python/disk info at the top of the Package Management page. |
| docassemble_webapp/docassemble/webapp/server.py | Computes disk free space and version strings and passes them into the update package template. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| else: | ||
| flash(word('You need to supply a Git URL, upload a file, or supply the name of a package on PyPI.'), 'error') | ||
| package_list, package_auth = get_package_info() | ||
| (disk_total, disk_used, disk_free) = shutil.disk_usage(daconfig['config file']) # pylint: disable=unused-variable |
There was a problem hiding this comment.
@copilot apply changes based on this feedback
| python_version = daconfig.get('python version', word('Unknown')) | ||
| system_version = daconfig.get('system version', word('Unknown')) | ||
| if python_version == system_version: | ||
| config_version = word("Version") + " " + str(python_version) | ||
| else: | ||
| config_version = word("Version") + " " + str(python_version) + ' (Python); ' + str(system_version) + ' (' + word('system') + ')' |
There was a problem hiding this comment.
@copilot apply changes based on this feedback
|
I'm letting copilot make the changes that I specifically said I didn't do. If you don't like them, then grab the first commit or let me know and I'll change appropriately. This is really just me asking for a specific change without wanting to do it empty-handed. EDIT: It seems that Copilot didn't do as I requested. Maybe due to repo permissions or something. Please let me know if you want me to make any changes, or feel free to do so yourself. Thanks! |
This is a small QOL change that I think would be nice, so that I can see from Package Management the same information that's already shown in Configuration. This is especially important for seeing which Python version I'm on when I'm installing packages that might have constraints.
I'm open to any/all changes. I tried to make this as direct a copy from config, but didn't do any helper functions or anything either. I really just wanted the system version and the python version to be on the updatepackage screen, but copied the whole thing for consistency.