feat(plugins): worked on plugin dashboard import handling

This commit is contained in:
Torkel Ödegaard
2016-03-10 19:57:48 +01:00
parent 78b9c3004a
commit 60adcedebe
14 changed files with 189 additions and 84 deletions

View File

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