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
0ad4a0fa
Commit
0ad4a0fa
authored
Jun 16, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into dashboard_folders
parents
7a39578f
724368d0
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
75 additions
and
20 deletions
+75
-20
public/app/core/components/form_dropdown/form_dropdown.ts
+2
-0
public/app/core/components/navbar/navbar.html
+3
-3
public/app/core/components/search/search.html
+1
-1
public/app/features/dashboard/dashnav/dashnav.html
+40
-8
public/app/features/dashboard/dashnav/dashnav.ts
+17
-2
public/app/features/dashboard/folder_picker/picker.ts
+2
-2
public/app/features/dashboard/partials/settings.html
+1
-1
public/app/features/dashboard/save_as_modal.ts
+2
-1
public/app/plugins/panel/heatmap/heatmap_data_converter.ts
+7
-2
No files found.
public/app/core/components/form_dropdown/form_dropdown.ts
View file @
0ad4a0fa
...
...
@@ -72,7 +72,9 @@ export class FormDropdownCtrl {
this
.
inputElement
.
keydown
(
evt
=>
{
if
(
evt
.
keyCode
===
13
)
{
setTimeout
(()
=>
{
this
.
inputElement
.
blur
();
},
100
);
}
});
...
...
public/app/core/components/navbar/navbar.html
View file @
0ad4a0fa
...
...
@@ -8,9 +8,9 @@
<i
class=
"fa fa-chevron-left"
></i>
</a>
<
a
class=
"navbar-page-btn navbar-page-btn--search"
ng-click=
"ctrl.showSearch()"
>
<i
class=
"fa fa-search"
></i
>
<
/a
>
<
!-- <a class="navbar-page-btn navbar-page-btn--search" ng-click="ctrl.showSearch()"> --
>
<!-- <i class="fa fa-search"></i> --
>
<
!-- </a> --
>
<div
ng-if=
"::!ctrl.hasMenu"
>
<a
href=
"{{::ctrl.section.url}}"
class=
"navbar-page-btn"
>
...
...
public/app/core/components/search/search.html
View file @
0ad4a0fa
...
...
@@ -96,7 +96,7 @@
<a
class=
"btn btn-inverse"
ng-click=
"ctrl.showNewFolderModal()"
ng-show=
"ctrl.contextSrv.isEditor"
ng-click=
"ctrl.isOpen = false;"
>
<i
class=
"fa fa-plus"
></i>
Create
New Folder
New Folder
</a>
<a
class=
"btn btn-inverse"
href=
"dashboard/new/?editview=import"
ng-show=
"ctrl.contextSrv.isEditor"
ng-click=
"ctrl.isOpen = false;"
>
...
...
public/app/features/dashboard/dashnav/dashnav.html
View file @
0ad4a0fa
<navbar
model=
"ctrl.navModel"
>
<div
class=
"navbar"
>
<div
class=
"navbar-inner"
>
<a
class=
"navbar-brand-btn pointer"
ng-click=
"ctrl.toggleSideMenu()"
>
<span
class=
"navbar-brand-btn-background"
>
<img
src=
"public/img/grafana_icon.svg"
></img>
</span>
<i
class=
"icon-gf icon-gf-grafana_wordmark"
></i>
<i
class=
"fa fa-caret-down"
></i>
<i
class=
"fa fa-chevron-left"
></i>
</a>
<div
class=
"navbar-section-wrapper"
>
<a
class=
"navbar-page-btn"
ng-click=
"ctrl.showSearch()"
>
<i
class=
"icon-gf icon-gf-dashboard"
></i>
{{ctrl.dashboard.title}}
<i
class=
"fa fa-caret-down"
></i>
</a>
</div>
<ul
class=
"nav dash-playlist-actions"
ng-if=
"ctrl.playlistSrv.isPlaying"
>
<ul
class=
"nav dash-playlist-actions"
ng-if=
"ctrl.playlistSrv.isPlaying"
>
<li>
<a
ng-click=
"ctrl.playlistSrv.prev()"
><i
class=
"fa fa-step-backward"
></i></a>
</li>
...
...
@@ -10,9 +27,9 @@
<li>
<a
ng-click=
"ctrl.playlistSrv.next()"
><i
class=
"fa fa-step-forward"
></i></a>
</li>
</ul>
</ul>
<ul
class=
"nav pull-left dashnav-action-icons"
>
<ul
class=
"nav pull-left dashnav-action-icons"
>
<li
ng-show=
"::ctrl.dashboard.meta.canStar"
>
<a
class=
"pointer"
ng-click=
"ctrl.starDashboard()"
>
<i
class=
"fa"
ng-class=
"{'fa-star-o': !ctrl.dashboard.meta.isStarred, 'fa-star': ctrl.dashboard.meta.isStarred}"
style=
"color: orange;"
></i>
...
...
@@ -47,9 +64,22 @@
<li
ng-if=
"::ctrl.dashboard.snapshot.originalUrl"
>
<a
ng-href=
"{{ctrl.dashboard.snapshot.originalUrl}}"
bs-tooltip=
"'Open original dashboard'"
data-placement=
"bottom"
><i
class=
"fa fa-link"
></i></a>
</li>
</ul>
<li
class=
"dropdown"
>
<a
class=
"pointer"
data-toggle=
"dropdown"
>
<i
class=
"fa fa-cog"
></i>
</a>
<ul
class=
"dropdown-menu dropdown-menu--navbar"
>
<li
ng-repeat=
"navItem in ::ctrl.navModel.menu"
ng-class=
"{active: navItem.active}"
>
<a
class=
"pointer"
ng-href=
"{{::navItem.url}}"
ng-click=
"ctrl.navItemClicked(navItem, $event)"
>
<i
class=
"{{::navItem.icon}}"
ng-show=
"::navItem.icon"
></i>
{{::navItem.title}}
</a>
</li>
</ul>
</li>
</ul>
<ul
class=
"nav pull-right"
>
<ul
class=
"nav pull-right"
>
<li
ng-show=
"ctrl.dashboard.meta.fullscreen"
class=
"dashnav-back-to-dashboard"
>
<a
ng-click=
"ctrl.exitFullscreen()"
>
Back to dashboard
...
...
@@ -58,6 +88,8 @@
<li>
<gf-time-picker
dashboard=
"ctrl.dashboard"
></gf-time-picker>
</li>
</ul>
</ul>
</div>
</div>
<
/navbar
>
<
dashboard-search></dashboard-search
>
public/app/features/dashboard/dashnav/dashnav.ts
View file @
0ad4a0fa
...
...
@@ -22,8 +22,8 @@ export class DashNavCtrl {
private
backendSrv
,
private
$timeout
,
private
datasourceSrv
,
private
navModelSrv
)
{
private
navModelSrv
,
private
contextSrv
)
{
this
.
navModel
=
navModelSrv
.
getDashboardNav
(
this
.
dashboard
,
this
);
appEvents
.
on
(
'save-dashboard'
,
this
.
saveDashboard
.
bind
(
this
),
$scope
);
...
...
@@ -38,6 +38,10 @@ export class DashNavCtrl {
}
}
toggleSideMenu
()
{
this
.
contextSrv
.
toggleSideMenu
();
}
openEditView
(
editview
)
{
var
search
=
_
.
extend
(
this
.
$location
.
search
(),
{
editview
:
editview
});
this
.
$location
.
search
(
search
);
...
...
@@ -139,6 +143,17 @@ export class DashNavCtrl {
onFolderChange
(
parentId
)
{
this
.
dashboard
.
parentId
=
parentId
;
}
showSearch
()
{
this
.
$rootScope
.
appEvent
(
'show-dash-search'
);
}
navItemClicked
(
navItem
,
evt
)
{
if
(
navItem
.
clickHandler
)
{
navItem
.
clickHandler
();
evt
.
preventDefault
();
}
}
}
export
function
dashNavDirective
()
{
...
...
public/app/features/dashboard/folder_picker/picker.ts
View file @
0ad4a0fa
...
...
@@ -45,7 +45,7 @@ export class FolderPickerCtrl {
folderChanged
()
{
const
selected
=
_
.
find
(
this
.
folders
,
{
title
:
this
.
selectedFolderSegment
.
value
});
if
(
selected
)
{
this
.
onChange
(
selected
.
id
);
this
.
onChange
(
{
$folderId
:
selected
.
id
}
);
}
}
}
...
...
@@ -70,7 +70,7 @@ export function folderPicker() {
controllerAs
:
'ctrl'
,
scope
:
{
selectedFolder
:
"<"
,
onChange
:
"
<
"
,
onChange
:
"
&
"
,
rootFolderName
:
"@"
}
};
...
...
public/app/features/dashboard/partials/settings.html
View file @
0ad4a0fa
...
...
@@ -45,7 +45,7 @@
</div>
</div>
<folder-picker
ng-if=
"!dashboardMeta.isFolder"
selected-folder=
"dashboardMeta.parentId"
on-change=
"onFolderChange"
></folder-picker>
<folder-picker
ng-if=
"!dashboardMeta.isFolder"
selected-folder=
"dashboardMeta.parentId"
on-change=
"onFolderChange
($folderId)
"
></folder-picker>
</div>
<div
class=
"section"
>
...
...
public/app/features/dashboard/save_as_modal.ts
View file @
0ad4a0fa
...
...
@@ -22,7 +22,8 @@ const template = `
<input type="text" class="gf-form-input" ng-model="ctrl.clone.title" give-focus="true" required>
</div>
<div class="gf-form">
<folder-picker ng-if="!clone.meta.isFolder" selected-folder="clone.meta.parentId" on-change="onFolderChange"></folder-picker>
<folder-picker ng-if="!ctrl.clone.meta.isFolder" selected-folder="ctrl.clone.meta.parentId" on-change="ctrl.onFolderChange($folderId)">
</folder-picker>
</div>
</div>
...
...
public/app/plugins/panel/heatmap/heatmap_data_converter.ts
View file @
0ad4a0fa
...
...
@@ -207,15 +207,20 @@ function pushToXBuckets(buckets, point, bucketNum, seriesName) {
}
function
pushToYBuckets
(
buckets
,
bucketNum
,
value
,
point
,
bounds
)
{
var
count
=
1
;
// Use the 3rd argument as scale/count
if
(
point
.
length
>
2
)
{
count
=
parseInt
(
point
[
2
]);
}
if
(
buckets
[
bucketNum
])
{
buckets
[
bucketNum
].
values
.
push
(
value
);
buckets
[
bucketNum
].
count
+=
1
;
buckets
[
bucketNum
].
count
+=
count
;
}
else
{
buckets
[
bucketNum
]
=
{
y
:
bucketNum
,
bounds
:
bounds
,
values
:
[
value
],
count
:
1
,
count
:
count
,
};
}
}
...
...
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