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
ba1fbe07
Commit
ba1fbe07
authored
Aug 25, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux: alternative row design
parent
4819e504
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
21 deletions
+38
-21
public/app/core/components/row_ctrl.ts
+10
-6
public/sass/components/_row.scss
+28
-15
No files found.
public/app/core/components/row_ctrl.ts
View file @
ba1fbe07
...
@@ -4,25 +4,29 @@ import _ from 'lodash';
...
@@ -4,25 +4,29 @@ import _ from 'lodash';
export
class
DashboardRowCtrl
{
export
class
DashboardRowCtrl
{
static
template
=
`
static
template
=
`
<
a class="dashboard-row__title pointer" ng-click="ctrl.toggle()
">
<
div class="dashboard-row__center
">
<
span class="dashboard-row__chevron
">
<
div class="dashboard-row__actions-left
">
<i class="fa fa-chevron-down" ng-hide="ctrl.panel.collapse"></i>
<i class="fa fa-chevron-down" ng-hide="ctrl.panel.collapse"></i>
<i class="fa fa-chevron-right" ng-show="ctrl.panel.collapse"></i>
<i class="fa fa-chevron-right" ng-show="ctrl.panel.collapse"></i>
</span>
</div>
<a class="dashboard-row__title pointer" ng-click="ctrl.toggle()">
<span class="dashboard-row__title-text">
<span class="dashboard-row__title-text">
{{ctrl.panel.title | interpolateTemplateVars:this}}
{{ctrl.panel.title | interpolateTemplateVars:this}}
</span>
</span>
</a>
</a>
<div class="dashboard-row__actions-right">
<a class="pointer" ng-click="ctrl.openSettings()"><span class="fa fa-cog"></i></a>
</div>
</div>
<div class="dashboard-row__panel_count">
<div class="dashboard-row__panel_count">
({{ctrl.panel.hiddenPanels.length}} hidden panels)
({{ctrl.panel.hiddenPanels.length}} hidden panels)
</div>
</div>
<div class="dashboard-row__actions">
<a class="pointer" ng-click="ctrl.openSettings()"><span class="fa fa-cog"></i></a>
</div>
<div class="dashboard-row__drag grid-drag-handle">
<div class="dashboard-row__drag grid-drag-handle">
</div>
</div>
`
;
`
;
dashboard
:
any
;
dashboard
:
any
;
panel
:
any
;
panel
:
any
;
...
...
public/sass/components/_row.scss
View file @
ba1fbe07
...
@@ -5,7 +5,8 @@ $dashboard-row-height: 30px;
...
@@ -5,7 +5,8 @@ $dashboard-row-height: 30px;
height
:
$dashboard-row-height
;
height
:
$dashboard-row-height
;
line-height
:
$dashboard-row-height
;
line-height
:
$dashboard-row-height
;
align-items
:
center
;
align-items
:
center
;
padding
:
0
0
.5rem
;
align-content
:
center
;
justify-content
:
center
;
&
--collapse
{
&
--collapse
{
background
:
$panel-bg
;
background
:
$panel-bg
;
...
@@ -22,11 +23,8 @@ $dashboard-row-height: 30px;
...
@@ -22,11 +23,8 @@ $dashboard-row-height: 30px;
}
}
&
:hover
{
&
:hover
{
.dashboard-row__chevron
{
.dashboard-row__actions-left
,
color
:
$link-color
;
.dashboard-row__actions-right
{
}
.dashboard-row__actions
{
visibility
:
visible
;
visibility
:
visible
;
opacity
:
1
;
opacity
:
1
;
transition
:
opacity
200ms
ease-in-out
100ms
;
transition
:
opacity
200ms
ease-in-out
100ms
;
...
@@ -34,29 +32,39 @@ $dashboard-row-height: 30px;
...
@@ -34,29 +32,39 @@ $dashboard-row-height: 30px;
}
}
}
}
.dashboard-row__center
{
position
:
relative
;
}
.dashboard-row__title
{
.dashboard-row__title
{
@include
brand-bottom-border
();
position
:
relative
;
position
:
relative
;
flex-grow
:
1
;
flex-grow
:
0
;
display
:
flex
;
flex-direction
:
row
;
margin-right
:
$panel-margin
;
margin-left
:
0
;
font-size
:
1
.15rem
;
font-size
:
1
.15rem
;
font-weight
:
$font-weight-semi-bold
;
font-weight
:
$font-weight-semi-bold
;
padding
:
0rem
1rem
0
.3rem
1rem
;
}
}
.dashboard-row__chevron
{
.dashboard-row__actions-left
{
position
:
absolute
;
left
:
-23px
;
font-size
:
$font-size-xs
;
font-size
:
$font-size-xs
;
color
:
$text-muted
;
color
:
$text-muted
;
position
:
relative
;
top
:
1px
;
top
:
1px
;
visibility
:
hidden
;
opacity
:
0
;
}
}
.dashboard-row__actions
{
.dashboard-row__actions-right
{
position
:
absolute
;
right
:
-40px
;
padding-right
:
1rem
;
padding-right
:
1rem
;
font-size
:
$font-size-sm
;
font-size
:
$font-size-sm
;
visibility
:
hidden
;
visibility
:
hidden
;
opacity
:
0
;
opacity
:
0
;
top
:
0px
;
a
{
a
{
color
:
$text-color-weak
;
color
:
$text-color-weak
;
padding-left
:
$spacer
;
padding-left
:
$spacer
;
...
@@ -67,7 +75,6 @@ $dashboard-row-height: 30px;
...
@@ -67,7 +75,6 @@ $dashboard-row-height: 30px;
}
}
.dashboard-row__title-text
{
.dashboard-row__title-text
{
padding-left
:
0
.4rem
;
color
:
$text-color
;
color
:
$text-color
;
}
}
...
@@ -77,6 +84,9 @@ $dashboard-row-height: 30px;
...
@@ -77,6 +84,9 @@ $dashboard-row-height: 30px;
font-size
:
$font-size-sm
;
font-size
:
$font-size-sm
;
font-weight
:
normal
;
font-weight
:
normal
;
display
:
none
;
display
:
none
;
position
:
absolute
;
right
:
30px
;
top
:
0
;
}
}
.dashboard-row__drag
{
.dashboard-row__drag
{
...
@@ -86,6 +96,9 @@ $dashboard-row-height: 30px;
...
@@ -86,6 +96,9 @@ $dashboard-row-height: 30px;
background
:
url("../img/grab_dark.svg")
no-repeat
50%
50%
;
background
:
url("../img/grab_dark.svg")
no-repeat
50%
50%
;
background-size
:
8px
;
background-size
:
8px
;
visibility
:
hidden
;
visibility
:
hidden
;
position
:
absolute
;
top
:
0
;
right
:
0
;
}
}
.panels-wrapper
{
.panels-wrapper
{
...
...
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