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
1e76f1a7
Unverified
Commit
1e76f1a7
authored
Jun 04, 2019
by
Ryan McKinley
Committed by
GitHub
Jun 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DataSourceApi: remove ExploreDataSourceApi (#17424)
parent
4066c552
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
13 deletions
+19
-13
packages/grafana-ui/src/types/datasource.ts
+11
-5
public/app/features/explore/Explore.tsx
+2
-2
public/app/features/explore/QueryRow.tsx
+2
-2
public/app/plugins/datasource/loki/components/LokiQueryFieldForm.tsx
+2
-2
public/app/plugins/datasource/prometheus/components/PromQueryField.tsx
+2
-2
No files found.
packages/grafana-ui/src/types/datasource.ts
View file @
1e76f1a7
...
@@ -202,14 +202,20 @@ export abstract class DataSourceApi<
...
@@ -202,14 +202,20 @@ export abstract class DataSourceApi<
* Used by alerting to check if query contains template variables
* Used by alerting to check if query contains template variables
*/
*/
targetContainsTemplate
?(
query
:
TQuery
):
boolean
;
targetContainsTemplate
?(
query
:
TQuery
):
boolean
;
}
export
abstract
class
ExploreDataSourceApi
<
/**
TQuery
extends
DataQuery
=
DataQuery
,
* Used in explore
TOptions
extends
DataSourceJsonData
=
DataSourceJsonData
*/
>
extends
DataSourceApi
<
TQuery
,
TOptions
>
{
modifyQuery
?(
query
:
TQuery
,
action
:
QueryFixAction
):
TQuery
;
modifyQuery
?(
query
:
TQuery
,
action
:
QueryFixAction
):
TQuery
;
/**
* Used in explore
*/
getHighlighterExpression
?(
query
:
TQuery
):
string
[];
getHighlighterExpression
?(
query
:
TQuery
):
string
[];
/**
* Used in explore
*/
languageProvider
?:
any
;
languageProvider
?:
any
;
}
}
...
...
public/app/features/explore/Explore.tsx
View file @
1e76f1a7
...
@@ -31,7 +31,7 @@ import {
...
@@ -31,7 +31,7 @@ import {
}
from
'./state/actions'
;
}
from
'./state/actions'
;
// Types
// Types
import
{
RawTimeRange
,
DataQuery
,
ExploreStartPageProps
,
Explore
DataSourceApi
,
DataQueryError
}
from
'@grafana/ui'
;
import
{
RawTimeRange
,
DataQuery
,
ExploreStartPageProps
,
DataSourceApi
,
DataQueryError
}
from
'@grafana/ui'
;
import
{
import
{
ExploreItemState
,
ExploreItemState
,
ExploreUrlState
,
ExploreUrlState
,
...
@@ -62,7 +62,7 @@ interface ExploreProps {
...
@@ -62,7 +62,7 @@ interface ExploreProps {
changeSize
:
typeof
changeSize
;
changeSize
:
typeof
changeSize
;
changeTime
:
typeof
changeTime
;
changeTime
:
typeof
changeTime
;
datasourceError
:
string
;
datasourceError
:
string
;
datasourceInstance
:
Explore
DataSourceApi
;
datasourceInstance
:
DataSourceApi
;
datasourceLoading
:
boolean
|
null
;
datasourceLoading
:
boolean
|
null
;
datasourceMissing
:
boolean
;
datasourceMissing
:
boolean
;
exploreId
:
ExploreId
;
exploreId
:
ExploreId
;
...
...
public/app/features/explore/QueryRow.tsx
View file @
1e76f1a7
...
@@ -16,7 +16,7 @@ import { StoreState } from 'app/types';
...
@@ -16,7 +16,7 @@ import { StoreState } from 'app/types';
import
{
import
{
TimeRange
,
TimeRange
,
DataQuery
,
DataQuery
,
Explore
DataSourceApi
,
DataSourceApi
,
QueryFixAction
,
QueryFixAction
,
DataSourceStatus
,
DataSourceStatus
,
PanelData
,
PanelData
,
...
@@ -38,7 +38,7 @@ interface QueryRowProps extends PropsFromParent {
...
@@ -38,7 +38,7 @@ interface QueryRowProps extends PropsFromParent {
changeQuery
:
typeof
changeQuery
;
changeQuery
:
typeof
changeQuery
;
className
?:
string
;
className
?:
string
;
exploreId
:
ExploreId
;
exploreId
:
ExploreId
;
datasourceInstance
:
Explore
DataSourceApi
;
datasourceInstance
:
DataSourceApi
;
datasourceStatus
:
DataSourceStatus
;
datasourceStatus
:
DataSourceStatus
;
highlightLogsExpressionAction
:
typeof
highlightLogsExpressionAction
;
highlightLogsExpressionAction
:
typeof
highlightLogsExpressionAction
;
history
:
HistoryItem
[];
history
:
HistoryItem
[];
...
...
public/app/plugins/datasource/loki/components/LokiQueryFieldForm.tsx
View file @
1e76f1a7
...
@@ -16,7 +16,7 @@ import BracesPlugin from 'app/features/explore/slate-plugins/braces';
...
@@ -16,7 +16,7 @@ import BracesPlugin from 'app/features/explore/slate-plugins/braces';
// Types
// Types
import
{
LokiQuery
}
from
'../types'
;
import
{
LokiQuery
}
from
'../types'
;
import
{
TypeaheadOutput
,
HistoryItem
}
from
'app/types/explore'
;
import
{
TypeaheadOutput
,
HistoryItem
}
from
'app/types/explore'
;
import
{
Explore
DataSourceApi
,
ExploreQueryFieldProps
,
DataSourceStatus
}
from
'@grafana/ui'
;
import
{
DataSourceApi
,
ExploreQueryFieldProps
,
DataSourceStatus
}
from
'@grafana/ui'
;
function
getChooserText
(
hasSyntax
:
boolean
,
hasLogLabels
:
boolean
,
datasourceStatus
:
DataSourceStatus
)
{
function
getChooserText
(
hasSyntax
:
boolean
,
hasLogLabels
:
boolean
,
datasourceStatus
:
DataSourceStatus
)
{
if
(
datasourceStatus
===
DataSourceStatus
.
Disconnected
)
{
if
(
datasourceStatus
===
DataSourceStatus
.
Disconnected
)
{
...
@@ -65,7 +65,7 @@ export interface CascaderOption {
...
@@ -65,7 +65,7 @@ export interface CascaderOption {
disabled
?:
boolean
;
disabled
?:
boolean
;
}
}
export
interface
LokiQueryFieldFormProps
extends
ExploreQueryFieldProps
<
Explore
DataSourceApi
<
LokiQuery
>
,
LokiQuery
>
{
export
interface
LokiQueryFieldFormProps
extends
ExploreQueryFieldProps
<
DataSourceApi
<
LokiQuery
>
,
LokiQuery
>
{
history
:
HistoryItem
[];
history
:
HistoryItem
[];
syntax
:
any
;
syntax
:
any
;
logLabelOptions
:
any
[];
logLabelOptions
:
any
[];
...
...
public/app/plugins/datasource/prometheus/components/PromQueryField.tsx
View file @
1e76f1a7
...
@@ -15,7 +15,7 @@ import BracesPlugin from 'app/features/explore/slate-plugins/braces';
...
@@ -15,7 +15,7 @@ import BracesPlugin from 'app/features/explore/slate-plugins/braces';
import
QueryField
,
{
TypeaheadInput
,
QueryFieldState
}
from
'app/features/explore/QueryField'
;
import
QueryField
,
{
TypeaheadInput
,
QueryFieldState
}
from
'app/features/explore/QueryField'
;
import
{
PromQuery
}
from
'../types'
;
import
{
PromQuery
}
from
'../types'
;
import
{
CancelablePromise
,
makePromiseCancelable
}
from
'app/core/utils/CancelablePromise'
;
import
{
CancelablePromise
,
makePromiseCancelable
}
from
'app/core/utils/CancelablePromise'
;
import
{
Explore
DataSourceApi
,
ExploreQueryFieldProps
,
DataSourceStatus
,
QueryHint
}
from
'@grafana/ui'
;
import
{
DataSourceApi
,
ExploreQueryFieldProps
,
DataSourceStatus
,
QueryHint
}
from
'@grafana/ui'
;
const
HISTOGRAM_GROUP
=
'__histograms__'
;
const
HISTOGRAM_GROUP
=
'__histograms__'
;
const
METRIC_MARK
=
'metric'
;
const
METRIC_MARK
=
'metric'
;
...
@@ -101,7 +101,7 @@ interface CascaderOption {
...
@@ -101,7 +101,7 @@ interface CascaderOption {
disabled
?:
boolean
;
disabled
?:
boolean
;
}
}
interface
PromQueryFieldProps
extends
ExploreQueryFieldProps
<
Explore
DataSourceApi
<
PromQuery
>
,
PromQuery
>
{
interface
PromQueryFieldProps
extends
ExploreQueryFieldProps
<
DataSourceApi
<
PromQuery
>
,
PromQuery
>
{
history
:
HistoryItem
[];
history
:
HistoryItem
[];
}
}
...
...
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