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
f45797ec
Commit
f45797ec
authored
Nov 17, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trying out panel actions buttons
parent
02e1ac12
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
3 deletions
+48
-3
src/app/directives/panelMenu.js
+7
-2
src/app/panels/graph/graph.js
+2
-1
src/app/panels/singlestat/singleStatPanel.js
+1
-0
src/app/partials/submenu.html
+13
-0
src/css/less/panel.less
+25
-0
No files found.
src/app/directives/panelMenu.js
View file @
f45797ec
...
...
@@ -13,6 +13,11 @@ function (angular, $, _) {
'<span class="panel-title drag-handle pointer">'
+
'<span class="panel-title-text drag-handle">{{panel.title | interpolateTemplateVars}}</span>'
+
'<span class="panel-links-icon"></span>'
+
'<span class="panel-actions">'
+
'<a href="asd" class="panel-menu-link"><i class="icon-th-list"></i></a>'
+
'<a href="asd" class="panel-menu-link">View</a>'
+
'<a href="asd" class="panel-menu-link">Edit</a>'
+
'</span>'
;
'</span>'
;
function
createMenuTemplate
(
$scope
)
{
...
...
@@ -119,7 +124,7 @@ function (angular, $, _) {
$menu
=
$
(
menuTemplate
);
$menu
.
css
(
'left'
,
menuLeftPos
);
$menu
.
mouseleave
(
function
()
{
dismiss
(
1000
);
//
dismiss(1000);
});
menuScope
=
$scope
.
$new
();
...
...
@@ -134,7 +139,7 @@ function (angular, $, _) {
$
(
".panel-container"
).
removeClass
(
'panel-highlight'
);
$panelContainer
.
toggleClass
(
'panel-highlight'
);
dismiss
(
2500
);
//
dismiss(2500);
};
if
(
$scope
.
panelMeta
.
titlePos
&&
$scope
.
panel
.
title
)
{
...
...
src/app/panels/graph/graph.js
View file @
f45797ec
...
...
@@ -72,10 +72,11 @@ function (angular, $, kbn, moment, _, GraphTooltip) {
height
=
parseInt
(
height
.
replace
(
'px'
,
''
),
10
);
}
height
-=
5
;
// padding
height
-=
scope
.
panel
.
title
?
24
:
9
;
// subtract panel title bar
if
(
scope
.
panel
.
legend
.
show
&&
!
scope
.
panel
.
legend
.
rightSide
)
{
height
=
height
-
2
1
;
// subtract one line legend
height
=
height
-
2
6
;
// subtract one line legend
}
elem
.
css
(
'height'
,
height
+
'px'
);
...
...
src/app/panels/singlestat/singleStatPanel.js
View file @
f45797ec
...
...
@@ -29,6 +29,7 @@ function (angular, app, _, $) {
height
=
parseInt
(
height
.
replace
(
'px'
,
''
),
10
);
}
height
-=
5
;
// padding
height
-=
panel
.
title
?
24
:
9
;
// subtract panel title bar
elem
.
css
(
'height'
,
height
+
'px'
);
...
...
src/app/partials/submenu.html
View file @
f45797ec
...
...
@@ -36,6 +36,19 @@
</li>
</ul>
<ul
class=
"grafana-segment-list pull-right"
style=
"margin-right: 0"
>
<li
class=
"grafana-target-segment annotation-segment"
>
<a
ng-click=
"disableAnnotation(annotation)"
>
back to dashboard
</a>
</li>
<li
class=
"grafana-target-segment annotation-segment"
>
<a
ng-click=
"disableAnnotation(annotation)"
>
fullscreen view
</a>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
</div>
...
...
src/css/less/panel.less
View file @
f45797ec
...
...
@@ -10,6 +10,11 @@
background: @grafanaPanelBackground;
margin: 5px;
position: relative;
&:hover {
.panel-actions {
display: block;
}
}
}
.panel-content {
...
...
@@ -27,6 +32,8 @@
font-weight: bold;
position: relative;
cursor: context-menu;
width: 100%;
display: block;
&.has-panel-links {
.panel-title-text:after {
...
...
@@ -124,3 +131,21 @@
border: 1px solid @grayDark;
}
}
.panel-actions {
display: none;
position: absolute;
right: 0;
top: -2px;
width: 112px;
a {
opacity: 0.35;
border: 1px solid black;
padding: 5px 10px;
font-size: 75%;
background: @grafanaTargetFuncBackground;
&:hover {
opacity: 1;
}
}
}
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