diff --git a/src/app/components/require.config.js b/src/app/components/require.backend.js
similarity index 97%
rename from src/app/components/require.config.js
rename to src/app/components/require.backend.js
index 0e44d467714..dcc382e3faf 100644
--- a/src/app/components/require.config.js
+++ b/src/app/components/require.backend.js
@@ -1,10 +1,10 @@
require.config({
urlArgs: 'bust=' + (new Date().getTime()),
- baseUrl: window.grafanaRequireJsBaseUrl,
+ baseUrl: 'public/app',
paths: {
- config: window.grafanaConfigUrl,
+ config: 'components/config',
settings: 'components/settings',
kbn: 'components/kbn',
store: 'components/store',
diff --git a/src/app/components/require.standalone.js b/src/app/components/require.standalone.js
new file mode 100644
index 00000000000..99737e19f74
--- /dev/null
+++ b/src/app/components/require.standalone.js
@@ -0,0 +1,99 @@
+require.config({
+ urlArgs: 'bust=' + (new Date().getTime()),
+ baseUrl: 'app',
+
+ paths: {
+ config: ['../config', '../config.sample'],
+ settings: 'components/settings',
+ kbn: 'components/kbn',
+ store: 'components/store',
+
+ css: '../vendor/require/css',
+ text: '../vendor/require/text',
+ moment: '../vendor/moment',
+ filesaver: '../vendor/filesaver',
+ angular: '../vendor/angular/angular',
+ 'angular-route': '../vendor/angular/angular-route',
+ 'angular-sanitize': '../vendor/angular/angular-sanitize',
+ 'angular-dragdrop': '../vendor/angular/angular-dragdrop',
+ 'angular-strap': '../vendor/angular/angular-strap',
+ timepicker: '../vendor/angular/timepicker',
+ datepicker: '../vendor/angular/datepicker',
+ bindonce: '../vendor/angular/bindonce',
+ crypto: '../vendor/crypto.min',
+ spectrum: '../vendor/spectrum',
+
+ lodash: 'components/lodash.extended',
+ 'lodash-src': '../vendor/lodash',
+ bootstrap: '../vendor/bootstrap/bootstrap',
+
+ jquery: '../vendor/jquery/jquery-2.1.1.min',
+
+ 'extend-jquery': 'components/extend-jquery',
+
+ 'jquery.flot': '../vendor/jquery/jquery.flot',
+ 'jquery.flot.pie': '../vendor/jquery/jquery.flot.pie',
+ 'jquery.flot.events': '../vendor/jquery/jquery.flot.events',
+ 'jquery.flot.selection': '../vendor/jquery/jquery.flot.selection',
+ 'jquery.flot.stack': '../vendor/jquery/jquery.flot.stack',
+ 'jquery.flot.stackpercent':'../vendor/jquery/jquery.flot.stackpercent',
+ 'jquery.flot.time': '../vendor/jquery/jquery.flot.time',
+ 'jquery.flot.crosshair': '../vendor/jquery/jquery.flot.crosshair',
+ 'jquery.flot.fillbelow': '../vendor/jquery/jquery.flot.fillbelow',
+
+ modernizr: '../vendor/modernizr-2.6.1',
+
+ 'bootstrap-tagsinput': '../vendor/tagsinput/bootstrap-tagsinput',
+ },
+ shim: {
+
+ spectrum: {
+ deps: ['jquery']
+ },
+
+ crypto: {
+ exports: 'Crypto'
+ },
+
+ angular: {
+ deps: ['jquery','config'],
+ exports: 'angular'
+ },
+
+ bootstrap: {
+ deps: ['jquery']
+ },
+
+ modernizr: {
+ exports: 'Modernizr'
+ },
+
+ jquery: {
+ exports: 'jQuery'
+ },
+
+ // simple dependency declaration
+ //
+ 'jquery.flot': ['jquery'],
+ 'jquery.flot.pie': ['jquery', 'jquery.flot'],
+ 'jquery.flot.events': ['jquery', 'jquery.flot'],
+ 'jquery.flot.selection':['jquery', 'jquery.flot'],
+ 'jquery.flot.stack': ['jquery', 'jquery.flot'],
+ 'jquery.flot.stackpercent':['jquery', 'jquery.flot'],
+ 'jquery.flot.time': ['jquery', 'jquery.flot'],
+ 'jquery.flot.crosshair':['jquery', 'jquery.flot'],
+ 'jquery.flot.fillbelow':['jquery', 'jquery.flot'],
+ 'angular-dragdrop': ['jquery', 'angular'],
+ 'angular-mocks': ['angular'],
+ 'angular-sanitize': ['angular'],
+ 'angular-route': ['angular'],
+ 'angular-strap': ['angular', 'bootstrap','timepicker', 'datepicker'],
+ 'bindonce': ['angular'],
+
+ timepicker: ['jquery', 'bootstrap'],
+ datepicker: ['jquery', 'bootstrap'],
+
+ 'bootstrap-tagsinput': ['jquery'],
+ },
+ waitSeconds: 60,
+});
diff --git a/src/index.html b/src/index.html
index b4071479a73..c6323c8b367 100644
--- a/src/index.html
+++ b/src/index.html
@@ -13,13 +13,11 @@
-
+
diff --git a/tasks/build_task.js b/tasks/build_task.js
index 0c85a52d716..6a4370f8970 100644
--- a/tasks/build_task.js
+++ b/tasks/build_task.js
@@ -20,7 +20,7 @@ module.exports = function(grunt) {
'filerev',
'usemin',
'clean:temp',
- 'uglify:dest'
+ // 'uglify:dest'
]);
grunt.registerTask('build:grafanaVersion', function() {
diff --git a/tasks/options/concat.js b/tasks/options/concat.js
index 537f5614812..c0aca70df23 100644
--- a/tasks/options/concat.js
+++ b/tasks/options/concat.js
@@ -28,7 +28,7 @@ module.exports = function(config) {
js: {
src: [
'<%= destDir %>/vendor/require/require.js',
- '<%= destDir %>/app/components/require.config.js',
+ '<%= destDir %>/app/components/require.standalone.js',
'<%= destDir %>/app/app.js',
],
dest: '<%= destDir %>/app/app.js'
diff --git a/tasks/options/requirejs.js b/tasks/options/requirejs.js
index 92dac5c5b41..735993fcf80 100644
--- a/tasks/options/requirejs.js
+++ b/tasks/options/requirejs.js
@@ -8,7 +8,7 @@ module.exports = function(config,grunt) {
dir: '<%= destDir %>',
baseUrl: './app',
- mainConfigFile: '<%= tempDir %>/app/components/require.config.js',
+ mainConfigFile: '<%= tempDir %>/app/components/require.standalone.js',
modules: [], // populated below,
optimize: 'none',
@@ -63,7 +63,8 @@ module.exports = function(config,grunt) {
'directives/all',
'filters/all',
'controllers/all',
- 'routes/standalone/default',
+ 'routes/standalone/all',
+ 'routes/backend/all',
'components/partials',
]
}