diff --git a/.jshintrc b/.jshintrc index 99247999e7c..bca48639a70 100644 --- a/.jshintrc +++ b/.jshintrc @@ -28,6 +28,7 @@ "globals": { "System": true, + "Promise": true, "define": true, "require": true, "Chromath": false, diff --git a/public/app/boot.js b/public/app/boot.js index d9924ca9dad..26922e9d612 100644 --- a/public/app/boot.js +++ b/public/app/boot.js @@ -1,6 +1,15 @@ (function bootGrafana() { 'use strict'; + var systemLocate = System.locate; + System.locate = function(load) { + var System = this; + return Promise.resolve(systemLocate.call(this, load)).then(function(address) { + return address + System.cacheBust; + }); + }; + System.cacheBust = '?bust=' + Date.now(); + System.import('app/app').then(function(app) { app.default.init(); }).catch(function(err) { diff --git a/tasks/systemjs_task.js b/tasks/systemjs_task.js index 0f1a63883e0..44ed41b9f41 100644 --- a/tasks/systemjs_task.js +++ b/tasks/systemjs_task.js @@ -14,9 +14,9 @@ module.exports = function(grunt) { 'app/app', 'app/features/all', 'app/plugins/panel/**/module', - 'app/plugins/datasource/graphite/datasource', - 'app/plugins/datasource/influxdb/datasource', - 'app/plugins/datasource/elasticsearch/datasource', + 'app/plugins/datasource/graphite/module', + 'app/plugins/datasource/influxdb/module', + 'app/plugins/datasource/elasticsearch/module', ]; var expression = modules.join(' + ');