MCPcopy Create free account
hub / github.com/algolia/cli / dashboardURL

Function dashboardURL

pkg/cmd/open/open.go:411–417  ·  view source on GitHub ↗

dashboardURL builds the dashboard URL for an application page. Application pages are scoped via the /apps/{appID} path; account pages carry the application in an applicationId query parameter.

(baseURL, appID string, target dashboardTarget)

Source from the content-addressed store, hash-verified

409// pages are scoped via the /apps/{appID} path; account pages carry the
410// application in an applicationId query parameter.
411func dashboardURL(baseURL, appID string, target dashboardTarget) string {
412 if target.accountScoped {
413 return fmt.Sprintf("%s/%s?applicationId=%s", baseURL, target.path, appID)
414 }
415
416 return fmt.Sprintf("%s/apps/%s/%s", baseURL, appID, target.path)
417}
418
419func listTargets(opts *OpenOptions) error {
420 fmt.Fprintln(

Callers 3

entryForFunction · 0.85
openDashboardTargetFunction · 0.85
TestDashboardURLFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDashboardURLFunction · 0.68