]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6331 prepare for detailed panels
authorStas Vilchik <vilchiks@gmail.com>
Fri, 3 Apr 2015 09:38:45 +0000 (11:38 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 3 Apr 2015 09:38:45 +0000 (11:38 +0200)
17 files changed:
server/sonar-web/src/main/hbs/overview/overview-layout.hbs
server/sonar-web/src/main/hbs/overview/overview-main-layout.hbs [new file with mode: 0644]
server/sonar-web/src/main/js/overview/app.js
server/sonar-web/src/main/js/overview/controller.js [new file with mode: 0644]
server/sonar-web/src/main/js/overview/layout.js
server/sonar-web/src/main/js/overview/main/coverage-view.js [new file with mode: 0644]
server/sonar-web/src/main/js/overview/main/duplications-view.js [new file with mode: 0644]
server/sonar-web/src/main/js/overview/main/gate-view.js [new file with mode: 0644]
server/sonar-web/src/main/js/overview/main/issues-view.js [new file with mode: 0644]
server/sonar-web/src/main/js/overview/main/layout.js [new file with mode: 0644]
server/sonar-web/src/main/js/overview/main/size-view.js [new file with mode: 0644]
server/sonar-web/src/main/js/overview/router.js [new file with mode: 0644]
server/sonar-web/src/main/js/overview/views/coverage-view.js [deleted file]
server/sonar-web/src/main/js/overview/views/duplications-view.js [deleted file]
server/sonar-web/src/main/js/overview/views/gate-view.js [deleted file]
server/sonar-web/src/main/js/overview/views/issues-view.js [deleted file]
server/sonar-web/src/main/js/overview/views/size-view.js [deleted file]

index 8ce2a7d4e4f40b9ba53fc8f8e3ab04f9bdd61044..a0a7d067a0e50c06e3135aed88e26acd50be6f3e 100644 (file)
@@ -1,18 +1 @@
-<div class="overview-card overview-gate" id="overview-gate"></div>
-
-<div class="overview-container columns">
-  <div class="column-half">
-    <div class="overview-card" id="overview-size"></div>
-  </div>
-  <div class="column-half">
-    <div class="overview-card" id="overview-issues"></div>
-  </div>
-</div>
-<div class="overview-container columns">
-  <div class="column-half">
-    <div class="overview-card" id="overview-coverage"></div>
-  </div>
-  <div class="column-half">
-    <div class="overview-card" id="overview-duplications"></div>
-  </div>
-</div>
+<div class="js-region"></div>
diff --git a/server/sonar-web/src/main/hbs/overview/overview-main-layout.hbs b/server/sonar-web/src/main/hbs/overview/overview-main-layout.hbs
new file mode 100644 (file)
index 0000000..8ce2a7d
--- /dev/null
@@ -0,0 +1,18 @@
+<div class="overview-card overview-gate" id="overview-gate"></div>
+
+<div class="overview-container columns">
+  <div class="column-half">
+    <div class="overview-card" id="overview-size"></div>
+  </div>
+  <div class="column-half">
+    <div class="overview-card" id="overview-issues"></div>
+  </div>
+</div>
+<div class="overview-container columns">
+  <div class="column-half">
+    <div class="overview-card" id="overview-coverage"></div>
+  </div>
+  <div class="column-half">
+    <div class="overview-card" id="overview-duplications"></div>
+  </div>
+</div>
index 9470914d2711f28c53cc99ec20271792e030ed2d..4bf5db63969c90d108b6530821e1bcf8bee14f70 100644 (file)
  */
 requirejs([
   'overview/layout',
-  'overview/models/state',
-  'overview/views/gate-view',
-  'overview/views/size-view',
-  'overview/views/issues-view',
-  'overview/views/coverage-view',
-  'overview/views/duplications-view'
+  'overview/controller',
+  'overview/router',
+  'overview/models/state'
 ], function (Layout,
-             State,
-             GateView,
-             SizeView,
-             IssuesView,
-             CoverageView,
-             DuplicationsView) {
+             Controller,
+             Router,
+             State) {
 
   var $ = jQuery,
       App = new Marionette.Application();
 
   App.addInitializer(function () {
     $('body').addClass('dashboard-page');
+
+    // add state model
     this.state = new State(window.overviewConf);
+
+    // create and render layout
     this.layout = new Layout({
       el: '.overview',
       model: this.state
     }).render();
-    this.layout.gateRegion.show(new GateView({ model: this.state }));
-    this.layout.sizeRegion.show(new SizeView({ model: this.state }));
-    this.layout.issuesRegion.show(new IssuesView({ model: this.state }));
-    this.layout.coverageRegion.show(new CoverageView({ model: this.state }));
-    this.layout.duplicationsRegion.show(new DuplicationsView({ model: this.state }));
-    this.state.fetch();
+
+    // create controller
+    this.controller = new Controller({ state: this.state, layout: this.layout });
+
+    // start router
+    this.router = new Router({ controller: this.controller });
+    Backbone.history.start();
   });
 
   window.requestMessages().done(function () {
diff --git a/server/sonar-web/src/main/js/overview/controller.js b/server/sonar-web/src/main/js/overview/controller.js
new file mode 100644 (file)
index 0000000..f72b99c
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+define([
+  'overview/main/layout',
+  'overview/main/gate-view',
+  'overview/main/size-view',
+  'overview/main/issues-view',
+  'overview/main/coverage-view',
+  'overview/main/duplications-view'
+], function (MainLayout,
+             GateView,
+             SizeView,
+             IssuesView,
+             CoverageView,
+             DuplicationsView) {
+
+  return Marionette.Controller.extend({
+
+    initialize: function (options) {
+      this.state = options.state;
+      this.layout = options.layout;
+    },
+
+    main: function () {
+      var options = { model: this.state },
+          mainLayout = new MainLayout(options);
+      this.layout.mainRegion.show(mainLayout);
+      mainLayout.gateRegion.show(new GateView(options));
+      mainLayout.sizeRegion.show(new SizeView(options));
+      mainLayout.issuesRegion.show(new IssuesView(options));
+      mainLayout.coverageRegion.show(new CoverageView(options));
+      mainLayout.duplicationsRegion.show(new DuplicationsView(options));
+      this.state.fetch();
+    }
+
+  });
+
+});
index ba70f756f626c7d101e6ebbf4360ae686b5a2e88..97cd93d0ca632c47085ffd8d8720a9774fb88059 100644 (file)
@@ -25,21 +25,7 @@ define([
     template: Templates['overview-layout'],
 
     regions: {
-      gateRegion: '#overview-gate',
-      sizeRegion: '#overview-size',
-      issuesRegion: '#overview-issues',
-      coverageRegion: '#overview-coverage',
-      duplicationsRegion: '#overview-duplications'
-    },
-
-    modelEvents: {
-      'change': 'toggleRegions'
-    },
-
-    toggleRegions: function () {
-      var conditions = this.model.get('gateConditions'),
-          hasGate = _.isArray(conditions) && conditions.length > 0;
-      this.$(this.gateRegion.el).toggle(hasGate);
+      mainRegion: '.js-region'
     }
   });
 
diff --git a/server/sonar-web/src/main/js/overview/main/coverage-view.js b/server/sonar-web/src/main/js/overview/main/coverage-view.js
new file mode 100644 (file)
index 0000000..8b807e4
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+define([
+  'templates/overview'
+], function () {
+
+  return Marionette.Layout.extend({
+    template: Templates['overview-coverage'],
+
+    modelEvents: {
+      'change': 'render'
+    },
+
+    onRender: function () {
+      var trend = this.model.get('coverageTrend'),
+          hasCoverage = this.model.get('coverage') != null;
+      if (_.size(trend) > 1 && hasCoverage) {
+        this.$('#overview-coverage-trend').sparkline(this.model.get('coverageTrend'));
+      }
+    }
+  });
+
+});
diff --git a/server/sonar-web/src/main/js/overview/main/duplications-view.js b/server/sonar-web/src/main/js/overview/main/duplications-view.js
new file mode 100644 (file)
index 0000000..18e69af
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+define([
+  'templates/overview'
+], function () {
+
+  return Marionette.Layout.extend({
+    template: Templates['overview-duplications'],
+
+    modelEvents: {
+      'change': 'render'
+    },
+
+    onRender: function () {
+      var trend = this.model.get('duplicationsTrend'),
+          hasDuplications = this.model.get('duplications') != null;
+      if (_.size(trend) > 1 && hasDuplications) {
+        this.$('#overview-duplications-trend').sparkline(this.model.get('duplicationsTrend'));
+      }
+    }
+  });
+
+});
diff --git a/server/sonar-web/src/main/js/overview/main/gate-view.js b/server/sonar-web/src/main/js/overview/main/gate-view.js
new file mode 100644 (file)
index 0000000..22b4f1c
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+define([
+  'templates/overview'
+], function () {
+
+  return Marionette.Layout.extend({
+    template: Templates['overview-gate'],
+
+    modelEvents: {
+      'change': 'render'
+    },
+
+    onRender: function () {
+      if (this.model.has('gateStatus')) {
+        this.$el.closest('.overview-card').addClass('overview-gate-' + this.model.get('gateStatus').toLowerCase());
+      }
+      this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' });
+    },
+
+    onClose: function () {
+      this.$('[data-toggle="tooltip"]').tooltip('destroy');
+    }
+  });
+
+});
diff --git a/server/sonar-web/src/main/js/overview/main/issues-view.js b/server/sonar-web/src/main/js/overview/main/issues-view.js
new file mode 100644 (file)
index 0000000..a17a1d9
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+define([
+  'templates/overview'
+], function () {
+
+  return Marionette.Layout.extend({
+    template: Templates['overview-issues'],
+
+    modelEvents: {
+      'change': 'render'
+    },
+
+    onRender: function () {
+      var trend = this.model.get('issuesTrend'),
+          hasIssues = this.model.get('issues') != null;
+      if (_.size(trend) > 1 && hasIssues) {
+        this.$('#overview-issues-trend').sparkline(this.model.get('issuesTrend'));
+      }
+    }
+  });
+
+});
diff --git a/server/sonar-web/src/main/js/overview/main/layout.js b/server/sonar-web/src/main/js/overview/main/layout.js
new file mode 100644 (file)
index 0000000..8db7c1e
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+define([
+  'templates/overview'
+], function () {
+
+  return Marionette.Layout.extend({
+    template: Templates['overview-main-layout'],
+
+    regions: {
+      gateRegion: '#overview-gate',
+      sizeRegion: '#overview-size',
+      issuesRegion: '#overview-issues',
+      coverageRegion: '#overview-coverage',
+      duplicationsRegion: '#overview-duplications'
+    },
+
+    modelEvents: {
+      'change': 'toggleRegions'
+    },
+
+    toggleRegions: function () {
+      var conditions = this.model.get('gateConditions'),
+          hasGate = _.isArray(conditions) && conditions.length > 0;
+      this.$(this.gateRegion.el).toggle(hasGate);
+    }
+  });
+
+});
diff --git a/server/sonar-web/src/main/js/overview/main/size-view.js b/server/sonar-web/src/main/js/overview/main/size-view.js
new file mode 100644 (file)
index 0000000..db1ab7e
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+define([
+  'templates/overview'
+], function () {
+
+  return Marionette.Layout.extend({
+    template: Templates['overview-size'],
+
+    modelEvents: {
+      'change': 'render'
+    },
+
+    onRender: function () {
+      var trend = this.model.get('sizeTrend'),
+          hasSize = this.model.get('ncloc') != null;
+      if (_.size(trend) > 1 && hasSize) {
+        this.$('#overview-size-trend').sparkline(this.model.get('sizeTrend'));
+      }
+    }
+  });
+
+});
diff --git a/server/sonar-web/src/main/js/overview/router.js b/server/sonar-web/src/main/js/overview/router.js
new file mode 100644 (file)
index 0000000..ace5ffd
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+define(function () {
+
+  return Backbone.Router.extend({
+
+    routes: {
+      '': 'main'
+    },
+
+    initialize: function (options) {
+      this.controller = options.controller;
+    },
+
+    main: function () {
+      this.controller.main();
+    }
+  });
+
+});
diff --git a/server/sonar-web/src/main/js/overview/views/coverage-view.js b/server/sonar-web/src/main/js/overview/views/coverage-view.js
deleted file mode 100644 (file)
index 8b807e4..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-define([
-  'templates/overview'
-], function () {
-
-  return Marionette.Layout.extend({
-    template: Templates['overview-coverage'],
-
-    modelEvents: {
-      'change': 'render'
-    },
-
-    onRender: function () {
-      var trend = this.model.get('coverageTrend'),
-          hasCoverage = this.model.get('coverage') != null;
-      if (_.size(trend) > 1 && hasCoverage) {
-        this.$('#overview-coverage-trend').sparkline(this.model.get('coverageTrend'));
-      }
-    }
-  });
-
-});
diff --git a/server/sonar-web/src/main/js/overview/views/duplications-view.js b/server/sonar-web/src/main/js/overview/views/duplications-view.js
deleted file mode 100644 (file)
index 18e69af..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-define([
-  'templates/overview'
-], function () {
-
-  return Marionette.Layout.extend({
-    template: Templates['overview-duplications'],
-
-    modelEvents: {
-      'change': 'render'
-    },
-
-    onRender: function () {
-      var trend = this.model.get('duplicationsTrend'),
-          hasDuplications = this.model.get('duplications') != null;
-      if (_.size(trend) > 1 && hasDuplications) {
-        this.$('#overview-duplications-trend').sparkline(this.model.get('duplicationsTrend'));
-      }
-    }
-  });
-
-});
diff --git a/server/sonar-web/src/main/js/overview/views/gate-view.js b/server/sonar-web/src/main/js/overview/views/gate-view.js
deleted file mode 100644 (file)
index 22b4f1c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-define([
-  'templates/overview'
-], function () {
-
-  return Marionette.Layout.extend({
-    template: Templates['overview-gate'],
-
-    modelEvents: {
-      'change': 'render'
-    },
-
-    onRender: function () {
-      if (this.model.has('gateStatus')) {
-        this.$el.closest('.overview-card').addClass('overview-gate-' + this.model.get('gateStatus').toLowerCase());
-      }
-      this.$('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: 'bottom' });
-    },
-
-    onClose: function () {
-      this.$('[data-toggle="tooltip"]').tooltip('destroy');
-    }
-  });
-
-});
diff --git a/server/sonar-web/src/main/js/overview/views/issues-view.js b/server/sonar-web/src/main/js/overview/views/issues-view.js
deleted file mode 100644 (file)
index a17a1d9..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-define([
-  'templates/overview'
-], function () {
-
-  return Marionette.Layout.extend({
-    template: Templates['overview-issues'],
-
-    modelEvents: {
-      'change': 'render'
-    },
-
-    onRender: function () {
-      var trend = this.model.get('issuesTrend'),
-          hasIssues = this.model.get('issues') != null;
-      if (_.size(trend) > 1 && hasIssues) {
-        this.$('#overview-issues-trend').sparkline(this.model.get('issuesTrend'));
-      }
-    }
-  });
-
-});
diff --git a/server/sonar-web/src/main/js/overview/views/size-view.js b/server/sonar-web/src/main/js/overview/views/size-view.js
deleted file mode 100644 (file)
index db1ab7e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-define([
-  'templates/overview'
-], function () {
-
-  return Marionette.Layout.extend({
-    template: Templates['overview-size'],
-
-    modelEvents: {
-      'change': 'render'
-    },
-
-    onRender: function () {
-      var trend = this.model.get('sizeTrend'),
-          hasSize = this.model.get('ncloc') != null;
-      if (_.size(trend) > 1 && hasSize) {
-        this.$('#overview-size-trend').sparkline(this.model.get('sizeTrend'));
-      }
-    }
-  });
-
-});