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
7ba0099f
Commit
7ba0099f
authored
Nov 17, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Panel: fixes to panel menu when in edito/fullscreen mode, Fixes #1069
parent
f45797ec
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
56 deletions
+48
-56
src/app/components/panelmeta.js
+4
-4
src/app/directives/panelMenu.js
+15
-10
src/app/services/influxdb/influxSeries.js
+0
-1
src/css/less/grafana.less
+0
-22
src/css/less/panel.less
+27
-17
src/test/specs/influxSeries-specs.js
+2
-2
No files found.
src/app/components/panelmeta.js
View file @
7ba0099f
...
@@ -12,12 +12,12 @@ function () {
...
@@ -12,12 +12,12 @@ function () {
this
.
extendedMenu
=
[];
this
.
extendedMenu
=
[];
if
(
options
.
fullscreen
)
{
if
(
options
.
fullscreen
)
{
this
.
addMenuItem
(
'view'
,
'icon-eye-open'
,
'toggleFullscreen(false)'
);
this
.
addMenuItem
(
'view'
,
'icon-eye-open'
,
'toggleFullscreen(false)
; dismiss();
'
);
}
}
this
.
addMenuItem
(
'edit'
,
'icon-cog'
,
'editPanel()'
);
this
.
addMenuItem
(
'edit'
,
'icon-cog'
,
'editPanel()
; dismiss();
'
);
this
.
addMenuItem
(
'duplicate'
,
'icon-copy'
,
'duplicatePanel()'
);
this
.
addMenuItem
(
'duplicate'
,
'icon-copy'
,
'duplicatePanel()'
);
this
.
addMenuItem
(
'share'
,
'icon-share'
,
'sharePanel()'
);
this
.
addMenuItem
(
'share'
,
'icon-share'
,
'sharePanel()
; dismiss();
'
);
this
.
addEditorTab
(
'General'
,
'app/partials/panelgeneral.html'
);
this
.
addEditorTab
(
'General'
,
'app/partials/panelgeneral.html'
);
...
@@ -25,7 +25,7 @@ function () {
...
@@ -25,7 +25,7 @@ function () {
this
.
addEditorTab
(
'Metrics'
,
'app/partials/metrics.html'
);
this
.
addEditorTab
(
'Metrics'
,
'app/partials/metrics.html'
);
}
}
this
.
addExtendedMenuItem
(
'Panel JSON'
,
''
,
'editPanelJson()'
);
this
.
addExtendedMenuItem
(
'Panel JSON'
,
''
,
'editPanelJson()
; dismiss();
'
);
}
}
PanelMeta
.
prototype
.
addMenuItem
=
function
(
text
,
icon
,
click
)
{
PanelMeta
.
prototype
.
addMenuItem
=
function
(
text
,
icon
,
click
)
{
...
...
src/app/directives/panelMenu.js
View file @
7ba0099f
...
@@ -13,11 +13,6 @@ function (angular, $, _) {
...
@@ -13,11 +13,6 @@ function (angular, $, _) {
'<span class="panel-title drag-handle pointer">'
+
'<span class="panel-title drag-handle pointer">'
+
'<span class="panel-title-text drag-handle">{{panel.title | interpolateTemplateVars}}</span>'
+
'<span class="panel-title-text drag-handle">{{panel.title | interpolateTemplateVars}}</span>'
+
'<span class="panel-links-icon"></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>'
;
'</span>'
;
function
createMenuTemplate
(
$scope
)
{
function
createMenuTemplate
(
$scope
)
{
...
@@ -77,7 +72,7 @@ function (angular, $, _) {
...
@@ -77,7 +72,7 @@ function (angular, $, _) {
$link
.
toggleClass
(
'has-panel-links'
,
showIcon
);
$link
.
toggleClass
(
'has-panel-links'
,
showIcon
);
});
});
function
dismiss
(
time
)
{
function
dismiss
(
time
,
force
)
{
clearTimeout
(
timeout
);
clearTimeout
(
timeout
);
timeout
=
null
;
timeout
=
null
;
...
@@ -87,10 +82,12 @@ function (angular, $, _) {
...
@@ -87,10 +82,12 @@ function (angular, $, _) {
}
}
// if hovering or draging pospone close
// if hovering or draging pospone close
if
(
force
!==
true
)
{
if
(
$menu
.
is
(
':hover'
)
||
$scope
.
dashboard
.
$$panelDragging
)
{
if
(
$menu
.
is
(
':hover'
)
||
$scope
.
dashboard
.
$$panelDragging
)
{
dismiss
(
25
00
);
dismiss
(
22
00
);
return
;
return
;
}
}
}
if
(
menuScope
)
{
if
(
menuScope
)
{
$menu
.
unbind
();
$menu
.
unbind
();
...
@@ -102,7 +99,12 @@ function (angular, $, _) {
...
@@ -102,7 +99,12 @@ function (angular, $, _) {
}
}
}
}
var
showMenu
=
function
()
{
var
showMenu
=
function
(
e
)
{
// if menu item is clicked and menu was just removed from dom ignore this event
if
(
!
$
.
contains
(
document
,
e
.
target
))
{
return
;
}
if
(
$menu
)
{
if
(
$menu
)
{
dismiss
();
dismiss
();
return
;
return
;
...
@@ -124,11 +126,14 @@ function (angular, $, _) {
...
@@ -124,11 +126,14 @@ function (angular, $, _) {
$menu
=
$
(
menuTemplate
);
$menu
=
$
(
menuTemplate
);
$menu
.
css
(
'left'
,
menuLeftPos
);
$menu
.
css
(
'left'
,
menuLeftPos
);
$menu
.
mouseleave
(
function
()
{
$menu
.
mouseleave
(
function
()
{
//
dismiss(1000);
dismiss
(
1000
);
});
});
menuScope
=
$scope
.
$new
();
menuScope
=
$scope
.
$new
();
menuScope
.
extendedMenu
=
getExtendedMenu
(
$scope
);
menuScope
.
extendedMenu
=
getExtendedMenu
(
$scope
);
menuScope
.
dismiss
=
function
()
{
dismiss
(
null
,
true
);
};
$
(
'.panel-menu'
).
remove
();
$
(
'.panel-menu'
).
remove
();
elem
.
append
(
$menu
);
elem
.
append
(
$menu
);
...
@@ -139,7 +144,7 @@ function (angular, $, _) {
...
@@ -139,7 +144,7 @@ function (angular, $, _) {
$
(
".panel-container"
).
removeClass
(
'panel-highlight'
);
$
(
".panel-container"
).
removeClass
(
'panel-highlight'
);
$panelContainer
.
toggleClass
(
'panel-highlight'
);
$panelContainer
.
toggleClass
(
'panel-highlight'
);
//dismiss(25
00);
dismiss
(
22
00
);
};
};
if
(
$scope
.
panelMeta
.
titlePos
&&
$scope
.
panel
.
title
)
{
if
(
$scope
.
panelMeta
.
titlePos
&&
$scope
.
panel
.
title
)
{
...
...
src/app/services/influxdb/influxSeries.js
View file @
7ba0099f
...
@@ -69,7 +69,6 @@ function (_) {
...
@@ -69,7 +69,6 @@ function (_) {
p
.
getAnnotations
=
function
()
{
p
.
getAnnotations
=
function
()
{
var
list
=
[];
var
list
=
[];
var
self
=
this
;
var
self
=
this
;
console
.
log
(
this
.
seriesList
);
_
.
each
(
this
.
seriesList
,
function
(
series
)
{
_
.
each
(
this
.
seriesList
,
function
(
series
)
{
var
titleCol
=
null
;
var
titleCol
=
null
;
...
...
src/css/less/grafana.less
View file @
7ba0099f
...
@@ -110,28 +110,6 @@
...
@@ -110,28 +110,6 @@
font-size: 12px;
font-size: 12px;
}
}
.panel-fullscreen {
z-index: 100;
display: block;
position: fixed;
left: 0px;
right: 0px;
top: 51px;
height: 100%;
padding: 0 10px;
background: @grafanaPanelBackground;
overflow-y: scroll;
height: 100%;
.panel-content {
padding-bottom: 130px;
}
.dropdown-menu {
margin-bottom: 70px;
}
}
.dashboard-fullscreen {
.dashboard-fullscreen {
.main-view-container {
.main-view-container {
overflow: hidden;
overflow: hidden;
...
...
src/css/less/panel.less
View file @
7ba0099f
...
@@ -79,6 +79,32 @@
...
@@ -79,6 +79,32 @@
bottom: 0;
bottom: 0;
}
}
.panel-fullscreen {
z-index: 100;
display: block;
position: fixed;
left: 0px;
right: 0px;
top: 51px;
height: 100%;
padding: 0 10px;
background: @grafanaPanelBackground;
overflow-y: scroll;
height: 100%;
.panel-content {
padding-bottom: 130px;
}
.dropdown-menu {
margin-bottom: 70px;
}
.panel-menu {
top: 0px;
}
}
.panel-menu {
.panel-menu {
z-index: 1000;
z-index: 1000;
position: absolute;
position: absolute;
...
@@ -132,20 +158,4 @@
...
@@ -132,20 +158,4 @@
}
}
}
}
.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;
}
}
}
src/test/specs/influxSeries-specs.js
View file @
7ba0099f
...
@@ -146,7 +146,7 @@ define([
...
@@ -146,7 +146,7 @@ define([
{
{
columns
:
[
'time'
,
'text'
,
'sequence_number'
,
'title'
,
'tags'
],
columns
:
[
'time'
,
'text'
,
'sequence_number'
,
'title'
,
'tags'
],
name
:
'events1'
,
name
:
'events1'
,
points
:
[[
1402596000
,
'some text'
,
1
,
'Hello'
,
'B'
],
[
1402596001
,
'asd'
,
2
,
'Hello2'
,
'B'
]]
points
:
[[
1402596000
000
,
'some text'
,
1
,
'Hello'
,
'B'
],
[
1402596001000
,
'asd'
,
2
,
'Hello2'
,
'B'
]]
}
}
],
],
annotation
:
{
annotation
:
{
...
@@ -176,7 +176,7 @@ define([
...
@@ -176,7 +176,7 @@ define([
{
{
columns
:
[
'time'
,
'text'
,
'sequence_number'
],
columns
:
[
'time'
,
'text'
,
'sequence_number'
],
name
:
'events1'
,
name
:
'events1'
,
points
:
[[
1402596000
,
'some text'
,
1
]]
points
:
[[
1402596000
000
,
'some text'
,
1
]]
}
}
],
],
annotation
:
{
query
:
'select'
}
annotation
:
{
query
:
'select'
}
...
...
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