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
c12d8301
Commit
c12d8301
authored
Nov 11, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Panel: added search typeahead for dashboard links, #1041
parent
a49a9b3b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
9 deletions
+28
-9
src/app/app.js
+2
-0
src/app/controllers/dashboardCtrl.js
+0
-1
src/app/directives/all.js
+0
-1
src/app/features/all.js
+3
-0
src/app/features/panellinkeditor/linkSrv.js
+0
-0
src/app/features/panellinkeditor/module.html
+4
-1
src/app/features/panellinkeditor/module.js
+15
-2
src/app/services/dashboard/dashboardKeyBindings.js
+0
-1
tasks/options/requirejs.js
+4
-3
No files found.
src/app/app.js
View file @
c12d8301
...
...
@@ -78,6 +78,8 @@ function (angular, $, _, appLevelRequire, config) {
});
var
preBootRequires
=
[
'services/all'
,
'features/all'
,
'controllers/all'
,
'directives/all'
,
'filters/all'
,
...
...
src/app/controllers/dashboardCtrl.js
View file @
c12d8301
...
...
@@ -3,7 +3,6 @@ define([
'jquery'
,
'config'
,
'lodash'
,
'services/all'
,
],
function
(
angular
,
$
,
config
,
_
)
{
"use strict"
;
...
...
src/app/directives/all.js
View file @
c12d8301
...
...
@@ -19,6 +19,5 @@ define([
'./graphiteSegment'
,
'./grafanaVersionCheck'
,
'./dropdown.typeahead'
,
'components/panellinkeditor/module'
,
'./influxdbFuncEditor'
],
function
()
{});
src/app/features/all.js
0 → 100644
View file @
c12d8301
define
([
'./panellinkeditor/module'
,
],
function
()
{});
src/app/
component
s/panellinkeditor/linkSrv.js
→
src/app/
feature
s/panellinkeditor/linkSrv.js
View file @
c12d8301
File moved
src/app/
component
s/panellinkeditor/module.html
→
src/app/
feature
s/panellinkeditor/module.html
View file @
c12d8301
...
...
@@ -21,7 +21,10 @@
<li
class=
"grafana-target-segment"
ng-show=
"link.type === 'dashboard'"
>
dashboard
</li>
<li
ng-show=
"link.type === 'dashboard'"
>
<input
type=
"text"
ng-model=
"link.dashboard"
class=
"input-large grafana-target-segment-input"
>
<input
type=
"text"
ng-model=
"link.dashboard"
bs-typeahead=
"searchDashboards"
class=
"input-large grafana-target-segment-input"
>
</li>
<li
class=
"grafana-target-segment"
ng-show=
"link.type === 'absolute'"
>
url
</li>
...
...
src/app/
component
s/panellinkeditor/module.js
→
src/app/
feature
s/panellinkeditor/module.js
View file @
c12d8301
...
...
@@ -15,11 +15,11 @@ function (angular, _) {
},
restrict
:
'E'
,
controller
:
'PanelLinkEditorCtrl'
,
templateUrl
:
'app/
component
s/panellinkeditor/module.html'
,
templateUrl
:
'app/
feature
s/panellinkeditor/module.html'
,
link
:
function
()
{
}
};
}).
controller
(
'PanelLinkEditorCtrl'
,
function
(
$scope
)
{
}).
controller
(
'PanelLinkEditorCtrl'
,
function
(
$scope
,
datasourceSrv
)
{
$scope
.
panel
.
links
=
$scope
.
panel
.
links
||
[];
...
...
@@ -30,6 +30,19 @@ function (angular, _) {
});
};
$scope
.
searchDashboards
=
function
(
query
,
callback
)
{
var
ds
=
datasourceSrv
.
getGrafanaDB
();
if
(
ds
===
null
)
{
return
;
}
ds
.
searchDashboards
(
query
).
then
(
function
(
result
)
{
var
dashboards
=
_
.
map
(
result
.
dashboards
,
function
(
dash
)
{
return
dash
.
title
;
});
callback
(
dashboards
);
});
};
$scope
.
deleteLink
=
function
(
link
)
{
$scope
.
panel
.
links
=
_
.
without
(
$scope
.
panel
.
links
,
link
);
};
...
...
src/app/services/dashboard/dashboardKeyBindings.js
View file @
c12d8301
define
([
'angular'
,
'jquery'
,
'services/all'
],
function
(
angular
,
$
)
{
"use strict"
;
...
...
tasks/options/requirejs.js
View file @
c12d8301
...
...
@@ -54,12 +54,13 @@ module.exports = function(config,grunt) {
'timepicker'
,
'datepicker'
,
'lodash'
,
'filters/all'
,
'jquery.flot'
,
'services/all'
,
'angular-strap'
,
'directives/all'
,
'angular-dragdrop'
,
'services/all'
,
'features/all'
,
'directives/all'
,
'filters/all'
,
'controllers/all'
,
'routes/all'
,
'components/partials'
,
...
...
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