Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
2465fcbd
Commit
2465fcbd
authored
Dec 13, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: FolderId and IsFolder when saving dashboard
parent
d3858d88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
12 deletions
+8
-12
pkg/services/dashboards/dashboards.go
+8
-8
pkg/services/provisioning/dashboards/types.go
+0
-3
public/app/core/components/search/search_results.ts
+0
-1
No files found.
pkg/services/dashboards/dashboards.go
View file @
2465fcbd
...
...
@@ -23,14 +23,12 @@ func SetRepository(rep Repository) {
}
type
SaveDashboardItem
struct
{
TitleLower
string
OrgId
int64
Folder
string
UpdatedAt
time
.
Time
UserId
int64
Message
string
Overwrite
bool
Dashboard
*
models
.
Dashboard
OrgId
int64
UpdatedAt
time
.
Time
UserId
int64
Message
string
Overwrite
bool
Dashboard
*
models
.
Dashboard
}
type
DashboardRepository
struct
{}
...
...
@@ -57,6 +55,8 @@ func (dr *DashboardRepository) SaveDashboard(json *SaveDashboardItem) (*models.D
OrgId
:
json
.
OrgId
,
Overwrite
:
json
.
Overwrite
,
UserId
:
json
.
UserId
,
FolderId
:
dashboard
.
FolderId
,
IsFolder
:
dashboard
.
IsFolder
,
}
if
!
json
.
UpdatedAt
.
IsZero
()
{
...
...
pkg/services/provisioning/dashboards/types.go
View file @
2465fcbd
package
dashboards
import
(
"strings"
"time"
"github.com/grafana/grafana/pkg/components/simplejson"
...
...
@@ -23,11 +22,9 @@ func createDashboardJson(data *simplejson.Json, lastModified time.Time, cfg *Das
dash
:=
&
dashboards
.
SaveDashboardItem
{}
dash
.
Dashboard
=
models
.
NewDashboardFromJson
(
data
)
dash
.
TitleLower
=
strings
.
ToLower
(
dash
.
Dashboard
.
Title
)
dash
.
UpdatedAt
=
lastModified
dash
.
Overwrite
=
true
dash
.
OrgId
=
cfg
.
OrgId
dash
.
Folder
=
cfg
.
Folder
dash
.
Dashboard
.
Data
.
Set
(
"editable"
,
cfg
.
Editable
)
if
dash
.
Dashboard
.
Title
==
""
{
...
...
public/app/core/components/search/search_results.ts
View file @
2465fcbd
...
...
@@ -9,7 +9,6 @@ export class SearchResultsCtrl {
/** @ngInject */
constructor
(
private
$location
)
{
}
toggleFolderExpand
(
section
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment