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
aee4af21
Commit
aee4af21
authored
Apr 25, 2017
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api: omit unused fields for /api/datasources
Fixes #7822
parent
4720216e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
pkg/api/datasources.go
+1
-1
pkg/api/dtos/models.go
+17
-1
No files found.
pkg/api/datasources.go
View file @
aee4af21
...
...
@@ -20,7 +20,7 @@ func GetDataSources(c *middleware.Context) Response {
result
:=
make
(
dtos
.
DataSourceList
,
0
)
for
_
,
ds
:=
range
query
.
Result
{
dsItem
:=
dtos
.
DataSource
{
dsItem
:=
dtos
.
DataSource
ListItemDTO
{
Id
:
ds
.
Id
,
OrgId
:
ds
.
OrgId
,
Name
:
ds
.
Name
,
...
...
pkg/api/dtos/models.go
View file @
aee4af21
...
...
@@ -84,7 +84,23 @@ type DataSource struct {
SecureJsonFields
map
[
string
]
bool
`json:"secureJsonFields"`
}
type
DataSourceList
[]
DataSource
type
DataSourceListItemDTO
struct
{
Id
int64
`json:"id"`
OrgId
int64
`json:"orgId"`
Name
string
`json:"name"`
Type
string
`json:"type"`
TypeLogoUrl
string
`json:"typeLogoUrl"`
Access
m
.
DsAccess
`json:"access"`
Url
string
`json:"url"`
Password
string
`json:"password"`
User
string
`json:"user"`
Database
string
`json:"database"`
BasicAuth
bool
`json:"basicAuth"`
IsDefault
bool
`json:"isDefault"`
JsonData
*
simplejson
.
Json
`json:"jsonData,omitempty"`
}
type
DataSourceList
[]
DataSourceListItemDTO
func
(
slice
DataSourceList
)
Len
()
int
{
return
len
(
slice
)
...
...
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