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
dc236b50
Commit
dc236b50
authored
Sep 05, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refatoring: minor changes to PR #13149
parent
777010b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
public/app/core/components/search/search.ts
+2
-3
public/app/features/dashboard/dashboard_import_ctrl.ts
+3
-1
public/app/features/dashboard/upload.ts
+6
-4
public/sass/components/_search.scss
+4
-0
No files found.
public/app/core/components/search/search.ts
View file @
dc236b50
...
...
@@ -130,9 +130,8 @@ export class SearchCtrl {
}
const
max
=
flattenedResult
.
length
;
let
newIndex
=
this
.
selectedIndex
+
direction
;
const
something
=
(
newIndex
%=
max
);
this
.
selectedIndex
=
something
<
0
?
newIndex
+
max
:
newIndex
;
const
newIndex
=
(
this
.
selectedIndex
+
direction
)
%
max
;
this
.
selectedIndex
=
newIndex
<
0
?
newIndex
+
max
:
newIndex
;
const
selectedItem
=
flattenedResult
[
this
.
selectedIndex
];
if
(
selectedItem
.
dashboardIndex
===
undefined
&&
this
.
results
[
selectedItem
.
folderIndex
].
id
===
0
)
{
...
...
public/app/features/dashboard/dashboard_import_ctrl.ts
View file @
dc236b50
import
_
from
'lodash'
;
import
config
from
'app/core/config'
;
import
locationUtil
from
'app/core/utils/location_util'
;
export
class
DashboardImportCtrl
{
navModel
:
any
;
...
...
@@ -179,7 +180,8 @@ export class DashboardImportCtrl {
folderId
:
this
.
folderId
,
})
.
then
(
res
=>
{
this
.
$location
.
url
(
res
.
importedUrl
);
const
dashUrl
=
locationUtil
.
stripBaseFromUrl
(
res
.
importedUrl
);
this
.
$location
.
url
(
dashUrl
);
});
}
...
...
public/app/features/dashboard/upload.ts
View file @
dc236b50
...
...
@@ -37,12 +37,14 @@ function uploadDashboardDirective(timer, alertSrv, $location) {
};
let
i
=
0
;
let
f
=
files
[
i
];
for
(
i
;
f
;
i
++
)
{
let
file
=
files
[
i
];
while
(
file
)
{
const
reader
=
new
FileReader
();
reader
.
onload
=
readerOnload
();
reader
.
readAsText
(
f
);
f
=
files
[
i
];
reader
.
readAsText
(
file
);
i
+=
1
;
file
=
files
[
i
];
}
}
...
...
public/sass/components/_search.scss
View file @
dc236b50
...
...
@@ -192,6 +192,10 @@
&
:hover
,
&
.selected
{
background
:
$list-item-hover-bg
;
.search-item__body-title
{
color
:
$text-color-strong
;
}
}
}
...
...
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