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
ad88e539
Commit
ad88e539
authored
Mar 15, 2018
by
ryan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove
parent
3aed867b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
pkg/api/pluginproxy/ds_proxy.go
+0
-2
public/app/plugins/datasource/influxdb/datasource.ts
+0
-5
public/app/plugins/datasource/influxdb/partials/config.html
+14
-6
No files found.
pkg/api/pluginproxy/ds_proxy.go
View file @
ad88e539
...
...
@@ -180,11 +180,9 @@ func (proxy *DataSourceProxy) getDirector() func(req *http.Request) {
func
(
proxy
*
DataSourceProxy
)
validateRequest
()
error
{
if
proxy
.
ds
.
Type
==
m
.
DS_INFLUXDB
{
if
proxy
.
ctx
.
Query
(
"db"
)
!=
proxy
.
ds
.
Database
{
if
!
proxy
.
ds
.
JsonData
.
Get
(
"allowDatabaseQuery"
)
.
MustBool
(
false
)
{
return
errors
.
New
(
"Datasource is not configured to allow this database"
)
}
}
}
if
!
checkWhiteList
(
proxy
.
ctx
,
proxy
.
targetUrl
.
Host
)
{
return
errors
.
New
(
"Target url is not a valid target"
)
...
...
public/app/plugins/datasource/influxdb/datasource.ts
View file @
ad88e539
...
...
@@ -16,7 +16,6 @@ export default class InfluxDatasource {
basicAuth
:
any
;
withCredentials
:
any
;
interval
:
any
;
allowDatabaseQuery
:
boolean
;
supportAnnotations
:
boolean
;
supportMetrics
:
boolean
;
responseParser
:
any
;
...
...
@@ -35,7 +34,6 @@ export default class InfluxDatasource {
this
.
basicAuth
=
instanceSettings
.
basicAuth
;
this
.
withCredentials
=
instanceSettings
.
withCredentials
;
this
.
interval
=
(
instanceSettings
.
jsonData
||
{}).
timeInterval
;
this
.
allowDatabaseQuery
=
(
instanceSettings
.
jsonData
||
{}).
allowDatabaseQuery
===
true
;
this
.
supportAnnotations
=
true
;
this
.
supportMetrics
=
true
;
this
.
responseParser
=
new
ResponseParser
();
...
...
@@ -240,9 +238,6 @@ export default class InfluxDatasource {
if
(
options
&&
options
.
database
)
{
params
.
db
=
options
.
database
;
if
(
params
.
db
!==
this
.
database
&&
!
this
.
allowDatabaseQuery
)
{
return
this
.
$q
.
reject
({
message
:
'This datasource does not allow changing database'
});
}
}
else
if
(
this
.
database
)
{
params
.
db
=
this
.
database
;
}
...
...
public/app/plugins/datasource/influxdb/partials/config.html
View file @
ad88e539
...
...
@@ -23,16 +23,24 @@
</div>
</div>
<gf-form-switch
class=
"gf-form"
label=
"Allow Database Queries"
label-class=
"gf-form-label width-14"
checked=
"ctrl.current.jsonData.allowDatabaseQuery"
tooltip=
"Support changing the database from a query"
></gf-form-switch>
<div
class=
"gf-form-group"
>
<div
class=
"grafana-info-box"
>
<h5>
Database Access
</h5>
<p>
Setting the database for this datasource does not deny access to other databases. The InfluxDB query syntax allows
switching the database in the query. For example:
<code>
SHOW MEASUREMENTS ON _internal
</code>
or
<code>
SELECT * FROM "_internal".."database" LIMIT 10
</code>
<br/><br/>
To support data isolation and security, make sure appropriate permissions are configured in InfluxDB.
</p>
</div>
</div>
<div
class=
"gf-form-group"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label
width-14
"
>
Min time interval
</span>
<span
class=
"gf-form-label"
>
Min time interval
</span>
<input
type=
"text"
class=
"gf-form-input width-6"
ng-model=
"ctrl.current.jsonData.timeInterval"
spellcheck=
'false'
placeholder=
"10s"
></input>
<info-popover
mode=
"right-absolute"
>
A lower limit for the auto group by time interval. Recommended to be set to write frequency,
...
...
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