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
7e6ac12b
Unverified
Commit
7e6ac12b
authored
May 08, 2020
by
Alexander Zobnin
Committed by
GitHub
May 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: move dataFramesReceived event to @grafana/data (#24443)
parent
8257633b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
9 deletions
+7
-9
packages/grafana-data/src/types/panelEvents.ts
+2
-0
public/app/features/panel/metrics_panel_ctrl.ts
+1
-2
public/app/plugins/panel/graph/module.ts
+1
-1
public/app/plugins/panel/heatmap/heatmap_ctrl.ts
+1
-1
public/app/plugins/panel/singlestat/module.ts
+1
-2
public/app/types/events.ts
+1
-3
No files found.
packages/grafana-data/src/types/panelEvents.ts
View file @
7e6ac12b
import
{
eventFactory
}
from
'./utils'
;
import
{
eventFactory
}
from
'./utils'
;
import
{
DataQueryError
,
DataQueryResponseData
}
from
'./datasource'
;
import
{
DataQueryError
,
DataQueryResponseData
}
from
'./datasource'
;
import
{
AngularPanelMenuItem
}
from
'./panel'
;
import
{
AngularPanelMenuItem
}
from
'./panel'
;
import
{
DataFrame
}
from
'./dataFrame'
;
/** Payloads */
/** Payloads */
export
interface
PanelChangeViewPayload
{
export
interface
PanelChangeViewPayload
{
...
@@ -15,6 +16,7 @@ export const refresh = eventFactory('refresh');
...
@@ -15,6 +16,7 @@ export const refresh = eventFactory('refresh');
export
const
componentDidMount
=
eventFactory
(
'component-did-mount'
);
export
const
componentDidMount
=
eventFactory
(
'component-did-mount'
);
export
const
dataError
=
eventFactory
<
DataQueryError
>
(
'data-error'
);
export
const
dataError
=
eventFactory
<
DataQueryError
>
(
'data-error'
);
export
const
dataReceived
=
eventFactory
<
DataQueryResponseData
[]
>
(
'data-received'
);
export
const
dataReceived
=
eventFactory
<
DataQueryResponseData
[]
>
(
'data-received'
);
export
const
dataFramesReceived
=
eventFactory
<
DataFrame
[]
>
(
'data-frames-received'
);
export
const
dataSnapshotLoad
=
eventFactory
<
DataQueryResponseData
[]
>
(
'data-snapshot-load'
);
export
const
dataSnapshotLoad
=
eventFactory
<
DataQueryResponseData
[]
>
(
'data-snapshot-load'
);
export
const
editModeInitialized
=
eventFactory
(
'init-edit-mode'
);
export
const
editModeInitialized
=
eventFactory
(
'init-edit-mode'
);
export
const
initPanelActions
=
eventFactory
<
AngularPanelMenuItem
[]
>
(
'init-panel-actions'
);
export
const
initPanelActions
=
eventFactory
<
AngularPanelMenuItem
[]
>
(
'init-panel-actions'
);
...
...
public/app/features/panel/metrics_panel_ctrl.ts
View file @
7e6ac12b
...
@@ -16,7 +16,6 @@ import {
...
@@ -16,7 +16,6 @@ import {
}
from
'@grafana/data'
;
}
from
'@grafana/data'
;
import
{
Unsubscribable
}
from
'rxjs'
;
import
{
Unsubscribable
}
from
'rxjs'
;
import
{
PanelModel
}
from
'app/features/dashboard/state'
;
import
{
PanelModel
}
from
'app/features/dashboard/state'
;
import
{
CoreEvents
}
from
'app/types'
;
class
MetricsPanelCtrl
extends
PanelCtrl
{
class
MetricsPanelCtrl
extends
PanelCtrl
{
scope
:
any
;
scope
:
any
;
...
@@ -204,7 +203,7 @@ class MetricsPanelCtrl extends PanelCtrl {
...
@@ -204,7 +203,7 @@ class MetricsPanelCtrl extends PanelCtrl {
}
}
try
{
try
{
this
.
events
.
emit
(
Core
Events
.
dataFramesReceived
,
data
);
this
.
events
.
emit
(
Panel
Events
.
dataFramesReceived
,
data
);
}
catch
(
err
)
{
}
catch
(
err
)
{
this
.
processDataError
(
err
);
this
.
processDataError
(
err
);
}
}
...
...
public/app/plugins/panel/graph/module.ts
View file @
7e6ac12b
...
@@ -156,7 +156,7 @@ class GraphCtrl extends MetricsPanelCtrl {
...
@@ -156,7 +156,7 @@ class GraphCtrl extends MetricsPanelCtrl {
this
.
contextMenuCtrl
=
new
GraphContextMenuCtrl
(
$scope
);
this
.
contextMenuCtrl
=
new
GraphContextMenuCtrl
(
$scope
);
this
.
events
.
on
(
PanelEvents
.
render
,
this
.
onRender
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
render
,
this
.
onRender
.
bind
(
this
));
this
.
events
.
on
(
Core
Events
.
dataFramesReceived
,
this
.
onDataFramesReceived
.
bind
(
this
));
this
.
events
.
on
(
Panel
Events
.
dataFramesReceived
,
this
.
onDataFramesReceived
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
dataSnapshotLoad
,
this
.
onDataSnapshotLoad
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
dataSnapshotLoad
,
this
.
onDataSnapshotLoad
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
editModeInitialized
,
this
.
onInitEditMode
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
editModeInitialized
,
this
.
onInitEditMode
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
initPanelActions
,
this
.
onInitPanelActions
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
initPanelActions
,
this
.
onInitPanelActions
.
bind
(
this
));
...
...
public/app/plugins/panel/heatmap/heatmap_ctrl.ts
View file @
7e6ac12b
...
@@ -143,7 +143,7 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
...
@@ -143,7 +143,7 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
// Bind grafana panel events
// Bind grafana panel events
this
.
events
.
on
(
PanelEvents
.
render
,
this
.
onRender
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
render
,
this
.
onRender
.
bind
(
this
));
this
.
events
.
on
(
Core
Events
.
dataFramesReceived
,
this
.
onDataFramesReceived
.
bind
(
this
));
this
.
events
.
on
(
Panel
Events
.
dataFramesReceived
,
this
.
onDataFramesReceived
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
dataSnapshotLoad
,
this
.
onSnapshotLoad
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
dataSnapshotLoad
,
this
.
onSnapshotLoad
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
editModeInitialized
,
this
.
onInitEditMode
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
editModeInitialized
,
this
.
onInitEditMode
.
bind
(
this
));
...
...
public/app/plugins/panel/singlestat/module.ts
View file @
7e6ac12b
...
@@ -28,7 +28,6 @@ import {
...
@@ -28,7 +28,6 @@ import {
import
{
convertOldAngularValueMapping
}
from
'@grafana/ui'
;
import
{
convertOldAngularValueMapping
}
from
'@grafana/ui'
;
import
{
CoreEvents
}
from
'app/types'
;
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
import
{
MetricsPanelCtrl
}
from
'app/plugins/sdk'
;
import
{
MetricsPanelCtrl
}
from
'app/plugins/sdk'
;
import
{
LinkSrv
}
from
'app/features/panel/panellinks/link_srv'
;
import
{
LinkSrv
}
from
'app/features/panel/panellinks/link_srv'
;
...
@@ -124,7 +123,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
...
@@ -124,7 +123,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
super
(
$scope
,
$injector
);
super
(
$scope
,
$injector
);
_
.
defaults
(
this
.
panel
,
this
.
panelDefaults
);
_
.
defaults
(
this
.
panel
,
this
.
panelDefaults
);
this
.
events
.
on
(
Core
Events
.
dataFramesReceived
,
this
.
onFramesReceived
.
bind
(
this
));
this
.
events
.
on
(
Panel
Events
.
dataFramesReceived
,
this
.
onFramesReceived
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
dataSnapshotLoad
,
this
.
onSnapshotLoad
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
dataSnapshotLoad
,
this
.
onSnapshotLoad
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
editModeInitialized
,
this
.
onInitEditMode
.
bind
(
this
));
this
.
events
.
on
(
PanelEvents
.
editModeInitialized
,
this
.
onInitEditMode
.
bind
(
this
));
...
...
public/app/types/events.ts
View file @
7e6ac12b
import
{
DataFrame
,
eventFactory
,
TimeRange
}
from
'@grafana/data'
;
import
{
eventFactory
,
TimeRange
}
from
'@grafana/data'
;
import
{
DashboardModel
}
from
'app/features/dashboard/state'
;
import
{
DashboardModel
}
from
'app/features/dashboard/state'
;
/**
/**
...
@@ -139,8 +139,6 @@ export const rowCollapsed = eventFactory('row-collapsed');
...
@@ -139,8 +139,6 @@ export const rowCollapsed = eventFactory('row-collapsed');
export
const
templateVariableValueUpdated
=
eventFactory
(
'template-variable-value-updated'
);
export
const
templateVariableValueUpdated
=
eventFactory
(
'template-variable-value-updated'
);
export
const
submenuVisibilityChanged
=
eventFactory
<
boolean
>
(
'submenu-visibility-changed'
);
export
const
submenuVisibilityChanged
=
eventFactory
<
boolean
>
(
'submenu-visibility-changed'
);
export
const
dataFramesReceived
=
eventFactory
<
DataFrame
[]
>
(
'data-frames-received'
);
export
const
graphClicked
=
eventFactory
<
GraphClickedPayload
>
(
'graph-click'
);
export
const
graphClicked
=
eventFactory
<
GraphClickedPayload
>
(
'graph-click'
);
export
const
thresholdChanged
=
eventFactory
<
ThresholdChangedPayload
>
(
'threshold-changed'
);
export
const
thresholdChanged
=
eventFactory
<
ThresholdChangedPayload
>
(
'threshold-changed'
);
...
...
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