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
e38a04ba
Commit
e38a04ba
authored
Dec 17, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes issues with user and team picker
parent
3efaf520
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
public/app/core/components/Select/TeamPicker.tsx
+5
-0
public/app/core/components/Select/UserPicker.tsx
+5
-0
No files found.
public/app/core/components/Select/TeamPicker.tsx
View file @
e38a04ba
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
_
from
'lodash'
;
import
{
AsyncSelect
}
from
'./Select'
;
import
{
AsyncSelect
}
from
'./Select'
;
import
{
debounce
}
from
'lodash'
;
import
{
debounce
}
from
'lodash'
;
import
{
getBackendSrv
}
from
'app/core/services/backend_srv'
;
import
{
getBackendSrv
}
from
'app/core/services/backend_srv'
;
...
@@ -37,6 +38,10 @@ export class TeamPicker extends Component<Props, State> {
...
@@ -37,6 +38,10 @@ export class TeamPicker extends Component<Props, State> {
const
backendSrv
=
getBackendSrv
();
const
backendSrv
=
getBackendSrv
();
this
.
setState
({
isLoading
:
true
});
this
.
setState
({
isLoading
:
true
});
if
(
_
.
isNil
(
query
))
{
query
=
''
;
}
return
backendSrv
.
get
(
`/api/teams/search?perpage=10&page=1&query=
${
query
}
`
).
then
(
result
=>
{
return
backendSrv
.
get
(
`/api/teams/search?perpage=10&page=1&query=
${
query
}
`
).
then
(
result
=>
{
const
teams
=
result
.
teams
.
map
(
team
=>
{
const
teams
=
result
.
teams
.
map
(
team
=>
{
return
{
return
{
...
...
public/app/core/components/Select/UserPicker.tsx
View file @
e38a04ba
// Libraries
// Libraries
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
_
from
'lodash'
;
// Components
// Components
import
{
AsyncSelect
}
from
'./Select'
;
import
{
AsyncSelect
}
from
'./Select'
;
...
@@ -38,6 +39,10 @@ export class UserPicker extends Component<Props, State> {
...
@@ -38,6 +39,10 @@ export class UserPicker extends Component<Props, State> {
const
backendSrv
=
getBackendSrv
();
const
backendSrv
=
getBackendSrv
();
this
.
setState
({
isLoading
:
true
});
this
.
setState
({
isLoading
:
true
});
if
(
_
.
isNil
(
query
))
{
query
=
''
;
}
return
backendSrv
return
backendSrv
.
get
(
`/api/org/users?query=
${
query
}
&limit=10`
)
.
get
(
`/api/org/users?query=
${
query
}
&limit=10`
)
.
then
(
result
=>
{
.
then
(
result
=>
{
...
...
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