Closed martinpitt closed 2 weeks ago
I was talking this over with Garrett. We'll discuss the specific design in https://github.com/cockpit-project/cockpit/pull/21121#discussion_r1803220498 , but also that whole #login-error
alert needs some polishing (not just for this specific message). I'll land this (to avoid conflicts), work on that polishing next, and block #21121 on that.
When directly logging into a remote host without cockpit installed, the login page showed an unhelpful and untranslatable fatal error message:
This also left the user with nothing actionable other than reloading the page.
Handle the "no-cockpit" problem code and show a proper error message. Use the exact same one as in the shell's host switcher, to avoid introducing another similar translatable string. This also goes back to the login form, to either choose another host, or reattempt the login after installing cockpit on the target.
Spotted in #21121. In that PR we'll most probably refine that error message.
Screenshot on main:
Screenshot with this PR -- I deliberately left it at German to see that it gets translated:
Note the "localhost" is a bit synthetic here due to how the test is set up -- ordinarily you'd choose a remote machine in the login form.