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
fede5e6c
Commit
fede5e6c
authored
Sep 27, 2018
by
Peter Holmberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename to pluginlistitem
parent
cabc4c4b
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
19 deletions
+23
-19
public/app/features/plugins/PluginList.tsx
+2
-2
public/app/features/plugins/PluginListItem.tsx
+2
-2
public/app/features/plugins/PluginListPage.test.tsx
+2
-2
public/app/features/plugins/PluginListPage.tsx
+2
-2
public/app/features/plugins/__mocks__/pluginMocks.ts
+2
-2
public/app/features/plugins/state/actions.ts
+3
-3
public/app/features/plugins/state/reducers.ts
+6
-2
public/app/types/index.ts
+2
-2
public/app/types/plugins.ts
+2
-2
No files found.
public/app/features/plugins/PluginList.tsx
View file @
fede5e6c
import
React
,
{
SFC
}
from
'react'
;
import
classNames
from
'classnames/bind'
;
import
PluginListItem
from
'./PluginListItem'
;
import
{
Plugin
}
from
'app/types'
;
import
{
Plugin
ListItem
}
from
'app/types'
;
import
{
LayoutMode
,
LayoutModes
}
from
'../../core/components/LayoutSelector/LayoutSelector'
;
interface
Props
{
plugins
:
Plugin
[];
plugins
:
Plugin
ListItem
[];
layoutMode
:
LayoutMode
;
}
...
...
public/app/features/plugins/PluginListItem.tsx
View file @
fede5e6c
import
React
,
{
SFC
}
from
'react'
;
import
{
Plugin
}
from
'app/types'
;
import
{
Plugin
ListItem
}
from
'app/types'
;
interface
Props
{
plugin
:
Plugin
;
plugin
:
Plugin
ListItem
;
}
const
PluginListItem
:
SFC
<
Props
>
=
props
=>
{
...
...
public/app/features/plugins/PluginListPage.test.tsx
View file @
fede5e6c
import
React
from
'react'
;
import
{
shallow
}
from
'enzyme'
;
import
{
PluginListPage
,
Props
}
from
'./PluginListPage'
;
import
{
NavModel
,
Plugin
}
from
'../../types'
;
import
{
NavModel
,
Plugin
ListItem
}
from
'../../types'
;
import
{
LayoutModes
}
from
'../../core/components/LayoutSelector/LayoutSelector'
;
const
setup
=
(
propOverrides
?:
object
)
=>
{
const
props
:
Props
=
{
navModel
:
{}
as
NavModel
,
plugins
:
[]
as
Plugin
[],
plugins
:
[]
as
Plugin
ListItem
[],
layoutMode
:
LayoutModes
.
Grid
,
loadPlugins
:
jest
.
fn
(),
};
...
...
public/app/features/plugins/PluginListPage.tsx
View file @
fede5e6c
...
...
@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
import
PageHeader
from
'../../core/components/PageHeader/PageHeader'
;
import
PluginActionBar
from
'./PluginActionBar'
;
import
PluginList
from
'./PluginList'
;
import
{
NavModel
,
Plugin
}
from
'../../types'
;
import
{
NavModel
,
Plugin
ListItem
}
from
'../../types'
;
import
{
loadPlugins
}
from
'./state/actions'
;
import
{
getNavModel
}
from
'../../core/selectors/navModel'
;
import
{
getLayoutMode
,
getPlugins
}
from
'./state/selectors'
;
...
...
@@ -12,7 +12,7 @@ import { LayoutMode } from '../../core/components/LayoutSelector/LayoutSelector'
export
interface
Props
{
navModel
:
NavModel
;
plugins
:
Plugin
[];
plugins
:
Plugin
ListItem
[];
layoutMode
:
LayoutMode
;
loadPlugins
:
typeof
loadPlugins
;
}
...
...
public/app/features/plugins/__mocks__/pluginMocks.ts
View file @
fede5e6c
import
{
Plugin
}
from
'app/types'
;
import
{
Plugin
ListItem
}
from
'app/types'
;
export
const
getMockPlugins
=
(
amount
:
number
):
Plugin
[]
=>
{
export
const
getMockPlugins
=
(
amount
:
number
):
Plugin
ListItem
[]
=>
{
const
plugins
=
[];
for
(
let
i
=
0
;
i
<=
amount
;
i
++
)
{
...
...
public/app/features/plugins/state/actions.ts
View file @
fede5e6c
import
{
Plugin
,
StoreState
}
from
'app/types'
;
import
{
Plugin
ListItem
,
StoreState
}
from
'app/types'
;
import
{
ThunkAction
}
from
'redux-thunk'
;
import
{
getBackendSrv
}
from
'../../../core/services/backend_srv'
;
import
{
LayoutMode
}
from
'../../../core/components/LayoutSelector/LayoutSelector'
;
...
...
@@ -11,7 +11,7 @@ export enum ActionTypes {
export
interface
LoadPluginsAction
{
type
:
ActionTypes
.
LoadPlugins
;
payload
:
Plugin
[];
payload
:
Plugin
ListItem
[];
}
export
interface
SetPluginsSearchQueryAction
{
...
...
@@ -34,7 +34,7 @@ export const setPluginsSearchQuery = (query: string): SetPluginsSearchQueryActio
payload
:
query
,
});
const
pluginsLoaded
=
(
plugins
:
Plugin
[]):
LoadPluginsAction
=>
({
const
pluginsLoaded
=
(
plugins
:
Plugin
ListItem
[]):
LoadPluginsAction
=>
({
type
:
ActionTypes
.
LoadPlugins
,
payload
:
plugins
,
});
...
...
public/app/features/plugins/state/reducers.ts
View file @
fede5e6c
import
{
Action
,
ActionTypes
}
from
'./actions'
;
import
{
Plugin
,
PluginsState
}
from
'app/types'
;
import
{
Plugin
ListItem
,
PluginsState
}
from
'app/types'
;
import
{
LayoutModes
}
from
'../../../core/components/LayoutSelector/LayoutSelector'
;
export
const
initialState
:
PluginsState
=
{
plugins
:
[]
as
Plugin
[],
searchQuery
:
''
,
layoutMode
:
LayoutModes
.
Grid
};
export
const
initialState
:
PluginsState
=
{
plugins
:
[]
as
PluginListItem
[],
searchQuery
:
''
,
layoutMode
:
LayoutModes
.
Grid
,
};
export
const
pluginsReducer
=
(
state
=
initialState
,
action
:
Action
):
PluginsState
=>
{
switch
(
action
.
type
)
{
...
...
public/app/types/index.ts
View file @
fede5e6c
...
...
@@ -6,7 +6,7 @@ import { FolderDTO, FolderState, FolderInfo } from './folders';
import
{
DashboardState
}
from
'./dashboard'
;
import
{
DashboardAcl
,
OrgRole
,
PermissionLevel
}
from
'./acl'
;
import
{
DataSource
}
from
'./datasources'
;
import
{
PluginMeta
,
Plugin
,
PluginsState
}
from
'./plugins'
;
import
{
PluginMeta
,
Plugin
ListItem
,
PluginsState
}
from
'./plugins'
;
export
{
Team
,
...
...
@@ -33,7 +33,7 @@ export {
PermissionLevel
,
DataSource
,
PluginMeta
,
Plugin
,
Plugin
ListItem
,
PluginsState
,
};
...
...
public/app/types/plugins.ts
View file @
fede5e6c
...
...
@@ -27,7 +27,7 @@ export interface PluginMetaInfo {
version
:
string
;
}
export
interface
Plugin
{
export
interface
Plugin
ListItem
{
defaultNavUrl
:
string
;
enabled
:
boolean
;
hasUpdate
:
boolean
;
...
...
@@ -41,7 +41,7 @@ export interface Plugin {
}
export
interface
PluginsState
{
plugins
:
Plugin
[];
plugins
:
Plugin
ListItem
[];
searchQuery
:
string
;
layoutMode
:
string
;
}
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