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
6df90121
Commit
6df90121
authored
Jun 02, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated dashboard links feature to support search by my multiple tags, #1944
parent
dc607b8e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
public/app/features/dashlinks/editor.html
+2
-1
public/app/features/dashlinks/module.js
+3
-3
No files found.
public/app/features/dashlinks/editor.html
View file @
6df90121
...
@@ -25,7 +25,8 @@
...
@@ -25,7 +25,8 @@
<li
class=
"tight-form-item"
ng-show=
"link.type === 'dashboards'"
>
With tag
</li>
<li
class=
"tight-form-item"
ng-show=
"link.type === 'dashboards'"
>
With tag
</li>
<li
ng-show=
"link.type === 'dashboards'"
>
<li
ng-show=
"link.type === 'dashboards'"
>
<input
type=
"text"
ng-model=
"link.tag"
class=
"input-small tight-form-input"
style=
"width: 151px"
ng-model-onblur
ng-change=
"updated()"
>
<bootstrap-tagsinput
ng-model=
"link.tags"
tagclass=
"label label-tag"
placeholder=
"add tags"
>
</bootstrap-tagsinput>
</li>
</li>
<li
class=
"tight-form-item"
ng-show=
"link.type === 'dashboards'"
>
<li
class=
"tight-form-item"
ng-show=
"link.type === 'dashboards'"
>
<editor-checkbox
text=
"As dropdown"
model=
"link.asDropdown"
change=
"updated()"
></editor-checkbox>
<editor-checkbox
text=
"As dropdown"
model=
"link.asDropdown"
change=
"updated()"
></editor-checkbox>
...
...
public/app/features/dashlinks/module.js
View file @
6df90121
...
@@ -89,7 +89,7 @@ function (angular, _) {
...
@@ -89,7 +89,7 @@ function (angular, _) {
function
buildLinks
(
linkDef
)
{
function
buildLinks
(
linkDef
)
{
if
(
linkDef
.
type
===
'dashboards'
)
{
if
(
linkDef
.
type
===
'dashboards'
)
{
if
(
!
linkDef
.
tag
)
{
if
(
!
linkDef
.
tag
s
)
{
console
.
log
(
'Dashboard link missing tag'
);
console
.
log
(
'Dashboard link missing tag'
);
return
$q
.
when
([]);
return
$q
.
when
([]);
}
}
...
@@ -97,7 +97,7 @@ function (angular, _) {
...
@@ -97,7 +97,7 @@ function (angular, _) {
if
(
linkDef
.
asDropdown
)
{
if
(
linkDef
.
asDropdown
)
{
return
$q
.
when
([{
return
$q
.
when
([{
title
:
linkDef
.
title
,
title
:
linkDef
.
title
,
tag
:
linkDef
.
tag
,
tag
s
:
linkDef
.
tags
,
keepTime
:
linkDef
.
keepTime
,
keepTime
:
linkDef
.
keepTime
,
includeVars
:
linkDef
.
includeVars
,
includeVars
:
linkDef
.
includeVars
,
icon
:
"fa fa-bars"
,
icon
:
"fa fa-bars"
,
...
@@ -132,7 +132,7 @@ function (angular, _) {
...
@@ -132,7 +132,7 @@ function (angular, _) {
}
}
$scope
.
searchDashboards
=
function
(
link
)
{
$scope
.
searchDashboards
=
function
(
link
)
{
return
backendSrv
.
search
({
tag
:
link
.
tag
}).
then
(
function
(
results
)
{
return
backendSrv
.
search
({
tag
:
link
.
tag
s
}).
then
(
function
(
results
)
{
return
_
.
reduce
(
results
,
function
(
memo
,
dash
)
{
return
_
.
reduce
(
results
,
function
(
memo
,
dash
)
{
// do not add current dashboard
// do not add current dashboard
if
(
dash
.
id
!==
currentDashId
)
{
if
(
dash
.
id
!==
currentDashId
)
{
...
...
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