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
785f35b1
Commit
785f35b1
authored
Sep 21, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:grafana/grafana
parents
c67327d7
a6c438c8
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
66 additions
and
23 deletions
+66
-23
devenv/docker/blocks/apache_proxy/docker-compose.yaml
+1
-1
devenv/docker/blocks/collectd/docker-compose.yaml
+1
-1
devenv/docker/blocks/graphite/docker-compose.yaml
+1
-1
devenv/docker/blocks/graphite1/docker-compose.yaml
+1
-1
devenv/docker/blocks/mssql/docker-compose.yaml
+1
-1
devenv/docker/blocks/mssql_tests/docker-compose.yaml
+1
-1
devenv/docker/blocks/mysql_opendata/docker-compose.yaml
+1
-1
devenv/docker/blocks/mysql_tests/docker-compose.yaml
+1
-1
devenv/docker/blocks/nginx_proxy/docker-compose.yaml
+1
-1
devenv/docker/blocks/openldap/docker-compose.yaml
+1
-1
devenv/docker/blocks/postgres_tests/docker-compose.yaml
+1
-1
devenv/docker/blocks/prometheus/docker-compose.yaml
+2
-2
devenv/docker/blocks/prometheus2/docker-compose.yaml
+2
-2
devenv/docker/blocks/prometheus_mac/docker-compose.yaml
+2
-2
docs/sources/auth/overview.md
+2
-3
public/app/containers/Explore/Legend.tsx
+3
-1
public/app/containers/Explore/PromQueryField.tsx
+3
-1
public/app/containers/Explore/slate-plugins/braces.test.ts
+18
-0
public/app/containers/Explore/slate-plugins/braces.ts
+16
-0
public/app/plugins/datasource/prometheus/datasource.ts
+1
-1
public/app/plugins/datasource/prometheus/specs/datasource.test.ts
+6
-0
No files found.
devenv/docker/blocks/apache_proxy/docker-compose.yaml
View file @
785f35b1
...
...
@@ -5,5 +5,5 @@
# root_url = %(protocol)s://%(domain)s:10081/grafana/
apacheproxy
:
build
:
blocks/apache_proxy
build
:
docker/
blocks/apache_proxy
network_mode
:
host
devenv/docker/blocks/collectd/docker-compose.yaml
View file @
785f35b1
collectd
:
build
:
blocks/collectd
build
:
docker/
blocks/collectd
environment
:
HOST_NAME
:
myserver
GRAPHITE_HOST
:
graphite
...
...
devenv/docker/blocks/graphite/docker-compose.yaml
View file @
785f35b1
graphite09
:
build
:
blocks/graphite
build
:
docker/
blocks/graphite
ports
:
-
"
8080:80"
-
"
2003:2003"
...
...
devenv/docker/blocks/graphite1/docker-compose.yaml
View file @
785f35b1
graphite
:
build
:
context
:
blocks/graphite1
context
:
docker/
blocks/graphite1
args
:
version
:
master
ports
:
...
...
devenv/docker/blocks/mssql/docker-compose.yaml
View file @
785f35b1
mssql
:
build
:
context
:
blocks/mssql/build
context
:
docker/
blocks/mssql/build
environment
:
ACCEPT_EULA
:
Y
MSSQL_SA_PASSWORD
:
Password!
...
...
devenv/docker/blocks/mssql_tests/docker-compose.yaml
View file @
785f35b1
mssqltests
:
build
:
context
:
blocks/mssql/build
context
:
docker/
blocks/mssql/build
environment
:
ACCEPT_EULA
:
Y
MSSQL_SA_PASSWORD
:
Password!
...
...
devenv/docker/blocks/mysql_opendata/docker-compose.yaml
View file @
785f35b1
mysql_opendata
:
build
:
blocks/mysql_opendata
build
:
docker/
blocks/mysql_opendata
environment
:
MYSQL_ROOT_PASSWORD
:
rootpass
MYSQL_DATABASE
:
testdata
...
...
devenv/docker/blocks/mysql_tests/docker-compose.yaml
View file @
785f35b1
mysqltests
:
build
:
context
:
blocks/mysql_tests
context
:
docker/
blocks/mysql_tests
environment
:
MYSQL_ROOT_PASSWORD
:
rootpass
MYSQL_DATABASE
:
grafana_tests
...
...
devenv/docker/blocks/nginx_proxy/docker-compose.yaml
View file @
785f35b1
...
...
@@ -5,5 +5,5 @@
# root_url = %(protocol)s://%(domain)s:10080/grafana/
nginxproxy
:
build
:
blocks/nginx_proxy
build
:
docker/
blocks/nginx_proxy
network_mode
:
host
devenv/docker/blocks/openldap/docker-compose.yaml
View file @
785f35b1
openldap
:
build
:
blocks/openldap
build
:
docker/
blocks/openldap
environment
:
SLAPD_PASSWORD
:
grafana
SLAPD_DOMAIN
:
grafana.org
...
...
devenv/docker/blocks/postgres_tests/docker-compose.yaml
View file @
785f35b1
postgrestest
:
build
:
context
:
blocks/postgres_tests
context
:
docker/
blocks/postgres_tests
environment
:
POSTGRES_USER
:
grafanatest
POSTGRES_PASSWORD
:
grafanatest
...
...
devenv/docker/blocks/prometheus/docker-compose.yaml
View file @
785f35b1
prometheus
:
build
:
blocks/prometheus
build
:
docker/
blocks/prometheus
network_mode
:
host
ports
:
-
"
9090:9090"
...
...
@@ -25,7 +25,7 @@
-
"
9093:9093"
prometheus-random-data
:
build
:
blocks/prometheus_random_data
build
:
docker/
blocks/prometheus_random_data
network_mode
:
host
ports
:
-
"
8081:8080"
devenv/docker/blocks/prometheus2/docker-compose.yaml
View file @
785f35b1
prometheus
:
build
:
blocks/prometheus2
build
:
docker/
blocks/prometheus2
network_mode
:
host
ports
:
-
"
9090:9090"
...
...
@@ -25,7 +25,7 @@
-
"
9093:9093"
prometheus-random-data
:
build
:
blocks/prometheus_random_data
build
:
docker/
blocks/prometheus_random_data
network_mode
:
host
ports
:
-
"
8081:8080"
devenv/docker/blocks/prometheus_mac/docker-compose.yaml
View file @
785f35b1
prometheus
:
build
:
blocks/prometheus_mac
build
:
docker/
blocks/prometheus_mac
ports
:
-
"
9090:9090"
...
...
@@ -21,6 +21,6 @@
-
"
9093:9093"
prometheus-random-data
:
build
:
blocks/prometheus_random_data
build
:
docker/
blocks/prometheus_random_data
ports
:
-
"
8081:8080"
docs/sources/auth/overview.md
View file @
785f35b1
...
...
@@ -32,11 +32,11 @@ permissions and org memberships.
## Grafana Auth
Grafana of course has a built in user authentication system with password authenticat
e
n enabled by default. You can
Grafana of course has a built in user authentication system with password authenticat
io
n enabled by default. You can
disable authentication by enabling anonymous access. You can also hide login form and only allow login through an auth
provider (listed above). There is also options for allowing self sign up.
### Anonymous authenticat
e
n
### Anonymous authenticat
io
n
You can make Grafana accessible without any login required by enabling anonymous access in the configuration file.
...
...
@@ -84,4 +84,3 @@ Set to the option detailed below to true to hide sign-out menu link. Useful if y
[
auth]
disable_signout_menu
=
true
```
public/app/containers/Explore/Legend.tsx
View file @
785f35b1
...
...
@@ -5,7 +5,9 @@ const LegendItem = ({ series }) => (
<
div
className=
"graph-legend-icon"
>
<
i
className=
"fa fa-minus pointer"
style=
{
{
color
:
series
.
color
}
}
/>
</
div
>
<
a
className=
"graph-legend-alias pointer"
>
{
series
.
alias
}
</
a
>
<
a
className=
"graph-legend-alias pointer"
title=
{
series
.
alias
}
>
{
series
.
alias
}
</
a
>
</
div
>
);
...
...
public/app/containers/Explore/PromQueryField.tsx
View file @
785f35b1
...
...
@@ -255,6 +255,8 @@ class PromQueryField extends React.Component<PromQueryFieldProps, PromQueryField
// Keep this DOM-free for testing
getTypeahead
({
prefix
,
wrapperClasses
,
text
}:
PromTypeaheadInput
):
TypeaheadOutput
{
// Syntax spans have 3 classes by default. More indicate a recognized token
const
tokenRecognized
=
wrapperClasses
.
length
>
3
;
// Determine candidates by CSS context
if
(
_
.
includes
(
wrapperClasses
,
'context-range'
))
{
// Suggestions for metric[|]
...
...
@@ -266,7 +268,7 @@ class PromQueryField extends React.Component<PromQueryFieldProps, PromQueryField
return
this
.
getAggregationTypeahead
.
apply
(
this
,
arguments
);
}
else
if
(
// Non-empty but not inside known token
(
prefix
&&
!
_
.
includes
(
wrapperClasses
,
'token'
)
)
||
(
prefix
&&
!
tokenRecognized
)
||
(
prefix
===
''
&&
!
text
.
match
(
/^
[
)
\s]
+$/
))
||
// Empty context or after ')'
text
.
match
(
/
[
+
\-
*
/
^%
]
/
)
// After binary operator
)
{
...
...
public/app/containers/Explore/slate-plugins/braces.test.ts
View file @
785f35b1
...
...
@@ -53,4 +53,22 @@ describe('braces', () => {
handler
(
event
,
change
);
expect
(
Plain
.
serialize
(
change
.
value
)).
toEqual
(
'sum(rate(metric{namespace="dev", cluster="c1"}[2m]))'
);
});
it
(
'removes closing brace when opening brace is removed'
,
()
=>
{
const
change
=
Plain
.
deserialize
(
'time()'
).
change
();
let
event
;
change
.
move
(
5
);
event
=
new
window
.
KeyboardEvent
(
'keydown'
,
{
key
:
'Backspace'
});
handler
(
event
,
change
);
expect
(
Plain
.
serialize
(
change
.
value
)).
toEqual
(
'time'
);
});
it
(
'keeps closing brace when opening brace is removed and inner values exist'
,
()
=>
{
const
change
=
Plain
.
deserialize
(
'time(value)'
).
change
();
let
event
;
change
.
move
(
5
);
event
=
new
window
.
KeyboardEvent
(
'keydown'
,
{
key
:
'Backspace'
});
const
handled
=
handler
(
event
,
change
);
expect
(
handled
).
toBeFalsy
();
});
});
public/app/containers/Explore/slate-plugins/braces.ts
View file @
785f35b1
...
...
@@ -43,6 +43,22 @@ export default function BracesPlugin() {
return
true
;
}
case
'Backspace'
:
{
const
text
=
value
.
anchorText
.
text
;
const
offset
=
value
.
anchorOffset
;
const
previousChar
=
text
[
offset
-
1
];
const
nextChar
=
text
[
offset
];
if
(
BRACES
[
previousChar
]
&&
BRACES
[
previousChar
]
===
nextChar
)
{
event
.
preventDefault
();
// Remove closing brace if directly following
change
.
deleteBackward
()
.
deleteForward
()
.
focus
();
return
true
;
}
}
default
:
{
break
;
}
...
...
public/app/plugins/datasource/prometheus/datasource.ts
View file @
785f35b1
...
...
@@ -46,7 +46,7 @@ export function determineQueryHints(series: any[], datasource?: any): any[] {
// Check for monotony
const
datapoints
:
number
[][]
=
s
.
datapoints
;
if
(
datapoints
.
length
>
1
)
{
if
(
query
.
indexOf
(
'rate('
)
===
-
1
&&
datapoints
.
length
>
1
)
{
let
increasing
=
false
;
const
monotonic
=
datapoints
.
filter
(
dp
=>
dp
[
0
]
!==
null
).
every
((
dp
,
index
)
=>
{
if
(
index
===
0
)
{
...
...
public/app/plugins/datasource/prometheus/specs/datasource.test.ts
View file @
785f35b1
...
...
@@ -247,6 +247,12 @@ describe('PrometheusDatasource', () => {
});
});
it
(
'returns no rate hint for a monotonously increasing series that already has a rate'
,
()
=>
{
const
series
=
[{
datapoints
:
[[
23
,
1000
],
[
24
,
1001
]],
query
:
'rate(metric[1m])'
,
responseIndex
:
0
}];
const
hints
=
determineQueryHints
(
series
);
expect
(
hints
).
toEqual
([
null
]);
});
it
(
'returns a rate hint w/o action for a complex monotonously increasing series'
,
()
=>
{
const
series
=
[{
datapoints
:
[[
23
,
1000
],
[
24
,
1001
]],
query
:
'sum(metric)'
,
responseIndex
:
0
}];
const
hints
=
determineQueryHints
(
series
);
...
...
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