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
a9bf8f80
Unverified
Commit
a9bf8f80
authored
Dec 05, 2019
by
Torkel Ödegaard
Committed by
GitHub
Dec 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Search: Fixed angular digest issues (#20906)
parent
9d9f0e1b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
public/app/core/components/manage_dashboards/manage_dashboards.ts
+4
-2
public/app/core/components/search/search.ts
+2
-1
public/app/core/specs/manage_dashboards.test.ts
+1
-2
No files found.
public/app/core/components/manage_dashboards/manage_dashboards.ts
View file @
a9bf8f80
import
{
IScope
}
from
'angular'
;
import
_
from
'lodash'
;
import
coreModule
from
'app/core/core_module'
;
import
appEvents
from
'app/core/app_events'
;
import
{
SearchSrv
}
from
'app/core/services/search_srv'
;
import
{
BackendSrv
}
from
'app/core/services/backend_srv'
;
import
{
NavModelSrv
}
from
'app/core/nav_model_srv'
;
import
{
ContextSrv
}
from
'app/core/services/context_srv'
;
import
{
CoreEvents
}
from
'app/types'
;
...
...
@@ -70,8 +70,8 @@ export class ManageDashboardsCtrl {
/** @ngInject */
constructor
(
private
$scope
:
IScope
,
private
backendSrv
:
BackendSrv
,
navModelSrv
:
NavModelSrv
,
private
searchSrv
:
SearchSrv
,
private
contextSrv
:
ContextSrv
)
{
...
...
@@ -107,6 +107,7 @@ export class ManageDashboardsCtrl {
})
.
then
(()
=>
{
if
(
!
this
.
folderUid
)
{
this
.
$scope
.
$digest
();
return
;
}
...
...
@@ -115,6 +116,7 @@ export class ManageDashboardsCtrl {
if
(
!
this
.
canSave
)
{
this
.
hasEditPermissionInFolders
=
false
;
}
this
.
$scope
.
$digest
();
});
});
}
...
...
public/app/core/components/search/search.ts
View file @
a9bf8f80
...
...
@@ -60,7 +60,7 @@ export class SearchCtrl {
queryParser
:
SearchQueryParser
;
/** @ngInject */
constructor
(
$scope
:
any
,
private
$location
:
any
,
private
$timeout
:
any
,
private
searchSrv
:
SearchSrv
)
{
constructor
(
private
$scope
:
any
,
private
$location
:
any
,
private
$timeout
:
any
,
private
searchSrv
:
SearchSrv
)
{
appEvents
.
on
(
CoreEvents
.
showDashSearch
,
this
.
openSearch
.
bind
(
this
),
$scope
);
appEvents
.
on
(
CoreEvents
.
hideDashSearch
,
this
.
closeSearch
.
bind
(
this
),
$scope
);
appEvents
.
on
(
CoreEvents
.
searchQuery
,
debounce
(
this
.
search
.
bind
(
this
),
500
),
$scope
);
...
...
@@ -252,6 +252,7 @@ export class SearchCtrl {
this
.
results
=
results
||
[];
this
.
isLoading
=
false
;
this
.
moveSelection
(
1
);
this
.
$scope
.
$digest
();
});
}
...
...
public/app/core/specs/manage_dashboards.test.ts
View file @
a9bf8f80
...
...
@@ -7,7 +7,6 @@ import {
}
from
'app/core/components/manage_dashboards/manage_dashboards'
;
import
{
SearchSrv
}
from
'app/core/services/search_srv'
;
import
{
BackendSrv
}
from
'../services/backend_srv'
;
import
{
NavModelSrv
}
from
'../nav_model_srv'
;
import
{
ContextSrv
}
from
'../services/context_srv'
;
const
mockSection
=
(
overides
?:
object
):
Section
=>
{
...
...
@@ -593,8 +592,8 @@ function createCtrlWithStubs(searchResponse: any, tags?: any) {
};
return
new
ManageDashboardsCtrl
(
{
$digest
:
jest
.
fn
()
}
as
any
,
{}
as
BackendSrv
,
{
getNav
:
()
=>
{}
}
as
NavModelSrv
,
searchSrvStub
as
SearchSrv
,
{
isEditor
:
true
}
as
ContextSrv
);
...
...
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