|
@@ -1,25 +1,27 @@
|
|
|
define([
|
|
define([
|
|
|
'angular',
|
|
'angular',
|
|
|
|
|
+ 'jquery',
|
|
|
],
|
|
],
|
|
|
-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('/dashboard/:id/panel/:panelId', {
|
|
|
|
|
|
|
+ .when('/dashboard/solo/:id/', {
|
|
|
templateUrl: 'app/partials/pro/solo-panel.html',
|
|
templateUrl: 'app/partials/pro/solo-panel.html',
|
|
|
controller : 'SoloPanelCtrl',
|
|
controller : 'SoloPanelCtrl',
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- module.controller('SoloPanelCtrl', function($scope, $rootScope, datasourceSrv, $routeParams, dashboardSrv, timeSrv) {
|
|
|
|
|
|
|
+ module.controller('SoloPanelCtrl', function($scope, $rootScope, datasourceSrv, $routeParams, dashboardSrv, timeSrv, $location) {
|
|
|
var panelId;
|
|
var panelId;
|
|
|
|
|
|
|
|
$scope.init = function() {
|
|
$scope.init = function() {
|
|
|
var db = datasourceSrv.getGrafanaDB();
|
|
var db = datasourceSrv.getGrafanaDB();
|
|
|
- panelId = parseInt($routeParams.panelId);
|
|
|
|
|
|
|
+ var params = $location.search();
|
|
|
|
|
+ panelId = parseInt(params.panelId);
|
|
|
|
|
|
|
|
db.getDashboard($routeParams.id, false)
|
|
db.getDashboard($routeParams.id, false)
|
|
|
.then(function(dashboardData) {
|
|
.then(function(dashboardData) {
|
|
@@ -33,7 +35,7 @@ function (angular) {
|
|
|
$scope.dashboard = dashboardSrv.create(dashboardData);
|
|
$scope.dashboard = dashboardSrv.create(dashboardData);
|
|
|
$scope.grafana.style = $scope.dashboard.style;
|
|
$scope.grafana.style = $scope.dashboard.style;
|
|
|
$scope.row = {
|
|
$scope.row = {
|
|
|
- height: '300px',
|
|
|
|
|
|
|
+ height: $(window).height() + 'px',
|
|
|
};
|
|
};
|
|
|
$scope.test = "Hej";
|
|
$scope.test = "Hej";
|
|
|
$scope.$index = 0;
|
|
$scope.$index = 0;
|