Skip to content
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

firewall: Show any included services on a service #12385

Merged
merged 3 commits into from
Aug 6, 2019

Conversation

croissanne
Copy link
Contributor

@croissanne croissanne commented Jul 22, 2019

@marusak
Copy link
Member

marusak commented Jul 22, 2019

Cool stuff :)
I was at first just rather confused :D Have you talked about this with @garrett or @andreasn ?
I know that not always there has to be Details tab. But why the second one has FreeIPA 4 server (itself) but first has Details and not DNS?
Maybe it would be better to have just one tab Included Services and having some listing in there?
What do you think @garrett ?

@croissanne
Copy link
Contributor Author

@marusak yea I wasn't sure about the design at all. More consistency there would be good I agree.

@garrett
Copy link
Member

garrett commented Jul 22, 2019

This is really cool.

I've always thought it's a little odd to have 1 tab for details.

I wonder if it makes sense to remove the tabs altogether and show all the information below.

Is there a service that pulls in more services than FreeIPA currently?

@croissanne
Copy link
Contributor Author

@garrett I think freeipa-4 includes quite a lot. Most are about 4-5.

@marusak
Copy link
Member

marusak commented Jul 23, 2019

Needs to rebase to master since #12367 changed tests names

Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Just one fixme in the tests, the rest looks good.

}
// We can't use Promise.all() here until cockpit is able to dispatch es2015 promises
// https://github.com/cockpit-project/cockpit/issues/10956
// eslint-disable-next-line cockpit/no-cockpit-all
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually be obsolete now. But let's keep it here, and we can drop all cockpit.all() in a separate PR.

addService('freeipa-4')
b.click("tr[data-row-id='freeipa-4']")
b.click("tbody.open a:contains(kerberos)")
b.wait_present("tbody.open .listing-ct-body:contains(Included service)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do an "else:" here, so that we have a reminder (failing test) once firewalld 0.7 trickles into distros. For example, debian-testing already has 0.7, so please add it here.

Copy link
Contributor Author

@croissanne croissanne Jul 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think our debian-testing is still buster?

But i will add the else!

@croissanne
Copy link
Contributor Author

@garrett Would the updated photo's design work better?

@garrett
Copy link
Member

garrett commented Jul 24, 2019

What if the we ditched the tabs entirely and had the services listed under the details text?

Something like this:


FreeIPA is an LDAP and Kerberos domain controller for Linux systems. Enable this option if you plan to provide a FreeIPA Domain Controller using the LDAP protocol. You can also enable the 'freeipa-ldaps' service if you want to provide the LDAPS protocol. Enable the 'dns' service if this FreeIPA server provides DNS services and 'freeipa-replication' service if this FreeIPA server is part of a multi-master replication setup.

Included Services

  • WWW (HTTP), port 80: HTTP is the protocol used to serve Web pages. If you plan to make your Web server publicly available, enable this option. This option is not required for viewing pages locally or developing Web pages.
  • Secure WWW (HTTPS), port 443: HTTPS is a modified HTTP used to serve Web pages when security is important. Examples are sites that require logins like stores or web mail. This option is not required for viewing pages locally or developing Web pages. You need the httpd package installed for this option to be useful.
  • Kerberos, port 88: Kerberos network authentication protocol server Kpasswd: Kerberos password (Kpasswd) server
  • LDAP, port 389: Lightweight Directory Access Protocol (LDAP) server
  • LDAPS, port 636: Lightweight Directory Access Protocol (LDAP) over Secure Sockets Layer (SSL) server

It's just a heading (probably an h4 or h5 — whatever is 1 more than the previous heading), which would be styled to be no larger than the row's text (so we'll probably need to do font-size: inherit on it here), then a <li> with <strong> for each item's title.

I don't think it would be too tall to do it this way. As there's nothing but informative text, I'd like it if we could keep it all together in the details.

If we eventually add more features, we could then we could reconsider tabs. But I'm not sure what features that would be. For example: Editing is about which zone the service is in really... or if it's a custom rule, then the ports selected too. (In other words: editing would be in a dialog, not inline in an expanded row.) So if not editing, then what? This is why I don't think we need tabs here, either in the present or the future.


TL;DR: Bulleted list with a heading. Names of services would be in a <strong> tag. No tabs.

@marusak
Copy link
Member

marusak commented Jul 29, 2019

Looks great now! :) Both debian stable and testing failed in testFirewallPage exactly in the same way which seems suspicious. I've retried it, lets see

</ul>
</div>
{tabs}
{ tabs && heading }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this tabs just tests if tabs is defined and if is, then it shows heading? Wouldn't it make sense to just show heading when defined? ({ heading })
Or wouldn something like simpleBody || (heading && tabs) work? (reading like "set simpleBody or heading followed by tabs")

@marusak
Copy link
Member

marusak commented Jul 29, 2019

I am afraid that tests are broken on debian. I've seen 4 results and all 4 failed the same way on testFirewallPage. Unfortunately needs work

martinpitt
martinpitt previously approved these changes Aug 2, 2019
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is much more elegant.

@martinpitt
Copy link
Member

Too many flakes, retrying a bit. Please self-land when all firewall tests pass.

@martinpitt
Copy link
Member

Still two firewall failures, retrying more.

@martinpitt martinpitt dismissed their stale review August 2, 2019 09:39

needs rework for changed firewalld API

@croissanne croissanne added the blocked Don't land until something else happens first (see task list) label Aug 2, 2019
@croissanne croissanne removed the blocked Don't land until something else happens first (see task list) label Aug 2, 2019
@croissanne croissanne requested review from martinpitt and removed request for martinpitt August 5, 2019 11:19
@croissanne croissanne requested a review from martinpitt August 5, 2019 11:28
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

})
.then(path => firewalld_dbus.call(path[0],
'org.fedoraproject.FirewallD1.config.service',
'getSettings2', []))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up: Start with this call, and if it fails, fall back to the old one and set includes to empty. Saves one call on new firewalld, and on older versions there's no change (one succeeding and one failing call).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, that would make a lot more sense. I'll do it as a followup, this one has been in the pipeline too long :p

@martinpitt martinpitt merged commit 5e5a5e4 into cockpit-project:master Aug 6, 2019
martinpitt pushed a commit that referenced this pull request Aug 6, 2019
@martinpitt
Copy link
Member

@Gundersanne : can you please send a PR against the rhel-8.1 branch with this backported?

@croissanne
Copy link
Contributor Author

@martinpitt sure, will be my first backport :D

@martinpitt
Copy link
Member

@Gundersanne: Sorry, can you please do the screenshot slightly wider (to avoid the label wrap) and have some more context? Right now it's hard to see from where this actually happens.

@croissanne
Copy link
Contributor Author

croissanne commented Aug 8, 2019

@martinpitt

image

image

image

@croissanne croissanne deleted the bz-1721548 branch September 23, 2019 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants