aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/computation/router.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-09-17 16:15:28 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-09-18 10:47:27 +0200
commit890ab0b59cdb3902f4869eabf8ca534814f1b3dd (patch)
tree0ed74726957e590f6506e378366ea15bf21bfcbd /server/sonar-web/src/main/js/apps/computation/router.js
parentce60ac8d2e137f33bb111668e54e78c195c73d79 (diff)
downloadsonarqube-890ab0b59cdb3902f4869eabf8ca534814f1b3dd.tar.gz
sonarqube-890ab0b59cdb3902f4869eabf8ca534814f1b3dd.zip
migrate js apps to es2015 modules
Diffstat (limited to 'server/sonar-web/src/main/js/apps/computation/router.js')
-rw-r--r--server/sonar-web/src/main/js/apps/computation/router.js46
1 files changed, 23 insertions, 23 deletions
diff --git a/server/sonar-web/src/main/js/apps/computation/router.js b/server/sonar-web/src/main/js/apps/computation/router.js
index 6d874801cd3..8ac31c7be90 100644
--- a/server/sonar-web/src/main/js/apps/computation/router.js
+++ b/server/sonar-web/src/main/js/apps/computation/router.js
@@ -1,29 +1,29 @@
-define(function () {
+import Backbone from 'backbone';
- return Backbone.Router.extend({
- routes: {
- '': 'index',
- 'index': 'index',
- 'current': 'current',
- 'past': 'past'
- },
+export default Backbone.Router.extend({
+ routes: {
+ '': 'index',
+ 'index': 'index',
+ 'current': 'current',
+ 'past': 'past'
+ },
- initialize: function (options) {
- this.options = options;
- },
+ initialize: function (options) {
+ this.options = options;
+ },
- index: function () {
- this.navigate('current');
- this.current();
- },
+ index: function () {
+ this.navigate('current');
+ this.current();
+ },
- current: function () {
- this.options.reports.fetch({ q: 'queue' });
- },
-
- past: function () {
- this.options.reports.fetch({ q: 'history' });
- }
- });
+ current: function () {
+ this.options.reports.fetch({ q: 'queue' });
+ },
+ past: function () {
+ this.options.reports.fetch({ q: 'history' });
+ }
});
+
+