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
665df676
Commit
665df676
authored
Oct 23, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
datasource as cfg: rename feature to provisioning
parent
c9bfa781
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
7 deletions
+27
-7
pkg/cmd/grafana-server/server.go
+11
-7
pkg/services/provisioning/datasources/datasources.go
+0
-0
pkg/services/provisioning/datasources/datasources_test.go
+0
-0
pkg/services/provisioning/datasources/test-configs/double-default-datasources.yaml
+0
-0
pkg/services/provisioning/datasources/test-configs/two-datasources-purge-others.yaml
+0
-0
pkg/services/provisioning/datasources/test-configs/two-datasources.yaml
+0
-0
pkg/services/provisioning/datasources/test-configs/zero-datasources.yaml
+0
-0
pkg/services/provisioning/datasources/types.go
+0
-0
pkg/services/provisioning/provisioning.go
+16
-0
No files found.
pkg/cmd/grafana-server/server.go
View file @
665df676
...
@@ -9,6 +9,9 @@ import (
...
@@ -9,6 +9,9 @@ import (
"strconv"
"strconv"
"time"
"time"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
"github.com/grafana/grafana/pkg/services/provisioning"
"golang.org/x/sync/errgroup"
"golang.org/x/sync/errgroup"
"github.com/grafana/grafana/pkg/api"
"github.com/grafana/grafana/pkg/api"
...
@@ -23,7 +26,7 @@ import (
...
@@ -23,7 +26,7 @@ import (
"github.com/grafana/grafana/pkg/services/search"
"github.com/grafana/grafana/pkg/services/search"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/setting"
datasourcesFromConfig
"github.com/grafana/grafana/pkg/setting/datasources"
"github.com/grafana/grafana/pkg/social"
"github.com/grafana/grafana/pkg/social"
"github.com/grafana/grafana/pkg/tracing"
"github.com/grafana/grafana/pkg/tracing"
)
)
...
@@ -56,18 +59,19 @@ func (g *GrafanaServerImpl) Start() {
...
@@ -56,18 +59,19 @@ func (g *GrafanaServerImpl) Start() {
g
.
writePIDFile
()
g
.
writePIDFile
()
initSql
()
initSql
()
err
:=
datasourcesFromConfig
.
Apply
(
filepath
.
Join
(
setting
.
HomePath
,
"conf/datasources.yaml"
))
if
err
!=
nil
{
g
.
log
.
Error
(
"Failed to configure datasources from config"
,
"error"
,
err
)
g
.
Shutdown
(
1
,
"Startup failed"
)
return
}
metrics
.
Init
(
setting
.
Cfg
)
metrics
.
Init
(
setting
.
Cfg
)
search
.
Init
()
search
.
Init
()
login
.
Init
()
login
.
Init
()
social
.
NewOAuthService
()
social
.
NewOAuthService
()
plugins
.
Init
()
plugins
.
Init
()
if
err
:=
provisioning
.
StartUp
(
setting
.
HomePath
);
err
!=
nil
{
logger
.
Error
(
"Failed to provision Grafana from config"
,
"error"
,
err
)
g
.
Shutdown
(
1
,
"Startup failed"
)
return
}
closer
,
err
:=
tracing
.
Init
(
setting
.
Cfg
)
closer
,
err
:=
tracing
.
Init
(
setting
.
Cfg
)
if
err
!=
nil
{
if
err
!=
nil
{
g
.
log
.
Error
(
"Tracing settings is not valid"
,
"error"
,
err
)
g
.
log
.
Error
(
"Tracing settings is not valid"
,
"error"
,
err
)
...
...
pkg/se
tt
ing/datasources/datasources.go
→
pkg/se
rvices/provision
ing/datasources/datasources.go
View file @
665df676
File moved
pkg/se
tt
ing/datasources/datasources_test.go
→
pkg/se
rvices/provision
ing/datasources/datasources_test.go
View file @
665df676
File moved
pkg/se
tt
ing/datasources/test-configs/double-default-datasources.yaml
→
pkg/se
rvices/provision
ing/datasources/test-configs/double-default-datasources.yaml
View file @
665df676
File moved
pkg/se
tt
ing/datasources/test-configs/two-datasources-purge-others.yaml
→
pkg/se
rvices/provision
ing/datasources/test-configs/two-datasources-purge-others.yaml
View file @
665df676
File moved
pkg/se
tt
ing/datasources/test-configs/two-datasources.yaml
→
pkg/se
rvices/provision
ing/datasources/test-configs/two-datasources.yaml
View file @
665df676
File moved
pkg/se
tt
ing/datasources/test-configs/zero-datasources.yaml
→
pkg/se
rvices/provision
ing/datasources/test-configs/zero-datasources.yaml
View file @
665df676
File moved
pkg/se
tt
ing/datasources/types.go
→
pkg/se
rvices/provision
ing/datasources/types.go
View file @
665df676
File moved
pkg/services/provisioning/provisioning.go
0 → 100644
View file @
665df676
package
provisioning
import
(
"path/filepath"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/services/provisioning/datasources"
)
var
(
logger
log
.
Logger
=
log
.
New
(
"services.provisioning"
)
)
func
StartUp
(
homePath
string
)
error
{
return
datasources
.
Apply
(
filepath
.
Join
(
homePath
,
"conf/datasources.yaml"
))
}
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