Merge branch 'master' into develop

This commit is contained in:
Torkel Ödegaard 2017-12-12 13:22:13 +01:00
commit 8a61e0967e
2 changed files with 6 additions and 1 deletions

View File

@ -187,6 +187,7 @@ func PostDashboard(c *middleware.Context, cmd m.SaveDashboardCommand) Response {
Message: cmd.Message,
OrgId: c.OrgId,
UserId: c.UserId,
Overwrite: cmd.Overwrite,
}
dashboard, err := dashboards.GetRepository().SaveDashboard(dashItem)

View File

@ -121,7 +121,11 @@ export default class GraphiteQuery {
}
hasSelectMetric() {
return this.segments[this.segments.length - 1].value === 'select metric';
if (this.segments.length > 0) {
return this.segments[this.segments.length - 1].value === 'select metric';
} else {
return false;
}
}
addFunction(newFunc) {