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
d68bfaa8
Commit
d68bfaa8
authored
Oct 25, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
datasource as cfg: typo
parent
da6430ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
pkg/api/datasources.go
+1
-1
pkg/models/datasource.go
+3
-4
pkg/services/sqlstore/datasource.go
+1
-1
No files found.
pkg/api/datasources.go
View file @
d68bfaa8
...
...
@@ -139,7 +139,7 @@ func UpdateDataSource(c *middleware.Context, cmd m.UpdateDataSourceCommand) Resp
err
=
bus
.
Dispatch
(
&
cmd
)
if
err
!=
nil
{
if
err
==
m
.
ErrDataSouceUpdatingOldVersion
{
if
err
==
m
.
ErrDataSou
r
ceUpdatingOldVersion
{
return
ApiError
(
500
,
"Failed to update datasource. Reload new version and try again"
,
err
)
}
else
{
return
ApiError
(
500
,
"Failed to update datasource"
,
err
)
...
...
pkg/models/datasource.go
View file @
d68bfaa8
...
...
@@ -23,11 +23,10 @@ const (
DS_ACCESS_PROXY
=
"proxy"
)
// Typed errors
var
(
ErrDataSourceNotFound
=
errors
.
New
(
"Data source not found"
)
ErrDataSourceNameExists
=
errors
.
New
(
"Data source with same name already exists"
)
ErrDataSou
ceUpdatingOldVersion
=
errors
.
New
(
"Trying to update old version of datasou
ce"
)
ErrDataSourceNotFound
=
errors
.
New
(
"Data source not found"
)
ErrDataSourceNameExists
=
errors
.
New
(
"Data source with same name already exists"
)
ErrDataSou
rceUpdatingOldVersion
=
errors
.
New
(
"Trying to update old version of datasour
ce"
)
)
type
DsAccess
string
...
...
pkg/services/sqlstore/datasource.go
View file @
d68bfaa8
...
...
@@ -167,7 +167,7 @@ func UpdateDataSource(cmd *m.UpdateDataSourceCommand) error {
}
if
affected
==
0
{
return
m
.
ErrDataSouceUpdatingOldVersion
return
m
.
ErrDataSou
r
ceUpdatingOldVersion
}
err
=
updateIsDefaultFlag
(
ds
,
sess
)
...
...
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