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
702978ef
Commit
702978ef
authored
Apr 11, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux: more work on panel menu
parent
a47183f7
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
68 additions
and
55 deletions
+68
-55
public/app/core/routes/dashboard_loaders.js
+1
-1
public/app/features/dashboard/row/add_panel.ts
+1
-1
public/app/features/panel/all.js
+1
-1
public/app/features/panel/panel_directive.ts
+1
-1
public/app/features/panel/panel_header.ts
+45
-0
public/app/features/panel/panel_menu.js
+0
-6
public/sass/_variables.dark.scss
+2
-0
public/sass/_variables.light.scss
+1
-0
public/sass/components/_dropdown.scss
+5
-5
public/sass/components/_row.scss
+1
-1
public/sass/pages/_dashboard.scss
+10
-39
No files found.
public/app/core/routes/dashboard_loaders.js
View file @
702978ef
...
@@ -34,7 +34,7 @@ function (coreModule) {
...
@@ -34,7 +34,7 @@ function (coreModule) {
rows
:
[
rows
:
[
{
{
title
:
'Dashboard Row'
,
title
:
'Dashboard Row'
,
height
:
'
2
50px'
,
height
:
'
3
50px'
,
panels
:[],
panels
:[],
isNew
:
true
,
isNew
:
true
,
}
}
...
...
public/app/features/dashboard/row/add_panel.ts
View file @
702978ef
...
@@ -78,7 +78,7 @@ export class AddPanelCtrl {
...
@@ -78,7 +78,7 @@ export class AddPanelCtrl {
}
}
addPanel
(
panelPluginInfo
)
{
addPanel
(
panelPluginInfo
)
{
var
defaultSpan
=
12
;
var
defaultSpan
=
6
;
var
span
=
12
-
this
.
row
.
span
;
var
span
=
12
-
this
.
row
.
span
;
var
panel
=
{
var
panel
=
{
...
...
public/app/features/panel/all.js
View file @
702978ef
define
([
define
([
'./panel_
menu
'
,
'./panel_
header
'
,
'./panel_directive'
,
'./panel_directive'
,
'./solo_panel_ctrl'
,
'./solo_panel_ctrl'
,
'./query_ctrl'
,
'./query_ctrl'
,
...
...
public/app/features/panel/panel_directive.ts
View file @
702978ef
...
@@ -19,7 +19,7 @@ var panelTemplate = `
...
@@ -19,7 +19,7 @@ var panelTemplate = `
<i class="fa fa-spinner fa-spin"></i>
<i class="fa fa-spinner fa-spin"></i>
</span>
</span>
<
div class="panel-title-container drag-handle" panel-menu></div
>
<
panel-header class="panel-title-container drag-handle" panel-ctrl="ctrl"></panel-header
>
</div>
</div>
<div class="panel-content">
<div class="panel-content">
...
...
public/app/features/panel/panel_header.ts
0 → 100644
View file @
702978ef
///<reference path="../../headers/common.d.ts" />
import
angular
from
'angular'
;
import
{
coreModule
}
from
'app/core/core'
;
var
template
=
`
<span class="panel-title drag-handle">
<span class="icon-gf panel-alert-icon"></span>
<span class="panel-title-text drag-handle">{{ctrl.panel.title | interpolateTemplateVars:this}}</span>
<span class="panel-menu-container dropdown">
<span class="fa fa-caret-down panel-menu-toggle" data-toggle="dropdown"></span>
<ul class="dropdown-menu panel-menu" role="menu">
<li>
<a ng-click="ctrl.addDataQuery(datasource);">
<i class="fa fa-cog"></i> Edit <span class="dropdown-menu-item-shortcut">e</span>
</a>
</li>
<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-eye"></i> View</a></li>
<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-share-square-o"></i> Share</a></li>
<li class="dropdown-submenu">
<a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-cube"></i> Actions</a>
<ul class="dropdown-menu panel-menu">
<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-flash"></i> Add Annotation</a></li>
<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-bullseye"></i> Toggle Legend</a></li>
<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-download"></i> Export to CSV</a></li>
<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-eye"></i> View JSON</a></li>
</ul>
</li>
<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-trash"></i> Remove</a></li>
</ul>
</span>
<span class="panel-time-info" ng-show="ctrl.timeInfo"><i class="fa fa-clock-o"></i> {{ctrl.timeInfo}}</span>
</span>`
;
/** @ngInject **/
function
panelHeader
()
{
return
{
restrict
:
'E'
,
template
:
template
,
link
:
function
()
{
}
};
}
coreModule
.
directive
(
'panelHeader'
,
panelHeader
);
public/app/features/panel/panel_menu.js
View file @
702978ef
...
@@ -16,12 +16,6 @@ function (angular, $, _, Tether) {
...
@@ -16,12 +16,6 @@ function (angular, $, _, Tether) {
'<span class="panel-title-text drag-handle">{{ctrl.panel.title | interpolateTemplateVars:this}}</span>'
+
'<span class="panel-title-text drag-handle">{{ctrl.panel.title | interpolateTemplateVars:this}}</span>'
+
'<span class="fa fa-caret-down panel-title-caret" data-toggle="dropdown"></span>'
+
'<span class="fa fa-caret-down panel-title-caret" data-toggle="dropdown"></span>'
+
'<span class="panel-time-info" ng-show="ctrl.timeInfo"><i class="fa fa-clock-o"></i> {{ctrl.timeInfo}}</span>'
+
'<span class="panel-time-info" ng-show="ctrl.timeInfo"><i class="fa fa-clock-o"></i> {{ctrl.timeInfo}}</span>'
+
'<ul class="dropdown-menu panel-dropdown-menu" role="menu">'
+
'<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-cog"></i> Edit <span class="dropdown-menu-item-shortcut">e</span></a></li>'
+
'<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-eye"></i> View</a></li>'
+
'<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-share-square-o"></i> Share</a></li>'
+
'<li><a ng-click="ctrl.addDataQuery(datasource);"><i class="fa fa-trash"></i> Remove</a></li>'
+
'</ul>'
+
'</span>'
;
'</span>'
;
function
createMenuTemplate
(
ctrl
)
{
function
createMenuTemplate
(
ctrl
)
{
...
...
public/sass/_variables.dark.scss
View file @
702978ef
...
@@ -192,6 +192,8 @@ $dropdownLinkColorActive: $white;
...
@@ -192,6 +192,8 @@ $dropdownLinkColorActive: $white;
$dropdownLinkBackgroundActive
:
$dark-4
;
$dropdownLinkBackgroundActive
:
$dark-4
;
$dropdownLinkBackgroundHover
:
$dark-4
;
$dropdownLinkBackgroundHover
:
$dark-4
;
$dropdown-link-color
:
$gray-3
;
// COMPONENT VARIABLES
// COMPONENT VARIABLES
// --------------------------------------------------
// --------------------------------------------------
...
...
public/sass/_variables.light.scss
View file @
702978ef
...
@@ -204,6 +204,7 @@ $dropdownLinkColorActive: $link-color;
...
@@ -204,6 +204,7 @@ $dropdownLinkColorActive: $link-color;
$dropdownLinkBackgroundActive
:
$gray-6
;
$dropdownLinkBackgroundActive
:
$gray-6
;
$dropdownLinkBackgroundHover
:
$gray-6
;
$dropdownLinkBackgroundHover
:
$gray-6
;
$dropdown-link-color
:
$gray-3
;
// COMPONENT VARIABLES
// COMPONENT VARIABLES
// --------------------------------------------------
// --------------------------------------------------
...
...
public/sass/components/_dropdown.scss
View file @
702978ef
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
width
:
0
;
width
:
0
;
height
:
0
;
height
:
0
;
vertical-align
:
top
;
vertical-align
:
top
;
border-top
:
4px
solid
$
blac
k
;
border-top
:
4px
solid
$
text-color-wea
k
;
border-right
:
4px
solid
transparent
;
border-right
:
4px
solid
transparent
;
border-left
:
4px
solid
transparent
;
border-left
:
4px
solid
transparent
;
content
:
""
;
content
:
""
;
...
@@ -192,7 +192,7 @@
...
@@ -192,7 +192,7 @@
.dropdown-submenu
>
.dropdown-menu
{
.dropdown-submenu
>
.dropdown-menu
{
top
:
0
;
top
:
0
;
left
:
100%
;
left
:
100%
;
margin-top
:
-6
px
;
margin-top
:
0
px
;
margin-left
:
-1px
;
margin-left
:
-1px
;
@include
border-radius
(
0
6px
6px
6px
);
@include
border-radius
(
0
6px
6px
6px
);
}
}
...
@@ -218,9 +218,9 @@
...
@@ -218,9 +218,9 @@
height
:
0
;
height
:
0
;
border-color
:
transparent
;
border-color
:
transparent
;
border-style
:
solid
;
border-style
:
solid
;
border-width
:
5px
0
5px
5
px
;
border-width
:
4px
0
4px
4
px
;
border-left-color
:
darken
(
$dropdownBackground
,
20%
)
;
border-left-color
:
$text-color-weak
;
margin-top
:
5
px
;
margin-top
:
4
px
;
margin-right
:
-10px
;
margin-right
:
-10px
;
}
}
.dropdown-submenu
:hover
>
a
::after
{
.dropdown-submenu
:hover
>
a
::after
{
...
...
public/sass/components/_row.scss
View file @
702978ef
...
@@ -147,7 +147,7 @@ $dash-row-menu-animation-speed: 0.20s;
...
@@ -147,7 +147,7 @@ $dash-row-menu-animation-speed: 0.20s;
li
a
{
li
a
{
display
:
block
;
display
:
block
;
white-space
:
nowrap
;
white-space
:
nowrap
;
color
:
$
text-muted
;
color
:
$
dropdown-link-color
;
font-size
:
$font-size-sm
;
font-size
:
$font-size-sm
;
padding
:
$spacer
/
2
$spacer
;
padding
:
$spacer
/
2
$spacer
;
border-left
:
2px
solid
$side-menu-bg
;
border-left
:
2px
solid
$side-menu-bg
;
...
...
public/sass/pages/_dashboard.scss
View file @
702978ef
...
@@ -56,22 +56,26 @@ div.flot-text {
...
@@ -56,22 +56,26 @@ div.flot-text {
.panel-title-container
{
.panel-title-container
{
min-height
:
9px
;
min-height
:
9px
;
padding
:
2px
0
;
padding
:
2px
0
;
cursor
:
pointer
;
cursor
:
move
;
word-wrap
:
break-word
;
word-wrap
:
break-word
;
display
:
block
;
}
}
.panel-title
{
.panel-title
{
border
:
0px
;
border
:
0px
;
font-weight
:
$font-weight-semi-bold
;
font-weight
:
$font-weight-semi-bold
;
position
:
relative
;
position
:
relative
;
cursor
:
pointer
;
width
:
100%
;
width
:
100%
;
display
:
block
;
display
:
block
;
}
}
.panel-title-caret
{
.panel-menu-container
{
margin-left
:
8px
;
}
.panel-menu-toggle
{
color
:
$text-color-faint
;
color
:
$text-color-faint
;
margin-left
:
10px
;
cursor
:
pointer
;
padding
:
3px
5px
;
padding
:
3px
5px
;
&
:hover
{
&
:hover
{
...
@@ -98,18 +102,16 @@ div.flot-text {
...
@@ -98,18 +102,16 @@ div.flot-text {
}
}
}
}
.panel-
dropdown-
menu
{
.panel-menu
{
border
:
none
;
border
:
none
;
left
:
50%
;
text-align
:
left
;
text-align
:
left
;
transform
:
translateX
(
-50%
);
background
:
$side-menu-bg
;
background
:
$side-menu-bg
;
box-shadow
:
$search-shadow
;
box-shadow
:
$search-shadow
;
li
a
{
li
a
{
display
:
block
;
display
:
block
;
white-space
:
nowrap
;
white-space
:
nowrap
;
color
:
$
text-muted
;
color
:
$
dropdown-link-color
;
font-size
:
$font-size-sm
;
font-size
:
$font-size-sm
;
padding
:
$spacer
/
2
$spacer
;
padding
:
$spacer
/
2
$spacer
;
border-left
:
2px
solid
$side-menu-bg
;
border-left
:
2px
solid
$side-menu-bg
;
...
@@ -195,37 +197,6 @@ div.flot-text {
...
@@ -195,37 +197,6 @@ div.flot-text {
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.panel-menu
{
z-index
:
500
;
position
:
absolute
;
background
:
$tight-form-func-bg
;
border
:
$panel-menu-border
;
.panel-menu-row
{
white-space
:
nowrap
;
border-bottom
:
$panel-menu-border
;
&
:last-child
{
border-bottom
:
none
;
}
}
.panel-menu-link
,
.panel-menu-icon
{
padding
:
5px
10px
;
}
.panel-menu-link
{
display
:
inline-block
;
border-right
:
$panel-menu-border
;
&
:last-child
{
border
:
none
;
}
}
.dropdown-menu
{
text-align
:
left
;
}
}
// .panel-highlight {
// .panel-highlight {
// box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(82,168,236,10.8)
// box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(82,168,236,10.8)
// }
// }
...
...
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