mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Public Dashboards: Replace simplejson with TimeSettings on dashboard struct (#55047)
* Replace simplejson for TimeSettings on PublicDashboard struct * Implement xorm conversion interface to TimeSettings * Fix minor test assertion issue
This commit is contained in:
committed by
GitHub
parent
6e99d8bba5
commit
b06eaf66b6
@@ -8,7 +8,6 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana/pkg/api/dtos"
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/datasources"
|
||||
@@ -109,7 +108,7 @@ func (pd *PublicDashboardServiceImpl) SavePublicDashboardConfig(ctx context.Cont
|
||||
|
||||
// set default value for time settings
|
||||
if dto.PublicDashboard.TimeSettings == nil {
|
||||
dto.PublicDashboard.TimeSettings = simplejson.New()
|
||||
dto.PublicDashboard.TimeSettings = &TimeSettings{}
|
||||
}
|
||||
|
||||
// get existing public dashboard if exists
|
||||
|
||||
Reference in New Issue
Block a user