From 16f7f68636202d658337cee06ab57dbd319e480a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 9 Jan 2015 09:37:42 +0100 Subject: [PATCH] Plugins: fixed broken example panel plugin, Fixes #1318 --- src/plugins/custom.panel.example/module.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/plugins/custom.panel.example/module.js b/src/plugins/custom.panel.example/module.js index d04d8fca959..8ed4a450533 100644 --- a/src/plugins/custom.panel.example/module.js +++ b/src/plugins/custom.panel.example/module.js @@ -2,9 +2,9 @@ define([ 'angular', 'app', 'lodash', - 'require', + 'components/panelmeta', ], -function (angular, app, _) { +function (angular, app, _, PanelMeta) { 'use strict'; var module = angular.module('grafana.panels.custom', []); @@ -12,9 +12,9 @@ function (angular, app, _) { module.controller('CustomPanelCtrl', function($scope, panelSrv) { - $scope.panelMeta = { - description : "Example plugin panel", - }; + $scope.panelMeta = new PanelMeta({ + description : "A static text panel that can use plain text, markdown, or (sanitized) HTML" + }); // set and populate defaults var _d = { @@ -22,10 +22,6 @@ function (angular, app, _) { _.defaults($scope.panel, _d); - $scope.init = function() { - panelSrv.init($scope); - }; - - $scope.init(); + panelSrv.init($scope); }); });