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
186ed1a3
Commit
186ed1a3
authored
Jan 28, 2019
by
Johannes Schill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: Fix typings and add Page-component to FolderPermissions #14762
parent
ab62a09f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
public/app/features/alerting/__snapshots__/AlertRuleList.test.tsx.snap
+6
-2
public/app/features/datasources/settings/DataSourceSettingsPage.tsx
+2
-2
public/app/features/folders/FolderPermissions.tsx
+7
-8
No files found.
public/app/features/alerting/__snapshots__/AlertRuleList.test.tsx.snap
View file @
186ed1a3
...
@@ -4,7 +4,9 @@ exports[`Render should render alert rules 1`] = `
...
@@ -4,7 +4,9 @@ exports[`Render should render alert rules 1`] = `
<Page
<Page
navModel={Object {}}
navModel={Object {}}
>
>
<PageContents>
<PageContents
isLoading={false}
>
<div
<div
className="page-action-bar"
className="page-action-bar"
>
>
...
@@ -156,7 +158,9 @@ exports[`Render should render component 1`] = `
...
@@ -156,7 +158,9 @@ exports[`Render should render component 1`] = `
<Page
<Page
navModel={Object {}}
navModel={Object {}}
>
>
<PageContents>
<PageContents
isLoading={false}
>
<div
<div
className="page-action-bar"
className="page-action-bar"
>
>
...
...
public/app/features/datasources/settings/DataSourceSettingsPage.tsx
View file @
186ed1a3
...
@@ -21,7 +21,7 @@ import { getNavModel } from 'app/core/selectors/navModel';
...
@@ -21,7 +21,7 @@ import { getNavModel } from 'app/core/selectors/navModel';
import
{
getRouteParamsId
}
from
'app/core/selectors/location'
;
import
{
getRouteParamsId
}
from
'app/core/selectors/location'
;
// Types
// Types
import
{
NavModel
,
Plugin
}
from
'app/types/'
;
import
{
NavModel
,
Plugin
,
StoreState
}
from
'app/types/'
;
import
{
DataSourceSettings
}
from
'@grafana/ui/src/types/'
;
import
{
DataSourceSettings
}
from
'@grafana/ui/src/types/'
;
import
{
getDataSourceLoadingNav
}
from
'../state/navModel'
;
import
{
getDataSourceLoadingNav
}
from
'../state/navModel'
;
...
@@ -232,7 +232,7 @@ export class DataSourceSettingsPage extends PureComponent<Props, State> {
...
@@ -232,7 +232,7 @@ export class DataSourceSettingsPage extends PureComponent<Props, State> {
}
}
}
}
function
mapStateToProps
(
state
)
{
function
mapStateToProps
(
state
:
StoreState
)
{
const
pageId
=
getRouteParamsId
(
state
.
location
);
const
pageId
=
getRouteParamsId
(
state
.
location
);
const
dataSource
=
getDataSource
(
state
.
dataSources
,
pageId
);
const
dataSource
=
getDataSource
(
state
.
dataSources
,
pageId
);
...
...
public/app/features/folders/FolderPermissions.tsx
View file @
186ed1a3
import
React
,
{
PureComponent
}
from
'react'
;
import
React
,
{
PureComponent
}
from
'react'
;
import
{
hot
}
from
'react-hot-loader'
;
import
{
hot
}
from
'react-hot-loader'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
Page
Header
from
'app/core/components/PageHeader/PageHeader
'
;
import
Page
from
'app/core/components/Page/Page
'
;
import
{
Tooltip
}
from
'@grafana/ui'
;
import
{
Tooltip
}
from
'@grafana/ui'
;
import
SlideDown
from
'app/core/components/Animations/SlideDown'
;
import
SlideDown
from
'app/core/components/Animations/SlideDown'
;
import
{
getNavModel
}
from
'app/core/selectors/navModel'
;
import
{
getNavModel
}
from
'app/core/selectors/navModel'
;
...
@@ -35,7 +35,7 @@ export interface State {
...
@@ -35,7 +35,7 @@ export interface State {
}
}
export
class
FolderPermissions
extends
PureComponent
<
Props
,
State
>
{
export
class
FolderPermissions
extends
PureComponent
<
Props
,
State
>
{
constructor
(
props
)
{
constructor
(
props
:
Props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
...
@@ -73,15 +73,14 @@ export class FolderPermissions extends PureComponent<Props, State> {
...
@@ -73,15 +73,14 @@ export class FolderPermissions extends PureComponent<Props, State> {
const
{
isAdding
}
=
this
.
state
;
const
{
isAdding
}
=
this
.
state
;
if
(
folder
.
id
===
0
)
{
if
(
folder
.
id
===
0
)
{
return
<
Page
Header
model=
{
navModel
}
/
>;
return
<
Page
navModel=
{
navModel
}
><
Page
.
Contents
isLoading=
{
true
}
><
span
></
span
></
Page
.
Contents
></
Page
>;
}
}
const
folderInfo
=
{
title
:
folder
.
title
,
url
:
folder
.
url
,
id
:
folder
.
id
};
const
folderInfo
=
{
title
:
folder
.
title
,
url
:
folder
.
url
,
id
:
folder
.
id
};
return
(
return
(
<
div
>
<
Page
navModel=
{
navModel
}
>
<
PageHeader
model=
{
navModel
}
/>
<
Page
.
Contents
>
<
div
className=
"page-container page-body"
>
<
div
className=
"page-action-bar"
>
<
div
className=
"page-action-bar"
>
<
h3
className=
"page-sub-heading"
>
Folder Permissions
</
h3
>
<
h3
className=
"page-sub-heading"
>
Folder Permissions
</
h3
>
<
Tooltip
placement=
"auto"
content=
{
<
PermissionsInfo
/>
}
>
<
Tooltip
placement=
"auto"
content=
{
<
PermissionsInfo
/>
}
>
...
@@ -104,8 +103,8 @@ export class FolderPermissions extends PureComponent<Props, State> {
...
@@ -104,8 +103,8 @@ export class FolderPermissions extends PureComponent<Props, State> {
isFetching=
{
false
}
isFetching=
{
false
}
folderInfo=
{
folderInfo
}
folderInfo=
{
folderInfo
}
/>
/>
</
div
>
</
Page
.
Contents
>
</
div
>
</
Page
>
);
);
}
}
}
}
...
...
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