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
3a65e27e
Commit
3a65e27e
authored
Mar 04, 2019
by
Hugo Häggmark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #15739
parent
328eea3a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
7 deletions
+23
-7
packages/grafana-ui/src/types/datasource.ts
+11
-1
public/app/features/dashboard/dashgrid/DataPanel.tsx
+4
-1
public/app/features/dashboard/dashgrid/PanelChrome.tsx
+1
-0
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx
+2
-1
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
+3
-2
public/app/features/dashboard/state/PanelModel.ts
+2
-2
No files found.
packages/grafana-ui/src/types/datasource.ts
View file @
3a65e27e
...
@@ -39,6 +39,16 @@ export interface DataQueryError {
...
@@ -39,6 +39,16 @@ export interface DataQueryError {
statusText
?:
string
;
statusText
?:
string
;
}
}
export
interface
ScopedVar
{
text
:
any
;
value
:
any
;
[
key
:
string
]:
any
;
}
export
interface
ScopedVars
{
[
key
:
string
]:
ScopedVar
;
}
export
interface
DataQueryOptions
<
TQuery
extends
DataQuery
=
DataQuery
>
{
export
interface
DataQueryOptions
<
TQuery
extends
DataQuery
=
DataQuery
>
{
timezone
:
string
;
timezone
:
string
;
range
:
TimeRange
;
range
:
TimeRange
;
...
@@ -50,7 +60,7 @@ export interface DataQueryOptions<TQuery extends DataQuery = DataQuery> {
...
@@ -50,7 +60,7 @@ export interface DataQueryOptions<TQuery extends DataQuery = DataQuery> {
interval
:
string
;
interval
:
string
;
intervalMs
:
number
;
intervalMs
:
number
;
maxDataPoints
:
number
;
maxDataPoints
:
number
;
scopedVars
:
object
;
scopedVars
:
ScopedVars
;
}
}
export
interface
QueryFix
{
export
interface
QueryFix
{
...
...
public/app/features/dashboard/dashgrid/DataPanel.tsx
View file @
3a65e27e
...
@@ -15,6 +15,7 @@ import {
...
@@ -15,6 +15,7 @@ import {
TableData
,
TableData
,
TimeRange
,
TimeRange
,
TimeSeries
,
TimeSeries
,
ScopedVars
,
}
from
'@grafana/ui'
;
}
from
'@grafana/ui'
;
interface
RenderProps
{
interface
RenderProps
{
...
@@ -33,6 +34,7 @@ export interface Props {
...
@@ -33,6 +34,7 @@ export interface Props {
refreshCounter
:
number
;
refreshCounter
:
number
;
minInterval
?:
string
;
minInterval
?:
string
;
maxDataPoints
?:
number
;
maxDataPoints
?:
number
;
scopedVars
?:
ScopedVars
;
children
:
(
r
:
RenderProps
)
=>
JSX
.
Element
;
children
:
(
r
:
RenderProps
)
=>
JSX
.
Element
;
onDataResponse
?:
(
data
:
DataQueryResponse
)
=>
void
;
onDataResponse
?:
(
data
:
DataQueryResponse
)
=>
void
;
onError
:
(
message
:
string
,
error
:
DataQueryError
)
=>
void
;
onError
:
(
message
:
string
,
error
:
DataQueryError
)
=>
void
;
...
@@ -95,6 +97,7 @@ export class DataPanel extends Component<Props, State> {
...
@@ -95,6 +97,7 @@ export class DataPanel extends Component<Props, State> {
timeRange
,
timeRange
,
widthPixels
,
widthPixels
,
maxDataPoints
,
maxDataPoints
,
scopedVars
,
onDataResponse
,
onDataResponse
,
onError
,
onError
,
}
=
this
.
props
;
}
=
this
.
props
;
...
@@ -127,7 +130,7 @@ export class DataPanel extends Component<Props, State> {
...
@@ -127,7 +130,7 @@ export class DataPanel extends Component<Props, State> {
intervalMs
:
intervalRes
.
intervalMs
,
intervalMs
:
intervalRes
.
intervalMs
,
targets
:
queries
,
targets
:
queries
,
maxDataPoints
:
maxDataPoints
||
widthPixels
,
maxDataPoints
:
maxDataPoints
||
widthPixels
,
scopedVars
:
{},
scopedVars
:
scopedVars
||
{},
cacheTimeout
:
null
,
cacheTimeout
:
null
,
};
};
...
...
public/app/features/dashboard/dashgrid/PanelChrome.tsx
View file @
3a65e27e
...
@@ -179,6 +179,7 @@ export class PanelChrome extends PureComponent<Props, State> {
...
@@ -179,6 +179,7 @@ export class PanelChrome extends PureComponent<Props, State> {
isVisible=
{
this
.
isVisible
}
isVisible=
{
this
.
isVisible
}
widthPixels=
{
width
}
widthPixels=
{
width
}
refreshCounter=
{
refreshCounter
}
refreshCounter=
{
refreshCounter
}
scopedVars=
{
panel
.
scopedVars
}
onDataResponse=
{
this
.
onDataResponse
}
onDataResponse=
{
this
.
onDataResponse
}
onError=
{
this
.
onDataError
}
onError=
{
this
.
onDataError
}
>
>
...
...
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx
View file @
3a65e27e
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
{
isEqual
}
from
'lodash'
;
import
{
isEqual
}
from
'lodash'
;
import
{
ScopedVars
}
from
'@grafana/ui'
;
import
PanelHeaderCorner
from
'./PanelHeaderCorner'
;
import
PanelHeaderCorner
from
'./PanelHeaderCorner'
;
import
{
PanelHeaderMenu
}
from
'./PanelHeaderMenu'
;
import
{
PanelHeaderMenu
}
from
'./PanelHeaderMenu'
;
...
@@ -16,7 +17,7 @@ export interface Props {
...
@@ -16,7 +17,7 @@ export interface Props {
timeInfo
:
string
;
timeInfo
:
string
;
title
?:
string
;
title
?:
string
;
description
?:
string
;
description
?:
string
;
scopedVars
?:
string
;
scopedVars
?:
ScopedVars
;
links
?:
[];
links
?:
[];
error
?:
string
;
error
?:
string
;
isFullscreen
:
boolean
;
isFullscreen
:
boolean
;
...
...
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
View file @
3a65e27e
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
Remarkable
from
'remarkable'
;
import
Remarkable
from
'remarkable'
;
import
{
Tooltip
}
from
'@grafana/ui'
;
import
{
Tooltip
,
ScopedVars
}
from
'@grafana/ui'
;
import
{
PanelModel
}
from
'app/features/dashboard/state/PanelModel'
;
import
{
PanelModel
}
from
'app/features/dashboard/state/PanelModel'
;
import
templateSrv
from
'app/features/templating/template_srv'
;
import
templateSrv
from
'app/features/templating/template_srv'
;
import
{
LinkSrv
}
from
'app/features/panel/panellinks/link_srv'
;
import
{
LinkSrv
}
from
'app/features/panel/panellinks/link_srv'
;
...
@@ -16,7 +17,7 @@ interface Props {
...
@@ -16,7 +17,7 @@ interface Props {
panel
:
PanelModel
;
panel
:
PanelModel
;
title
?:
string
;
title
?:
string
;
description
?:
string
;
description
?:
string
;
scopedVars
?:
string
;
scopedVars
?:
ScopedVars
;
links
?:
[];
links
?:
[];
error
?:
string
;
error
?:
string
;
}
}
...
...
public/app/features/dashboard/state/PanelModel.ts
View file @
3a65e27e
...
@@ -3,7 +3,7 @@ import _ from 'lodash';
...
@@ -3,7 +3,7 @@ import _ from 'lodash';
// Types
// Types
import
{
Emitter
}
from
'app/core/utils/emitter'
;
import
{
Emitter
}
from
'app/core/utils/emitter'
;
import
{
DataQuery
,
TimeSeries
,
Threshold
}
from
'@grafana/ui'
;
import
{
DataQuery
,
TimeSeries
,
Threshold
,
ScopedVars
}
from
'@grafana/ui'
;
import
{
TableData
}
from
'@grafana/ui/src'
;
import
{
TableData
}
from
'@grafana/ui/src'
;
export
interface
GridPos
{
export
interface
GridPos
{
...
@@ -71,7 +71,7 @@ export class PanelModel {
...
@@ -71,7 +71,7 @@ export class PanelModel {
type
:
string
;
type
:
string
;
title
:
string
;
title
:
string
;
alert
?:
any
;
alert
?:
any
;
scopedVars
?:
any
;
scopedVars
?:
ScopedVars
;
repeat
?:
string
;
repeat
?:
string
;
repeatIteration
?:
number
;
repeatIteration
?:
number
;
repeatPanelId
?:
number
;
repeatPanelId
?:
number
;
...
...
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