diff --git a/examples/nginx-app/css/dark.css b/examples/nginx-app/css/dark.css
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/examples/nginx-app/css/light.css b/examples/nginx-app/css/light.css
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/examples/nginx-app/img/logo_large.png b/examples/nginx-app/img/logo_large.png
new file mode 100644
index 00000000000..c28955960e4
Binary files /dev/null and b/examples/nginx-app/img/logo_large.png differ
diff --git a/examples/nginx-app/img/logo_small.png b/examples/nginx-app/img/logo_small.png
new file mode 100644
index 00000000000..a6040f66f3d
Binary files /dev/null and b/examples/nginx-app/img/logo_small.png differ
diff --git a/examples/nginx-app/module.js b/examples/nginx-app/module.js
new file mode 100644
index 00000000000..9e061df04cc
--- /dev/null
+++ b/examples/nginx-app/module.js
@@ -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
+ };
+
+});
diff --git a/examples/nginx-app/panel/module.js b/examples/nginx-app/panel/module.js
new file mode 100644
index 00000000000..9ccc5b6c962
--- /dev/null
+++ b/examples/nginx-app/panel/module.js
@@ -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 = '
nginx!
';
+ NginxPanel.prototype = Object.create(_super.prototype);
+ NginxPanel.prototype.constructor = NginxPanel;
+
+ return NginxPanel;
+ })(sdk.PanelCtrl);
+
+ return {
+ PanelCtrl: NginxPanel
+ };
+});
diff --git a/examples/nginx-app/panel/plugin.json b/examples/nginx-app/panel/plugin.json
new file mode 100644
index 00000000000..4160f9ae6f3
--- /dev/null
+++ b/examples/nginx-app/panel/plugin.json
@@ -0,0 +1,6 @@
+{
+ "type": "panel",
+ "name": "Nginx Panel",
+ "id": "nginx-panel",
+ "staticRoot": "."
+}
diff --git a/examples/nginx-app/partials/config.html b/examples/nginx-app/partials/config.html
new file mode 100644
index 00000000000..cdd6b8d9b60
--- /dev/null
+++ b/examples/nginx-app/partials/config.html
@@ -0,0 +1 @@
+nginx config
diff --git a/examples/nginx-app/partials/stream.html b/examples/nginx-app/partials/stream.html
new file mode 100644
index 00000000000..a89afaced57
--- /dev/null
+++ b/examples/nginx-app/partials/stream.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+
diff --git a/examples/nginx-app/plugin.json b/examples/nginx-app/plugin.json
new file mode 100644
index 00000000000..6941fe87f17
--- /dev/null
+++ b/examples/nginx-app/plugin.json
@@ -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"}
+ ]
+ }
+}
diff --git a/examples/panel-plugin-boilerplate-es5/module.js b/examples/panel-boilerplate-es5/module.js
similarity index 100%
rename from examples/panel-plugin-boilerplate-es5/module.js
rename to examples/panel-boilerplate-es5/module.js
diff --git a/examples/panel-plugin-boilerplate-es5/panel.html b/examples/panel-boilerplate-es5/panel.html
similarity index 100%
rename from examples/panel-plugin-boilerplate-es5/panel.html
rename to examples/panel-boilerplate-es5/panel.html
diff --git a/examples/panel-plugin-boilerplate-es5/plugin.json b/examples/panel-boilerplate-es5/plugin.json
similarity index 100%
rename from examples/panel-plugin-boilerplate-es5/plugin.json
rename to examples/panel-boilerplate-es5/plugin.json
diff --git a/public/app/grafana.ts b/public/app/app.ts
similarity index 100%
rename from public/app/grafana.ts
rename to public/app/app.ts
diff --git a/public/app/boot.js b/public/app/boot.js
index 7ba0fb12bf2..d9924ca9dad 100644
--- a/public/app/boot.js
+++ b/public/app/boot.js
@@ -1,8 +1,8 @@
(function bootGrafana() {
'use strict';
- System.import('app/grafana').then(function(grafana) {
- grafana.default.init();
+ System.import('app/app').then(function(app) {
+ app.default.init();
}).catch(function(err) {
console.log('Loading app module failed: ', err);
});
diff --git a/tasks/systemjs_task.js b/tasks/systemjs_task.js
index a2a4b6433d7..0f1a63883e0 100644
--- a/tasks/systemjs_task.js
+++ b/tasks/systemjs_task.js
@@ -11,7 +11,7 @@ module.exports = function(grunt) {
console.log('Starting systemjs-builder');
var modules = [
- 'app/grafana',
+ 'app/app',
'app/features/all',
'app/plugins/panel/**/module',
'app/plugins/datasource/graphite/datasource',