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
marmarek
left a comment
There was a problem hiding this comment.
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
tplsdict 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.
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.
| 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.
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.
Why just epoch? It's meaningless without full version. Maybe you need just name here then?
|
|
||
| %{python3_sitelib}/qubesmanager/resources_rc.py | ||
|
|
||
| %{python3_sitelib}/qubesmanager/ui_templatemanger2.py |
There was a problem hiding this comment.
Should the old one be removed (not only from spec, but from repo completely)?
There was a problem hiding this comment.
yes, good catch, no point keeping it
There is no good place for the info, so I opened QubesOS/qubes-issues#9530 and will work on that right after this one. |
It now has close+apply buttons instead of cancel+ok QubesOS/qubes-manager#382
|
Included in #387 |
Changed Template Manager UI to be more friendly.
Added a lot of explanations. Functionally,
added checking for obsolete templates.