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
46ab09ed
Commit
46ab09ed
authored
Sep 21, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(links): fixed styling for dashboard links
parent
dc3b6147
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
public/app/features/dashboard/submenu/submenu.html
+7
-4
public/app/features/dashlinks/module.js
+5
-3
public/sass/components/_gf-form.scss
+1
-0
No files found.
public/app/features/dashboard/submenu/submenu.html
View file @
46ab09ed
...
...
@@ -13,11 +13,14 @@
<div
ng-repeat=
"annotation in ctrl.dashboard.annotations.list"
class=
"submenu-item"
ng-class=
"{'annotation-disabled': !annotation.enable}"
>
<gf-form-switch
class=
"gf-form"
label=
"{{annotation.name}}"
checked=
"annotation.enable"
on-change=
"ctrl.annotationStateChanged()"
></gf-form-switch>
</div>
</ul>
</div>
<div
class=
"gf-form gf-form--grow"
>
</div>
<
ul
class=
"pull-right"
ng-if=
"ctrl.dashboard.links.length > 0"
>
<dash-links-container
links=
"ctrl.dashboard.links"
></dash-links-container>
</
ul
>
<
div
ng-if=
"ctrl.dashboard.links.length > 0"
>
<dash-links-container
links=
"ctrl.dashboard.links"
class=
"gf-form-inline"
></dash-links-container>
</
div
>
<div
class=
"clearfix"
></div>
</div>
public/app/features/dashlinks/module.js
View file @
46ab09ed
...
...
@@ -44,17 +44,19 @@ function (angular, _) {
restrict
:
'E'
,
link
:
function
(
scope
,
elem
)
{
var
link
=
scope
.
link
;
var
template
=
'<div class="
submenu-item dropdown
">'
+
'<a class="pointer
dash-nav-link
" data-placement="bottom"'
+
var
template
=
'<div class="
gf-form
">'
+
'<a class="pointer
gf-form-label
" data-placement="bottom"'
+
(
link
.
asDropdown
?
' ng-click="fillDropdown(link)" data-toggle="dropdown"'
:
""
)
+
'>'
+
'<i></i> <span></span></a>'
;
if
(
link
.
asDropdown
)
{
template
+=
'<ul class="dropdown-menu" role="menu">'
+
'<li ng-repeat="dash in link.searchHits"><a href="{{dash.url}}">
<i class="fa fa-th-large"></i>
{{dash.title}}</a></li>'
+
'<li ng-repeat="dash in link.searchHits"><a href="{{dash.url}}">{{dash.title}}</a></li>'
+
'</ul>'
;
}
template
+=
'</div>'
;
elem
.
html
(
template
);
$compile
(
elem
.
contents
())(
scope
);
...
...
public/sass/components/_gf-form.scss
View file @
46ab09ed
...
...
@@ -7,6 +7,7 @@ $gf-form-margin: 0.25rem;
align-items
:
center
;
text-align
:
left
;
position
:
relative
;
font-size
:
$font-size-sm
;
&
--offset-1
{
margin-left
:
$spacer
;
...
...
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