-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat: basic open status command #74
Conversation
pkg/cmd/open/open.go
Outdated
@@ -23,6 +23,7 @@ var nameURLmap = map[string]string{ | |||
"docs": "https://algolia.com/doc/", | |||
"cli-docs": "https://algolia.com/doc/tools/cli/get-started/overview/", | |||
"cli-repo": "https://github.com/algolia/cli", | |||
"status": "https://status.algolia.com/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say we could also open the dashboard on https://www.algolia.com/apps/<appID>/monitoring/status
page.
Basically, if a profile / appID is currently configured / set as default, open the dashboard status page.
If no profile / no appID, open https://status.algolia.com/
. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The status page on the dashboard is more informative IMHO, as it clearly state which cluster you are and the status of the cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, It'd be even better when we'll handle authentication with the CLI, we could force login to the browser by passing a token (maybe?) so we're sure the user will never have to enter his login/password to see the https://www.algolia.com/apps/<appID>/monitoring/status
page
7d3e5e4
to
73673f9
Compare
73673f9
to
a350462
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more comment :)
pkg/cmd/open/open.go
Outdated
url := nameURLmap[shortcut].Default | ||
if applicationID != "" { | ||
url = nameURLmap[shortcut].WithAppId | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have this logic at two different place now, I guess we could build the list of shortcuts before (using the AppID) and re-use it here and below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I don't think the test at the line #105 is necessary anymore (adding the /
before the appID)
6ebae8c
to
70c389b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.