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
ab078133
Unverified
Commit
ab078133
authored
Nov 11, 2020
by
Arve Knudsen
Committed by
GitHub
Nov 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backend: Remove unused code (#28933)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent
7378af0a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
18 deletions
+0
-18
pkg/models/datasource.go
+0
-4
pkg/services/provisioning/datasources/config_reader_test.go
+0
-6
pkg/services/sqlstore/datasource.go
+0
-8
No files found.
pkg/models/datasource.go
View file @
ab078133
...
@@ -207,10 +207,6 @@ type GetDataSourcesQuery struct {
...
@@ -207,10 +207,6 @@ type GetDataSourcesQuery struct {
Result
[]
*
DataSource
Result
[]
*
DataSource
}
}
type
GetAllDataSourcesQuery
struct
{
Result
[]
*
DataSource
}
type
GetDataSourceByIdQuery
struct
{
type
GetDataSourceByIdQuery
struct
{
Id
int64
Id
int64
OrgId
int64
OrgId
int64
...
...
pkg/services/provisioning/datasources/config_reader_test.go
View file @
ab078133
...
@@ -35,7 +35,6 @@ func TestDatasourceAsConfig(t *testing.T) {
...
@@ -35,7 +35,6 @@ func TestDatasourceAsConfig(t *testing.T) {
bus
.
AddHandler
(
"test"
,
mockInsert
)
bus
.
AddHandler
(
"test"
,
mockInsert
)
bus
.
AddHandler
(
"test"
,
mockUpdate
)
bus
.
AddHandler
(
"test"
,
mockUpdate
)
bus
.
AddHandler
(
"test"
,
mockGet
)
bus
.
AddHandler
(
"test"
,
mockGet
)
bus
.
AddHandler
(
"test"
,
mockGetAll
)
bus
.
AddHandler
(
"test"
,
mockGetOrg
)
bus
.
AddHandler
(
"test"
,
mockGetOrg
)
Convey
(
"apply default values when missing"
,
func
()
{
Convey
(
"apply default values when missing"
,
func
()
{
...
@@ -282,11 +281,6 @@ func mockInsert(cmd *models.AddDataSourceCommand) error {
...
@@ -282,11 +281,6 @@ func mockInsert(cmd *models.AddDataSourceCommand) error {
return
nil
return
nil
}
}
func
mockGetAll
(
cmd
*
models
.
GetAllDataSourcesQuery
)
error
{
cmd
.
Result
=
fakeRepo
.
loadAll
return
nil
}
func
mockGet
(
cmd
*
models
.
GetDataSourceByNameQuery
)
error
{
func
mockGet
(
cmd
*
models
.
GetDataSourceByNameQuery
)
error
{
for
_
,
v
:=
range
fakeRepo
.
loadAll
{
for
_
,
v
:=
range
fakeRepo
.
loadAll
{
if
cmd
.
Name
==
v
.
Name
&&
cmd
.
OrgId
==
v
.
OrgId
{
if
cmd
.
Name
==
v
.
Name
&&
cmd
.
OrgId
==
v
.
OrgId
{
...
...
pkg/services/sqlstore/datasource.go
View file @
ab078133
...
@@ -18,7 +18,6 @@ import (
...
@@ -18,7 +18,6 @@ import (
func
init
()
{
func
init
()
{
bus
.
AddHandler
(
"sql"
,
GetDataSources
)
bus
.
AddHandler
(
"sql"
,
GetDataSources
)
bus
.
AddHandler
(
"sql"
,
GetAllDataSources
)
bus
.
AddHandler
(
"sql"
,
AddDataSource
)
bus
.
AddHandler
(
"sql"
,
AddDataSource
)
bus
.
AddHandler
(
"sql"
,
DeleteDataSourceById
)
bus
.
AddHandler
(
"sql"
,
DeleteDataSourceById
)
bus
.
AddHandler
(
"sql"
,
DeleteDataSourceByName
)
bus
.
AddHandler
(
"sql"
,
DeleteDataSourceByName
)
...
@@ -74,13 +73,6 @@ func GetDataSources(query *models.GetDataSourcesQuery) error {
...
@@ -74,13 +73,6 @@ func GetDataSources(query *models.GetDataSourcesQuery) error {
return
sess
.
Find
(
&
query
.
Result
)
return
sess
.
Find
(
&
query
.
Result
)
}
}
func
GetAllDataSources
(
query
*
models
.
GetAllDataSourcesQuery
)
error
{
sess
:=
x
.
Limit
(
5000
,
0
)
.
Asc
(
"name"
)
query
.
Result
=
make
([]
*
models
.
DataSource
,
0
)
return
sess
.
Find
(
&
query
.
Result
)
}
func
DeleteDataSourceById
(
cmd
*
models
.
DeleteDataSourceByIdCommand
)
error
{
func
DeleteDataSourceById
(
cmd
*
models
.
DeleteDataSourceByIdCommand
)
error
{
return
inTransaction
(
func
(
sess
*
DBSession
)
error
{
return
inTransaction
(
func
(
sess
*
DBSession
)
error
{
var
rawSQL
=
"DELETE FROM data_source WHERE id=? and org_id=?"
var
rawSQL
=
"DELETE FROM data_source WHERE id=? and org_id=?"
...
...
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