-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Improve Template Manager UI #382
base: main
Are you sure you want to change the base?
Conversation
Should I base this on release4.2 or on main, @marmarek ? |
main |
c5370f3
to
8e93566
Compare
8e93566
to
f1fdb2a
Compare
Changed Template Manager UI to be more friendly. Added a lot of explanations. Functionally, added checking for obsolete templates.
f1fdb2a
to
23fa39f
Compare
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.
Besides specific comments below, here are few comments about the behavior:
- When clicking "upgrade template" on installed template, I get a warning it will get reinstalled and my changes will be lost. But then it says "Template ... of highest version already installed, skipping..." and it doesn't actually reinstall it. I tried this on fedora-40-xfce - installed version is "0:4.2.0-202404251306" and the one in repo "0:4.3.0-202405280043".
- Templates listed as "installed" have version that is currently installed. So far so good. But there is no information to what version"upgrade" action will upgrade it. This may be related to dropping version from
tpls
dict key (the comment about keeping just epoch). - Templates that are both installed and available (possibly with a newer version) are not listed as "available" (that's probably okay, if a version you can update to is listed somewhere).
- Failed action shows an error text, but there is no icon/extra dialog about the error. Maybe at least "OK" button should change?
- Clicking "Repository settings" should go to "updates" tab, and ideally scroll to the templates section. Or at least say somewhere that user should go there.
- Repository data should refresh automatically after coming back from repository settings. Or there should be some info that user need to click that button themselves.
Besides the above, it's a huge improvement over the old template manager.
# Todo: | ||
# - tests | ||
# - packaging | ||
|
||
# tests: | ||
# - run with data, see if there are things listed | ||
# - check button visibility? | ||
|
||
# later bullcrap | ||
# - fix qvm-template | ||
# - update eol table |
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.
Not applicable anymore, right? If some still is, create issues instead of comments here.
if not eol_string: | ||
return False | ||
eol = datetime.strptime(eol_string, '%Y-%m-%d') | ||
return eol > datetime.now() |
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.
return eol > datetime.now() | |
return eol < datetime.now() |
name = self.template_name | ||
for suffix in SUFFIXES: | ||
name = name.removesuffix(suffix) | ||
eol_string = EOL_DATES.get(name, None) |
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.
It should also look at os-eol
feature on the template itself (for installed templates). This may need to be collected elsewhere and put into entry
dict to keep it clean.
If you prefer to change it later in a separate PR, I'm fine with that too, but open an issue about it then.
for key in tpls: | ||
tpls[key] = { | ||
(x['name'], x['epoch'], x['version'], x['release']): x | ||
(x['name'], x['epoch']): x |
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.
Why just epoch? It's meaningless without full version. Maybe you need just name here then?
@@ -100,6 +100,7 @@ rm -rf $RPM_BUILD_ROOT | |||
|
|||
%{python3_sitelib}/qubesmanager/resources_rc.py | |||
|
|||
%{python3_sitelib}/qubesmanager/ui_templatemanger2.py |
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.
Should the old one be removed (not only from spec, but from repo completely)?
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.
yes, good catch, no point keeping it
Changed Template Manager UI to be more friendly.
Added a lot of explanations. Functionally,
added checking for obsolete templates.