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
3157fc65
Commit
3157fc65
authored
Sep 04, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed dashboard import view, did not hide search results
parent
dd4f27e3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
45 deletions
+22
-45
src/app/directives/dashEditLink.js
+8
-11
src/app/directives/dashUpload.js
+2
-1
src/app/partials/search.html
+12
-33
No files found.
src/app/directives/dashEditLink.js
View file @
3157fc65
...
...
@@ -42,26 +42,23 @@ function (angular, $) {
}
}
scope
.
onAppEvent
(
'hide-dash-editor'
,
function
()
{
if
(
editorScope
)
{
editorScope
.
dismiss
();
function
hideEditorPane
()
{
if
(
editorScope
)
{
editorScope
.
dismiss
();
}
}
});
scope
.
onAppEvent
(
"dashboard-loaded"
,
hideEditorPane
);
scope
.
onAppEvent
(
'hide-dash-editor'
,
hideEditorPane
);
scope
.
onAppEvent
(
'show-dash-editor'
,
function
(
evt
,
payload
)
{
if
(
lastEditor
===
payload
.
src
)
{
editorScope
.
dismiss
();
return
;
}
hideEditorPane
();
if
(
editorScope
)
{
editorScope
.
dismiss
();
}
if
(
lastEditor
===
payload
.
src
)
{
return
;
}
scope
.
exitFullscreen
();
lastEditor
=
payload
.
src
;
editorScope
=
payload
.
scope
?
payload
.
scope
.
$new
()
:
scope
.
$new
();
editorScope
.
dismiss
=
function
()
{
editorScope
.
$destroy
();
elem
.
empty
();
...
...
src/app/directives/dashUpload.js
View file @
3157fc65
...
...
@@ -15,8 +15,9 @@ function (angular) {
var
readerOnload
=
function
()
{
return
function
(
e
)
{
var
dashboard
=
JSON
.
parse
(
e
.
target
.
result
);
scope
.
$apply
(
function
()
{
scope
.
emitAppEvent
(
'setup-dashboard'
,
dashboard
);
scope
.
$apply
(
);
}
);
};
};
for
(
var
i
=
0
,
f
;
f
=
files
[
i
];
i
++
)
{
...
...
src/app/partials/search.html
View file @
3157fc65
<style>
#grafana-search
{
position
:
fixed
;
right
:
0
;
left
:
0
;
top
:
39px
;
margin-right
:
auto
;
margin-left
:
auto
;
/* give it dimensions */
min-height
:
10em
;
width
:
90%
;
}
</style>
<div
ng-controller=
"SearchCtrl"
ng-init=
"init()"
>
<div
ng-controller=
"SearchCtrl"
ng-init=
"init()"
>
<div
class=
"dashboard-editor-header"
>
<div
class=
"dashboard-editor-title"
style=
"border: 0; line-height: 41px;"
>
<i
class=
"icon icon-search"
></i>
...
...
@@ -33,21 +21,16 @@
New
</button>
<span
style=
"position: relative;"
>
<input
type=
"text"
placeholder=
"search dashboards, metrics, or graphs"
xng-focus=
"giveSearchFocus"
ng-keydown=
"keyDown($event)"
ng-model=
"query.query"
spellcheck=
'false'
ng-change=
"search()"
/>
<a
class=
"search-tagview-switch"
href=
"javascript:void(0);"
ng-class=
"{'active': tagsOnly}"
ng-click=
"showTags($event)"
>
tags
</a>
<input
type=
"text"
placeholder=
"search dashboards, metrics, or graphs"
xng-focus=
"giveSearchFocus"
ng-keydown=
"keyDown($event)"
ng-model=
"query.query"
spellcheck=
'false'
ng-change=
"search()"
/>
<a
class=
"search-tagview-switch"
href=
"javascript:void(0);"
ng-class=
"{'active': tagsOnly}"
ng-click=
"showTags($event)"
>
tags
</a>
</span>
</div>
</div>
</div>
<div
ng-if=
"!showImport"
>
<h6
ng-hide=
"results.dashboards.length"
>
No dashboards matching your query were found.
</h6>
<div
class=
"search-results-container"
ng-if=
"tagsOnly"
>
<div
ng-repeat=
"tag in results.tags"
class=
"pointer"
style=
"width: 180px; float: left;"
ng-class=
"{'selected': $index === selectedIndex }"
...
...
@@ -60,8 +43,7 @@
</div>
<div
class=
"search-results-container"
ng-if=
"!tagsOnly"
>
<div
class=
"search-result-item pointer"
bindonce
ng-repeat=
"row in results.dashboards"
<div
class=
"search-result-item pointer"
bindonce
ng-repeat=
"row in results.dashboards"
ng-class=
"{'selected': $index === selectedIndex }"
ng-click=
"goToDashboard(row.id)"
>
<div
class=
"search-result-actions small"
>
...
...
@@ -86,20 +68,17 @@
</div>
</div>
</div>
</li>
<li
ng-if=
"showImport"
style=
"margin: 20px;"
>
<div
class=
"editor-row"
>
<div
class=
"editor-row"
ng-if=
"showImport"
>
<div
class=
"section"
>
<div
class=
"editor-option"
>
<h5>
Local File
<tip>
Load dashboard JSON layout from file
</tip></h5>
<form>
<input
type=
"file"
id=
"dashupload"
dash-upload
/><br>
<input
type=
"file"
id=
"dashupload"
dash-upload
/><br>
</form>
</div>
</div>
</div>
</li>
</div>
</div>
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