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
5e2b9e40
Commit
5e2b9e40
authored
Feb 04, 2019
by
Hugo Häggmark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more typings
parent
6b98b059
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
19 deletions
+24
-19
packages/grafana-ui/src/types/plugin.ts
+6
-4
public/app/features/explore/Explore.tsx
+3
-3
public/app/plugins/datasource/loki/components/LokiStartPage.tsx
+2
-5
public/app/plugins/datasource/prometheus/components/PromStart.tsx
+2
-5
public/app/types/explore.ts
+11
-2
No files found.
packages/grafana-ui/src/types/plugin.ts
View file @
5e2b9e40
...
...
@@ -65,15 +65,19 @@ export interface ExploreQueryFieldProps<DSType extends DataSourceApi, TQuery ext
onExecuteHint
?:
(
action
:
QueryFixAction
)
=>
void
;
}
export
interface
ExploreStartPageProps
{
onClickExample
:
(
query
:
DataQuery
)
=>
void
;
}
export
interface
PluginExports
{
Datasource
?:
DataSourceApi
;
QueryCtrl
?:
any
;
QueryEditor
?:
ComponentClass
<
QueryEditorProps
<
DataSourceApi
,
DataQuery
>>
;
QueryEditor
?:
ComponentClass
<
QueryEditorProps
<
DataSourceApi
,
DataQuery
>>
;
ConfigCtrl
?:
any
;
AnnotationsQueryCtrl
?:
any
;
VariableQueryEditor
?:
any
;
ExploreQueryField
?:
ComponentClass
<
ExploreQueryFieldProps
<
DataSourceApi
,
DataQuery
>>
;
ExploreStartPage
?:
any
;
ExploreStartPage
?:
ComponentClass
<
ExploreStartPageProps
>
;
// Panel plugin
PanelCtrl
?:
any
;
...
...
@@ -131,5 +135,3 @@ export interface PluginMetaInfo {
updated
:
string
;
version
:
string
;
}
public/app/features/explore/Explore.tsx
View file @
5e2b9e40
// Libraries
import
React
from
'react'
;
import
React
,
{
ComponentClass
}
from
'react'
;
import
{
hot
}
from
'react-hot-loader'
;
import
{
connect
}
from
'react-redux'
;
import
_
from
'lodash'
;
...
...
@@ -21,7 +21,7 @@ import TimePicker, { parseTime } from './TimePicker';
import
{
changeSize
,
changeTime
,
initializeExplore
,
modifyQueries
,
scanStart
,
setQueries
}
from
'./state/actions'
;
// Types
import
{
RawTimeRange
,
TimeRange
,
DataQuery
}
from
'@grafana/ui'
;
import
{
RawTimeRange
,
TimeRange
,
DataQuery
,
ExploreStartPageProps
}
from
'@grafana/ui'
;
import
{
ExploreItemState
,
ExploreUrlState
,
RangeScanner
,
ExploreId
}
from
'app/types/explore'
;
import
{
StoreState
}
from
'app/types'
;
import
{
LAST_USED_DATASOURCE_KEY
,
ensureQueries
,
DEFAULT_RANGE
}
from
'app/core/utils/explore'
;
...
...
@@ -30,7 +30,7 @@ import { ExploreToolbar } from './ExploreToolbar';
import
{
scanStopAction
}
from
'./state/actionTypes'
;
interface
ExploreProps
{
StartPage
?:
any
;
StartPage
?:
ComponentClass
<
ExploreStartPageProps
>
;
changeSize
:
typeof
changeSize
;
changeTime
:
typeof
changeTime
;
datasourceError
:
string
;
...
...
public/app/plugins/datasource/loki/components/LokiStartPage.tsx
View file @
5e2b9e40
import
React
,
{
PureComponent
}
from
'react'
;
import
LokiCheatSheet
from
'./LokiCheatSheet'
;
import
{
ExploreStartPageProps
}
from
'@grafana/ui'
;
interface
Props
{
onClickExample
:
()
=>
void
;
}
export
default
class
LokiStartPage
extends
PureComponent
<
Props
>
{
export
default
class
LokiStartPage
extends
PureComponent
<
ExploreStartPageProps
>
{
render
()
{
return
(
<
div
className=
"grafana-info-box grafana-info-box--max-lg"
>
...
...
public/app/plugins/datasource/prometheus/components/PromStart.tsx
View file @
5e2b9e40
import
React
,
{
PureComponent
}
from
'react'
;
import
PromCheatSheet
from
'./PromCheatSheet'
;
import
{
ExploreStartPageProps
}
from
'@grafana/ui'
;
interface
Props
{
onClickExample
:
()
=>
void
;
}
export
default
class
PromStart
extends
PureComponent
<
Props
>
{
export
default
class
PromStart
extends
PureComponent
<
ExploreStartPageProps
>
{
render
()
{
return
(
<
div
className=
"grafana-info-box grafana-info-box--max-lg"
>
...
...
public/app/types/explore.ts
View file @
5e2b9e40
import
{
ComponentClass
}
from
'react'
;
import
{
Value
}
from
'slate'
;
import
{
RawTimeRange
,
TimeRange
,
DataQuery
,
DataSourceSelectItem
,
DataSourceApi
,
QueryHint
}
from
'@grafana/ui'
;
import
{
RawTimeRange
,
TimeRange
,
DataQuery
,
DataSourceSelectItem
,
DataSourceApi
,
QueryHint
,
ExploreStartPageProps
,
}
from
'@grafana/ui'
;
import
{
Emitter
}
from
'app/core/core'
;
import
{
LogsModel
}
from
'app/core/logs_model'
;
...
...
@@ -102,7 +111,7 @@ export interface ExploreItemState {
/**
* React component to be shown when no queries have been run yet, e.g., for a query language cheat sheet.
*/
StartPage
?:
any
;
StartPage
?:
ComponentClass
<
ExploreStartPageProps
>
;
/**
* Width used for calculating the graph interval (can't have more datapoints than pixels)
*/
...
...
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