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

* Plugins: Add support for includes' icon

* Docs: Add plugin includes' icon reference
pull/29430/head
Joan López de la Franca Beltran 5 years ago committed by GitHub
parent 26a41ecc1c
commit c22a39ab2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      docs/sources/developers/plugins/metadata.md
  2. 1
      pkg/api/index.go
  3. 1
      pkg/plugins/models.go

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

@ -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)
}

@ -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:"-"`
}

Loading…
Cancel
Save