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
f15f4425
Unverified
Commit
f15f4425
authored
Sep 04, 2018
by
Marcus Efraimsson
Committed by
GitHub
Sep 04, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12854 from grafana/12853-empty-team-list
[wip]added empty list cta to team list
parents
eb7172c3
6832b807
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
4 deletions
+38
-4
public/app/containers/Teams/TeamList.tsx
+38
-4
No files found.
public/app/containers/Teams/TeamList.tsx
View file @
f15f4425
...
...
@@ -6,6 +6,7 @@ import { NavStore } from 'app/stores/NavStore/NavStore';
import
{
TeamsStore
,
Team
}
from
'app/stores/TeamsStore/TeamsStore'
;
import
{
BackendSrv
}
from
'app/core/services/backend_srv'
;
import
DeleteButton
from
'app/core/components/DeleteButton/DeleteButton'
;
import
EmptyListCTA
from
'app/core/components/EmptyListCTA/EmptyListCTA'
;
interface
Props
{
nav
:
typeof
NavStore
.
Type
;
...
...
@@ -61,11 +62,8 @@ export class TeamList extends React.Component<Props, any> {
);
}
render
()
{
const
{
nav
,
teams
}
=
this
.
props
;
renderTeamList
(
teams
)
{
return
(
<
div
>
<
PageHeader
model=
{
nav
as
any
}
/>
<
div
className=
"page-container page-body"
>
<
div
className=
"page-action-bar"
>
<
div
className=
"gf-form gf-form--grow"
>
...
...
@@ -103,6 +101,42 @@ export class TeamList extends React.Component<Props, any> {
</
table
>
</
div
>
</
div
>
);
}
renderEmptyList
()
{
return
(
<
div
className=
"page-container page-body"
>
<
EmptyListCTA
model=
{
{
title
:
"You haven't created any teams yet."
,
buttonIcon
:
'fa fa-plus'
,
buttonLink
:
'org/teams/new'
,
buttonTitle
:
' New team'
,
proTip
:
'Assign folder and dashboard permissions to teams instead of users to ease administration.'
,
proTipLink
:
''
,
proTipLinkTitle
:
''
,
proTipTarget
:
'_blank'
,
}
}
/>
</
div
>
);
}
render
()
{
const
{
nav
,
teams
}
=
this
.
props
;
let
view
;
if
(
teams
.
filteredTeams
.
length
>
0
)
{
view
=
this
.
renderTeamList
(
teams
);
}
else
{
view
=
this
.
renderEmptyList
();
}
return
(
<
div
>
<
PageHeader
model=
{
nav
as
any
}
/>
{
view
}
</
div
>
);
}
...
...
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