alert: use new url format
This commit is contained in:
@@ -171,11 +171,16 @@ func GetDashboardFolderUrl(isFolder bool, uid string, slug string) string {
|
||||
return GetDashboardUrl(uid, slug)
|
||||
}
|
||||
|
||||
// GetDashboardUrl return the html url for a dashboard
|
||||
// Return the html url for a dashboard
|
||||
func GetDashboardUrl(uid string, slug string) string {
|
||||
return fmt.Sprintf("%s/d/%s/%s", setting.AppSubUrl, uid, slug)
|
||||
}
|
||||
|
||||
// Return the full url for a dashboard
|
||||
func GetFullDashboardUrl(uid string, slug string) string {
|
||||
return fmt.Sprintf("%s%s", setting.AppUrl, GetDashboardUrl(uid, slug))
|
||||
}
|
||||
|
||||
// GetFolderUrl return the html url for a folder
|
||||
func GetFolderUrl(folderUid string, slug string) string {
|
||||
return fmt.Sprintf("%s/dashboards/f/%s/%s", setting.AppSubUrl, folderUid, slug)
|
||||
@@ -277,3 +282,13 @@ type DashboardPermissionForUser struct {
|
||||
Permission PermissionType `json:"permission"`
|
||||
PermissionName string `json:"permissionName"`
|
||||
}
|
||||
|
||||
type DashboardRef struct {
|
||||
Uid string
|
||||
Slug string
|
||||
}
|
||||
|
||||
type GetDashboardUIDByIdQuery struct {
|
||||
Id int64
|
||||
Result *DashboardRef
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user