mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(plugins): worked on plugin dashboard import handling
This commit is contained in:
@@ -102,8 +102,11 @@ func (cmd *SaveDashboardCommand) GetDashboardModel() *Dashboard {
|
||||
}
|
||||
|
||||
// GetString a
|
||||
func (dash *Dashboard) GetString(prop string) string {
|
||||
return dash.Data[prop].(string)
|
||||
func (dash *Dashboard) GetString(prop string, defaultValue string) string {
|
||||
if val, exists := dash.Data[prop]; exists {
|
||||
return val.(string)
|
||||
}
|
||||
return defaultValue
|
||||
}
|
||||
|
||||
// UpdateSlug updates the slug
|
||||
|
||||
Reference in New Issue
Block a user