mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
docs(examples): move app example into new repo
This commit is contained in:
parent
a16c799da9
commit
4f52bc138f
@ -1,3 +1,4 @@
|
|||||||
## Example plugin implementations
|
## Example plugin implementations
|
||||||
|
|
||||||
[simple-json-datasource](https://github.com/grafana/simple-json-datasource)
|
datasource:[simple-json-datasource](https://github.com/grafana/simple-json-datasource)
|
||||||
|
app: [example-app](https://github.com/grafana/example-app)
|
7
examples/nginx-app/.gitignore
vendored
7
examples/nginx-app/.gitignore
vendored
@ -1,7 +0,0 @@
|
|||||||
.DS_Store
|
|
||||||
|
|
||||||
node_modules
|
|
||||||
tmp/*
|
|
||||||
npm-debug.log
|
|
||||||
dist/*
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"disallowImplicitTypeConversion": ["string"],
|
|
||||||
"disallowKeywords": ["with"],
|
|
||||||
"disallowMultipleLineBreaks": true,
|
|
||||||
"disallowMixedSpacesAndTabs": true,
|
|
||||||
"disallowTrailingWhitespace": true,
|
|
||||||
"requireSpacesInFunctionExpression": {
|
|
||||||
"beforeOpeningCurlyBrace": true
|
|
||||||
},
|
|
||||||
"disallowSpacesInsideArrayBrackets": true,
|
|
||||||
"disallowSpacesInsideParentheses": true,
|
|
||||||
"validateIndentation": 2
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
"browser": true,
|
|
||||||
"esnext": true,
|
|
||||||
|
|
||||||
"bitwise":false,
|
|
||||||
"curly": true,
|
|
||||||
"eqnull": true,
|
|
||||||
"devel": true,
|
|
||||||
"eqeqeq": true,
|
|
||||||
"forin": false,
|
|
||||||
"immed": true,
|
|
||||||
"supernew": true,
|
|
||||||
"expr": true,
|
|
||||||
"indent": 2,
|
|
||||||
"latedef": true,
|
|
||||||
"newcap": true,
|
|
||||||
"noarg": true,
|
|
||||||
"noempty": true,
|
|
||||||
"undef": true,
|
|
||||||
"boss": true,
|
|
||||||
"trailing": true,
|
|
||||||
"laxbreak": true,
|
|
||||||
"laxcomma": true,
|
|
||||||
"sub": true,
|
|
||||||
"unused": true,
|
|
||||||
"maxdepth": 6,
|
|
||||||
"maxlen": 140,
|
|
||||||
|
|
||||||
"globals": {
|
|
||||||
"System": true,
|
|
||||||
"define": true,
|
|
||||||
"require": true,
|
|
||||||
"Chromath": false,
|
|
||||||
"setImmediate": true
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,54 +0,0 @@
|
|||||||
module.exports = function(grunt) {
|
|
||||||
|
|
||||||
require('load-grunt-tasks')(grunt);
|
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-execute');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
|
||||||
|
|
||||||
grunt.initConfig({
|
|
||||||
|
|
||||||
clean: ["dist"],
|
|
||||||
|
|
||||||
copy: {
|
|
||||||
src_to_dist: {
|
|
||||||
cwd: 'src',
|
|
||||||
expand: true,
|
|
||||||
src: ['**/*', '!**/*.js', '!**/*.scss'],
|
|
||||||
dest: 'dist'
|
|
||||||
},
|
|
||||||
pluginDef: {
|
|
||||||
expand: true,
|
|
||||||
src: ['plugin.json', 'readme.md'],
|
|
||||||
dest: 'dist',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
watch: {
|
|
||||||
rebuild_all: {
|
|
||||||
files: ['src/**/*', 'plugin.json', 'readme.md'],
|
|
||||||
tasks: ['default'],
|
|
||||||
options: {spawn: false}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
babel: {
|
|
||||||
options: {
|
|
||||||
sourceMap: true,
|
|
||||||
presets: ["es2015"],
|
|
||||||
plugins: ['transform-es2015-modules-systemjs', "transform-es2015-for-of"],
|
|
||||||
},
|
|
||||||
dist: {
|
|
||||||
files: [{
|
|
||||||
cwd: 'src',
|
|
||||||
expand: true,
|
|
||||||
src: ['**/*.js'],
|
|
||||||
dest: 'dist',
|
|
||||||
ext:'.js'
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
grunt.registerTask('default', ['clean', 'copy:src_to_dist', 'copy:pluginDef', 'babel']);
|
|
||||||
};
|
|
@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "kentik-app",
|
|
||||||
"private": true,
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "",
|
|
||||||
"main": "index.js",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/raintank/kentik-app-poc.git"
|
|
||||||
},
|
|
||||||
"author": "",
|
|
||||||
"license": "ISC",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/raintank/kentik-app-poc/issues"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"grunt": "~0.4.5",
|
|
||||||
"babel": "~6.5.1",
|
|
||||||
"grunt-babel": "~6.0.0",
|
|
||||||
"grunt-contrib-copy": "~0.8.2",
|
|
||||||
"grunt-contrib-watch": "^0.6.1",
|
|
||||||
"grunt-contrib-uglify": "~0.11.0",
|
|
||||||
"grunt-systemjs-builder": "^0.2.5",
|
|
||||||
"load-grunt-tasks": "~3.2.0",
|
|
||||||
"grunt-execute": "~0.2.2",
|
|
||||||
"grunt-contrib-clean": "~0.6.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"babel-plugin-transform-es2015-modules-systemjs": "^6.5.0",
|
|
||||||
"babel-preset-es2015": "^6.5.0",
|
|
||||||
"lodash": "~4.0.0"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/raintank/kentik-app-poc#readme"
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "app",
|
|
||||||
"name": "Nginx",
|
|
||||||
"id": "nginx-app",
|
|
||||||
|
|
||||||
"staticRoot": ".",
|
|
||||||
|
|
||||||
"pages": [
|
|
||||||
{ "name": "Live stream", "component": "StreamPageCtrl", "role": "Editor"},
|
|
||||||
{ "name": "Log view", "component": "LogsPageCtrl", "role": "Viewer"}
|
|
||||||
],
|
|
||||||
|
|
||||||
"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"
|
|
||||||
},
|
|
||||||
|
|
||||||
"includes": [
|
|
||||||
{"type": "dashboard", "name": "Nginx Connection stats", "path": "dashboards/nginx_connection_stats.json"},
|
|
||||||
{"type": "panel", "name": "Nginx Panel"},
|
|
||||||
{"type": "datasource", "name": "Nginx Datasource"}
|
|
||||||
],
|
|
||||||
|
|
||||||
"dependencies": {
|
|
||||||
"grafanaVersion": "3.x.x",
|
|
||||||
"plugins": [
|
|
||||||
{"type": "datasource", "id": "graphite", "name": "Graphite", "version": "1.0.0"},
|
|
||||||
{"type": "panel", "id": "graph", "name": "Graph", "version": "1.0.0"}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
## Overview
|
|
||||||
|
|
||||||
This application is an example app.
|
|
||||||
|
|
||||||
### Awesome
|
|
||||||
|
|
||||||
Even though it does not have any features it is still pretty awesome.
|
|
@ -1,3 +0,0 @@
|
|||||||
<h3>
|
|
||||||
Nginx config!
|
|
||||||
</h3>
|
|
@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
export class NginxAppConfigCtrl {
|
|
||||||
}
|
|
||||||
NginxAppConfigCtrl.templateUrl = 'components/config.html';
|
|
||||||
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
<h3>
|
|
||||||
Logs page!
|
|
||||||
</h3>
|
|
@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
export class LogsPageCtrl {
|
|
||||||
}
|
|
||||||
LogsPageCtrl.templateUrl = 'components/logs.html';
|
|
||||||
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
<h3>
|
|
||||||
Stream page!
|
|
||||||
</h3>
|
|
@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
export class StreamPageCtrl {
|
|
||||||
}
|
|
||||||
StreamPageCtrl.templateUrl = 'components/stream.html';
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
require([
|
|
||||||
], function () {
|
|
||||||
|
|
||||||
function Dashboard() {
|
|
||||||
|
|
||||||
this.getInputs = function() {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
this.buildDashboard = function() {
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return Dashboard;
|
|
||||||
});
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
export default class NginxDatasource {
|
|
||||||
|
|
||||||
constructor() {}
|
|
||||||
|
|
||||||
query(options) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
testDatasource() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
import {Datasource} from './datasource';
|
|
||||||
|
|
||||||
export {
|
|
||||||
Datasource
|
|
||||||
};
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "datasource",
|
|
||||||
"name": "Nginx Datasource",
|
|
||||||
"id": "nginx-datasource"
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.3 KiB |
@ -1,9 +0,0 @@
|
|||||||
import {LogsPageCtrl} from './components/logs';
|
|
||||||
import {StreamPageCtrl} from './components/stream';
|
|
||||||
import {NginxAppConfigCtrl} from './components/config';
|
|
||||||
|
|
||||||
export {
|
|
||||||
NginxAppConfigCtrl as ConfigCtrl,
|
|
||||||
StreamPageCtrl,
|
|
||||||
LogsPageCtrl
|
|
||||||
};
|
|
@ -1,15 +0,0 @@
|
|||||||
import {PanelCtrl} from 'app/plugins/sdk';
|
|
||||||
|
|
||||||
class NginxPanelCtrl extends PanelCtrl {
|
|
||||||
|
|
||||||
constructor($scope, $injector) {
|
|
||||||
super($scope, $injector);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
NginxPanelCtrl.template = '<h2>nginx!</h2>';
|
|
||||||
|
|
||||||
export {
|
|
||||||
NginxPanelCtrl as PanelCtrl
|
|
||||||
};
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "panel",
|
|
||||||
"name": "Nginx Panel",
|
|
||||||
"id": "nginx-panel"
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user