mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
refactor(): removed stuff
This commit is contained in:
28
examples/panel-plugin-boilerplate-es5/module.js
Normal file
28
examples/panel-plugin-boilerplate-es5/module.js
Normal file
@@ -0,0 +1,28 @@
|
||||
define([
|
||||
'app/plugins/sdk'
|
||||
], function(sdk) {
|
||||
|
||||
var BoilerPlatePanel = (function(_super) {
|
||||
|
||||
function BoilerPlatePanel($scope, $injector) {
|
||||
_super.call(this, $scope, $injector);
|
||||
}
|
||||
|
||||
// you do not need a templateUrl, you can use a inline template here
|
||||
// BoilerPlatePanel.template = '<h2>boilerplate</h2>';
|
||||
|
||||
// all panel static assets can be accessed via 'public/plugins/<plugin-id>/<file>
|
||||
BoilerPlatePanel.templateUrl = 'public/plugins/panel-boilerplate-es5/panel.html';
|
||||
|
||||
BoilerPlatePanel.prototype = Object.create(_super.prototype);
|
||||
BoilerPlatePanel.prototype.constructor = BoilerPlatePanel;
|
||||
|
||||
return BoilerPlatePanel;
|
||||
|
||||
})(sdk.PanelCtrl);
|
||||
|
||||
|
||||
return {
|
||||
PanelCtrl: BoilerPlatePanel
|
||||
};
|
||||
});
|
||||
4
examples/panel-plugin-boilerplate-es5/panel.html
Normal file
4
examples/panel-plugin-boilerplate-es5/panel.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<h2 class="text-center">
|
||||
Boilerplate panel
|
||||
</h2>
|
||||
|
||||
6
examples/panel-plugin-boilerplate-es5/plugin.json
Normal file
6
examples/panel-plugin-boilerplate-es5/plugin.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "panel",
|
||||
"name": "Panel Boilerplate",
|
||||
"id": "panel-boilerplate-es5",
|
||||
"staticRoot": "."
|
||||
}
|
||||
Reference in New Issue
Block a user