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

Add link to dasboard from 'apps describe' output #538

Merged
merged 1 commit into from
Nov 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/meroxa/root/apps/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package apps
import (
"context"
"errors"
"fmt"

"github.com/meroxa/cli/utils/display"

Expand Down Expand Up @@ -75,6 +76,8 @@ func (d *Describe) Execute(ctx context.Context) error {
d.logger.Info(ctx, output)
d.logger.JSON(ctx, app)

dashboardURL := fmt.Sprintf("https://dashboard.meroxa.io/apps/%s/detail", app.Name)
Copy link
Contributor

@nassor nassor Nov 14, 2022

Choose a reason for hiding this comment

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

Not a review, just a comment. We have the Name to improve user usability, but should we use that as the default value for our URLs generated by us? The reasoning is that using UUID guarantees that the resource is unique and the same 100% of the time, and names, especially in a bigger organization, can generate start to generate conflicts/confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

names are unique within the account, and you can't see the dashboard without being logged in to the account. we would have much bigger problems if a customer wanted us to change our name schema than this URL.

"application_name_account_id" UNIQUE, btree (name, account_id) WHERE deleted_at IS NULL

are you describing the situation in which a user belongs to multiple accounts and each account has an app with the same name? that's something that the customer has control of. i'd hope they can come up with a naming convention that doesn't confuse themselves.

d.logger.Info(ctx, fmt.Sprintf("\n ✨ To visualize your application, visit %s", dashboardURL))
return nil
}

Expand Down