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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
37 deletions
+71
-37
public/app/containers/Teams/TeamList.tsx
+71
-37
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,48 +62,81 @@ export class TeamList extends React.Component<Props, any> {
);
}
renderTeamList
(
teams
)
{
return
(
<
div
className=
"page-container page-body"
>
<
div
className=
"page-action-bar"
>
<
div
className=
"gf-form gf-form--grow"
>
<
label
className=
"gf-form--has-input-icon gf-form--grow"
>
<
input
type=
"text"
className=
"gf-form-input"
placeholder=
"Search teams"
value=
{
teams
.
search
}
onChange=
{
this
.
onSearchQueryChange
}
/>
<
i
className=
"gf-form-input-icon fa fa-search"
/>
</
label
>
</
div
>
<
div
className=
"page-action-bar__spacer"
/>
<
a
className=
"btn btn-success"
href=
"org/teams/new"
>
<
i
className=
"fa fa-plus"
/>
New team
</
a
>
</
div
>
<
div
className=
"admin-list-table"
>
<
table
className=
"filter-table filter-table--hover form-inline"
>
<
thead
>
<
tr
>
<
th
/>
<
th
>
Name
</
th
>
<
th
>
Email
</
th
>
<
th
>
Members
</
th
>
<
th
style=
{
{
width
:
'1%'
}
}
/>
</
tr
>
</
thead
>
<
tbody
>
{
teams
.
filteredTeams
.
map
(
team
=>
this
.
renderTeamMember
(
team
))
}
</
tbody
>
</
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
}
/>
<
div
className=
"page-container page-body"
>
<
div
className=
"page-action-bar"
>
<
div
className=
"gf-form gf-form--grow"
>
<
label
className=
"gf-form--has-input-icon gf-form--grow"
>
<
input
type=
"text"
className=
"gf-form-input"
placeholder=
"Search teams"
value=
{
teams
.
search
}
onChange=
{
this
.
onSearchQueryChange
}
/>
<
i
className=
"gf-form-input-icon fa fa-search"
/>
</
label
>
</
div
>
<
div
className=
"page-action-bar__spacer"
/>
<
a
className=
"btn btn-success"
href=
"org/teams/new"
>
<
i
className=
"fa fa-plus"
/>
New team
</
a
>
</
div
>
<
div
className=
"admin-list-table"
>
<
table
className=
"filter-table filter-table--hover form-inline"
>
<
thead
>
<
tr
>
<
th
/>
<
th
>
Name
</
th
>
<
th
>
Email
</
th
>
<
th
>
Members
</
th
>
<
th
style=
{
{
width
:
'1%'
}
}
/>
</
tr
>
</
thead
>
<
tbody
>
{
teams
.
filteredTeams
.
map
(
team
=>
this
.
renderTeamMember
(
team
))
}
</
tbody
>
</
table
>
</
div
>
</
div
>
{
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