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
29291f88
Commit
29291f88
authored
Jul 18, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:grafana/grafana
parents
913b8576
3ab5ab36
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
public/app/containers/Explore/QueryField.tsx
+3
-2
No files found.
public/app/containers/Explore/QueryField.tsx
View file @
29291f88
...
...
@@ -17,6 +17,7 @@ import { processLabels, RATE_RANGES, cleanText } from './utils/prometheus';
import
Typeahead
from
'./Typeahead'
;
const
EMPTY_METRIC
=
''
;
const
METRIC_MARK
=
'metric'
;
export
const
TYPEAHEAD_DEBOUNCE
=
300
;
function
flattenSuggestions
(
s
)
{
...
...
@@ -135,7 +136,7 @@ class QueryField extends React.Component<any, any> {
if
(
!
this
.
state
.
metrics
)
{
return
;
}
setPrismTokens
(
this
.
props
.
prismLanguage
,
'metrics'
,
this
.
state
.
metrics
);
setPrismTokens
(
this
.
props
.
prismLanguage
,
METRIC_MARK
,
this
.
state
.
metrics
);
// Trigger re-render
window
.
requestAnimationFrame
(()
=>
{
...
...
@@ -184,7 +185,7 @@ class QueryField extends React.Component<any, any> {
let
typeaheadContext
=
null
;
// Take first metric as lucky guess
const
metricNode
=
editorNode
.
querySelector
(
'.metric'
);
const
metricNode
=
editorNode
.
querySelector
(
`.
${
METRIC_MARK
}
`
);
if
(
wrapperClasses
.
contains
(
'context-range'
))
{
// Rate ranges
...
...
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