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
8e65f361
Commit
8e65f361
authored
Jan 11, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added system admin skeleton
parent
dc16c8c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
26 deletions
+11
-26
conf/grafana.ini
+1
-13
grafana
+1
-1
pkg/api/api.go
+8
-5
pkg/api/frontendsettings.go
+1
-7
No files found.
conf/grafana.ini
View file @
8e65f361
...
@@ -63,24 +63,12 @@ type = sqlite3
...
@@ -63,24 +63,12 @@ type = sqlite3
host
=
127.0.0.1:3306
host
=
127.0.0.1:3306
name
=
grafana
name
=
grafana
user
=
root
user
=
root
PASSWD
=
password
=
; For "postgres" only, either "disable", "require" or "verify-full"
; For "postgres" only, either "disable", "require" or "verify-full"
ssl_mode
=
disable
ssl_mode
=
disable
; For "sqlite3" only
; For "sqlite3" only
path
=
data/grafana.db
path
=
data/grafana.db
; [database]
; ; Either "mysql", "postgres" or "sqlite3", it's your choice
; type = postgres
; host = 127.0.0.1:5432
; name = grafana
; user = grafana
; password = grafana
; ; For "postgres" only, either "disable", "require" or "verify-full"
; ssl_mode = disable
; ; For "sqlite3" only
; path = data/grafana.db
;
[log]
[log]
root_path
=
root_path
=
; Either "console", "file", "conn", "smtp" or "database", default is "console"
; Either "console", "file", "conn", "smtp" or "database", default is "console"
...
...
grafana
@
b66894f7
Subproject commit
1d769fe41cf348d88636938fcb06afcf3425d45b
Subproject commit
b66894f72780cbed0edb01f9bd26cc47298daa98
pkg/api/api.go
View file @
8e65f361
...
@@ -27,11 +27,14 @@ func Register(m *macaron.Macaron) {
...
@@ -27,11 +27,14 @@ func Register(m *macaron.Macaron) {
m
.
Get
(
"/api/account/others"
,
auth
,
GetOtherAccounts
)
m
.
Get
(
"/api/account/others"
,
auth
,
GetOtherAccounts
)
// data sources
// data sources
m
.
Get
(
"/admin/datasources/"
,
auth
,
Index
)
m
.
Get
(
"/acount/datasources/"
,
auth
,
Index
)
m
.
Get
(
"/api/admin/datasources/list"
,
auth
,
GetDataSources
)
m
.
Get
(
"/api/datasources/list"
,
auth
,
GetDataSources
)
m
.
Put
(
"/api/admin/datasources"
,
auth
,
AddDataSource
)
m
.
Put
(
"/api/datasources"
,
auth
,
AddDataSource
)
m
.
Post
(
"/api/admin/datasources"
,
auth
,
UpdateDataSource
)
m
.
Post
(
"/api/datasources"
,
auth
,
UpdateDataSource
)
m
.
Delete
(
"/api/admin/datasources/:id"
,
auth
,
DeleteDataSource
)
m
.
Delete
(
"/api/datasources/:id"
,
auth
,
DeleteDataSource
)
// system admin
m
.
Get
(
"/admin"
,
auth
,
Index
)
// data source proxy
// data source proxy
m
.
Any
(
"/api/datasources/proxy/:id/*"
,
auth
,
ProxyDataSourceRequest
)
m
.
Any
(
"/api/datasources/proxy/:id/*"
,
auth
,
ProxyDataSourceRequest
)
...
...
pkg/api/frontendsettings.go
View file @
8e65f361
...
@@ -25,7 +25,7 @@ func getFrontendSettings(c *middleware.Context) (map[string]interface{}, error)
...
@@ -25,7 +25,7 @@ func getFrontendSettings(c *middleware.Context) (map[string]interface{}, error)
datasources
:=
make
(
map
[
string
]
interface
{})
datasources
:=
make
(
map
[
string
]
interface
{})
for
i
,
ds
:=
range
accountDataSources
{
for
_
,
ds
:=
range
accountDataSources
{
url
:=
ds
.
Url
url
:=
ds
.
Url
if
ds
.
Access
==
m
.
DS_ACCESS_PROXY
{
if
ds
.
Access
==
m
.
DS_ACCESS_PROXY
{
...
@@ -46,12 +46,6 @@ func getFrontendSettings(c *middleware.Context) (map[string]interface{}, error)
...
@@ -46,12 +46,6 @@ func getFrontendSettings(c *middleware.Context) (map[string]interface{}, error)
}
}
}
}
// temp hack, first is always default
// TODO: implement default ds account setting
if
i
==
0
{
dsMap
[
"default"
]
=
true
}
datasources
[
ds
.
Name
]
=
dsMap
datasources
[
ds
.
Name
]
=
dsMap
}
}
...
...
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