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
631c7adf
Commit
631c7adf
authored
Aug 17, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated
parent
34ab1e52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
src/app/partials/pro/solo-panel.html
+0
-0
src/app/routes/p_solo-panel.js
+25
-4
No files found.
src/app/partials/solo-panel.html
→
src/app/partials/
pro/
solo-panel.html
View file @
631c7adf
File moved
src/app/routes/p_solo-panel.js
View file @
631c7adf
define
([
define
([
'angular'
,
'angular'
,
'lodash'
,
],
],
function
(
angular
)
{
function
(
angular
,
_
)
{
"use strict"
;
"use strict"
;
var
module
=
angular
.
module
(
'grafana.routes'
);
var
module
=
angular
.
module
(
'grafana.routes'
);
module
.
config
(
function
(
$routeProvider
)
{
module
.
config
(
function
(
$routeProvider
)
{
$routeProvider
$routeProvider
.
when
(
'/
solo-panel/db/:i
d'
,
{
.
when
(
'/
dashboard/:id/panel/:panelI
d'
,
{
templateUrl
:
'app/partials/solo-panel.html'
,
templateUrl
:
'app/partials/
pro/
solo-panel.html'
,
controller
:
'SoloPanelCtrl'
,
controller
:
'SoloPanelCtrl'
,
});
});
});
});
...
@@ -17,6 +18,7 @@ function (angular) {
...
@@ -17,6 +18,7 @@ function (angular) {
module
.
controller
(
'SoloPanelCtrl'
,
function
(
$scope
,
$rootScope
,
datasourceSrv
,
$routeParams
,
alertSrv
,
dashboardSrv
,
filterSrv
)
{
module
.
controller
(
'SoloPanelCtrl'
,
function
(
$scope
,
$rootScope
,
datasourceSrv
,
$routeParams
,
alertSrv
,
dashboardSrv
,
filterSrv
)
{
var
db
=
datasourceSrv
.
getGrafanaDB
();
var
db
=
datasourceSrv
.
getGrafanaDB
();
var
panelId
=
parseInt
(
$routeParams
.
panelId
);
db
.
getDashboard
(
$routeParams
.
id
,
false
)
db
.
getDashboard
(
$routeParams
.
id
,
false
)
.
then
(
function
(
dashboardData
)
{
.
then
(
function
(
dashboardData
)
{
...
@@ -33,13 +35,32 @@ function (angular) {
...
@@ -33,13 +35,32 @@ function (angular) {
};
};
$scope
.
test
=
"Hej"
;
$scope
.
test
=
"Hej"
;
$scope
.
$index
=
0
;
$scope
.
$index
=
0
;
$scope
.
panel
=
$scope
.
dashboard
.
rows
[
0
].
panels
[
0
];
$scope
.
panel
=
$scope
.
getPanelById
(
panelId
);
$scope
.
panel
.
span
=
12
;
$scope
.
panel
.
span
=
12
;
$scope
.
dashboardViewState
=
{
registerPanel
:
function
()
{
}
};
$scope
.
filter
=
filterSrv
;
$scope
.
filter
=
filterSrv
;
$scope
.
filter
.
init
(
$scope
.
dashboard
);
$scope
.
filter
.
init
(
$scope
.
dashboard
);
};
};
$scope
.
getPanelById
=
function
(
id
)
{
var
rows
=
$scope
.
dashboard
.
rows
;
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
var
row
=
rows
[
i
];
for
(
var
j
=
0
;
j
<
row
.
panels
.
length
;
j
++
)
{
var
panel
=
row
.
panels
[
j
];
if
(
panel
.
id
===
id
)
{
return
panel
;
}
}
}
return
null
;
};
});
});
});
});
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