cockpit-machines icon indicating copy to clipboard operation
cockpit-machines copied to clipboard

Allow inclusion of EOL OSes in list

Open queengooborg opened this issue 3 years ago • 13 comments

My main contract is to work on MDN web docs' Browser Compat Data project, which involves a lot of old browsers and testing in them. Because of this, I end up needing to create VMs for older OSes like Windows XP. I would love for there to be an option to include EOL OSes in the dropdown list with a checkbox, much like the virt-manager program, something like the following: A screenshot showing the virtual machine creation dialog, with an added checkbox to toggle end of life OS releases

Perhaps EOL releases can then be represented with a warning or hourglass icon in the list: A screenshot showing the list of operating systems, with an hourglass icon next to the entry for Windows XP

queengooborg avatar Jan 07 '22 08:01 queengooborg

I would not go with a checkbox, but Patternfly offers this 'Show more' feature, which appears in the end of the list, or when filtering and getting no results. https://www.patternfly.org/v4/components/select/#view-more

I think it matches great to this feature request.

KKoukiou avatar Jan 07 '22 10:01 KKoukiou

I like the idea of the show more feature that @KKoukiou suggests! :+1:

We could use the description to show that vendor support ended (and even include the date of when that happened):

Screenshot 2022-02-07 at 13-06-46 PatternFly 4 • Select (Yes, I'm aware that these are states in the US. That's what the demo on PF uses. Pretend that they're operating systems. :wink:)

With a little bit of custom CSS, it could be to the side as well, which I think looks a bit better:

Screenshot 2022-02-07 at 13-06-26 PatternFly 4 • Select

The CSS:

.pf-c-select__menu-item.pf-m-description {
  display: flex;
  align-items: baseline;
}

Of course, this would have to be prefixed in something like .vm-create-os-select.pf-c-select__menu-item.pf-m-description { ... } or whatever, so it doesn't apply to every select on the page.

PF utility classes exist for both display flex and align-items baseline, but the issue here is that the values are passed to the select widget and the CSS would need to be applied at the menu-item level.

Additionally, the above CSS hack doesn't play well with fancier selects, like multiple selection selects with checked items, as it'd look like this instead, which isn't really great:

Screenshot 2022-02-07 at 13-11-15 PatternFly 4 • Select (Cropped to two selected items in a multiselect. The first has the checkmark in the correct place. The second one, with this hack applied, is incorrect.)

But as we only want one item, this local hack is probably fine otherwise. However, even without the hack, I think showing the items with an expander — or when they match a search — makes sense.

garrett avatar Feb 07 '22 12:02 garrett

We might also want to include a warning icon (fa-exclamation-triangle / ExclamationTriangleIcon) for the vendor support ending, as there will definitely be security issues with any (and every) EOL OS.

In this case, I also think it's probably OK for the triangle icon to inherit the same subdued grey. It doesn't have to be yellow-orange.

garrett avatar Feb 07 '22 13:02 garrett

I'd like to take up this issue :D

aazam-gh avatar Apr 02 '23 09:04 aazam-gh

@Alcadeus0: Then do so and send a PR! (You don't have to wait or have issues assigned.) Thanks!


How to develop for Cockpit: https://cockpit-project.org/external/source/HACKING.html

Our dev docs in general (which covers a few more things): https://cockpit-project.org/external/wiki/Contributing.html

garrett avatar Apr 03 '23 09:04 garrett

@garrett According to the conditions we have in place for filtering EOL OSes ACCEPT_EOL_DATES_AFTER = getTodayYearShifted(-1) we only accept dates shifted from last year and hence filter out almost all the EOL OSes. Should we keep this condition in place and adjust the date shift or remove it completely?

aazam-gh avatar Apr 04 '23 10:04 aazam-gh

By default, we shouldn't show EOL OSes, except within a grace period (which is 1 year). They would need to be opt-in or specifically searched for. This is why it's important to mark them as such in the list, to make it clear they're EOL in that expanded list mode or in a search.

In other words: If it's EOL, it should always show it's EOL, even during the grace period or if someone bypasses the default filter.

garrett avatar Apr 05 '23 08:04 garrett

What would be the grace period defined then? Would keeping the EOL accept dates to 10 years prior be enough.

aazam-gh avatar Apr 05 '23 09:04 aazam-gh

No, 10 years is far too long. Even a year is way too long to realistically use something without security updates.

This issue is not about changing the window of EOL OSes; it is about showing EOL OSes in the interface, including visibly marking them as EOL and allowing someone to override the filter that only shows currently-supported OSes, by expanding the list and also searching.

Changing time windows and having more fine-grained information should be left to other issues. (For example, I filed this one for having a last-update field in osinfo, for when OSes don't have formal EOL or when updates exceed EOL: https://gitlab.com/libosinfo/libosinfo/-/issues/52). But, again, that is something else and not really related to this issue.

garrett avatar Apr 05 '23 09:04 garrett

Gotcha so I'll change the current component in the dialog box for the OS list to the view more component

aazam-gh avatar Apr 05 '23 09:04 aazam-gh

Yes, we would need these two things:

  1. View more https://www.patternfly.org/v4/components/select/#view-more (Except it should say something like "View older operating systems without vendor support")

  2. The list items should show that the vendor support ended like I mocked it up @ https://github.com/cockpit-project/cockpit-machines/issues/509#issuecomment-1031406722

    • It's OK underneath, especially with the warning triangle icon that I suggest in a follow-up comment later on in this issue.
    • We can figure out if it makes sense to add the little bit of custom CSS to have it all on the same line (and if that would work with the icon and the checkmark).

We cannot show the EOL distributions (either in the expanded list or by searching specifically for them) without visually marking them as such, hence these two points.

garrett avatar Apr 05 '23 09:04 garrett

Closing as duplicate of #1181

marusak avatar Dec 14 '23 15:12 marusak

This isn't actually a duplicate issue:

This bug is referring to the fact that it's impossible to install an OS that is past its EOL, and this bug is tracking adding that feature so that EOL ones are selectable and display a warning.

Bug #1181 is actually referring to the fact that there is a misconfigutation in the os info about what operating systems are installable.

Requesting this bug be re-opened, as it's not actually a duplicate.

tsacks avatar Dec 14 '23 15:12 tsacks