aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/coding-rules
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-03-27 12:04:48 +0200
committerGitHub <noreply@github.com>2017-03-27 12:04:48 +0200
commit7d963d84f40ee3db3b51c557fb596aa9febf82bb (patch)
tree7f761f198fae4ad898f4dd98703923921520098b /server/sonar-web/src/main/js/apps/coding-rules
parent48699b502c866ea5a309c57f8ad5e737d1933280 (diff)
downloadsonarqube-7d963d84f40ee3db3b51c557fb596aa9febf82bb.tar.gz
sonarqube-7d963d84f40ee3db3b51c557fb596aa9febf82bb.zip
optimize js bundles (#1855)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/coding-rules')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/active-severity-facet.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/repository-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/severity-facet.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/status-facet.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/type-facet.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/init.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/routes.js16
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule-filter-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js3
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js2
13 files changed, 23 insertions, 17 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/active-severity-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/active-severity-facet.js
index 0bda9b9fada..11eaa506d3a 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/active-severity-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/active-severity-facet.js
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import sortBy from 'lodash/sortBy';
+import { sortBy } from 'lodash';
import BaseFacet from './base-facet';
import Template from '../templates/facets/coding-rules-severity-facet.hbs';
import { translate } from '../../../helpers/l10n';
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js
index f2568f2109c..1fd1c67ead6 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import $ from 'jquery';
-import sortBy from 'lodash/sortBy';
+import { sortBy } from 'lodash';
import BaseFacet from './base-facet';
import Template from '../templates/facets/coding-rules-quality-profile-facet.hbs';
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/repository-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/repository-facet.js
index 379c9b8fbdc..2e6a00b28d2 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/repository-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/repository-facet.js
@@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import 'lodash/object';
import CustomValuesFacet from './custom-values-facet';
export default CustomValuesFacet.extend({
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/severity-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/severity-facet.js
index cc0afc62ce3..f3b21711f7f 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/severity-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/severity-facet.js
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import sortBy from 'lodash/sortBy';
+import { sortBy } from 'lodash';
import BaseFacet from './base-facet';
import Template from '../templates/facets/coding-rules-severity-facet.hbs';
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/status-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/status-facet.js
index 49645fe82bb..9468aff68e7 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/status-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/status-facet.js
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import sortBy from 'lodash/sortBy';
+import { sortBy } from 'lodash';
import BaseFacet from './base-facet';
import { translate } from '../../../helpers/l10n';
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/type-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/type-facet.js
index 7e940f0ff7b..8dfbaf61eaf 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/type-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/type-facet.js
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import sortBy from 'lodash/sortBy';
+import { sortBy } from 'lodash';
import BaseFacet from './base-facet';
import Template from '../templates/facets/coding-rules-type-facet.hbs';
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/init.js b/server/sonar-web/src/main/js/apps/coding-rules/init.js
index bd3eeebda96..f25d2ad0c10 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/init.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/init.js
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import $ from 'jquery';
-import sortBy from 'lodash/sortBy';
+import { sortBy } from 'lodash';
import Backbone from 'backbone';
import Marionette from 'backbone.marionette';
import State from './models/state';
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/routes.js b/server/sonar-web/src/main/js/apps/coding-rules/routes.js
index 651cc6aeaec..a1bba34c6b6 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/routes.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/routes.js
@@ -17,8 +17,16 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import React from 'react';
-import { IndexRoute } from 'react-router';
-import CodingRulesAppContainer from './components/CodingRulesAppContainer';
+const routes = [
+ {
+ indexRoute: {
+ getComponent(_, callback) {
+ require.ensure([], require => {
+ callback(null, require('./components/CodingRulesAppContainer').default);
+ });
+ }
+ }
+ }
+];
-export default <IndexRoute component={CodingRulesAppContainer} />;
+export default routes;
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js
index c83af70b66b..2fa5eb3f2f4 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import $ from 'jquery';
-import union from 'lodash/union';
+import { union } from 'lodash';
import Backbone from 'backbone';
import Marionette from 'backbone.marionette';
import Rules from './models/rules';
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule-filter-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule-filter-view.js
index 98e7529af5c..e3cb43a256f 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule-filter-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule-filter-view.js
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import $ from 'jquery';
-import union from 'lodash/union';
+import { union } from 'lodash';
import ActionOptionsView from '../../components/common/action-options-view';
import Template from './templates/coding-rules-rule-filter-form.hbs';
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js
index b7fdf7d3c33..ba8ed5311ba 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js
@@ -18,8 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import $ from 'jquery';
-import difference from 'lodash/difference';
-import union from 'lodash/union';
+import { difference, union } from 'lodash';
import Marionette from 'backbone.marionette';
import RuleFilterMixin from './rule-filter-mixin';
import Template from '../templates/rule/coding-rules-rule-meta.hbs';
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js
index 7265d718b25..eab8d1be804 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import $ from 'jquery';
-import sortBy from 'lodash/sortBy';
+import { sortBy } from 'lodash';
import Backbone from 'backbone';
import Marionette from 'backbone.marionette';
import ProfileActivationView from './profile-activation-view';
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js
index 80568ff7d9e..77c0b59d6a5 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import $ from 'jquery';
-import union from 'lodash/union';
+import { union } from 'lodash';
import Backbone from 'backbone';
import WorkspaceListItemView from '../../components/navigator/workspace-list-item-view';
import ProfileActivationView from './rule/profile-activation-view';