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
39728c88
Commit
39728c88
authored
Mar 18, 2019
by
Peter Holmberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename to char
parent
515fb590
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
public/app/core/utils/explore.ts
+2
-2
public/app/core/utils/query.ts
+1
-1
public/app/features/dashboard/state/PanelModel.ts
+3
-3
No files found.
public/app/core/utils/explore.ts
View file @
39728c88
...
...
@@ -23,7 +23,7 @@ import {
ResultGetter
,
}
from
'app/types/explore'
;
import
{
LogsDedupStrategy
}
from
'app/core/logs_model'
;
import
{
getNextRefId
Lette
r
}
from
'./query'
;
import
{
getNextRefId
Cha
r
}
from
'./query'
;
export
const
DEFAULT_RANGE
=
{
from
:
'now-6h'
,
...
...
@@ -227,7 +227,7 @@ export function generateKey(index = 0): string {
}
export
function
generateEmptyQuery
(
queries
:
DataQuery
[],
index
=
0
):
DataQuery
{
return
{
refId
:
getNextRefId
Lette
r
(
queries
),
key
:
generateKey
(
index
)
};
return
{
refId
:
getNextRefId
Cha
r
(
queries
),
key
:
generateKey
(
index
)
};
}
/**
...
...
public/app/core/utils/query.ts
View file @
39728c88
import
_
from
'lodash'
;
import
{
DataQuery
}
from
'@grafana/ui/'
;
export
const
getNextRefId
Lette
r
=
(
queries
:
DataQuery
[]):
string
=>
{
export
const
getNextRefId
Cha
r
=
(
queries
:
DataQuery
[]):
string
=>
{
const
letters
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
;
return
_
.
find
(
letters
,
refId
=>
{
...
...
public/app/features/dashboard/state/PanelModel.ts
View file @
39728c88
...
...
@@ -3,7 +3,7 @@ import _ from 'lodash';
// Utils
import
{
Emitter
}
from
'app/core/utils/emitter'
;
import
{
getNextRefId
Lette
r
}
from
'app/core/utils/query'
;
import
{
getNextRefId
Cha
r
}
from
'app/core/utils/query'
;
// Types
import
{
DataQuery
,
TimeSeries
,
Threshold
,
ScopedVars
,
PanelTypeChangedHook
}
from
'@grafana/ui'
;
...
...
@@ -131,7 +131,7 @@ export class PanelModel {
if
(
this
.
targets
)
{
for
(
const
query
of
this
.
targets
)
{
if
(
!
query
.
refId
)
{
query
.
refId
=
getNextRefId
Lette
r
(
this
.
targets
);
query
.
refId
=
getNextRefId
Cha
r
(
this
.
targets
);
}
}
}
...
...
@@ -269,7 +269,7 @@ export class PanelModel {
addQuery
(
query
?:
Partial
<
DataQuery
>
)
{
query
=
query
||
{
refId
:
'A'
};
query
.
refId
=
getNextRefId
Lette
r
(
this
.
targets
);
query
.
refId
=
getNextRefId
Cha
r
(
this
.
targets
);
this
.
targets
.
push
(
query
as
DataQuery
);
}
...
...
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