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
10daf1d6
Commit
10daf1d6
authored
Jun 17, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Enable the "limit" param in /api/search"
This reverts commit
3d776851
.
parent
23aa614b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
9 deletions
+1
-9
pkg/services/search/handlers.go
+0
-1
pkg/services/search/models.go
+0
-1
pkg/services/sqlstore/dashboard.go
+1
-7
No files found.
pkg/services/search/handlers.go
View file @
10daf1d6
...
@@ -44,7 +44,6 @@ func searchHandler(query *Query) error {
...
@@ -44,7 +44,6 @@ func searchHandler(query *Query) error {
IsStarred
:
query
.
IsStarred
,
IsStarred
:
query
.
IsStarred
,
OrgId
:
query
.
OrgId
,
OrgId
:
query
.
OrgId
,
DashboardIds
:
query
.
DashboardIds
,
DashboardIds
:
query
.
DashboardIds
,
Limit
:
query
.
Limit
,
}
}
if
err
:=
bus
.
Dispatch
(
&
dashQuery
);
err
!=
nil
{
if
err
:=
bus
.
Dispatch
(
&
dashQuery
);
err
!=
nil
{
...
...
pkg/services/search/models.go
View file @
10daf1d6
...
@@ -42,7 +42,6 @@ type FindPersistedDashboardsQuery struct {
...
@@ -42,7 +42,6 @@ type FindPersistedDashboardsQuery struct {
UserId
int64
UserId
int64
IsStarred
bool
IsStarred
bool
DashboardIds
[]
int
DashboardIds
[]
int
Limit
int
Result
HitList
Result
HitList
}
}
pkg/services/sqlstore/dashboard.go
View file @
10daf1d6
...
@@ -123,11 +123,6 @@ type DashboardSearchProjection struct {
...
@@ -123,11 +123,6 @@ type DashboardSearchProjection struct {
}
}
func
SearchDashboards
(
query
*
search
.
FindPersistedDashboardsQuery
)
error
{
func
SearchDashboards
(
query
*
search
.
FindPersistedDashboardsQuery
)
error
{
limit
:=
query
.
Limit
if
limit
==
0
{
limit
=
1000
}
var
sql
bytes
.
Buffer
var
sql
bytes
.
Buffer
params
:=
make
([]
interface
{},
0
)
params
:=
make
([]
interface
{},
0
)
...
@@ -170,8 +165,7 @@ func SearchDashboards(query *search.FindPersistedDashboardsQuery) error {
...
@@ -170,8 +165,7 @@ func SearchDashboards(query *search.FindPersistedDashboardsQuery) error {
params
=
append
(
params
,
"%"
+
query
.
Title
+
"%"
)
params
=
append
(
params
,
"%"
+
query
.
Title
+
"%"
)
}
}
sql
.
WriteString
(
fmt
.
Sprintf
(
" ORDER BY dashboard.title ASC LIMIT ?"
))
sql
.
WriteString
(
fmt
.
Sprintf
(
" ORDER BY dashboard.title ASC LIMIT 1000"
))
params
=
append
(
params
,
limit
)
var
res
[]
DashboardSearchProjection
var
res
[]
DashboardSearchProjection
...
...
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