Plugins: Add support for includes' icon (#29416)

* Plugins: Add support for includes' icon

* Docs: Add plugin includes' icon reference
This commit is contained in:
Joan López de la Franca Beltran 2020-11-27 10:48:37 +01:00 committed by GitHub
parent 26a41ecc1c
commit c22a39ab2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -68,6 +68,7 @@ Plugin dependencies.
| `name` | string | No | |
| `role` | string | No | |
| `type` | string | No | |
| `icon` | string | No | |
## info

View File

@ -104,6 +104,7 @@ func getAppLinks(c *models.ReqContext) ([]*dtos.NavLink, error) {
Text: include.Name,
}
}
link.Icon = include.Icon
appLink.Children = append(appLink.Children, link)
}

View File

@ -133,6 +133,7 @@ type PluginInclude struct {
AddToNav bool `json:"addToNav"`
DefaultNav bool `json:"defaultNav"`
Slug string `json:"slug"`
Icon string `json:"icon"`
Id string `json:"-"`
}