Commit a0780ce4 by Torkel Ödegaard

Began work on solo panel

parent c416b090
<div class="container-fluid main">
<div class="span12">
<div class="panel nospace" ng-if="panel">
<kibana-panel type="panel.type" ng-cloak></kibana-panel>
</div>
</div>
</div>
define([
'./dashboard-from-db',
'./solo-panel-route',
'./dashboard-from-file',
'./dashboard-from-script',
'./dashboard-default',
......
define([
'angular',
],
function (angular) {
"use strict";
var module = angular.module('grafana.routes');
module.config(function($routeProvider) {
$routeProvider
.when('/solo-panel/db/:id', {
templateUrl: 'app/partials/solo-panel.html',
controller : 'SoloPanelCtrl',
});
});
module.controller('SoloPanelCtrl', function($scope, $rootScope, datasourceSrv, $routeParams, alertSrv, dashboard) {
var db = datasourceSrv.getGrafanaDB();
db.getDashboard($routeParams.id, false)
.then(function(dashboard) {
$scope.initPanelScope(dashboard);
}).then(null, function(error) {
alertSrv.set('Error', error, 'error');
});
});
$scope.initPanelScope = function(dashboard){
$scope.dashboard = dashboard.create(dashboardData);
$scope.grafana.style = $scope.dashboard.style;
$scope.filter = filterSrv;
$scope.filter.init($scope.dashboard);
};
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment