forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plugins): working on plugin examples
- Loading branch information
Showing
16 changed files
with
115 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
define([ | ||
'angular', | ||
'app/app' | ||
], function(angular, app) { | ||
|
||
var module = angular.module('nginx-app', []); | ||
app.default.useModule(module); | ||
|
||
module.config(function($routeProvider) { | ||
$routeProvider | ||
.when('/nginx/stream', { | ||
templateUrl: 'public/plugins/nginx-app/partials/stream.html', | ||
}); | ||
}); | ||
|
||
function NginxConfigCtrl() { | ||
this.appEditCtrl.beforeUpdate = function() { | ||
alert('before!'); | ||
}; | ||
} | ||
NginxConfigCtrl.templateUrl = 'public/plugins/nginx-app/partials/config.html'; | ||
|
||
|
||
return { | ||
ConfigCtrl: NginxConfigCtrl | ||
}; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
define([ | ||
'app/plugins/sdk' | ||
], function(sdk) { | ||
'use strict'; | ||
|
||
var NginxPanel = (function(_super) { | ||
function NginxPanel($scope, $injector) { | ||
_super.call(this, $scope, $injector); | ||
} | ||
|
||
NginxPanel.template = '<h2>nginx!</h2>'; | ||
NginxPanel.prototype = Object.create(_super.prototype); | ||
NginxPanel.prototype.constructor = NginxPanel; | ||
|
||
return NginxPanel; | ||
})(sdk.PanelCtrl); | ||
|
||
return { | ||
PanelCtrl: NginxPanel | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "panel", | ||
"name": "Nginx Panel", | ||
"id": "nginx-panel", | ||
"staticRoot": "." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h2>nginx config</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<topnav title="Nginx" icon="fa fa-fw fa-cubes" subnav="true"> | ||
<ul class="nav"> | ||
<li class="active" ><a href="org/apps">Overview</a></li> | ||
</ul> | ||
</topnav> | ||
|
||
<div class="page-container" style="background: transparent; border: 0;"> | ||
<div class="page-wide" ng-init="ctrl.init()"> | ||
<h1>NGINX app</h1> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"type": "app", | ||
"name": "Nginx", | ||
"id": "nginx-app", | ||
|
||
"staticRoot": ".", | ||
|
||
"pages": [ | ||
{"name": "Live stream", "url": "nginx/stream", "reqRole": "Editor"}, | ||
{"name": "Log view", "url": "nginx/log", "reqRole": "Editor"} | ||
], | ||
|
||
"css": { | ||
"dark": "css/dark.css", | ||
"light": "css/light.css" | ||
}, | ||
|
||
"info": { | ||
"description": "Official Grafana Nginx App & Dashboard bundle", | ||
"author": { | ||
"name": "Nginx Inc.", | ||
"url": "http://nginx.com" | ||
}, | ||
"keywords": ["nginx"], | ||
"logos": { | ||
"small": "img/logo_small.png", | ||
"large": "img/logo_large.png" | ||
}, | ||
"links": [ | ||
{"name": "Project site", "url": "http://project.com"}, | ||
{"name": "License & Terms", "url": "http://license.com"} | ||
], | ||
"version": "1.0.0", | ||
"updated": "2015-02-10" | ||
}, | ||
|
||
"dependencies": { | ||
"grafanaVersion": "2.6.x", | ||
"plugins": [ | ||
{"type": "datasource", "id": "graphite", "name": "Graphite", "version": "1.0.0"}, | ||
{"type": "panel", "id": "graph", "name": "Graph", "version": "1.0.0"} | ||
] | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters