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
730036e1
Commit
730036e1
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 TeamPages #14762
parent
03cebeca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
public/app/core/components/PageHeader/PageHeader.tsx
+1
-1
public/app/features/teams/TeamPages.tsx
+13
-8
No files found.
public/app/core/components/PageHeader/PageHeader.tsx
View file @
730036e1
...
...
@@ -80,7 +80,7 @@ const Navigation = ({ main }: { main: NavModelItem }) => {
};
export
default
class
PageHeader
extends
React
.
Component
<
Props
,
any
>
{
constructor
(
props
)
{
constructor
(
props
:
Props
)
{
super
(
props
);
}
...
...
public/app/features/teams/TeamPages.tsx
View file @
730036e1
...
...
@@ -3,7 +3,7 @@ import { connect } from 'react-redux';
import
_
from
'lodash'
;
import
{
hot
}
from
'react-hot-loader'
;
import
config
from
'app/core/config'
;
import
Page
Header
from
'app/core/components/PageHeader/PageHeader
'
;
import
Page
from
'app/core/components/Page/Page
'
;
import
TeamMembers
from
'./TeamMembers'
;
import
TeamSettings
from
'./TeamSettings'
;
import
TeamGroupSync
from
'./TeamGroupSync'
;
...
...
@@ -24,6 +24,7 @@ export interface Props {
interface
State
{
isSyncEnabled
:
boolean
;
isLoading
:
boolean
;
}
enum
PageTypes
{
...
...
@@ -33,10 +34,11 @@ enum PageTypes {
}
export
class
TeamPages
extends
PureComponent
<
Props
,
State
>
{
constructor
(
props
)
{
constructor
(
props
:
Props
)
{
super
(
props
);
this
.
state
=
{
isLoading
:
false
,
isSyncEnabled
:
config
.
buildInfo
.
isEnterprise
,
};
}
...
...
@@ -47,8 +49,10 @@ export class TeamPages extends PureComponent<Props, State> {
async
fetchTeam
()
{
const
{
loadTeam
,
teamId
}
=
this
.
props
;
return
await
loadTeam
(
teamId
);
this
.
setState
({
isLoading
:
true
});
const
team
=
await
loadTeam
(
teamId
);
this
.
setState
({
isLoading
:
false
});
return
team
;
}
getCurrentPage
()
{
...
...
@@ -78,10 +82,11 @@ export class TeamPages extends PureComponent<Props, State> {
const
{
team
,
navModel
}
=
this
.
props
;
return
(
<
div
>
<
PageHeader
model=
{
navModel
}
/>
{
team
&&
Object
.
keys
(
team
).
length
!==
0
&&
<
div
className=
"page-container page-body"
>
{
this
.
renderPage
()
}
</
div
>
}
</
div
>
<
Page
navModel=
{
navModel
}
>
<
Page
.
Contents
isLoading=
{
this
.
state
.
isLoading
}
>
{
team
&&
Object
.
keys
(
team
).
length
!==
0
&&
<
div
className=
"page-container page-body"
>
{
this
.
renderPage
()
}
</
div
>
}
</
Page
.
Contents
>
</
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