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
dba08746
Commit
dba08746
authored
Feb 14, 2018
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
provisioing: always skip sample.yaml files
parent
165304a3
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
2 deletions
+50
-2
conf/provisioning/dashboards/sample.yaml
+3
-0
conf/provisioning/datasources/sample.yaml
+3
-0
pkg/services/provisioning/dashboards/config_reader.go
+1
-1
pkg/services/provisioning/dashboards/test-configs/dashboards-from-disk/sample.yaml
+10
-0
pkg/services/provisioning/datasources/config_reader.go
+1
-1
pkg/services/provisioning/datasources/test-configs/all-properties/sample.yaml
+32
-0
No files found.
conf/provisioning/dashboards/sample.yaml
View file @
dba08746
# This file is only an example.
# Grafana will never read sample.yaml files
# # config file version
# # config file version
# apiVersion: 1
# apiVersion: 1
...
...
conf/provisioning/datasources/sample.yaml
View file @
dba08746
# This file is only an example.
# Grafana will never read sample.yaml files
# # config file version
# # config file version
# apiVersion: 1
# apiVersion: 1
...
...
pkg/services/provisioning/dashboards/config_reader.go
View file @
dba08746
...
@@ -63,7 +63,7 @@ func (cr *configReader) readConfig() ([]*DashboardsAsConfig, error) {
...
@@ -63,7 +63,7 @@ func (cr *configReader) readConfig() ([]*DashboardsAsConfig, error) {
}
}
for
_
,
file
:=
range
files
{
for
_
,
file
:=
range
files
{
if
!
strings
.
HasSuffix
(
file
.
Name
(),
".yaml"
)
&&
!
strings
.
HasSuffix
(
file
.
Name
(),
".yml"
)
{
if
(
!
strings
.
HasSuffix
(
file
.
Name
(),
".yaml"
)
&&
!
strings
.
HasSuffix
(
file
.
Name
(),
".yml"
))
||
file
.
Name
()
==
"sample.yaml"
{
continue
continue
}
}
...
...
pkg/services/provisioning/dashboards/test-configs/dashboards-from-disk/sample.yaml
0 → 100644
View file @
dba08746
apiVersion
:
1
providers
:
-
name
:
'
gasdf'
orgId
:
2
folder
:
'
developers'
editable
:
true
type
:
file
options
:
path
:
/var/lib/grafana/dashboards
pkg/services/provisioning/datasources/config_reader.go
View file @
dba08746
...
@@ -24,7 +24,7 @@ func (cr *configReader) readConfig(path string) ([]*DatasourcesAsConfig, error)
...
@@ -24,7 +24,7 @@ func (cr *configReader) readConfig(path string) ([]*DatasourcesAsConfig, error)
}
}
for
_
,
file
:=
range
files
{
for
_
,
file
:=
range
files
{
if
strings
.
HasSuffix
(
file
.
Name
(),
".yaml"
)
||
strings
.
HasSuffix
(
file
.
Name
(),
".yml"
)
{
if
(
strings
.
HasSuffix
(
file
.
Name
(),
".yaml"
)
||
strings
.
HasSuffix
(
file
.
Name
(),
".yml"
))
&&
file
.
Name
()
!=
"sample.yaml"
{
datasource
,
err
:=
cr
.
parseDatasourceConfig
(
path
,
file
)
datasource
,
err
:=
cr
.
parseDatasourceConfig
(
path
,
file
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
pkg/services/provisioning/datasources/test-configs/all-properties/sample.yaml
0 → 100644
View file @
dba08746
# Should not be included
apiVersion
:
1
datasources
:
-
name
:
name
type
:
type
access
:
proxy
orgId
:
2
url
:
url
password
:
password
user
:
user
database
:
database
basicAuth
:
true
basicAuthUser
:
basic_auth_user
basicAuthPassword
:
basic_auth_password
withCredentials
:
true
jsonData
:
graphiteVersion
:
"
1.1"
tlsAuth
:
true
tlsAuthWithCACert
:
true
secureJsonData
:
tlsCACert
:
"
MjNOcW9RdkbUDHZmpco2HCYzVq9dE+i6Yi+gmUJotq5CDA=="
tlsClientCert
:
"
ckN0dGlyMXN503YNfjTcf9CV+GGQneN+xmAclQ=="
tlsClientKey
:
"
ZkN4aG1aNkja/gKAB1wlnKFIsy2SRDq4slrM0A=="
editable
:
true
version
:
10
deleteDatasources
:
-
name
:
old-graphite3
orgId
:
2
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