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
5c2d3812
Unverified
Commit
5c2d3812
authored
Apr 29, 2019
by
Ryan McKinley
Committed by
GitHub
Apr 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plugins: move PanelPluginMeta to grafana/ui (#16804)
parent
7146d576
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
36 additions
and
40 deletions
+36
-40
packages/grafana-ui/src/types/panel.ts
+19
-0
public/app/core/config.ts
+1
-2
public/app/features/dashboard/components/DashExportModal/DashboardExporter.test.ts
+1
-1
public/app/features/dashboard/components/DashExportModal/DashboardExporter.ts
+1
-1
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
+1
-2
public/app/features/dashboard/dashgrid/PanelChrome.tsx
+1
-2
public/app/features/dashboard/dashgrid/PanelPluginNotFound.tsx
+2
-2
public/app/features/dashboard/panel_editor/PanelEditor.tsx
+1
-3
public/app/features/dashboard/panel_editor/VisualizationTab.tsx
+1
-1
public/app/features/dashboard/panel_editor/VizPickerSearch.tsx
+1
-2
public/app/features/dashboard/panel_editor/VizTypePicker.tsx
+1
-2
public/app/features/dashboard/panel_editor/VizTypePickerPlugin.tsx
+1
-1
public/app/features/dashboard/state/PanelModel.ts
+1
-2
public/app/features/plugins/__mocks__/pluginMocks.ts
+2
-2
public/app/types/plugins.ts
+1
-15
public/test/specs/helpers.ts
+1
-2
No files found.
packages/grafana-ui/src/types/panel.ts
View file @
5c2d3812
...
...
@@ -2,9 +2,28 @@ import { ComponentClass, ComponentType } from 'react';
import
{
LoadingState
,
SeriesData
}
from
'./data'
;
import
{
TimeRange
}
from
'./time'
;
import
{
ScopedVars
,
DataQueryRequest
,
DataQueryError
,
LegacyResponseData
}
from
'./datasource'
;
import
{
PluginMeta
}
from
'./plugin'
;
export
type
InterpolateFunction
=
(
value
:
string
,
scopedVars
?:
ScopedVars
,
format
?:
string
|
Function
)
=>
string
;
export
interface
PanelPluginMeta
extends
PluginMeta
{
hideFromList
?:
boolean
;
sort
:
number
;
angularPlugin
:
AngularPanelPlugin
|
null
;
vizPlugin
:
PanelPlugin
|
null
;
hasBeenImported
?:
boolean
;
// if length>0 the query tab will show up
// Before 6.2 this could be table and/or series, but 6.2+ supports both transparently
// so it will be deprecated soon
dataFormats
?:
PanelDataFormat
[];
}
export
enum
PanelDataFormat
{
Table
=
'table'
,
TimeSeries
=
'time_series'
,
}
export
interface
PanelData
{
state
:
LoadingState
;
series
:
SeriesData
[];
...
...
public/app/core/config.ts
View file @
5c2d3812
import
_
from
'lodash'
;
import
{
PanelPluginMeta
}
from
'app/types/plugins'
;
import
{
GrafanaTheme
,
getTheme
,
GrafanaThemeType
,
DataSourceInstanceSettings
}
from
'@grafana/ui'
;
import
{
GrafanaTheme
,
getTheme
,
GrafanaThemeType
,
PanelPluginMeta
,
DataSourceInstanceSettings
}
from
'@grafana/ui'
;
export
interface
BuildInfo
{
version
:
string
;
...
...
public/app/features/dashboard/components/DashExportModal/DashboardExporter.test.ts
View file @
5c2d3812
...
...
@@ -9,7 +9,7 @@ import config from 'app/core/config';
import
{
DashboardExporter
}
from
'./DashboardExporter'
;
import
{
DashboardModel
}
from
'../../state/DashboardModel'
;
import
{
DatasourceSrv
}
from
'app/features/plugins/datasource_srv'
;
import
{
PanelPluginMeta
}
from
'
app/types
'
;
import
{
PanelPluginMeta
}
from
'
@grafana/ui
'
;
describe
(
'given dashboard with repeated panels'
,
()
=>
{
let
dash
:
any
,
exported
:
any
;
...
...
public/app/features/dashboard/components/DashExportModal/DashboardExporter.ts
View file @
5c2d3812
...
...
@@ -4,7 +4,7 @@ import config from 'app/core/config';
import
{
DashboardModel
}
from
'../../state/DashboardModel'
;
import
DatasourceSrv
from
'app/features/plugins/datasource_srv'
;
import
{
PanelModel
}
from
'app/features/dashboard/state'
;
import
{
PanelPluginMeta
}
from
'
app/types/plugins
'
;
import
{
PanelPluginMeta
}
from
'
@grafana/ui
'
;
interface
Input
{
name
:
string
;
...
...
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
View file @
5c2d3812
...
...
@@ -17,8 +17,7 @@ import { PanelResizer } from './PanelResizer';
// Types
import
{
PanelModel
,
DashboardModel
}
from
'../state'
;
import
{
PanelPluginMeta
}
from
'app/types'
;
import
{
AngularPanelPlugin
,
PanelPlugin
}
from
'@grafana/ui/src/types/panel'
;
import
{
PanelPluginMeta
,
AngularPanelPlugin
,
PanelPlugin
}
from
'@grafana/ui/src/types/panel'
;
import
{
AutoSizer
}
from
'react-virtualized'
;
export
interface
Props
{
...
...
public/app/features/dashboard/dashgrid/PanelChrome.tsx
View file @
5c2d3812
...
...
@@ -16,8 +16,7 @@ import config from 'app/core/config';
// Types
import
{
DashboardModel
,
PanelModel
}
from
'../state'
;
import
{
PanelPluginMeta
}
from
'app/types'
;
import
{
LoadingState
,
PanelData
}
from
'@grafana/ui'
;
import
{
PanelPluginMeta
,
LoadingState
,
PanelData
}
from
'@grafana/ui'
;
import
{
ScopedVars
}
from
'@grafana/ui'
;
import
templateSrv
from
'app/features/templating/template_srv'
;
...
...
public/app/features/dashboard/dashgrid/PanelPluginNotFound.tsx
View file @
5c2d3812
...
...
@@ -6,8 +6,8 @@ import React, { PureComponent } from 'react';
import
{
AlertBox
}
from
'app/core/components/AlertBox/AlertBox'
;
// Types
import
{
PanelPluginMeta
,
AppNotificationSeverity
}
from
'app/types'
;
import
{
PanelProps
,
PanelPlugin
,
PluginType
}
from
'@grafana/ui'
;
import
{
AppNotificationSeverity
}
from
'app/types'
;
import
{
PanelP
luginMeta
,
PanelP
rops
,
PanelPlugin
,
PluginType
}
from
'@grafana/ui'
;
interface
Props
{
pluginId
:
string
;
...
...
public/app/features/dashboard/panel_editor/PanelEditor.tsx
View file @
5c2d3812
...
...
@@ -13,9 +13,7 @@ import { AngularComponent } from 'app/core/services/AngularLoader';
import
{
PanelModel
}
from
'../state/PanelModel'
;
import
{
DashboardModel
}
from
'../state/DashboardModel'
;
import
{
PanelPluginMeta
}
from
'app/types/plugins'
;
import
{
Tooltip
}
from
'@grafana/ui'
;
import
{
PanelPluginMeta
,
Tooltip
}
from
'@grafana/ui'
;
interface
PanelEditorProps
{
panel
:
PanelModel
;
...
...
public/app/features/dashboard/panel_editor/VisualizationTab.tsx
View file @
5c2d3812
...
...
@@ -16,9 +16,9 @@ import { FadeIn } from 'app/core/components/Animations/FadeIn';
// Types
import
{
PanelModel
}
from
'../state'
;
import
{
DashboardModel
}
from
'../state'
;
import
{
PanelPluginMeta
}
from
'app/types/plugins'
;
import
{
VizPickerSearch
}
from
'./VizPickerSearch'
;
import
PluginStateinfo
from
'app/features/plugins/PluginStateInfo'
;
import
{
PanelPluginMeta
}
from
'@grafana/ui'
;
interface
Props
{
panel
:
PanelModel
;
...
...
public/app/features/dashboard/panel_editor/VizPickerSearch.tsx
View file @
5c2d3812
import
React
,
{
PureComponent
}
from
'react'
;
import
{
FilterInput
}
from
'app/core/components/FilterInput/FilterInput'
;
import
{
PanelPluginMeta
}
from
'app/types'
;
import
{
PanelPluginMeta
}
from
'@grafana/ui'
;
interface
Props
{
plugin
:
PanelPluginMeta
;
...
...
public/app/features/dashboard/panel_editor/VizTypePicker.tsx
View file @
5c2d3812
import
React
,
{
PureComponent
}
from
'react'
;
import
config
from
'app/core/config'
;
import
{
PanelPluginMeta
}
from
'app/types/plugins'
;
import
VizTypePickerPlugin
from
'./VizTypePickerPlugin'
;
import
{
EmptySearchResult
}
from
'@grafana/ui'
;
import
{
PanelPluginMeta
,
EmptySearchResult
}
from
'@grafana/ui'
;
export
interface
Props
{
current
:
PanelPluginMeta
;
...
...
public/app/features/dashboard/panel_editor/VizTypePickerPlugin.tsx
View file @
5c2d3812
import
React
from
'react'
;
import
classNames
from
'classnames'
;
import
{
PanelPluginMeta
}
from
'
app/types/plugins
'
;
import
{
PanelPluginMeta
}
from
'
@grafana/ui
'
;
interface
Props
{
isCurrent
:
boolean
;
...
...
public/app/features/dashboard/state/PanelModel.ts
View file @
5c2d3812
...
...
@@ -6,8 +6,7 @@ import { Emitter } from 'app/core/utils/emitter';
import
{
getNextRefIdChar
}
from
'app/core/utils/query'
;
// Types
import
{
DataQuery
,
Threshold
,
ScopedVars
,
DataQueryResponseData
}
from
'@grafana/ui'
;
import
{
PanelPluginMeta
}
from
'app/types'
;
import
{
PanelPluginMeta
,
DataQuery
,
Threshold
,
ScopedVars
,
DataQueryResponseData
}
from
'@grafana/ui'
;
import
config
from
'app/core/config'
;
import
{
PanelQueryRunner
}
from
'./PanelQueryRunner'
;
...
...
public/app/features/plugins/__mocks__/pluginMocks.ts
View file @
5c2d3812
import
{
Plugin
,
PanelPluginMeta
,
PanelDataFormat
}
from
'app/types'
;
import
{
P
luginType
}
from
'@grafana/ui'
;
import
{
Plugin
}
from
'app/types'
;
import
{
P
anelPluginMeta
,
PluginType
,
PanelDataFormat
}
from
'@grafana/ui'
;
export
const
getMockPlugins
=
(
amount
:
number
):
Plugin
[]
=>
{
const
plugins
=
[];
...
...
public/app/types/plugins.ts
View file @
5c2d3812
import
{
AngularPanelPlugin
,
PanelPlugin
,
PluginMeta
}
from
'@grafana/ui/src/types'
;
export
interface
PanelPluginMeta
extends
PluginMeta
{
hideFromList
?:
boolean
;
sort
:
number
;
angularPlugin
:
AngularPanelPlugin
|
null
;
vizPlugin
:
PanelPlugin
|
null
;
hasBeenImported
?:
boolean
;
dataFormats
:
PanelDataFormat
[];
}
export
enum
PanelDataFormat
{
Table
=
'table'
,
TimeSeries
=
'time_series'
,
}
import
{
PluginMeta
}
from
'@grafana/ui'
;
/**
* Values we don't want in the public API
...
...
public/test/specs/helpers.ts
View file @
5c2d3812
...
...
@@ -3,8 +3,7 @@ import config from 'app/core/config';
import
*
as
dateMath
from
'app/core/utils/datemath'
;
import
{
angularMocks
,
sinon
}
from
'../lib/common'
;
import
{
PanelModel
}
from
'app/features/dashboard/state/PanelModel'
;
import
{
PanelPluginMeta
}
from
'app/types'
;
import
{
RawTimeRange
}
from
'@grafana/ui/src/types'
;
import
{
PanelPluginMeta
,
RawTimeRange
}
from
'@grafana/ui'
;
export
function
ControllerTestContext
(
this
:
any
)
{
const
self
=
this
;
...
...
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