Switch default behaviour of 'gui' w.r.t. browser

Bug #1631438 reported by Mark Shuttleworth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Ian Booth

Bug Description

On average, I'm finding that --no-browser is needed. I suspect it's true that most people are SSH'ing to the place they are running juju commands. So let's make --no-browser the default behaviour, please. In general I think it's bad practice to assume the existence of a graphical environment around CLI tools (but it's OK to make those optional).

So please add --browser as an option to 'juju gui', and deprecate (with no-op) --no-browser.

Also, I think --credentials or would be better than --show-credentials, thoughts?

Tags: usability
Changed in juju:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.1.0
tags: added: usability
Ian Booth (wallyworld)
Changed in juju:
assignee: nobody → Ian Booth (wallyworld)
status: Triaged → In Progress
Revision history for this message
Ian Booth (wallyworld) wrote :

We also have

juju credentials --format yaml --show-secrets

where --show-secrets is optional just like --show-credentials is for juju gui.

--show-credentials or --show-secrets very explicitly tells the user what to expect the CLI to do.

--credentials (to me) implies that it is a named argument expecting a value to be supplied, ie

$ juju foo --credentials=mysecret

Actually, "credentials" is a misnomer as there's only one of them - in Juju the singular is what has been adopted FWIW. eg "juju add-credential" or the prompt to "Enter credential name".

So for consistency it should be --show-credential or --credential.

IMO --show-credential(s) is more clear, without the plural for consistency.

If the guidance remains to adopt --credential(s), that can easily be done.

Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR against 2.1 to invert behavior: https://github.com/juju/juju/pull/6984

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1631438] Re: Switch default behaviour of 'gui' w.r.t. browser

I think you'll find that almost everybody typing 'juju gui' wants the
credential, so the question is whether you want to make them all
remember and type that every time, or you want to have them hide it when
they specifically DON'T want it.

  $ juju gui
  GUI 2.2.4 is enabled at https://192.168.9.161:17070/gui/

  Model 'foo' is at
https://192.168.9.161:17070/gui/8765137d-dc3a-4abf-8830-443321775cda/
  Your credentials are admin / 996bdf0e6bfecc1423c7440bdfe9f3de

I also think MOST people do not want to open a browser.

So:
  --browse should (optionally) try to open the browser.
  --hide-credential should not show the credential

Revision history for this message
Ian Booth (wallyworld) wrote :

Sounds good to me. The work to switch the --browser behaviour is already done in the PR.

Now that we've settled on --<verb>-credential, easy to also switch the default credential exposure behaviour and tweak the text.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

TY :)

Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.