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
4fc9d794
Commit
4fc9d794
authored
Jan 17, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved plugin types to @grafana/ui
parent
a201c76c
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
73 additions
and
58 deletions
+73
-58
packages/grafana-ui/src/types/plugin.ts
+51
-0
public/app/features/datasources/state/navModel.ts
+2
-1
public/app/features/plugins/state/navModel.ts
+2
-1
public/app/plugins/datasource/loki/datasource.ts
+2
-1
public/app/plugins/datasource/testdata/QueryEditor.tsx
+12
-0
public/app/types/datasources.ts
+2
-2
public/app/types/plugins.ts
+1
-51
public/app/types/series.ts
+1
-2
No files found.
packages/grafana-ui/src/types/plugin.ts
View file @
4fc9d794
...
...
@@ -18,3 +18,54 @@ export interface PluginExports {
PanelDefaults
?:
any
;
}
export
interface
PluginMeta
{
id
:
string
;
name
:
string
;
info
:
PluginMetaInfo
;
includes
:
PluginInclude
[];
// Datasource-specific
metrics
?:
boolean
;
tables
?:
boolean
;
logs
?:
boolean
;
explore
?:
boolean
;
annotations
?:
boolean
;
mixed
?:
boolean
;
hasQueryHelp
?:
boolean
;
queryOptions
?:
PluginMetaQueryOptions
;
}
interface
PluginMetaQueryOptions
{
cacheTimeout
?:
boolean
;
maxDataPoints
?:
boolean
;
minInterval
?:
boolean
;
}
export
interface
PluginInclude
{
type
:
string
;
name
:
string
;
path
:
string
;
}
interface
PluginMetaInfoLink
{
name
:
string
;
url
:
string
;
}
export
interface
PluginMetaInfo
{
author
:
{
name
:
string
;
url
?:
string
;
};
description
:
string
;
links
:
PluginMetaInfoLink
[];
logos
:
{
large
:
string
;
small
:
string
;
};
screenshots
:
any
[];
updated
:
string
;
version
:
string
;
}
public/app/features/datasources/state/navModel.ts
View file @
4fc9d794
import
{
DataSource
,
NavModel
,
NavModelItem
,
PluginMeta
}
from
'app/types'
;
import
{
DataSource
,
NavModel
,
NavModelItem
}
from
'app/types'
;
import
{
PluginMeta
}
from
'@grafana/ui/src/types'
;
import
config
from
'app/core/config'
;
export
function
buildNavModel
(
dataSource
:
DataSource
,
pluginMeta
:
PluginMeta
):
NavModelItem
{
...
...
public/app/features/plugins/state/navModel.ts
View file @
4fc9d794
import
_
from
'lodash'
;
import
{
DataSource
,
PluginMeta
,
NavModel
}
from
'app/types'
;
import
{
DataSource
,
NavModel
}
from
'app/types'
;
import
{
PluginMeta
}
from
'@grafana/ui/src/types'
;
import
config
from
'app/core/config'
;
export
function
buildNavModel
(
ds
:
DataSource
,
plugin
:
PluginMeta
,
currentPage
:
string
):
NavModel
{
...
...
public/app/plugins/datasource/loki/datasource.ts
View file @
4fc9d794
...
...
@@ -2,7 +2,8 @@ import _ from 'lodash';
import
*
as
dateMath
from
'app/core/utils/datemath'
;
import
{
LogsStream
,
LogsModel
,
makeSeriesForLogs
}
from
'app/core/logs_model'
;
import
{
PluginMeta
,
DataQuery
}
from
'app/types'
;
import
{
DataQuery
}
from
'app/types'
;
import
{
PluginMeta
}
from
'@grafana/ui/src/types'
;
import
{
addLabelToSelector
}
from
'app/plugins/datasource/prometheus/add_label_to_query'
;
import
LanguageProvider
from
'./language_provider'
;
...
...
public/app/plugins/datasource/testdata/QueryEditor.tsx
0 → 100644
View file @
4fc9d794
import
React
,
{
PureComponent
}
from
'react'
;
interface
Props
{
}
export
class
QueryEditor
extends
PureComponent
<
Props
>
{
render
()
{
return
(
<
h2
>
Test data
</
h2
>
);
}
}
public/app/types/datasources.ts
View file @
4fc9d794
import
{
LayoutMode
}
from
'../core/components/LayoutSelector/LayoutSelector'
;
import
{
Plugin
,
PluginMeta
}
from
'./plugins'
;
import
{
PluginExports
}
from
'@grafana/ui
'
;
import
{
Plugin
}
from
'./plugins'
;
import
{
PluginExports
,
PluginMeta
}
from
'@grafana/ui/src/types
'
;
export
interface
DataSource
{
id
:
number
;
...
...
public/app/types/plugins.ts
View file @
4fc9d794
import
{
PluginExports
}
from
'@grafana/ui/src/types'
;
import
{
PluginExports
,
PluginMetaInfo
}
from
'@grafana/ui/src/types'
;
export
interface
PanelPlugin
{
id
:
string
;
...
...
@@ -11,56 +11,6 @@ export interface PanelPlugin {
exports
?:
PluginExports
;
}
interface
PluginMetaQueryOptions
{
cacheTimeout
?:
boolean
;
maxDataPoints
?:
boolean
;
minInterval
?:
boolean
;
}
export
interface
PluginMeta
{
id
:
string
;
name
:
string
;
info
:
PluginMetaInfo
;
includes
:
PluginInclude
[];
// Datasource-specific
metrics
?:
boolean
;
tables
?:
boolean
;
logs
?:
boolean
;
explore
?:
boolean
;
annotations
?:
boolean
;
mixed
?:
boolean
;
hasQueryHelp
?:
boolean
;
queryOptions
?:
PluginMetaQueryOptions
;
}
export
interface
PluginInclude
{
type
:
string
;
name
:
string
;
path
:
string
;
}
interface
PluginMetaInfoLink
{
name
:
string
;
url
:
string
;
}
export
interface
PluginMetaInfo
{
author
:
{
name
:
string
;
url
?:
string
;
};
description
:
string
;
links
:
PluginMetaInfoLink
[];
logos
:
{
large
:
string
;
small
:
string
;
};
screenshots
:
any
[];
updated
:
string
;
version
:
string
;
}
export
interface
Plugin
{
defaultNavUrl
:
string
;
enabled
:
boolean
;
...
...
public/app/types/series.ts
View file @
4fc9d794
import
{
PluginMeta
}
from
'./plugins'
;
import
{
TimeSeries
,
TimeRange
,
RawTimeRange
,
PluginExports
}
from
'@grafana/ui'
;
import
{
TimeSeries
,
TimeRange
,
RawTimeRange
,
PluginExports
,
PluginMeta
}
from
'@grafana/ui/src/types'
;
export
interface
DataQueryResponse
{
data
:
TimeSeries
[];
...
...
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