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
7ee57b77
Commit
7ee57b77
authored
Nov 23, 2017
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashlist: When searching should reset checked state to false
parent
9ba9043d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
1 deletions
+22
-1
public/app/features/dashboard/dashboard_list_ctrl.ts
+7
-0
public/app/features/dashboard/partials/dashboardList.html
+1
-1
public/app/features/dashboard/specs/dashboard_list_ctrl.jest.ts
+10
-0
public/sass/components/_search.scss
+4
-0
No files found.
public/app/features/dashboard/dashboard_list_ctrl.ts
View file @
7ee57b77
...
...
@@ -39,6 +39,9 @@ export class DashboardListCtrl {
}
initDashboardList
(
result
:
any
)
{
this
.
canMove
=
false
;
this
.
canDelete
=
false
;
if
(
!
result
)
{
this
.
sections
=
[];
return
;
...
...
@@ -159,6 +162,10 @@ export class DashboardListCtrl {
return
this
.
getDashboards
();
}
onQueryChange
()
{
return
this
.
getDashboards
();
}
onTagFilterChange
()
{
this
.
query
.
tag
.
push
(
this
.
selectedTagFilter
.
term
);
this
.
selectedTagFilter
=
this
.
tagFilterOptions
[
0
];
...
...
public/app/features/dashboard/partials/dashboardList.html
View file @
7ee57b77
...
...
@@ -17,7 +17,7 @@
<div
class=
"gf-form width-15"
>
<span
style=
"position: relative;"
>
<input
type=
"text"
class=
"gf-form-input"
placeholder=
"Find Dashboard by name"
tabindex=
"1"
give-focus=
"true"
ng-model=
"ctrl.query.query"
ng-model-options=
"{ debounce: 500 }"
spellcheck=
'false'
ng-change=
"ctrl.
getDashboards
()"
/>
ng-model=
"ctrl.query.query"
ng-model-options=
"{ debounce: 500 }"
spellcheck=
'false'
ng-change=
"ctrl.
onQueryChange
()"
/>
</span>
</div>
</div>
...
...
public/app/features/dashboard/specs/dashboard_list_ctrl.jest.ts
View file @
7ee57b77
...
...
@@ -110,6 +110,8 @@ describe('DashboardListCtrl', () => {
describe
(
'with no filter'
,
()
=>
{
beforeEach
(()
=>
{
ctrl
.
query
.
query
=
'd'
;
ctrl
.
canMove
=
true
;
ctrl
.
canDelete
=
true
;
return
ctrl
.
getDashboards
();
});
...
...
@@ -120,6 +122,14 @@ describe('DashboardListCtrl', () => {
expect
(
ctrl
.
sections
[
1
].
checked
).
toEqual
(
false
);
expect
(
ctrl
.
sections
[
1
].
items
[
0
].
checked
).
toEqual
(
false
);
});
it
(
'should disable Move To button'
,
()
=>
{
expect
(
ctrl
.
canMove
).
toBeFalsy
();
});
it
(
'should disable delete button'
,
()
=>
{
expect
(
ctrl
.
canDelete
).
toBeFalsy
();
});
});
describe
(
'with tag filter'
,
()
=>
{
...
...
public/sass/components/_search.scss
View file @
7ee57b77
...
...
@@ -126,6 +126,10 @@
.search-item__with-checkbox
{
display
:
flex
;
.search-item
{
margin
:
1px
3px
;
}
}
.search-item
{
...
...
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