summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-04-05 11:46:02 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-04-05 11:46:02 +0200
commit0bac18d71ccd2504254cd82c89ea208320a5fb30 (patch)
tree1a5c465a5411469833a612f0893f2de907997682
parent7c90d26047935985378a3aa0f26ee316acba59e1 (diff)
downloadsonarqube-0bac18d71ccd2504254cd82c89ea208320a5fb30.tar.gz
sonarqube-0bac18d71ccd2504254cd82c89ea208320a5fb30.zip
enforce js code style5.5-M14
-rw-r--r--server/sonar-web/.eslintrc10
-rw-r--r--server/sonar-web/.jscsrc37
-rw-r--r--server/sonar-web/package.json6
-rw-r--r--server/sonar-web/src/main/js/api/components.js1
-rw-r--r--server/sonar-web/src/main/js/api/events.js1
-rw-r--r--server/sonar-web/src/main/js/api/issues.js7
-rw-r--r--server/sonar-web/src/main/js/api/measures.js1
-rw-r--r--server/sonar-web/src/main/js/api/permissions.js13
-rw-r--r--server/sonar-web/src/main/js/api/user-tokens.js7
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/IssueWidgets.js3
-rw-r--r--server/sonar-web/src/main/js/apps/account/tokens-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js4
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.js2
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/Search.js4
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/constants.js5
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/helpers.js4
-rw-r--r--server/sonar-web/src/main/js/apps/code/actions/index.js6
-rw-r--r--server/sonar-web/src/main/js/apps/code/app.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/Breadcrumb.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/Code.js1
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/Component.js5
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentDetach.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentName.js3
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentPin.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentQualityGate.js1
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/Components.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentsEmpty.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/Search.js5
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/Truncated.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/reducers/index.js6
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/controller.js1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/type-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/layout.js1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/rule-filter-mixin.js1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/rule-parameters-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/workspace-header-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/workspace-list-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/app/actions.js2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/IconBubbles.js2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/IconHistory.js2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/IconList.js2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/IconTree.js2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/LanguageDistribution.js1
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/details/actions.js2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresDomain.js1
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/store/treeViewActions.js2
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/create-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/custom-measure.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/custom-measures.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/delete-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/form-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/header-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/layout.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/list-footer-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/list-item-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/list-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/update-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/dashboard/app.js7
-rw-r--r--server/sonar-web/src/main/js/apps/global-permissions/groups-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/global-permissions/permission.js4
-rw-r--r--server/sonar-web/src/main/js/apps/global-permissions/permissions-list.js3
-rw-r--r--server/sonar-web/src/main/js/apps/global-permissions/users-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/app.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/create-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/delete-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/form-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/group.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/groups.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/header-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/layout.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/list-footer-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/list-item-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/list-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/search-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/update-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/groups/users-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/app.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/component-viewer/issue-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/component-viewer/main.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/controller.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/assignee-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/base-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/context-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/file-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/issue-key-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/mode-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/module-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/reporter-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/resolution-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/severity-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/status-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/type-facet.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/filters-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/issue-filter-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/layout.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/models/filter.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/models/filters.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/models/issue.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/models/issues.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/models/state.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/router.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/workspace-header-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/workspace-home-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/workspace-list-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/maintenance/app.js1
-rw-r--r--server/sonar-web/src/main/js/apps/maintenance/main-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/markdown/app.js1
-rw-r--r--server/sonar-web/src/main/js/apps/markdown/markdown-help-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/measures/measures-filter-bar.js1
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/app.js2
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/create-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/form-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/header-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/layout.js1
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/list-footer-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/list-item-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/list-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/metric.js1
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/metrics.js1
-rw-r--r--server/sonar-web/src/main/js/apps/metrics/update-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/complexity-distribution.js2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/event.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/events-list-filter.js2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/language-distribution.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/legend.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/gate/gate-condition.js2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/gate/gate.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/helpers/periods.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/code-smells.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/components.js9
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/coverage.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/duplications.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/main.js2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/risk.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/structure.js1
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/timeline.js2
-rw-r--r--server/sonar-web/src/main/js/apps/permission-templates/main.js12
-rw-r--r--server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.js2
-rw-r--r--server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.js6
-rw-r--r--server/sonar-web/src/main/js/apps/permission-templates/permission-template.js4
-rw-r--r--server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js5
-rw-r--r--server/sonar-web/src/main/js/apps/permission-templates/permissions-header.js4
-rw-r--r--server/sonar-web/src/main/js/apps/project-permissions/groups-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/project-permissions/main.js10
-rw-r--r--server/sonar-web/src/main/js/apps/project-permissions/permissions-footer.js7
-rw-r--r--server/sonar-web/src/main/js/apps/project-permissions/permissions-header.js4
-rw-r--r--server/sonar-web/src/main/js/apps/project-permissions/permissions.js5
-rw-r--r--server/sonar-web/src/main/js/apps/project-permissions/project.js2
-rw-r--r--server/sonar-web/src/main/js/apps/project-permissions/qualifier-filter.js2
-rw-r--r--server/sonar-web/src/main/js/apps/project-permissions/search.js3
-rw-r--r--server/sonar-web/src/main/js/apps/project-permissions/users-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/projects/app.js6
-rw-r--r--server/sonar-web/src/main/js/apps/projects/create-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/projects/delete-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/projects/main.js17
-rw-r--r--server/sonar-web/src/main/js/apps/projects/projects.js2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/search.js14
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionForm.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/views/copy-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/views/create-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/views/delete-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/views/gate-conditions-delete-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/views/rename-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/actions-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/app.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/change-profile-parent-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/controller.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/copy-profile-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/create-profile-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/delete-profile-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/intro-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/layout.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profile-changelog-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profile-comparison-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profile-header-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profile-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profiles-empty-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profiles-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profiles.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/rename-profile-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/restore-built-in-profiles-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/router.js1
-rw-r--r--server/sonar-web/src/main/js/apps/source-viewer/app.js1
-rw-r--r--server/sonar-web/src/main/js/apps/system/app.js1
-rw-r--r--server/sonar-web/src/main/js/apps/system/item-log-level.js6
-rw-r--r--server/sonar-web/src/main/js/apps/system/item-object.js2
-rw-r--r--server/sonar-web/src/main/js/apps/system/item-value.js2
-rw-r--r--server/sonar-web/src/main/js/apps/system/main.js4
-rw-r--r--server/sonar-web/src/main/js/apps/system/section.js2
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/app.js1
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/controller.js1
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/footer-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/header-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/layout.js1
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/list-item-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/list-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/plugin-changelog-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/plugin.js1
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/plugins.js1
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/router.js1
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/search-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/app.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/change-password-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/create-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/deactivate-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/form-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/groups-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/header-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/layout.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/list-footer-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/list-item-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/list-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/users/search-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/tokens-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/update-view.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/user.js1
-rw-r--r--server/sonar-web/src/main/js/apps/users/users.js1
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/Menu.js1
-rw-r--r--server/sonar-web/src/main/js/components/RestartModal/index.js1
-rw-r--r--server/sonar-web/src/main/js/components/SelectList/index.js5
-rw-r--r--server/sonar-web/src/main/js/components/charts/bar-chart.js46
-rw-r--r--server/sonar-web/src/main/js/components/charts/bubble-chart.js57
-rw-r--r--server/sonar-web/src/main/js/components/charts/donut-chart.js16
-rw-r--r--server/sonar-web/src/main/js/components/charts/histogram.js26
-rw-r--r--server/sonar-web/src/main/js/components/charts/line-chart.js45
-rw-r--r--server/sonar-web/src/main/js/components/charts/treemap-breadcrumbs.js3
-rw-r--r--server/sonar-web/src/main/js/components/charts/treemap.js22
-rw-r--r--server/sonar-web/src/main/js/components/charts/word-cloud.js11
-rw-r--r--server/sonar-web/src/main/js/components/common/action-options-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/common/file-upload.js1
-rw-r--r--server/sonar-web/src/main/js/components/common/modal-form.js1
-rw-r--r--server/sonar-web/src/main/js/components/common/popup.js1
-rw-r--r--server/sonar-web/src/main/js/components/common/selectable-collection-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/collections/issues.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/issue-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/models/changelog.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/models/issue.js14
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/changelog-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/comment-form-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/issue-popup.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/set-severity-form-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/set-type-form-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/tags-form-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/views/transitions-form-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/mixins/tooltips-mixin.js2
-rw-r--r--server/sonar-web/src/main/js/components/navigator/controller.js1
-rw-r--r--server/sonar-web/src/main/js/components/navigator/facets-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/navigator/facets/base-facet.js1
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/ajax-select-filters.js32
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/base-filters.js33
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/checkbox-filters.js7
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/choice-filters.js28
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/favorite-filters.js11
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/filter-bar.js14
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/metric-filters.js12
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/more-criteria-filters.js14
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/range-filters.js16
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/string-filters.js11
-rw-r--r--server/sonar-web/src/main/js/components/navigator/models/facet.js1
-rw-r--r--server/sonar-web/src/main/js/components/navigator/models/facets.js1
-rw-r--r--server/sonar-web/src/main/js/components/navigator/models/state.js1
-rw-r--r--server/sonar-web/src/main/js/components/navigator/router.js1
-rw-r--r--server/sonar-web/src/main/js/components/navigator/workspace-header-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/navigator/workspace-list-item-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/navigator/workspace-list-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/router/router.js3
-rw-r--r--server/sonar-web/src/main/js/components/select-list/controls.js6
-rw-r--r--server/sonar-web/src/main/js/components/select-list/footer.js2
-rw-r--r--server/sonar-web/src/main/js/components/select-list/item.js2
-rw-r--r--server/sonar-web/src/main/js/components/select-list/list.js4
-rw-r--r--server/sonar-web/src/main/js/components/select-list/main.js7
-rw-r--r--server/sonar-web/src/main/js/components/shared/FavoriteIssueFilter.js2
-rw-r--r--server/sonar-web/src/main/js/components/shared/FavoriteMeasureFilter.js2
-rw-r--r--server/sonar-web/src/main/js/components/shared/assignee-helper.js4
-rw-r--r--server/sonar-web/src/main/js/components/shared/checkbox.js4
-rw-r--r--server/sonar-web/src/main/js/components/shared/drilldown-link.js2
-rw-r--r--server/sonar-web/src/main/js/components/shared/favorite.js2
-rw-r--r--server/sonar-web/src/main/js/components/shared/issues-link.js3
-rw-r--r--server/sonar-web/src/main/js/components/shared/list-footer.js7
-rw-r--r--server/sonar-web/src/main/js/components/shared/pending-icon.js2
-rw-r--r--server/sonar-web/src/main/js/components/shared/pin-icon.js3
-rw-r--r--server/sonar-web/src/main/js/components/shared/quality-gate-link.js3
-rw-r--r--server/sonar-web/src/main/js/components/shared/quality-profile-link.js3
-rw-r--r--server/sonar-web/src/main/js/components/shared/radio-toggle.js8
-rw-r--r--server/sonar-web/src/main/js/components/shared/rating.js5
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/header.js4
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/helpers/code-with-issue-locations-helper.js7
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js5
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/more-actions.js1
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/popups/line-actions-popup.js5
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/source.js1
-rw-r--r--server/sonar-web/src/main/js/components/workspace/main.js2
-rw-r--r--server/sonar-web/src/main/js/components/workspace/models/item.js1
-rw-r--r--server/sonar-web/src/main/js/components/workspace/models/items.js1
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/base-viewer-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/item-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/items-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/rule-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js1
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/viewer-view.js1
-rw-r--r--server/sonar-web/src/main/js/helpers/handlebars/formatFacetValue.js1
-rw-r--r--server/sonar-web/src/main/js/helpers/latinize.js1
-rw-r--r--server/sonar-web/src/main/js/helpers/measures.js10
-rw-r--r--server/sonar-web/src/main/js/helpers/path.js4
-rw-r--r--server/sonar-web/src/main/js/helpers/request.js10
-rw-r--r--server/sonar-web/src/main/js/helpers/urls.js5
-rw-r--r--server/sonar-web/src/main/js/main/app.js2
-rw-r--r--server/sonar-web/src/main/js/main/nav/app.js11
-rw-r--r--server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js5
-rw-r--r--server/sonar-web/src/main/js/main/nav/component/component-nav-meta.js13
-rw-r--r--server/sonar-web/src/main/js/main/nav/component/component-nav.js2
-rw-r--r--server/sonar-web/src/main/js/main/nav/global/global-nav-branding.js8
-rw-r--r--server/sonar-web/src/main/js/main/nav/global/global-nav-search.js2
-rw-r--r--server/sonar-web/src/main/js/main/nav/global/search-view.js3
-rw-r--r--server/sonar-web/src/main/js/main/nav/global/shortcuts-help-view.js1
-rw-r--r--server/sonar-web/src/main/js/main/nav/links-mixin.js8
-rw-r--r--server/sonar-web/src/main/js/main/processes.js3
-rw-r--r--server/sonar-web/src/main/js/widgets/issue-filter/widget.js1
-rw-r--r--server/sonar-web/src/main/js/widgets/old/base.js1
-rw-r--r--server/sonar-web/src/main/js/widgets/old/bubble-chart.js22
-rw-r--r--server/sonar-web/src/main/js/widgets/old/pie-chart.js23
-rw-r--r--server/sonar-web/src/main/js/widgets/old/stack-area.js25
-rw-r--r--server/sonar-web/src/main/js/widgets/old/timeline.js22
-rw-r--r--server/sonar-web/src/main/js/widgets/old/widget.js19
332 files changed, 319 insertions, 921 deletions
diff --git a/server/sonar-web/.eslintrc b/server/sonar-web/.eslintrc
index b22ddbb9776..0161c839d43 100644
--- a/server/sonar-web/.eslintrc
+++ b/server/sonar-web/.eslintrc
@@ -27,7 +27,6 @@
"plugins": [
"react",
- "mocha",
"import"
],
@@ -43,7 +42,7 @@
"no-multi-spaces": 1,
"no-self-compare": 2,
"no-unexpected-multiline": 2,
- "max-len": [1, 120, 2],
+ "max-len": 0,
"no-const-assign": 2,
"no-multiple-empty-lines": [1, { "max": 3 }],
"no-spaced-func": 1,
@@ -76,5 +75,12 @@
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
"react/sort-comp": 1
+ },
+
+ "settings": {
+ "import/ignore": [
+ "node_modules",
+ "hbs$"
+ ]
}
}
diff --git a/server/sonar-web/.jscsrc b/server/sonar-web/.jscsrc
new file mode 100644
index 00000000000..0b5067c2de7
--- /dev/null
+++ b/server/sonar-web/.jscsrc
@@ -0,0 +1,37 @@
+{
+ "preset": "airbnb",
+ "esnext": true,
+ "excludeFiles": [
+ "src/main/js/libs/**"
+ ],
+
+ "disallowSpacesInFunctionDeclaration": false,
+ "requireTrailingComma": false,
+ "requirePaddingNewLinesAfterBlocks": false,
+ "requireShorthandArrowFunctions": false,
+ "disallowQuotedKeysInObjects": false,
+ "requireSpacesInFunctionDeclaration": {
+ "beforeOpeningRoundBrace": true,
+ "beforeOpeningCurlyBrace": true
+ },
+ "requireDotNotation": {
+ "allExcept": [
+ "snake_case"
+ ]
+ },
+ "disallowSpaceAfterObjectKeys": false,
+ "maximumLineLength": 120,
+ "safeContextKeyword": [
+ "that"
+ ],
+ "requireDollarBeforejQueryAssignment": false,
+ "requireDotNotation": false,
+ "disallowArrayDestructuringReturn": false,
+ "requireEnhancedObjectLiterals": true,
+ "requireObjectKeysOnNewLine": {
+ "allExcept": ["sameLine"]
+ },
+ "requireSpaceBeforeDestructuredValues": true,
+ "requireSpaceBeforeObjectValues": true,
+ "requireSpacesInsideObjectBrackets": "all"
+}
diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json
index 2a2b3149855..bedbac551af 100644
--- a/server/sonar-web/package.json
+++ b/server/sonar-web/package.json
@@ -26,8 +26,7 @@
"del": "2.0.2",
"enzyme": "1.2.0",
"eslint": "2.2.0",
- "eslint-plugin-import": "^1.0.0-beta.0",
- "eslint-plugin-mocha": "1.1.0",
+ "eslint-plugin-import": "^1.4.0",
"eslint-plugin-react": "4.0.0",
"event-stream": "3.3.1",
"expose-loader": "0.7.1",
@@ -46,6 +45,7 @@
"imports-loader": "0.6.5",
"isparta": "4.0.0",
"jquery": "2.2.0",
+ "jscs": "^2.11.0",
"jsdom": "6.5.1",
"lodash": "4.6.1",
"mocha": "2.3.4",
@@ -80,7 +80,7 @@
"build": "gulp build",
"test": "mocha --opts tests/mocha.opts tests",
"coverage": "babel-node node_modules/.bin/isparta cover --root 'src/main/js' --include-all-sources --excludes '**/libs/**' --dir 'target/coverage' node_modules/.bin/_mocha -- --opts tests/mocha.opts tests",
- "lint": "eslint src/main/js"
+ "lint": "eslint src/main/js && jscs src/main/js"
},
"engines": {
"node": ">=4"
diff --git a/server/sonar-web/src/main/js/api/components.js b/server/sonar-web/src/main/js/api/components.js
index a4ce0bcaf55..ac53aaf2ab3 100644
--- a/server/sonar-web/src/main/js/api/components.js
+++ b/server/sonar-web/src/main/js/api/components.js
@@ -19,7 +19,6 @@
*/
import { getJSON, postJSON, post } from '../helpers/request.js';
-
export function getComponents (data) {
const url = window.baseUrl + '/api/components/search';
return getJSON(url, data);
diff --git a/server/sonar-web/src/main/js/api/events.js b/server/sonar-web/src/main/js/api/events.js
index 1a4b0bdb473..450a4cd2623 100644
--- a/server/sonar-web/src/main/js/api/events.js
+++ b/server/sonar-web/src/main/js/api/events.js
@@ -19,7 +19,6 @@
*/
import { getJSON } from '../helpers/request.js';
-
/**
* Return events for a component
* @param {string} componentKey
diff --git a/server/sonar-web/src/main/js/api/issues.js b/server/sonar-web/src/main/js/api/issues.js
index 7e2a70ad440..d4b6b4932bf 100644
--- a/server/sonar-web/src/main/js/api/issues.js
+++ b/server/sonar-web/src/main/js/api/issues.js
@@ -21,7 +21,6 @@ import _ from 'underscore';
import { getJSON } from '../helpers/request.js';
-
export function getFacets (query, facets) {
const url = window.baseUrl + '/api/issues/search';
const data = _.extend({}, query, { facets: facets.join(), ps: 1, additionalFields: '_all' });
@@ -30,24 +29,20 @@ export function getFacets (query, facets) {
});
}
-
export function getFacet (query, facet) {
return getFacets(query, [facet]).then(r => {
return { facet: r.facets[0].values, response: r.response };
});
}
-
export function getSeverities (query) {
return getFacet(query, 'severities').then(r => r.facet);
}
-
export function getTags (query) {
return getFacet(query, 'tags').then(r => r.facet);
}
-
export function extractAssignees (facet, response) {
return facet.map(item => {
const user = _.findWhere(response.users, { login: item.val });
@@ -55,12 +50,10 @@ export function extractAssignees (facet, response) {
});
}
-
export function getAssignees (query) {
return getFacet(query, 'assignees').then(r => extractAssignees(r.facet, r.response));
}
-
export function getIssuesCount (query) {
const url = window.baseUrl + '/api/issues/search';
const data = _.extend({}, query, { ps: 1, facetMode: 'debt' });
diff --git a/server/sonar-web/src/main/js/api/measures.js b/server/sonar-web/src/main/js/api/measures.js
index 1ebc1e3e225..e182dab8174 100644
--- a/server/sonar-web/src/main/js/api/measures.js
+++ b/server/sonar-web/src/main/js/api/measures.js
@@ -19,7 +19,6 @@
*/
import { getJSON } from '../helpers/request.js';
-
export function getMeasures (componentKey, metrics) {
const url = window.baseUrl + '/api/measures/component';
const data = { componentKey, metricKeys: metrics.join(',') };
diff --git a/server/sonar-web/src/main/js/api/permissions.js b/server/sonar-web/src/main/js/api/permissions.js
index 533120e4df8..4e199cd6c54 100644
--- a/server/sonar-web/src/main/js/api/permissions.js
+++ b/server/sonar-web/src/main/js/api/permissions.js
@@ -28,13 +28,11 @@ function typeError (method, message) {
throw new TypeError(`permissions#${method}: ${message}`);
}
-
export function getUsers (data) {
const url = window.baseUrl + '/api/permissions/users';
return request({ type: 'GET', url, data });
}
-
export function grantToUser (permission, user, project) {
if (typeof permission !== 'string' || !permission.length) {
return typeError('grantToUser', 'please provide permission');
@@ -51,7 +49,6 @@ export function grantToUser (permission, user, project) {
return request({ type: 'POST', url, data });
}
-
export function revokeFromUser (permission, user, project) {
if (typeof permission !== 'string' || !permission.length) {
return typeError('revokeFromUser', 'please provide permission');
@@ -68,13 +65,11 @@ export function revokeFromUser (permission, user, project) {
return request({ type: 'POST', url, data });
}
-
export function getGroups (data) {
const url = window.baseUrl + '/api/permissions/groups';
return request({ type: 'GET', url, data });
}
-
export function grantToGroup (permission, group, project) {
if (typeof permission !== 'string' || !permission.length) {
return typeError('grantToGroup', 'please provide permission');
@@ -91,7 +86,6 @@ export function grantToGroup (permission, group, project) {
return request({ type: 'POST', url, data });
}
-
export function revokeFromGroup (permission, group, project) {
if (typeof permission !== 'string' || !permission.length) {
return typeError('revokeFromGroup', 'please provide permission');
@@ -108,7 +102,6 @@ export function revokeFromGroup (permission, group, project) {
return request({ type: 'POST', url, data });
}
-
export function getPermissionTemplates (query) {
const url = window.baseUrl + '/api/permissions/search_templates';
const data = { };
@@ -118,7 +111,6 @@ export function getPermissionTemplates (query) {
return request({ type: 'GET', url, data });
}
-
export function createPermissionTemplate (options) {
const url = window.baseUrl + '/api/permissions/create_template';
return request(_.extend({ type: 'POST', url }, options));
@@ -129,13 +121,11 @@ export function updatePermissionTemplate (options) {
return request(_.extend({ type: 'POST', url }, options));
}
-
export function deletePermissionTemplate (options) {
const url = window.baseUrl + '/api/permissions/delete_template';
return request(_.extend({ type: 'POST', url }, options));
}
-
export function setDefaultPermissionTemplate (template, qualifier) {
if (typeof template !== 'string' || !template.length) {
return typeError('setDefaultPermissionTemplate', 'please provide permission template ID');
@@ -146,8 +136,7 @@ export function setDefaultPermissionTemplate (template, qualifier) {
return request({ type: 'POST', url, data });
}
-
-export function applyTemplateToProject(options) {
+export function applyTemplateToProject (options) {
const url = window.baseUrl + '/api/permissions/apply_template';
return request(_.extend({ type: 'POST', url }, options));
}
diff --git a/server/sonar-web/src/main/js/api/user-tokens.js b/server/sonar-web/src/main/js/api/user-tokens.js
index 218da22f2fe..3cd1a71b4c7 100644
--- a/server/sonar-web/src/main/js/api/user-tokens.js
+++ b/server/sonar-web/src/main/js/api/user-tokens.js
@@ -19,7 +19,6 @@
*/
import { getJSON, postJSON, post } from '../helpers/request.js';
-
/**
* List tokens for given user login
* @param {string} login
@@ -31,27 +30,25 @@ export function getTokens (login) {
return getJSON(url, data).then(r => r.userTokens);
}
-
/**
* Generate a user token
* @param {string} userLogin
* @param {string} tokenName
* @returns {Promise}
*/
-export function generateToken(userLogin, tokenName) {
+export function generateToken (userLogin, tokenName) {
const url = window.baseUrl + '/api/user_tokens/generate';
const data = { login: userLogin, name: tokenName };
return postJSON(url, data);
}
-
/**
* Revoke a user token
* @param {string} userLogin
* @param {string} tokenName
* @returns {Promise}
*/
-export function revokeToken(userLogin, tokenName) {
+export function revokeToken (userLogin, tokenName) {
const url = window.baseUrl + '/api/user_tokens/revoke';
const data = { login: userLogin, name: tokenName };
return post(url, data);
diff --git a/server/sonar-web/src/main/js/apps/account/components/IssueWidgets.js b/server/sonar-web/src/main/js/apps/account/components/IssueWidgets.js
index 673089bab6a..0230acb750b 100644
--- a/server/sonar-web/src/main/js/apps/account/components/IssueWidgets.js
+++ b/server/sonar-web/src/main/js/apps/account/components/IssueWidgets.js
@@ -27,10 +27,8 @@ import { getFacets, getFacet } from '../../../api/issues';
import { translate } from '../../../helpers/l10n';
import { formatMeasure } from '../../../helpers/measures';
-
const BASE_QUERY = { resolved: false, assignees: '__me__' };
-
function getTotalUrl () {
return window.baseUrl + '/account/issues#resolved=false';
}
@@ -55,7 +53,6 @@ function getPeriodUrl (createdAfter, createdBefore) {
return window.baseUrl + `/account/issues#resolved=false|createdAfter=${createdAfter}|createdBefore=${createdBefore}`;
}
-
export default class IssueWidgets extends Component {
state = {
loading: true
diff --git a/server/sonar-web/src/main/js/apps/account/tokens-view.js b/server/sonar-web/src/main/js/apps/account/tokens-view.js
index 6ba5c9776a6..1429bd31d5a 100644
--- a/server/sonar-web/src/main/js/apps/account/tokens-view.js
+++ b/server/sonar-web/src/main/js/apps/account/tokens-view.js
@@ -25,7 +25,6 @@ import Clipboard from 'clipboard';
import Template from './templates/account-tokens.hbs';
import { getTokens, generateToken, revokeToken } from '../../api/user-tokens';
-
export default Marionette.ItemView.extend({
template: Template,
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js
index 3418548c36e..3e2ec7e3510 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js
@@ -27,7 +27,6 @@ import SearchContainer from '../containers/SearchContainer';
import TasksContainer from '../containers/TasksContainer';
import ListFooterContainer from '../containers/ListFooterContainer';
-
export default class BackgroundTasksApp extends Component {
componentDidMount () {
this.props.initApp(this.props.options.component);
@@ -43,7 +42,7 @@ export default class BackgroundTasksApp extends Component {
getDateFilter () {
const DATE_FORMAT = 'YYYY-MM-DD';
- let filter = {};
+ const filter = {};
switch (this.state.dateFilter) {
case DATE.TODAY:
filter.minSubmittedAt = moment().startOf('day').format(DATE_FORMAT);
@@ -57,6 +56,7 @@ export default class BackgroundTasksApp extends Component {
}
break;
default:
+
// do nothing
}
return filter;
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.js b/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.js
index b5969a75ceb..83e90c9caf3 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.js
@@ -33,7 +33,7 @@ export default class DateFilter extends Component {
}
attachDatePicker () {
- let opts = {
+ const opts = {
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js
index 04ddd3d5a73..6a66f8b22b9 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js
@@ -33,8 +33,8 @@ export default React.createClass({
},
onSearch() {
- let searchInput = this.refs.searchInput;
- let query = searchInput.value;
+ const searchInput = this.refs.searchInput;
+ const query = searchInput.value;
this.props.onSearch(query);
},
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/constants.js b/server/sonar-web/src/main/js/apps/background-tasks/constants.js
index d58eb9032b5..7915c37540a 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/constants.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/constants.js
@@ -27,16 +27,13 @@ export const STATUSES = {
CANCELED: 'CANCELED'
};
-
export const ALL_TYPES = 'ALL_TYPES';
-
export const CURRENTS = {
ALL: '__ALL__',
ONLY_CURRENTS: 'CURRENTS'
};
-
export const DATE = {
ANY: 'ANY',
TODAY: 'TODAY',
@@ -51,8 +48,6 @@ export const DEFAULT_FILTERS = {
query: ''
};
-
export const DATE_FORMAT = 'YYYY-MM-DD';
-
export const DEBOUNCE_DELAY = 250;
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/helpers.js b/server/sonar-web/src/main/js/apps/background-tasks/helpers.js
index e53b1dda56d..a3c797b6985 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/helpers.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/helpers.js
@@ -20,11 +20,11 @@
const ONE_SECOND = 1000;
const ONE_MINUTE = 60 * ONE_SECOND;
-function format(int, suffix) {
+function format (int, suffix) {
return `${int}${suffix}`;
}
-export function formatDuration(value) {
+export function formatDuration (value) {
if (!value) {
return '';
}
diff --git a/server/sonar-web/src/main/js/apps/code/actions/index.js b/server/sonar-web/src/main/js/apps/code/actions/index.js
index 6f08f352e86..fc143fa1ec1 100644
--- a/server/sonar-web/src/main/js/apps/code/actions/index.js
+++ b/server/sonar-web/src/main/js/apps/code/actions/index.js
@@ -24,7 +24,6 @@ import { getChildren, getComponent, getTree, getBreadcrumbs } from '../../../api
import { translate } from '../../../helpers/l10n';
import { getComponentUrl } from '../../../helpers/urls';
-
const METRICS = [
'ncloc',
'code_smells',
@@ -41,7 +40,6 @@ const METRICS_WITH_COVERAGE = [
'overall_coverage'
];
-
export const INIT = 'INIT';
export const BROWSE = 'BROWSE';
export const SEARCH = 'SEARCH';
@@ -52,7 +50,6 @@ export const START_FETCHING = 'START_FETCHING';
export const STOP_FETCHING = 'STOP_FETCHING';
export const RAISE_ERROR = 'RAISE_ERROR';
-
export function initComponentAction (component, breadcrumbs = []) {
return {
type: INIT,
@@ -107,7 +104,6 @@ export function raiseError (message) {
};
}
-
function getPath (componentKey) {
return '/' + encodeURIComponent(componentKey);
}
@@ -169,7 +165,7 @@ async function getErrorMessage (response) {
return translate('not_authorized');
default:
try {
- let json = await response.json();
+ const json = await response.json();
return json['err_msg'] ||
(json.errors && _.pluck(json.errors, 'msg').join('. ')) ||
translate('default_error_message');
diff --git a/server/sonar-web/src/main/js/apps/code/app.js b/server/sonar-web/src/main/js/apps/code/app.js
index cf84835a71f..c907e417174 100644
--- a/server/sonar-web/src/main/js/apps/code/app.js
+++ b/server/sonar-web/src/main/js/apps/code/app.js
@@ -29,13 +29,11 @@ import configureStore from './store/configureStore';
import './styles/code.css';
-
const store = configureStore();
const history = useRouterHistory(createHashHistory)({ queryKey: false });
syncReduxAndRouter(history, store);
-
window.sonarqube.appStarted.then(({ el, component }) => {
const CodeWithComponent = () => {
return <Code component={component}/>;
diff --git a/server/sonar-web/src/main/js/apps/code/components/Breadcrumb.js b/server/sonar-web/src/main/js/apps/code/components/Breadcrumb.js
index 6957cd66256..ad6f2786c46 100644
--- a/server/sonar-web/src/main/js/apps/code/components/Breadcrumb.js
+++ b/server/sonar-web/src/main/js/apps/code/components/Breadcrumb.js
@@ -21,12 +21,10 @@ import React from 'react';
import ComponentName from './ComponentName';
-
const Breadcrumb = ({ component, onBrowse }) => (
<ComponentName
component={component}
onBrowse={onBrowse}/>
);
-
export default Breadcrumb;
diff --git a/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.js b/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.js
index 4d0e3b4b273..a724db37337 100644
--- a/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.js
+++ b/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.js
@@ -21,7 +21,6 @@ import React from 'react';
import Breadcrumb from './Breadcrumb';
-
const Breadcrumbs = ({ breadcrumbs, onBrowse }) => (
<ul className="code-breadcrumbs">
{breadcrumbs.map((component, index) => (
@@ -34,5 +33,4 @@ const Breadcrumbs = ({ breadcrumbs, onBrowse }) => (
</ul>
);
-
export default Breadcrumbs;
diff --git a/server/sonar-web/src/main/js/apps/code/components/Code.js b/server/sonar-web/src/main/js/apps/code/components/Code.js
index 78911ec1437..47e2e13cf2e 100644
--- a/server/sonar-web/src/main/js/apps/code/components/Code.js
+++ b/server/sonar-web/src/main/js/apps/code/components/Code.js
@@ -27,7 +27,6 @@ import SourceViewer from './SourceViewer';
import Search from './Search';
import { initComponent, browse } from '../actions';
-
class Code extends Component {
componentDidMount () {
const { dispatch, component, routing } = this.props;
diff --git a/server/sonar-web/src/main/js/apps/code/components/Component.js b/server/sonar-web/src/main/js/apps/code/components/Component.js
index 1f025708713..34d0f04713e 100644
--- a/server/sonar-web/src/main/js/apps/code/components/Component.js
+++ b/server/sonar-web/src/main/js/apps/code/components/Component.js
@@ -28,11 +28,9 @@ import ComponentQualityGate from './ComponentQualityGate';
import ComponentDetach from './ComponentDetach';
import ComponentPin from './ComponentPin';
-
const TOP_OFFSET = 200;
const BOTTOM_OFFSET = 10;
-
class Component extends React.Component {
componentDidMount () {
this.handleUpdate();
@@ -80,7 +78,7 @@ class Component extends React.Component {
/* eslint object-shorthand: 0 */
return (
- <tr className={classNames({ 'selected': selected })}>
+ <tr className={classNames({ selected })}>
<td className="thin nowrap">
<span className="spacer-right">
{componentAction}
@@ -149,7 +147,6 @@ class Component extends React.Component {
}
}
-
function mapStateToProps (state, ownProps) {
return {
selected: state.current.searchSelectedItem === ownProps.component,
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentDetach.js b/server/sonar-web/src/main/js/apps/code/components/ComponentDetach.js
index c2a18b6defd..7583fcbbe92 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentDetach.js
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentDetach.js
@@ -22,7 +22,6 @@ import React from 'react';
import { getComponentUrl } from '../../../helpers/urls';
import { translate } from '../../../helpers/l10n';
-
const ComponentDetach = ({ component }) => (
<a
className="icon-detach"
@@ -30,5 +29,4 @@ const ComponentDetach = ({ component }) => (
href={getComponentUrl(component.refKey || component.key)}/>
);
-
export default ComponentDetach;
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.js b/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.js
index 7845e5d1178..a4a31655b74 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.js
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentMeasure.js
@@ -22,7 +22,6 @@ import React from 'react';
import { formatMeasure } from '../../../helpers/measures';
-
const ComponentMeasure = ({ component, metricKey, metricType }) => {
const measure = _.findWhere(component.measures, { metric: metricKey });
return (
@@ -32,5 +31,4 @@ const ComponentMeasure = ({ component, metricKey, metricType }) => {
);
};
-
export default ComponentMeasure;
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentName.js b/server/sonar-web/src/main/js/apps/code/components/ComponentName.js
index fafcc8a8b0a..2b14457fb25 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentName.js
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentName.js
@@ -24,7 +24,6 @@ import Truncated from './Truncated';
import QualifierIcon from '../../../components/shared/qualifier-icon';
import { getComponentUrl } from '../../../helpers/urls';
-
function getTooltip (component) {
const isFile = component.qualifier === 'FIL' || component.qualifier === 'UTS';
if (isFile && component.path) {
@@ -48,7 +47,6 @@ function mostCommitPrefix (strings) {
return prefix.substr(0, prefix.length - lastPrefixPart.length);
}
-
const Component = ({ component, previous, onBrowse }) => {
const handleClick = (e) => {
e.preventDefault();
@@ -85,5 +83,4 @@ const Component = ({ component, previous, onBrowse }) => {
);
};
-
export default Component;
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentPin.js b/server/sonar-web/src/main/js/apps/code/components/ComponentPin.js
index 9e3484cdbdc..b22c078aa07 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentPin.js
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentPin.js
@@ -23,7 +23,6 @@ import Workspace from '../../../components/workspace/main';
import PinIcon from '../../../components/shared/pin-icon';
import { translate } from '../../../helpers/l10n';
-
const ComponentPin = ({ component }) => {
const handleClick = (e) => {
e.preventDefault();
@@ -41,5 +40,4 @@ const ComponentPin = ({ component }) => {
);
};
-
export default ComponentPin;
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentQualityGate.js b/server/sonar-web/src/main/js/apps/code/components/ComponentQualityGate.js
index 9fb381e6833..599515ebefd 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentQualityGate.js
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentQualityGate.js
@@ -36,5 +36,4 @@ const ComponentQualityGate = ({ component }) => {
) : <span/>;
};
-
export default ComponentQualityGate;
diff --git a/server/sonar-web/src/main/js/apps/code/components/Components.js b/server/sonar-web/src/main/js/apps/code/components/Components.js
index 6f7c159d3f1..91300d647ed 100644
--- a/server/sonar-web/src/main/js/apps/code/components/Components.js
+++ b/server/sonar-web/src/main/js/apps/code/components/Components.js
@@ -23,7 +23,6 @@ import Component from './Component';
import ComponentsEmpty from './ComponentsEmpty';
import ComponentsHeader from './ComponentsHeader';
-
const Components = ({ baseComponent, components, coverageMetric, onBrowse }) => (
<table className="data zebra">
<ComponentsHeader baseComponent={baseComponent}/>
@@ -55,5 +54,4 @@ const Components = ({ baseComponent, components, coverageMetric, onBrowse }) =>
</table>
);
-
export default Components;
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentsEmpty.js b/server/sonar-web/src/main/js/apps/code/components/ComponentsEmpty.js
index 6a6962ef561..753b2de8b13 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentsEmpty.js
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentsEmpty.js
@@ -20,7 +20,6 @@
import React from 'react';
import { translate } from '../../../helpers/l10n';
-
const ComponentsEmpty = () => (
<tr>
<td colSpan="2">
@@ -32,5 +31,4 @@ const ComponentsEmpty = () => (
</tr>
);
-
export default ComponentsEmpty;
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js b/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js
index 97d489214f0..16bd1e5966d 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js
@@ -21,7 +21,6 @@ import React from 'react';
import { translate } from '../../../helpers/l10n';
-
const ComponentsHeader = ({ baseComponent }) => (
<thead>
<tr>
@@ -49,5 +48,4 @@ const ComponentsHeader = ({ baseComponent }) => (
</thead>
);
-
export default ComponentsHeader;
diff --git a/server/sonar-web/src/main/js/apps/code/components/Search.js b/server/sonar-web/src/main/js/apps/code/components/Search.js
index 97cba288b03..86044f9de8f 100644
--- a/server/sonar-web/src/main/js/apps/code/components/Search.js
+++ b/server/sonar-web/src/main/js/apps/code/components/Search.js
@@ -24,7 +24,6 @@ import classNames from 'classnames';
import { search, selectCurrent, selectNext, selectPrev } from '../actions';
import { translateWithParameters } from '../../../helpers/l10n';
-
class Search extends Component {
componentDidMount () {
this.refs.input.focus();
@@ -46,7 +45,8 @@ class Search extends Component {
dispatch(selectNext());
break;
default:
- // do nothing
+
+ // do nothing
}
}
@@ -89,7 +89,6 @@ class Search extends Component {
}
}
-
export default connect(state => {
return { query: state.current.searchQuery };
})(Search);
diff --git a/server/sonar-web/src/main/js/apps/code/components/Truncated.js b/server/sonar-web/src/main/js/apps/code/components/Truncated.js
index 52d019f2017..16b503565a4 100644
--- a/server/sonar-web/src/main/js/apps/code/components/Truncated.js
+++ b/server/sonar-web/src/main/js/apps/code/components/Truncated.js
@@ -19,7 +19,6 @@
*/
import React from 'react';
-
const Truncated = ({ children, title }) => (
<span
className="code-truncated"
@@ -28,5 +27,4 @@ const Truncated = ({ children, title }) => (
</span>
);
-
export default Truncated;
diff --git a/server/sonar-web/src/main/js/apps/code/reducers/index.js b/server/sonar-web/src/main/js/apps/code/reducers/index.js
index eb7c09c8301..b76be02a510 100644
--- a/server/sonar-web/src/main/js/apps/code/reducers/index.js
+++ b/server/sonar-web/src/main/js/apps/code/reducers/index.js
@@ -22,7 +22,6 @@ import _ from 'underscore';
import { INIT, BROWSE, SEARCH, UPDATE_QUERY, SELECT_NEXT, SELECT_PREV, START_FETCHING, STOP_FETCHING,
RAISE_ERROR } from '../actions';
-
function hasSourceCode (component) {
return component.qualifier === 'FIL' || component.qualifier === 'UTS';
}
@@ -88,7 +87,6 @@ function getPrev (element, list) {
}
}
-
export const initialState = {
fetching: false,
baseComponent: null,
@@ -104,8 +102,9 @@ export const initialState = {
errorMessage: null
};
-
export function current (state = initialState, action) {
+ /* eslint no-case-declarations: 0 */
+ /* FIXME fix it ^^^ */
switch (action.type) {
case INIT:
const coverageMetric = selectCoverageMetric(action.component);
@@ -166,7 +165,6 @@ export function current (state = initialState, action) {
}
}
-
export function bucket (state = [], action) {
switch (action.type) {
case INIT:
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/controller.js b/server/sonar-web/src/main/js/apps/coding-rules/controller.js
index c872a21227d..27d6a475da4 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/controller.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/controller.js
@@ -29,7 +29,6 @@ export default Controller.extend({
'name', 'lang', 'langName', 'sysTags', 'tags', 'status', 'severity'
],
-
_searchParameters () {
const fields = this.ruleFields.slice();
const profile = this.app.state.get('query').qprofile;
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 eb4822407ee..af8b47c9248 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
@@ -32,4 +32,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/layout.js b/server/sonar-web/src/main/js/apps/coding-rules/layout.js
index 9d40b1c5833..2c5dba8ebae 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/layout.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/layout.js
@@ -44,7 +44,6 @@ export default Marionette.LayoutView.extend({
this.$('.search-navigator').addClass('search-navigator-extended-view');
},
-
hideDetails () {
this.$('.search-navigator').removeClass('search-navigator-extended-view');
if (this.scroll != null) {
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-filter-mixin.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-filter-mixin.js
index 2d142bda5e1..4bc6a1ef131 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-filter-mixin.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-filter-mixin.js
@@ -41,4 +41,3 @@ export default {
}
};
-
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js
index db19ac674c0..97c5499ae3b 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js
@@ -66,4 +66,3 @@ export default Marionette.ItemView.extend({
}
});
-
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 1a5e0507fe0..dc67ad6c39f 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
@@ -112,4 +112,3 @@ export default Marionette.ItemView.extend(RuleFilterMixin).extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-parameters-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-parameters-view.js
index 205a43c58b6..0c3c721e3eb 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-parameters-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-parameters-view.js
@@ -42,4 +42,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/workspace-header-view.js b/server/sonar-web/src/main/js/apps/coding-rules/workspace-header-view.js
index 1e976b2cbdb..f88999eef9c 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/workspace-header-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/workspace-header-view.js
@@ -64,4 +64,3 @@ export default WorkspaceHeaderView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-view.js b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-view.js
index ebcaada5b0d..eda62e135e3 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-view.js
@@ -46,4 +46,3 @@ export default WorkspaceListView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/component-measures/app/actions.js b/server/sonar-web/src/main/js/apps/component-measures/app/actions.js
index e38934a9bee..85f74ffa9a4 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/app/actions.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/app/actions.js
@@ -26,7 +26,6 @@ import { getMetrics } from '../../../api/metrics';
export const DISPLAY_HOME = 'app/DISPLAY_HOME';
export const RECEIVE_METRICS = 'app/RECEIVE_METRICS';
-
/*
* Action Creators
*/
@@ -39,7 +38,6 @@ function receiveMetrics (metrics) {
return { type: RECEIVE_METRICS, metrics };
}
-
/*
* Workflow
*/
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/IconBubbles.js b/server/sonar-web/src/main/js/apps/component-measures/components/IconBubbles.js
index b5411d4cc81..a0914801a08 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/IconBubbles.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/IconBubbles.js
@@ -20,7 +20,7 @@
import React from 'react';
export default function IconBubbles () {
- /* eslint max-len: 0 */
+ /* jscs:disable maximumLineLength */
return (
<svg className="measure-tab-icon"
viewBox="0 0 512 448"
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/IconHistory.js b/server/sonar-web/src/main/js/apps/component-measures/components/IconHistory.js
index 85dac4e9dec..06057097841 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/IconHistory.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/IconHistory.js
@@ -20,7 +20,7 @@
import React from 'react';
export default function IconHistory () {
- /* eslint max-len: 0 */
+ /* jscs:disable maximumLineLength */
return (
<svg className="measure-tab-icon"
viewBox="0 0 512 448"
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/IconList.js b/server/sonar-web/src/main/js/apps/component-measures/components/IconList.js
index 6725685c36b..116c5395ac0 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/IconList.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/IconList.js
@@ -20,7 +20,7 @@
import React from 'react';
export default function ListIcon () {
- /* eslint max-len: 0 */
+ /* jscs:disable maximumLineLength */
return (
<svg className="measure-tab-icon"
viewBox="0 0 448 448"
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/IconTree.js b/server/sonar-web/src/main/js/apps/component-measures/components/IconTree.js
index 1b9cb2ca79d..cbd60958e7f 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/IconTree.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/IconTree.js
@@ -20,7 +20,7 @@
import React from 'react';
export default function IconTree () {
- /* eslint max-len: 0 */
+ /* jscs:disable maximumLineLength */
return (
<svg className="measure-tab-icon"
viewBox="0 0 448 448"
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/LanguageDistribution.js b/server/sonar-web/src/main/js/apps/component-measures/components/LanguageDistribution.js
index bd9fc9a54c0..fe8c4d6849f 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/LanguageDistribution.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/LanguageDistribution.js
@@ -26,7 +26,6 @@ import { formatMeasure } from '../../../helpers/measures';
import { getLanguages } from '../../../api/languages';
import { translate } from '../../../helpers/l10n';
-
export default class LanguageDistribution extends React.Component {
componentDidMount () {
this.requestLanguages();
diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/actions.js b/server/sonar-web/src/main/js/apps/component-measures/details/actions.js
index b6d4bcaf163..7f24fce6112 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/details/actions.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/details/actions.js
@@ -27,7 +27,6 @@ import { enhanceWithLeak } from '../utils';
export const REQUEST_MEASURE = 'details/REQUEST_MEASURE';
export const RECEIVE_MEASURE = 'details/RECEIVE_MEASURE';
-
/*
* Action Creators
*/
@@ -40,7 +39,6 @@ function receiveMeasure (measure, secondaryMeasure, periods) {
return { type: RECEIVE_MEASURE, measure, secondaryMeasure, periods };
}
-
/*
* Workflow
*/
diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresDomain.js b/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresDomain.js
index 42253dc2b78..236775e00f7 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresDomain.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresDomain.js
@@ -67,4 +67,3 @@ AllMeasuresDomain.defaultProps = {
AllMeasuresDomain.propTypes = {
displayHeader: React.PropTypes.bool
};
-
diff --git a/server/sonar-web/src/main/js/apps/component-measures/store/treeViewActions.js b/server/sonar-web/src/main/js/apps/component-measures/store/treeViewActions.js
index 5701ffb1498..84681697821 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/store/treeViewActions.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/store/treeViewActions.js
@@ -30,7 +30,6 @@ import { startFetching, stopFetching } from './statusActions';
export const UPDATE_STORE = 'drilldown/tree/UPDATE_STORE';
export const INIT = 'drilldown/tree/INIT';
-
/*
* Action Creators
*/
@@ -56,7 +55,6 @@ function init (rootComponent, metric, periodIndex = 1) {
return { type: INIT, rootComponent, metric, periodIndex };
}
-
/*
* Workflow
*/
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/create-view.js b/server/sonar-web/src/main/js/apps/custom-measures/create-view.js
index d7fb10976f9..d1dda2a31e8 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/create-view.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/create-view.js
@@ -46,4 +46,3 @@ export default FormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/custom-measure.js b/server/sonar-web/src/main/js/apps/custom-measures/custom-measure.js
index 239b93c1ac8..4d6a414ac2c 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/custom-measure.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/custom-measure.js
@@ -54,4 +54,3 @@ export default Backbone.Model.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/custom-measures.js b/server/sonar-web/src/main/js/apps/custom-measures/custom-measures.js
index fe06cc39c22..eb64353b809 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/custom-measures.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/custom-measures.js
@@ -68,4 +68,3 @@ export default Backbone.Collection.extend({
});
-
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/delete-view.js b/server/sonar-web/src/main/js/apps/custom-measures/delete-view.js
index efd5f2b9a03..4e86d48df91 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/delete-view.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/delete-view.js
@@ -46,4 +46,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/form-view.js b/server/sonar-web/src/main/js/apps/custom-measures/form-view.js
index ea0c2d90aa3..857c4594ece 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/form-view.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/form-view.js
@@ -67,4 +67,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/header-view.js b/server/sonar-web/src/main/js/apps/custom-measures/header-view.js
index a64585fe12d..ea5ceda2004 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/header-view.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/header-view.js
@@ -41,4 +41,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/layout.js b/server/sonar-web/src/main/js/apps/custom-measures/layout.js
index 36e8eb865e5..bd01fb89e7f 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/layout.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/layout.js
@@ -30,4 +30,3 @@ export default Marionette.LayoutView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/list-footer-view.js b/server/sonar-web/src/main/js/apps/custom-measures/list-footer-view.js
index 38d6ed7a561..d4d876440c2 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/list-footer-view.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/list-footer-view.js
@@ -50,4 +50,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/list-item-view.js b/server/sonar-web/src/main/js/apps/custom-measures/list-item-view.js
index 3e21a231e02..d669ae250d2 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/list-item-view.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/list-item-view.js
@@ -62,4 +62,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/list-view.js b/server/sonar-web/src/main/js/apps/custom-measures/list-view.js
index a390b95a05b..3a86298dca1 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/list-view.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/list-view.js
@@ -27,4 +27,3 @@ export default Marionette.CompositeView.extend({
childViewContainer: 'tbody'
});
-
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/update-view.js b/server/sonar-web/src/main/js/apps/custom-measures/update-view.js
index fde20403f4c..e3de7acde10 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/update-view.js
+++ b/server/sonar-web/src/main/js/apps/custom-measures/update-view.js
@@ -43,4 +43,3 @@ export default FormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/dashboard/app.js b/server/sonar-web/src/main/js/apps/dashboard/app.js
index 308ef963090..2ad7df40aa0 100644
--- a/server/sonar-web/src/main/js/apps/dashboard/app.js
+++ b/server/sonar-web/src/main/js/apps/dashboard/app.js
@@ -36,7 +36,6 @@ window.Portal.prototype = {
this.saveDashboardsState();
},
-
createAllSortables () {
const that = this;
const blocks = $('.' + this.options.block);
@@ -81,7 +80,6 @@ window.Portal.prototype = {
.on('dragleave', onDragLeave);
},
-
highlightWidget (widgetId) {
const block = $('#block_' + widgetId);
const options = this.options;
@@ -91,7 +89,6 @@ window.Portal.prototype = {
}, this.options.highlightDuration);
},
-
saveDashboardsState () {
const options = this.options;
const result = $('.' + this.options.column).map(function () {
@@ -125,7 +122,6 @@ window.Portal.prototype = {
}
},
-
editWidget (widgetId) {
$('#widget_title_' + widgetId).hide();
$('#widget_' + widgetId).hide();
@@ -133,7 +129,6 @@ window.Portal.prototype = {
$($(`#block_${widgetId} a.link-action`)[0]).hide();
},
-
cancelEditWidget (widgetId) {
$('widget_title_' + widgetId).show();
$('#widget_' + widgetId).show();
@@ -141,14 +136,12 @@ window.Portal.prototype = {
$($(`#block_${widgetId} a.link-action`)[0]).show();
},
-
deleteWidget (element) {
$(element).closest('.' + this.options.block).remove();
this.saveDashboardsState();
}
};
-
window.autoResize = function (everyMs, callback) {
const debounce = _.debounce(callback, everyMs);
$(window).on('resize', debounce);
diff --git a/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js b/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js
index f74b578f772..dac2ad2d4f9 100644
--- a/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js
+++ b/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js
@@ -70,4 +70,3 @@ export default Modal.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/global-permissions/permission.js b/server/sonar-web/src/main/js/apps/global-permissions/permission.js
index 456aa69befb..3e99b67abe0 100644
--- a/server/sonar-web/src/main/js/apps/global-permissions/permission.js
+++ b/server/sonar-web/src/main/js/apps/global-permissions/permission.js
@@ -41,7 +41,7 @@ export default React.createClass({
requestUsers() {
const url = window.baseUrl + '/api/permissions/users';
- let data = { permission: this.props.permission.key, ps: MAX_ITEMS };
+ const data = { permission: this.props.permission.key, ps: MAX_ITEMS };
if (this.props.project) {
data.projectId = this.props.project;
}
@@ -50,7 +50,7 @@ export default React.createClass({
requestGroups() {
const url = window.baseUrl + '/api/permissions/groups';
- let data = { permission: this.props.permission.key, ps: MAX_ITEMS };
+ const data = { permission: this.props.permission.key, ps: MAX_ITEMS };
if (this.props.project) {
data.projectId = this.props.project;
}
diff --git a/server/sonar-web/src/main/js/apps/global-permissions/permissions-list.js b/server/sonar-web/src/main/js/apps/global-permissions/permissions-list.js
index a45d4308c96..a8f62b304d3 100644
--- a/server/sonar-web/src/main/js/apps/global-permissions/permissions-list.js
+++ b/server/sonar-web/src/main/js/apps/global-permissions/permissions-list.js
@@ -22,7 +22,6 @@ import React from 'react';
import Permission from './permission';
-
export default React.createClass({
propTypes: {
permissions: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
@@ -35,7 +34,7 @@ export default React.createClass({
},
render() {
- let className = classNames({ 'new-loading': !this.props.ready });
+ const className = classNames({ 'new-loading': !this.props.ready });
return <ul id="global-permissions-list" className={className}>{this.renderPermissions()}</ul>;
}
});
diff --git a/server/sonar-web/src/main/js/apps/global-permissions/users-view.js b/server/sonar-web/src/main/js/apps/global-permissions/users-view.js
index ba4789f1bcd..32456c6d8f8 100644
--- a/server/sonar-web/src/main/js/apps/global-permissions/users-view.js
+++ b/server/sonar-web/src/main/js/apps/global-permissions/users-view.js
@@ -70,4 +70,3 @@ export default Modal.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/app.js b/server/sonar-web/src/main/js/apps/groups/app.js
index 6fea34a2a74..c9d8562646f 100644
--- a/server/sonar-web/src/main/js/apps/groups/app.js
+++ b/server/sonar-web/src/main/js/apps/groups/app.js
@@ -62,4 +62,3 @@ App.on('start', function () {
window.sonarqube.appStarted.then(options => App.start(options));
-
diff --git a/server/sonar-web/src/main/js/apps/groups/create-view.js b/server/sonar-web/src/main/js/apps/groups/create-view.js
index d5c918d2a4e..f39b361be58 100644
--- a/server/sonar-web/src/main/js/apps/groups/create-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/create-view.js
@@ -44,4 +44,3 @@ export default FormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/delete-view.js b/server/sonar-web/src/main/js/apps/groups/delete-view.js
index 6228cf93c2e..df29da5b6c1 100644
--- a/server/sonar-web/src/main/js/apps/groups/delete-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/delete-view.js
@@ -52,4 +52,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/form-view.js b/server/sonar-web/src/main/js/apps/groups/form-view.js
index 31a2f12c6a8..2f108d0b6c5 100644
--- a/server/sonar-web/src/main/js/apps/groups/form-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/form-view.js
@@ -39,4 +39,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/group.js b/server/sonar-web/src/main/js/apps/groups/group.js
index f1e9ff54f88..bb025e4cb74 100644
--- a/server/sonar-web/src/main/js/apps/groups/group.js
+++ b/server/sonar-web/src/main/js/apps/groups/group.js
@@ -53,4 +53,3 @@ export default Backbone.Model.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/groups.js b/server/sonar-web/src/main/js/apps/groups/groups.js
index 73c1886f081..9e85daa8f4e 100644
--- a/server/sonar-web/src/main/js/apps/groups/groups.js
+++ b/server/sonar-web/src/main/js/apps/groups/groups.js
@@ -55,4 +55,3 @@ export default Backbone.Collection.extend({
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/header-view.js b/server/sonar-web/src/main/js/apps/groups/header-view.js
index 18c340e2a46..69498cdf56f 100644
--- a/server/sonar-web/src/main/js/apps/groups/header-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/header-view.js
@@ -53,4 +53,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/layout.js b/server/sonar-web/src/main/js/apps/groups/layout.js
index 2b2d49eb1a6..b0cdf69c088 100644
--- a/server/sonar-web/src/main/js/apps/groups/layout.js
+++ b/server/sonar-web/src/main/js/apps/groups/layout.js
@@ -31,4 +31,3 @@ export default Marionette.LayoutView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/list-footer-view.js b/server/sonar-web/src/main/js/apps/groups/list-footer-view.js
index 7d983388829..035b768470f 100644
--- a/server/sonar-web/src/main/js/apps/groups/list-footer-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/list-footer-view.js
@@ -50,4 +50,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/list-item-view.js b/server/sonar-web/src/main/js/apps/groups/list-item-view.js
index d559ecc599b..788ebb5891e 100644
--- a/server/sonar-web/src/main/js/apps/groups/list-item-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/list-item-view.js
@@ -76,4 +76,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/list-view.js b/server/sonar-web/src/main/js/apps/groups/list-view.js
index fd3a8c81dbd..20280b7c7c4 100644
--- a/server/sonar-web/src/main/js/apps/groups/list-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/list-view.js
@@ -38,4 +38,3 @@ export default Marionette.CollectionView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/search-view.js b/server/sonar-web/src/main/js/apps/groups/search-view.js
index c9d24d11f9a..b77b32a24cf 100644
--- a/server/sonar-web/src/main/js/apps/groups/search-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/search-view.js
@@ -65,4 +65,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/update-view.js b/server/sonar-web/src/main/js/apps/groups/update-view.js
index 40ade76b45b..da2a52615ed 100644
--- a/server/sonar-web/src/main/js/apps/groups/update-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/update-view.js
@@ -43,4 +43,3 @@ export default FormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/groups/users-view.js b/server/sonar-web/src/main/js/apps/groups/users-view.js
index 63615a330b3..37969c3d1fc 100644
--- a/server/sonar-web/src/main/js/apps/groups/users-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/users-view.js
@@ -56,4 +56,3 @@ export default Modal.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/app.js b/server/sonar-web/src/main/js/apps/issues/app.js
index 5efe059d331..447e12140f4 100644
--- a/server/sonar-web/src/main/js/apps/issues/app.js
+++ b/server/sonar-web/src/main/js/apps/issues/app.js
@@ -85,4 +85,3 @@ App.on('start', function () {
window.sonarqube.appStarted.then(options => App.start(options));
-
diff --git a/server/sonar-web/src/main/js/apps/issues/component-viewer/issue-view.js b/server/sonar-web/src/main/js/apps/issues/component-viewer/issue-view.js
index e21cceb7483..87129149326 100644
--- a/server/sonar-web/src/main/js/apps/issues/component-viewer/issue-view.js
+++ b/server/sonar-web/src/main/js/apps/issues/component-viewer/issue-view.js
@@ -33,4 +33,3 @@ export default IssueView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js b/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js
index 4fe7469af9d..9b8e8ad6974 100644
--- a/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js
+++ b/server/sonar-web/src/main/js/apps/issues/component-viewer/main.js
@@ -219,4 +219,3 @@ export default SourceViewer.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/controller.js b/server/sonar-web/src/main/js/apps/issues/controller.js
index d7326d71009..26c87b8dcca 100644
--- a/server/sonar-web/src/main/js/apps/issues/controller.js
+++ b/server/sonar-web/src/main/js/apps/issues/controller.js
@@ -274,4 +274,3 @@ export default Controller.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets-view.js b/server/sonar-web/src/main/js/apps/issues/facets-view.js
index eef2767bc2e..6acd5791317 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets-view.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets-view.js
@@ -62,4 +62,3 @@ export default FacetsView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/assignee-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/assignee-facet.js
index d1d2a27b5e3..f67204b3278 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/assignee-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/assignee-facet.js
@@ -122,4 +122,3 @@ export default CustomValuesFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/base-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/base-facet.js
index 32409d01743..b6a4c107f6d 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/base-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/base-facet.js
@@ -40,4 +40,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/context-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/context-facet.js
index 0a2a30e00a0..56de58a1c0d 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/context-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/context-facet.js
@@ -31,4 +31,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js
index 95f22a4cd71..c89dc9d0b32 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js
@@ -170,4 +170,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/file-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/file-facet.js
index e7d4ad7d1e5..134be19e085 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/file-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/file-facet.js
@@ -57,4 +57,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/issue-key-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/issue-key-facet.js
index 08d3a4369c1..6bbd974a1b9 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/issue-key-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/issue-key-facet.js
@@ -39,4 +39,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/mode-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/mode-facet.js
index b1887ccd548..5b4ca34ced7 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/mode-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/mode-facet.js
@@ -40,4 +40,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/module-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/module-facet.js
index 24f4f792964..937f4815bf9 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/module-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/module-facet.js
@@ -45,4 +45,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/reporter-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/reporter-facet.js
index d2f36ace123..0c299b952ad 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/reporter-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/reporter-facet.js
@@ -60,4 +60,3 @@ export default CustomValuesFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/resolution-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/resolution-facet.js
index 9cdba459c61..43c2793e247 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/resolution-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/resolution-facet.js
@@ -66,4 +66,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/severity-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/severity-facet.js
index a1021362b55..baed7a76c99 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/severity-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/severity-facet.js
@@ -32,4 +32,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/status-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/status-facet.js
index d3190fc9c21..a0bfd985016 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/status-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/status-facet.js
@@ -32,4 +32,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/type-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/type-facet.js
index 47218c9a0cc..2790b3a36a4 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/type-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/type-facet.js
@@ -32,4 +32,3 @@ export default BaseFacet.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/filters-view.js b/server/sonar-web/src/main/js/apps/issues/filters-view.js
index 810a060944d..408d3e5d521 100644
--- a/server/sonar-web/src/main/js/apps/issues/filters-view.js
+++ b/server/sonar-web/src/main/js/apps/issues/filters-view.js
@@ -108,4 +108,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/issue-filter-view.js b/server/sonar-web/src/main/js/apps/issues/issue-filter-view.js
index 78690a109a0..16bcfb0ba8f 100644
--- a/server/sonar-web/src/main/js/apps/issues/issue-filter-view.js
+++ b/server/sonar-web/src/main/js/apps/issues/issue-filter-view.js
@@ -39,4 +39,3 @@ export default ActionOptionsView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/layout.js b/server/sonar-web/src/main/js/apps/issues/layout.js
index 14bd310f0ff..5877ff50009 100644
--- a/server/sonar-web/src/main/js/apps/issues/layout.js
+++ b/server/sonar-web/src/main/js/apps/issues/layout.js
@@ -71,4 +71,3 @@ export default Marionette.LayoutView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/models/filter.js b/server/sonar-web/src/main/js/apps/issues/models/filter.js
index 23e1060a37a..d976adf5349 100644
--- a/server/sonar-web/src/main/js/apps/issues/models/filter.js
+++ b/server/sonar-web/src/main/js/apps/issues/models/filter.js
@@ -33,4 +33,3 @@ export default Backbone.Model.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/models/filters.js b/server/sonar-web/src/main/js/apps/issues/models/filters.js
index 0aeff2969a5..530002d8954 100644
--- a/server/sonar-web/src/main/js/apps/issues/models/filters.js
+++ b/server/sonar-web/src/main/js/apps/issues/models/filters.js
@@ -32,4 +32,3 @@ export default Backbone.Collection.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/models/issue.js b/server/sonar-web/src/main/js/apps/issues/models/issue.js
index 0209e59e7cc..3ac85533697 100644
--- a/server/sonar-web/src/main/js/apps/issues/models/issue.js
+++ b/server/sonar-web/src/main/js/apps/issues/models/issue.js
@@ -29,4 +29,3 @@ export default Issue.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/models/issues.js b/server/sonar-web/src/main/js/apps/issues/models/issues.js
index c8b94fca35d..adb43844c4d 100644
--- a/server/sonar-web/src/main/js/apps/issues/models/issues.js
+++ b/server/sonar-web/src/main/js/apps/issues/models/issues.js
@@ -112,4 +112,3 @@ export default Backbone.Collection.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/models/state.js b/server/sonar-web/src/main/js/apps/issues/models/state.js
index 8c87c0e04f2..554004954de 100644
--- a/server/sonar-web/src/main/js/apps/issues/models/state.js
+++ b/server/sonar-web/src/main/js/apps/issues/models/state.js
@@ -81,4 +81,3 @@ export default State.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/router.js b/server/sonar-web/src/main/js/apps/issues/router.js
index f5d7ac57d93..eb6c6c4284a 100644
--- a/server/sonar-web/src/main/js/apps/issues/router.js
+++ b/server/sonar-web/src/main/js/apps/issues/router.js
@@ -57,4 +57,3 @@ export default Router.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/workspace-header-view.js b/server/sonar-web/src/main/js/apps/issues/workspace-header-view.js
index 89ed4d1975f..9b09659443e 100644
--- a/server/sonar-web/src/main/js/apps/issues/workspace-header-view.js
+++ b/server/sonar-web/src/main/js/apps/issues/workspace-header-view.js
@@ -130,4 +130,3 @@ export default WorkspaceHeaderView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/workspace-home-view.js b/server/sonar-web/src/main/js/apps/issues/workspace-home-view.js
index a01b47f768f..ae3c99ad5c8 100644
--- a/server/sonar-web/src/main/js/apps/issues/workspace-home-view.js
+++ b/server/sonar-web/src/main/js/apps/issues/workspace-home-view.js
@@ -24,4 +24,3 @@ export default Marionette.ItemView.extend({
template: Template
});
-
diff --git a/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js b/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js
index 00e1f4cb558..19fbd97d5e7 100644
--- a/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js
+++ b/server/sonar-web/src/main/js/apps/issues/workspace-list-view.js
@@ -139,4 +139,3 @@ export default WorkspaceListView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/maintenance/app.js b/server/sonar-web/src/main/js/apps/maintenance/app.js
index 4b58063ee52..6ed1c7dbce0 100644
--- a/server/sonar-web/src/main/js/apps/maintenance/app.js
+++ b/server/sonar-web/src/main/js/apps/maintenance/app.js
@@ -36,4 +36,3 @@ App.on('start', function () {
App.start();
-
diff --git a/server/sonar-web/src/main/js/apps/maintenance/main-view.js b/server/sonar-web/src/main/js/apps/maintenance/main-view.js
index dd79b1fd73a..751578de956 100644
--- a/server/sonar-web/src/main/js/apps/maintenance/main-view.js
+++ b/server/sonar-web/src/main/js/apps/maintenance/main-view.js
@@ -87,4 +87,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/markdown/app.js b/server/sonar-web/src/main/js/apps/markdown/app.js
index 0e7a4c6e347..e6b264a6885 100644
--- a/server/sonar-web/src/main/js/apps/markdown/app.js
+++ b/server/sonar-web/src/main/js/apps/markdown/app.js
@@ -29,4 +29,3 @@ App.on('start', function () {
window.sonarqube.appStarted.then(options => App.start(options));
-
diff --git a/server/sonar-web/src/main/js/apps/markdown/markdown-help-view.js b/server/sonar-web/src/main/js/apps/markdown/markdown-help-view.js
index b5138caab95..95235579e99 100644
--- a/server/sonar-web/src/main/js/apps/markdown/markdown-help-view.js
+++ b/server/sonar-web/src/main/js/apps/markdown/markdown-help-view.js
@@ -24,4 +24,3 @@ export default Marionette.ItemView.extend({
template: Template
});
-
diff --git a/server/sonar-web/src/main/js/apps/measures/measures-filter-bar.js b/server/sonar-web/src/main/js/apps/measures/measures-filter-bar.js
index bec20727db8..33dfbedae4d 100644
--- a/server/sonar-web/src/main/js/apps/measures/measures-filter-bar.js
+++ b/server/sonar-web/src/main/js/apps/measures/measures-filter-bar.js
@@ -26,4 +26,3 @@ export default FilterBarView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/app.js b/server/sonar-web/src/main/js/apps/metrics/app.js
index 02222b06fe7..542a5073d17 100644
--- a/server/sonar-web/src/main/js/apps/metrics/app.js
+++ b/server/sonar-web/src/main/js/apps/metrics/app.js
@@ -61,7 +61,6 @@ const init = function () {
this.metrics.fetch();
};
-
App.requestDomains = function () {
return $.get(window.baseUrl + '/api/metrics/domains').done(function (r) {
App.domains = r.domains;
@@ -81,4 +80,3 @@ App.on('start', function () {
window.sonarqube.appStarted.then(options => App.start(options));
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/create-view.js b/server/sonar-web/src/main/js/apps/metrics/create-view.js
index 382146c12ec..d8a73fc9d62 100644
--- a/server/sonar-web/src/main/js/apps/metrics/create-view.js
+++ b/server/sonar-web/src/main/js/apps/metrics/create-view.js
@@ -50,4 +50,3 @@ export default FormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/form-view.js b/server/sonar-web/src/main/js/apps/metrics/form-view.js
index 56b40d9eca2..93690b03cbe 100644
--- a/server/sonar-web/src/main/js/apps/metrics/form-view.js
+++ b/server/sonar-web/src/main/js/apps/metrics/form-view.js
@@ -71,4 +71,3 @@ export default ModalForm.extend({
});
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/header-view.js b/server/sonar-web/src/main/js/apps/metrics/header-view.js
index a319ad9791e..8627fc5b497 100644
--- a/server/sonar-web/src/main/js/apps/metrics/header-view.js
+++ b/server/sonar-web/src/main/js/apps/metrics/header-view.js
@@ -43,4 +43,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/layout.js b/server/sonar-web/src/main/js/apps/metrics/layout.js
index ba08590f4c3..70c32ffd663 100644
--- a/server/sonar-web/src/main/js/apps/metrics/layout.js
+++ b/server/sonar-web/src/main/js/apps/metrics/layout.js
@@ -30,4 +30,3 @@ export default Marionette.LayoutView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/list-footer-view.js b/server/sonar-web/src/main/js/apps/metrics/list-footer-view.js
index b2e1cd2bdc2..7071214f108 100644
--- a/server/sonar-web/src/main/js/apps/metrics/list-footer-view.js
+++ b/server/sonar-web/src/main/js/apps/metrics/list-footer-view.js
@@ -50,4 +50,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/list-item-view.js b/server/sonar-web/src/main/js/apps/metrics/list-item-view.js
index 497922782c1..a28fb5de126 100644
--- a/server/sonar-web/src/main/js/apps/metrics/list-item-view.js
+++ b/server/sonar-web/src/main/js/apps/metrics/list-item-view.js
@@ -67,4 +67,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/list-view.js b/server/sonar-web/src/main/js/apps/metrics/list-view.js
index 77ab1dbff4f..5fc11ee977f 100644
--- a/server/sonar-web/src/main/js/apps/metrics/list-view.js
+++ b/server/sonar-web/src/main/js/apps/metrics/list-view.js
@@ -32,4 +32,3 @@ export default Marionette.CollectionView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/metric.js b/server/sonar-web/src/main/js/apps/metrics/metric.js
index 300f1596800..a9edf32fe75 100644
--- a/server/sonar-web/src/main/js/apps/metrics/metric.js
+++ b/server/sonar-web/src/main/js/apps/metrics/metric.js
@@ -54,4 +54,3 @@ export default Backbone.Model.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/metrics.js b/server/sonar-web/src/main/js/apps/metrics/metrics.js
index 59bff3f0b01..88e1a5ab56c 100644
--- a/server/sonar-web/src/main/js/apps/metrics/metrics.js
+++ b/server/sonar-web/src/main/js/apps/metrics/metrics.js
@@ -57,4 +57,3 @@ export default Backbone.Collection.extend({
});
-
diff --git a/server/sonar-web/src/main/js/apps/metrics/update-view.js b/server/sonar-web/src/main/js/apps/metrics/update-view.js
index 915e2f8a23d..b559f1dc05b 100644
--- a/server/sonar-web/src/main/js/apps/metrics/update-view.js
+++ b/server/sonar-web/src/main/js/apps/metrics/update-view.js
@@ -46,4 +46,3 @@ export default FormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/overview/components/complexity-distribution.js b/server/sonar-web/src/main/js/apps/overview/components/complexity-distribution.js
index dc9dc1e7460..e57f7072e6c 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/complexity-distribution.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/complexity-distribution.js
@@ -23,10 +23,8 @@ import { BarChart } from '../../../components/charts/bar-chart';
import { formatMeasure } from '../../../helpers/measures';
import { translateWithParameters } from '../../../helpers/l10n';
-
const HEIGHT = 80;
-
export const ComplexityDistribution = React.createClass({
propTypes: {
distribution: React.PropTypes.string.isRequired,
diff --git a/server/sonar-web/src/main/js/apps/overview/components/event.js b/server/sonar-web/src/main/js/apps/overview/components/event.js
index bc7fba66301..35832990704 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/event.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/event.js
@@ -23,7 +23,6 @@ import moment from 'moment';
import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin';
import { translate } from '../../../helpers/l10n';
-
export const Event = React.createClass({
propTypes: {
event: React.PropTypes.shape({
diff --git a/server/sonar-web/src/main/js/apps/overview/components/events-list-filter.js b/server/sonar-web/src/main/js/apps/overview/components/events-list-filter.js
index 5a84e4be0de..2dcb0eaf398 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/events-list-filter.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/events-list-filter.js
@@ -21,10 +21,8 @@ import React from 'react';
import Select from 'react-select';
import { translate } from '../../../helpers/l10n';
-
const TYPES = ['All', 'Version', 'Alert', 'Profile', 'Other'];
-
export const EventsListFilter = React.createClass({
propTypes: {
onFilter: React.PropTypes.func.isRequired,
diff --git a/server/sonar-web/src/main/js/apps/overview/components/language-distribution.js b/server/sonar-web/src/main/js/apps/overview/components/language-distribution.js
index fcec62538d6..73e568a94c6 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/language-distribution.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/language-distribution.js
@@ -25,7 +25,6 @@ import { formatMeasure } from '../../../helpers/measures';
import { getLanguages } from '../../../api/languages';
import { translate } from '../../../helpers/l10n';
-
export const LanguageDistribution = React.createClass({
propTypes: {
distribution: React.PropTypes.string.isRequired,
diff --git a/server/sonar-web/src/main/js/apps/overview/components/legend.js b/server/sonar-web/src/main/js/apps/overview/components/legend.js
index 4647dfac682..408b827ac9f 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/legend.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/legend.js
@@ -21,7 +21,6 @@ import React from 'react';
import { DomainLeakTitle } from '../main/components';
-
export const Legend = React.createClass({
render() {
return <div className="overview-legend overview-leak">
diff --git a/server/sonar-web/src/main/js/apps/overview/gate/gate-condition.js b/server/sonar-web/src/main/js/apps/overview/gate/gate-condition.js
index 5279ab40176..621102841ba 100644
--- a/server/sonar-web/src/main/js/apps/overview/gate/gate-condition.js
+++ b/server/sonar-web/src/main/js/apps/overview/gate/gate-condition.js
@@ -24,7 +24,6 @@ import { DrilldownLink } from '../../../components/shared/drilldown-link';
import { formatMeasure } from '../../../helpers/measures';
import { translate } from '../../../helpers/l10n';
-
const Measure = React.createClass({
render() {
if (this.props.value == null || isNaN(this.props.value)) {
@@ -35,7 +34,6 @@ const Measure = React.createClass({
}
});
-
export default React.createClass({
render() {
const metricName = translate('metric', this.props.condition.metric.name, 'name');
diff --git a/server/sonar-web/src/main/js/apps/overview/gate/gate.js b/server/sonar-web/src/main/js/apps/overview/gate/gate.js
index 934e117f286..74d2671ee4d 100644
--- a/server/sonar-web/src/main/js/apps/overview/gate/gate.js
+++ b/server/sonar-web/src/main/js/apps/overview/gate/gate.js
@@ -23,7 +23,6 @@ import GateConditions from './gate-conditions';
import GateEmpty from './gate-empty';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-
export default React.createClass({
renderGateConditions () {
return <GateConditions gate={this.props.gate} component={this.props.component}/>;
diff --git a/server/sonar-web/src/main/js/apps/overview/helpers/periods.js b/server/sonar-web/src/main/js/apps/overview/helpers/periods.js
index 80bb9b7a308..20bc9981ff0 100644
--- a/server/sonar-web/src/main/js/apps/overview/helpers/periods.js
+++ b/server/sonar-web/src/main/js/apps/overview/helpers/periods.js
@@ -32,7 +32,6 @@ export function getPeriodLabel (periods, periodIndex) {
return getLabel(period);
}
-
export function getPeriodDate (periods, periodIndex) {
const period = _.findWhere(periods, { index: periodIndex });
if (!period) {
diff --git a/server/sonar-web/src/main/js/apps/overview/main/code-smells.js b/server/sonar-web/src/main/js/apps/overview/main/code-smells.js
index b5024d444f4..d56cb86adb0 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/code-smells.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/code-smells.js
@@ -38,7 +38,6 @@ import { getMetricName } from '../helpers/metrics';
import { formatMeasure } from '../../../helpers/measures';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-
export const CodeSmells = React.createClass({
propTypes: {
leakPeriodLabel: React.PropTypes.string,
diff --git a/server/sonar-web/src/main/js/apps/overview/main/components.js b/server/sonar-web/src/main/js/apps/overview/main/components.js
index 7113db33759..8fe41b3014a 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/components.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/components.js
@@ -23,21 +23,18 @@ import React from 'react';
import { Timeline } from './timeline';
import { translateWithParameters } from '../../../helpers/l10n';
-
export const Domain = React.createClass({
render () {
return <div className="overview-card">{this.props.children}</div>;
}
});
-
export const DomainTitle = React.createClass({
render () {
return <div className="overview-title">{this.props.children}</div>;
}
});
-
export const DomainLeakTitle = React.createClass({
renderInline (tooltip, fromNow) {
return <span className="overview-domain-leak-title" title={tooltip} data-toggle="tooltip">
@@ -64,7 +61,6 @@ export const DomainLeakTitle = React.createClass({
}
});
-
export const DomainHeader = React.createClass({
render () {
return <div className="overview-card-header">
@@ -73,7 +69,6 @@ export const DomainHeader = React.createClass({
}
});
-
export const DomainPanel = React.createClass({
propTypes: {
domain: React.PropTypes.string
@@ -86,7 +81,6 @@ export const DomainPanel = React.createClass({
}
});
-
export const DomainNutshell = React.createClass({
render () {
return <div className="overview-domain-nutshell">{this.props.children}</div>;
@@ -99,14 +93,12 @@ export const DomainLeak = React.createClass({
}
});
-
export const MeasuresList = React.createClass({
render () {
return <div className="overview-domain-measures">{this.props.children}</div>;
}
});
-
export const Measure = React.createClass({
propTypes: {
label: React.PropTypes.string,
@@ -140,7 +132,6 @@ export const Measure = React.createClass({
}
});
-
export const DomainMixin = {
renderTimelineStartDate() {
const momentDate = moment(this.props.historyStartDate);
diff --git a/server/sonar-web/src/main/js/apps/overview/main/coverage.js b/server/sonar-web/src/main/js/apps/overview/main/coverage.js
index dcab23f842b..8f7709438df 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/coverage.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/coverage.js
@@ -34,7 +34,6 @@ import { getMetricName } from '../helpers/metrics';
import { formatMeasure } from '../../../helpers/measures';
import { translate } from '../../../helpers/l10n';
-
export const GeneralCoverage = React.createClass({
propTypes: {
measures: React.PropTypes.object.isRequired,
diff --git a/server/sonar-web/src/main/js/apps/overview/main/duplications.js b/server/sonar-web/src/main/js/apps/overview/main/duplications.js
index 066a4808eee..8077c4d97c4 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/duplications.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/duplications.js
@@ -34,7 +34,6 @@ import { getMetricName } from '../helpers/metrics';
import { formatMeasure, formatMeasureVariation } from '../../../helpers/measures';
import { translate } from '../../../helpers/l10n';
-
export const GeneralDuplications = React.createClass({
propTypes: {
leakPeriodLabel: React.PropTypes.string,
diff --git a/server/sonar-web/src/main/js/apps/overview/main/main.js b/server/sonar-web/src/main/js/apps/overview/main/main.js
index fdb05b26b53..540ce0b3e2a 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/main.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/main.js
@@ -31,7 +31,6 @@ import { getPeriodLabel, getPeriodDate } from './../helpers/periods';
import { getMeasures } from '../../../api/measures';
import { getTimeMachineData } from '../../../api/time-machine';
-
const METRICS_LIST = [
'overall_coverage',
'new_overall_coverage',
@@ -64,7 +63,6 @@ const HISTORY_METRICS_LIST = [
'ncloc'
];
-
export default React.createClass({
propTypes: {
leakPeriodIndex: React.PropTypes.string.isRequired
diff --git a/server/sonar-web/src/main/js/apps/overview/main/risk.js b/server/sonar-web/src/main/js/apps/overview/main/risk.js
index 6cc95ad5811..d6cf8f95e02 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/risk.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/risk.js
@@ -38,7 +38,6 @@ import { getMetricName } from '../helpers/metrics';
import { formatMeasure } from '../../../helpers/measures';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-
export const Risk = React.createClass({
propTypes: {
leakPeriodLabel: React.PropTypes.string,
diff --git a/server/sonar-web/src/main/js/apps/overview/main/structure.js b/server/sonar-web/src/main/js/apps/overview/main/structure.js
index eb3c156293c..2f431e63227 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/structure.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/structure.js
@@ -34,7 +34,6 @@ import { formatMeasure, formatMeasureVariation } from '../../../helpers/measures
import { LanguageDistribution } from '../components/language-distribution';
import { translate } from '../../../helpers/l10n';
-
export const GeneralStructure = React.createClass({
propTypes: {
leakPeriodLabel: React.PropTypes.string,
diff --git a/server/sonar-web/src/main/js/apps/overview/main/timeline.js b/server/sonar-web/src/main/js/apps/overview/main/timeline.js
index 89a36ac30d9..81f76ceb266 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/timeline.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/timeline.js
@@ -22,10 +22,8 @@ import React from 'react';
import { LineChart } from '../../../components/charts/line-chart';
-
const HEIGHT = 80;
-
export class Timeline extends React.Component {
filterSnapshots () {
return this.props.history.filter(s => {
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/main.js b/server/sonar-web/src/main/js/apps/permission-templates/main.js
index daee510ca17..d20b26aabcf 100644
--- a/server/sonar-web/src/main/js/apps/permission-templates/main.js
+++ b/server/sonar-web/src/main/js/apps/permission-templates/main.js
@@ -46,8 +46,8 @@ export default React.createClass({
return permissionTemplates.map(permissionTemplate => {
// it's important to keep the order of the permission template's permissions
// the same as the order of base permissions
- let permissions = basePermissions.map(basePermission => {
- let projectPermission = _.findWhere(permissionTemplate.permissions, { key: basePermission.key });
+ const permissions = basePermissions.map(basePermission => {
+ const projectPermission = _.findWhere(permissionTemplate.permissions, { key: basePermission.key });
return _.extend({ usersCount: 0, groupsCount: 0 }, basePermission, projectPermission);
});
return _.extend({}, permissionTemplate, { permissions });
@@ -56,7 +56,7 @@ export default React.createClass({
mergeDefaultsToTemplates(permissionTemplates, defaultTemplates = []) {
return permissionTemplates.map(permissionTemplate => {
- let defaultFor = [];
+ const defaultFor = [];
defaultTemplates.forEach(defaultTemplate => {
if (defaultTemplate.templateId === permissionTemplate.id) {
defaultFor.push(defaultTemplate.qualifier);
@@ -68,9 +68,9 @@ export default React.createClass({
requestPermissions() {
getPermissionTemplates().done(r => {
- let permissions = this.sortPermissions(r.permissions);
- let permissionTemplates = this.mergePermissionsToTemplates(r.permissionTemplates, permissions);
- let permissionTemplatesWithDefaults = this.mergeDefaultsToTemplates(permissionTemplates, r.defaultTemplates);
+ const permissions = this.sortPermissions(r.permissions);
+ const permissionTemplates = this.mergePermissionsToTemplates(r.permissionTemplates, permissions);
+ const permissionTemplatesWithDefaults = this.mergeDefaultsToTemplates(permissionTemplates, r.defaultTemplates);
this.setState({
ready: true,
permissionTemplates: permissionTemplatesWithDefaults,
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.js b/server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.js
index 2e7817c8b63..4ca60b3d4db 100644
--- a/server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.js
+++ b/server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.js
@@ -37,7 +37,7 @@ export default React.createClass({
},
renderIfMultipleTopQualifiers() {
- let defaults = this.props.permissionTemplate.defaultFor.map(qualifier => {
+ const defaults = this.props.permissionTemplate.defaultFor.map(qualifier => {
return <li key={qualifier}><QualifierIcon qualifier={qualifier}/>&nbsp;{translate('qualifier', qualifier)}</li>;
});
return (
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.js b/server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.js
index 5c6dcfd9740..27be58a70e2 100644
--- a/server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.js
+++ b/server/sonar-web/src/main/js/apps/permission-templates/permission-template-set-defaults.js
@@ -40,7 +40,7 @@ export default React.createClass({
},
renderIfSingleTopQualifier(availableQualifiers) {
- let qualifiers = availableQualifiers.map(qualifier => {
+ const qualifiers = availableQualifiers.map(qualifier => {
return (
<span key={qualifier} className="text-middle">
<a onClick={this.setDefault.bind(this, qualifier)} className="button" href="#">Set Default</a>
@@ -52,7 +52,7 @@ export default React.createClass({
},
renderIfMultipleTopQualifiers(availableQualifiers) {
- let qualifiers = availableQualifiers.map(qualifier => {
+ const qualifiers = availableQualifiers.map(qualifier => {
return (
<li key={qualifier}>
<a onClick={this.setDefault.bind(this, qualifier)} href="#">
@@ -73,7 +73,7 @@ export default React.createClass({
},
render() {
- let availableQualifiers = this.getAvailableQualifiers();
+ const availableQualifiers = this.getAvailableQualifiers();
if (availableQualifiers.length === 0) {
return null;
}
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permission-template.js b/server/sonar-web/src/main/js/apps/permission-templates/permission-template.js
index d606e626005..c2a3e2cb9c3 100644
--- a/server/sonar-web/src/main/js/apps/permission-templates/permission-template.js
+++ b/server/sonar-web/src/main/js/apps/permission-templates/permission-template.js
@@ -69,7 +69,7 @@ export default React.createClass({
},
renderAssociation() {
- let projectKeyPattern = this.props.permissionTemplate.projectKeyPattern;
+ const projectKeyPattern = this.props.permissionTemplate.projectKeyPattern;
if (!projectKeyPattern) {
return null;
}
@@ -84,7 +84,7 @@ export default React.createClass({
},
render() {
- let permissions = this.props.permissionTemplate.permissions.map(p => {
+ const permissions = this.props.permissionTemplate.permissions.map(p => {
return (
<td key={p.key}>
<table>
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js b/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js
index 3f8f66fbeb5..2a6aff49bd6 100644
--- a/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js
+++ b/server/sonar-web/src/main/js/apps/permission-templates/permission-templates.js
@@ -23,7 +23,6 @@ import React from 'react';
import PermissionsHeader from './permissions-header';
import PermissionTemplate from './permission-template';
-
export default React.createClass({
propTypes: {
permissionTemplates: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
@@ -33,14 +32,14 @@ export default React.createClass({
},
render() {
- let permissionTemplates = this.props.permissionTemplates.map(p => {
+ const permissionTemplates = this.props.permissionTemplates.map(p => {
return <PermissionTemplate
key={p.id}
permissionTemplate={p}
topQualifiers={this.props.topQualifiers}
refresh={this.props.refresh}/>;
});
- let className = classNames('data zebra', { 'new-loading': !this.props.ready });
+ const className = classNames('data zebra', { 'new-loading': !this.props.ready });
return (
<table id="permission-templates" className={className}>
<PermissionsHeader permissions={this.props.permissions}/>
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/permissions-header.js b/server/sonar-web/src/main/js/apps/permission-templates/permissions-header.js
index 9efa0298ee0..a459d2f60c1 100644
--- a/server/sonar-web/src/main/js/apps/permission-templates/permissions-header.js
+++ b/server/sonar-web/src/main/js/apps/permission-templates/permissions-header.js
@@ -25,8 +25,8 @@ export default React.createClass({
},
render() {
- let cellWidth = (80 / this.props.permissions.length) + '%';
- let cells = this.props.permissions.map(p => {
+ const cellWidth = (80 / this.props.permissions.length) + '%';
+ const cells = this.props.permissions.map(p => {
return (
<th key={p.key} style={{ width: cellWidth }}>
{p.name}<br/><span className="small">{p.description}</span>
diff --git a/server/sonar-web/src/main/js/apps/project-permissions/groups-view.js b/server/sonar-web/src/main/js/apps/project-permissions/groups-view.js
index 20fcec63f97..30fe7999af6 100644
--- a/server/sonar-web/src/main/js/apps/project-permissions/groups-view.js
+++ b/server/sonar-web/src/main/js/apps/project-permissions/groups-view.js
@@ -70,4 +70,3 @@ export default Modal.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/project-permissions/main.js b/server/sonar-web/src/main/js/apps/project-permissions/main.js
index 3b70c09939e..f58b2abf16a 100644
--- a/server/sonar-web/src/main/js/apps/project-permissions/main.js
+++ b/server/sonar-web/src/main/js/apps/project-permissions/main.js
@@ -27,10 +27,8 @@ import Search from './search';
import ApplyTemplateView from './apply-template-view';
import { translate } from '../../helpers/l10n';
-
const PERMISSIONS_ORDER = ['user', 'codeviewer', 'issueadmin', 'admin', 'scan'];
-
export default React.createClass({
propTypes: {
permissionTemplates: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
@@ -51,8 +49,8 @@ export default React.createClass({
mergePermissionsToProjects(projects, basePermissions) {
return projects.map(project => {
// it's important to keep the order of the project permissions the same as the order of base permissions
- let permissions = basePermissions.map(basePermission => {
- let projectPermission = _.findWhere(project.permissions, { key: basePermission.key });
+ const permissions = basePermissions.map(basePermission => {
+ const projectPermission = _.findWhere(project.permissions, { key: basePermission.key });
return _.extend({ usersCount: 0, groupsCount: 0 }, basePermission, projectPermission);
});
return _.extend({}, project, { permissions });
@@ -60,7 +58,7 @@ export default React.createClass({
},
requestPermissions(page = 1, query = '', filter = this.state.filter) {
- let url = window.baseUrl + '/api/permissions/search_project_permissions';
+ const url = window.baseUrl + '/api/permissions/search_project_permissions';
let data = { p: page, q: query };
if (filter !== '__ALL__') {
data.qualifier = filter;
@@ -70,7 +68,7 @@ export default React.createClass({
}
this.setState({ ready: false }, () => {
$.get(url, data).done(r => {
- let permissions = this.sortPermissions(r.permissions);
+ const permissions = this.sortPermissions(r.permissions);
let projects = this.mergePermissionsToProjects(r.projects, permissions);
if (page > 1) {
projects = [].concat(this.state.projects, projects);
diff --git a/server/sonar-web/src/main/js/apps/project-permissions/permissions-footer.js b/server/sonar-web/src/main/js/apps/project-permissions/permissions-footer.js
index f6710b3f074..1e247dccd01 100644
--- a/server/sonar-web/src/main/js/apps/project-permissions/permissions-footer.js
+++ b/server/sonar-web/src/main/js/apps/project-permissions/permissions-footer.js
@@ -20,7 +20,6 @@
import classNames from 'classnames';
import React from 'react';
-
export default React.createClass({
propTypes: {
count: React.PropTypes.number.isRequired,
@@ -37,9 +36,9 @@ export default React.createClass({
if (this.props.componentId) {
return null;
}
- let hasMore = this.props.total > this.props.count;
- let loadMoreLink = <a onClick={this.handleLoadMore} className="spacer-left" href="#">show more</a>;
- let className = classNames('spacer-top note text-center', { 'new-loading': !this.props.ready });
+ const hasMore = this.props.total > this.props.count;
+ const loadMoreLink = <a onClick={this.handleLoadMore} className="spacer-left" href="#">show more</a>;
+ const className = classNames('spacer-top note text-center', { 'new-loading': !this.props.ready });
return (
<footer className={className}>
{this.props.count}/{this.props.total} shown
diff --git a/server/sonar-web/src/main/js/apps/project-permissions/permissions-header.js b/server/sonar-web/src/main/js/apps/project-permissions/permissions-header.js
index 9efa0298ee0..a459d2f60c1 100644
--- a/server/sonar-web/src/main/js/apps/project-permissions/permissions-header.js
+++ b/server/sonar-web/src/main/js/apps/project-permissions/permissions-header.js
@@ -25,8 +25,8 @@ export default React.createClass({
},
render() {
- let cellWidth = (80 / this.props.permissions.length) + '%';
- let cells = this.props.permissions.map(p => {
+ const cellWidth = (80 / this.props.permissions.length) + '%';
+ const cells = this.props.permissions.map(p => {
return (
<th key={p.key} style={{ width: cellWidth }}>
{p.name}<br/><span className="small">{p.description}</span>
diff --git a/server/sonar-web/src/main/js/apps/project-permissions/permissions.js b/server/sonar-web/src/main/js/apps/project-permissions/permissions.js
index 11b39b44965..16789fce35d 100644
--- a/server/sonar-web/src/main/js/apps/project-permissions/permissions.js
+++ b/server/sonar-web/src/main/js/apps/project-permissions/permissions.js
@@ -23,7 +23,6 @@ import React from 'react';
import PermissionsHeader from './permissions-header';
import Project from './project';
-
export default React.createClass({
propTypes: {
projects: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
@@ -33,14 +32,14 @@ export default React.createClass({
},
render() {
- let projects = this.props.projects.map(p => {
+ const projects = this.props.projects.map(p => {
return <Project
key={p.id}
project={p}
permissionTemplates={this.props.permissionTemplates}
refresh={this.props.refresh}/>;
});
- let className = classNames('data zebra', { 'new-loading': !this.props.ready });
+ const className = classNames('data zebra', { 'new-loading': !this.props.ready });
return (
<table id="projects" className={className}>
<PermissionsHeader permissions={this.props.permissions}/>
diff --git a/server/sonar-web/src/main/js/apps/project-permissions/project.js b/server/sonar-web/src/main/js/apps/project-permissions/project.js
index 16420f56ab1..2a3c77a4af5 100644
--- a/server/sonar-web/src/main/js/apps/project-permissions/project.js
+++ b/server/sonar-web/src/main/js/apps/project-permissions/project.js
@@ -61,7 +61,7 @@ export default React.createClass({
},
render() {
- let permissions = this.props.project.permissions.map(p => {
+ const permissions = this.props.project.permissions.map(p => {
return (
<td key={p.key}>
<table>
diff --git a/server/sonar-web/src/main/js/apps/project-permissions/qualifier-filter.js b/server/sonar-web/src/main/js/apps/project-permissions/qualifier-filter.js
index 50056a930b2..7773b56ba31 100644
--- a/server/sonar-web/src/main/js/apps/project-permissions/qualifier-filter.js
+++ b/server/sonar-web/src/main/js/apps/project-permissions/qualifier-filter.js
@@ -22,7 +22,6 @@ import { translate } from '../../helpers/l10n';
import RadioToggle from '../../components/shared/radio-toggle';
-
const rootQualifiersToOptions = (qualifiers) => {
return qualifiers.map(q => {
return {
@@ -32,7 +31,6 @@ const rootQualifiersToOptions = (qualifiers) => {
});
};
-
export const QualifierFilter = ({ rootQualifiers, filter, onFilter }) => {
const options = [{ value: '__ALL__', label: 'All' }, ...rootQualifiersToOptions(rootQualifiers)];
diff --git a/server/sonar-web/src/main/js/apps/project-permissions/search.js b/server/sonar-web/src/main/js/apps/project-permissions/search.js
index b07a0a1f526..1b1951504f1 100644
--- a/server/sonar-web/src/main/js/apps/project-permissions/search.js
+++ b/server/sonar-web/src/main/js/apps/project-permissions/search.js
@@ -22,7 +22,6 @@ import React from 'react';
import { QualifierFilter } from './qualifier-filter';
-
export default React.createClass({
propTypes: {
search: React.PropTypes.func.isRequired
@@ -38,7 +37,7 @@ export default React.createClass({
},
search() {
- let q = this.refs.input.value;
+ const q = this.refs.input.value;
this.props.search(q);
},
diff --git a/server/sonar-web/src/main/js/apps/project-permissions/users-view.js b/server/sonar-web/src/main/js/apps/project-permissions/users-view.js
index ff641cbc272..04399fad78b 100644
--- a/server/sonar-web/src/main/js/apps/project-permissions/users-view.js
+++ b/server/sonar-web/src/main/js/apps/project-permissions/users-view.js
@@ -68,4 +68,3 @@ export default Modal.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/projects/app.js b/server/sonar-web/src/main/js/apps/projects/app.js
index 8ac06e62dd0..7c68d2c4b6e 100644
--- a/server/sonar-web/src/main/js/apps/projects/app.js
+++ b/server/sonar-web/src/main/js/apps/projects/app.js
@@ -24,9 +24,9 @@ import { getCurrentUser } from '../../api/users';
window.sonarqube.appStarted.then(options => {
getCurrentUser().then(user => {
- let el = document.querySelector(options.el);
- let hasProvisionPermission = user.permissions.global.indexOf('provisioning') !== -1;
- let topLevelQualifiers = options.rootQualifiers;
+ const el = document.querySelector(options.el);
+ const hasProvisionPermission = user.permissions.global.indexOf('provisioning') !== -1;
+ const topLevelQualifiers = options.rootQualifiers;
ReactDOM.render(<Main hasProvisionPermission={hasProvisionPermission}
topLevelQualifiers={topLevelQualifiers}/>, el);
});
diff --git a/server/sonar-web/src/main/js/apps/projects/create-view.js b/server/sonar-web/src/main/js/apps/projects/create-view.js
index 5a3eb9d4c73..9dc15b0b9f5 100644
--- a/server/sonar-web/src/main/js/apps/projects/create-view.js
+++ b/server/sonar-web/src/main/js/apps/projects/create-view.js
@@ -21,7 +21,6 @@ import ModalForm from '../../components/common/modal-form';
import { createProject } from '../../api/components';
import Template from './templates/projects-create-form.hbs';
-
export default ModalForm.extend({
template: Template,
diff --git a/server/sonar-web/src/main/js/apps/projects/delete-view.js b/server/sonar-web/src/main/js/apps/projects/delete-view.js
index a39823d42a5..7d7ee00be62 100644
--- a/server/sonar-web/src/main/js/apps/projects/delete-view.js
+++ b/server/sonar-web/src/main/js/apps/projects/delete-view.js
@@ -30,4 +30,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/projects/main.js b/server/sonar-web/src/main/js/apps/projects/main.js
index ae005a9165e..48bc0cd8a6a 100644
--- a/server/sonar-web/src/main/js/apps/projects/main.js
+++ b/server/sonar-web/src/main/js/apps/projects/main.js
@@ -54,7 +54,7 @@ export default React.createClass({
},
getFilters() {
- let filters = { ps: PAGE_SIZE };
+ const filters = { ps: PAGE_SIZE };
if (this.state.page !== 1) {
filters.p = this.state.page;
}
@@ -76,12 +76,13 @@ export default React.createClass({
this.requestGhosts();
break;
default:
+
// should never happen
}
},
requestGhosts() {
- let data = this.getFilters();
+ const data = this.getFilters();
getGhosts(data).then(r => {
let projects = r.projects.map(project => {
return _.extend(project, { id: project.uuid, qualifier: 'TRK' });
@@ -94,7 +95,7 @@ export default React.createClass({
},
requestProvisioned() {
- let data = this.getFilters();
+ const data = this.getFilters();
getProvisioned(data).then(r => {
let projects = r.projects.map(project => {
return _.extend(project, { id: project.uuid, qualifier: 'TRK' });
@@ -107,7 +108,7 @@ export default React.createClass({
},
requestAllProjects() {
- let data = this.getFilters();
+ const data = this.getFilters();
data.qualifiers = this.state.qualifiers;
getComponents(data).then(r => {
let projects = r.components;
@@ -154,17 +155,17 @@ export default React.createClass({
},
onProjectSelected(project) {
- let newSelection = _.uniq([].concat(this.state.selection, project.id));
+ const newSelection = _.uniq([].concat(this.state.selection, project.id));
this.setState({ selection: newSelection });
},
onProjectDeselected(project) {
- let newSelection = _.without(this.state.selection, project.id);
+ const newSelection = _.without(this.state.selection, project.id);
this.setState({ selection: newSelection });
},
onAllSelected() {
- let newSelection = this.state.projects.map(project => {
+ const newSelection = this.state.projects.map(project => {
return project.id;
});
this.setState({ selection: newSelection });
@@ -175,7 +176,7 @@ export default React.createClass({
},
deleteProjects() {
- let ids = this.state.selection.join(',');
+ const ids = this.state.selection.join(',');
deleteComponents({ ids }).then(() => {
this.setState({ page: 1, selection: [] }, this.requestProjects);
});
diff --git a/server/sonar-web/src/main/js/apps/projects/projects.js b/server/sonar-web/src/main/js/apps/projects/projects.js
index a67d6b090b9..bf92990d726 100644
--- a/server/sonar-web/src/main/js/apps/projects/projects.js
+++ b/server/sonar-web/src/main/js/apps/projects/projects.js
@@ -63,7 +63,7 @@ export default React.createClass({
},
render() {
- let className = classNames('data', 'zebra', { 'new-loading': !this.props.ready });
+ const className = classNames('data', 'zebra', { 'new-loading': !this.props.ready });
return (
<table className={className}>
<tbody>{this.props.projects.map(this.renderProject)}</tbody>
diff --git a/server/sonar-web/src/main/js/apps/projects/search.js b/server/sonar-web/src/main/js/apps/projects/search.js
index 08c9f99898d..f6f0d126db2 100644
--- a/server/sonar-web/src/main/js/apps/projects/search.js
+++ b/server/sonar-web/src/main/js/apps/projects/search.js
@@ -36,7 +36,7 @@ export default React.createClass({
},
search() {
- let q = this.refs.input.value;
+ const q = this.refs.input.value;
this.props.onSearch(q);
},
@@ -49,7 +49,7 @@ export default React.createClass({
},
getQualifierOptions() {
- let options = this.props.topLevelQualifiers.map(q => {
+ const options = this.props.topLevelQualifiers.map(q => {
return { value: q, label: translate('qualifiers', q) };
});
return _.sortBy(options, option => {
@@ -58,12 +58,12 @@ export default React.createClass({
},
renderCheckbox() {
- let isAllChecked = this.props.projects.length > 0 &&
+ const isAllChecked = this.props.projects.length > 0 &&
this.props.selection.length === this.props.projects.length;
- let thirdState = this.props.projects.length > 0 &&
+ const thirdState = this.props.projects.length > 0 &&
this.props.selection.length > 0 &&
this.props.selection.length < this.props.projects.length;
- let isChecked = isAllChecked || thirdState;
+ const isChecked = isAllChecked || thirdState;
return <Checkbox onCheck={this.onCheck} initiallyChecked={isChecked} thirdState={thirdState}/>;
},
@@ -93,7 +93,7 @@ export default React.createClass({
},
renderQualifierFilter() {
- let options = this.getQualifierOptions();
+ const options = this.getQualifierOptions();
if (options.length < 2) {
return null;
}
@@ -106,7 +106,7 @@ export default React.createClass({
},
render() {
- let isSomethingSelected = this.props.projects.length > 0 && this.props.selection.length > 0;
+ const isSomethingSelected = this.props.projects.length > 0 && this.props.selection.length > 0;
return (
<div className="panel panel-vertical bordered-bottom spacer-bottom">
<table className="data">
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionForm.js b/server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionForm.js
index 6cd0229391e..e9cf133c2b0 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionForm.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionForm.js
@@ -26,6 +26,7 @@ import { translate } from '../../../helpers/l10n';
export default function AddConditionForm ({ metrics, onSelect }) {
function handleChange (option) {
const metric = option.value;
+
// e.target.value = '';
onSelect(metric);
}
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js
index fc7e90f4e88..66672a19c4a 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js
@@ -45,7 +45,6 @@ export default function Conditions (
return metrics.find(metric => metric.key === condition.metric).name;
});
-
return (
<div id="quality-gate-conditions" className="quality-gate-section">
<h3 className="spacer-bottom">
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/copy-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/copy-view.js
index bd20dbdfa8d..c93e7bc1f33 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/views/copy-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/views/copy-view.js
@@ -45,4 +45,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/create-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/create-view.js
index 3af7c15c118..2a12f24fdeb 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/views/create-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/views/create-view.js
@@ -44,4 +44,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/delete-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/delete-view.js
index 291e866c211..8473319b570 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/views/delete-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/views/delete-view.js
@@ -44,4 +44,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/gate-conditions-delete-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/gate-conditions-delete-view.js
index 51aa9aaa27f..4c4d8bed312 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/views/gate-conditions-delete-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/views/gate-conditions-delete-view.js
@@ -45,4 +45,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/rename-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/rename-view.js
index b3e0551bd5b..1d989c681b0 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/views/rename-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/views/rename-view.js
@@ -45,4 +45,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/actions-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/actions-view.js
index 7cec542e58a..ae5c603d3cb 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/actions-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/actions-view.js
@@ -112,4 +112,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/app.js b/server/sonar-web/src/main/js/apps/quality-profiles/app.js
index 24881c7b7ef..74a8511776c 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/app.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/app.js
@@ -80,4 +80,3 @@ App.on('start', function () {
window.sonarqube.appStarted.then(options => App.start(options));
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/change-profile-parent-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/change-profile-parent-view.js
index 246a9315334..e86554b516e 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/change-profile-parent-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/change-profile-parent-view.js
@@ -78,4 +78,3 @@ export default ModalFormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/controller.js b/server/sonar-web/src/main/js/apps/quality-profiles/controller.js
index e2076ea8fbc..e3303e5d227 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/controller.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/controller.js
@@ -126,4 +126,3 @@ export default Marionette.Controller.extend({
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/copy-profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/copy-profile-view.js
index f9d2852d095..e391f8bc274 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/copy-profile-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/copy-profile-view.js
@@ -63,4 +63,3 @@ export default ModalFormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/create-profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/create-profile-view.js
index 41c049a6029..68aa25279dd 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/create-profile-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/create-profile-view.js
@@ -100,4 +100,3 @@ export default ModalFormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/delete-profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/delete-profile-view.js
index 551348ee26a..b75d930867b 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/delete-profile-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/delete-profile-view.js
@@ -56,4 +56,3 @@ export default ModalFormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/intro-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/intro-view.js
index e082dd67aff..924a99ef640 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/intro-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/intro-view.js
@@ -24,4 +24,3 @@ export default Marionette.ItemView.extend({
template: Template
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/layout.js b/server/sonar-web/src/main/js/apps/quality-profiles/layout.js
index 2e91bc49328..5102782a0b1 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/layout.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/layout.js
@@ -45,4 +45,3 @@ export default Marionette.LayoutView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profile-changelog-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profile-changelog-view.js
index 255d6e3311e..25fa859bb43 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profile-changelog-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profile-changelog-view.js
@@ -53,4 +53,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profile-comparison-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profile-comparison-view.js
index 9564c1ce3bd..79d79b7a123 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profile-comparison-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profile-comparison-view.js
@@ -63,4 +63,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profile-header-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profile-header-view.js
index 629b7043a50..d1b29b01c42 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profile-header-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profile-header-view.js
@@ -89,4 +89,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profile-view.js
index c57ba6c29de..09c5f751bcf 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profile-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profile-view.js
@@ -22,7 +22,6 @@ import Marionette from 'backbone.marionette';
import Template from './templates/quality-profiles-profile.hbs';
import { formatMeasure } from '../../helpers/measures';
-
export default Marionette.ItemView.extend({
tagName: 'a',
className: 'list-group-item',
@@ -59,4 +58,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profiles-empty-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profiles-empty-view.js
index 7d160faf133..9dbd11e1ea6 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profiles-empty-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profiles-empty-view.js
@@ -25,4 +25,3 @@ export default Marionette.ItemView.extend({
template: Template
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profiles-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profiles-view.js
index d1beb30c0ba..99f2ee93a51 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profiles-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profiles-view.js
@@ -82,4 +82,3 @@ export default Marionette.CompositeView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profiles.js b/server/sonar-web/src/main/js/apps/quality-profiles/profiles.js
index c3b9335c952..5be52cc7d66 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profiles.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profiles.js
@@ -41,4 +41,3 @@ export default Backbone.Collection.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/rename-profile-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/rename-profile-view.js
index 77ab397642c..52c4e7eaf50 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/rename-profile-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/rename-profile-view.js
@@ -54,4 +54,3 @@ export default ModalFormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/restore-built-in-profiles-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/restore-built-in-profiles-view.js
index 3f3de05c29e..a46487a49ec 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/restore-built-in-profiles-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/restore-built-in-profiles-view.js
@@ -77,4 +77,3 @@ export default ModalFormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/router.js b/server/sonar-web/src/main/js/apps/quality-profiles/router.js
index 2bab1758015..388859710cf 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/router.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/router.js
@@ -53,4 +53,3 @@ export default Backbone.Router.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/source-viewer/app.js b/server/sonar-web/src/main/js/apps/source-viewer/app.js
index 9e11bcdaca7..bc3ee163918 100644
--- a/server/sonar-web/src/main/js/apps/source-viewer/app.js
+++ b/server/sonar-web/src/main/js/apps/source-viewer/app.js
@@ -44,4 +44,3 @@ App.on('start', function () {
window.sonarqube.appStarted.then(options => App.start(options));
-
diff --git a/server/sonar-web/src/main/js/apps/system/app.js b/server/sonar-web/src/main/js/apps/system/app.js
index 1aec0d92665..652fd6d06bc 100644
--- a/server/sonar-web/src/main/js/apps/system/app.js
+++ b/server/sonar-web/src/main/js/apps/system/app.js
@@ -26,4 +26,3 @@ window.sonarqube.appStarted.then(options => {
ReactDOM.render(<Main/>, el);
});
-
diff --git a/server/sonar-web/src/main/js/apps/system/item-log-level.js b/server/sonar-web/src/main/js/apps/system/item-log-level.js
index 8832badcab7..27ac5d84306 100644
--- a/server/sonar-web/src/main/js/apps/system/item-log-level.js
+++ b/server/sonar-web/src/main/js/apps/system/item-log-level.js
@@ -29,17 +29,17 @@ export default React.createClass({
},
onChange() {
- let newValue = this.refs.select.value;
+ const newValue = this.refs.select.value;
setLogLevel(newValue).then(() => {
this.setState({ level: newValue });
});
},
render() {
- let options = LOG_LEVELS.map(level => {
+ const options = LOG_LEVELS.map(level => {
return <option key={level} value={level}>{level}</option>;
});
- let warning = this.state.level !== 'INFO' ? (
+ const warning = this.state.level !== 'INFO' ? (
<div className="alert alert-danger spacer-top" style={{ wordBreak: 'normal' }}>
{translate('system.log_level.warning')}
</div>
diff --git a/server/sonar-web/src/main/js/apps/system/item-object.js b/server/sonar-web/src/main/js/apps/system/item-object.js
index 46864bfa8f7..93652bf7c4a 100644
--- a/server/sonar-web/src/main/js/apps/system/item-object.js
+++ b/server/sonar-web/src/main/js/apps/system/item-object.js
@@ -22,7 +22,7 @@ import ItemValue from './item-value';
export default React.createClass({
render() {
- let rows = Object.keys(this.props.value).map(key => {
+ const rows = Object.keys(this.props.value).map(key => {
return <tr key={key}>
<td className="thin nowrap">{key}</td>
<td><ItemValue value={this.props.value[key]}/></td>
diff --git a/server/sonar-web/src/main/js/apps/system/item-value.js b/server/sonar-web/src/main/js/apps/system/item-value.js
index 10164dec10c..d3765865f80 100644
--- a/server/sonar-web/src/main/js/apps/system/item-value.js
+++ b/server/sonar-web/src/main/js/apps/system/item-value.js
@@ -28,7 +28,7 @@ export default React.createClass({
return <ItemLogLevel value={this.props.value}/>;
}
- let rawValue = this.props.value;
+ const rawValue = this.props.value;
let formattedValue;
switch (typeof this.props.value) {
case 'boolean':
diff --git a/server/sonar-web/src/main/js/apps/system/main.js b/server/sonar-web/src/main/js/apps/system/main.js
index f600dd3438b..36f425ed81d 100644
--- a/server/sonar-web/src/main/js/apps/system/main.js
+++ b/server/sonar-web/src/main/js/apps/system/main.js
@@ -33,7 +33,7 @@ export default React.createClass({
},
parseSections (data) {
- let sections = Object.keys(data).map(section => {
+ const sections = Object.keys(data).map(section => {
return { name: section, items: this.parseItems(data[section]) };
});
return this.orderSections(sections);
@@ -44,7 +44,7 @@ export default React.createClass({
},
parseItems (data) {
- let items = Object.keys(data).map(item => {
+ const items = Object.keys(data).map(item => {
return { name: item, value: data[item] };
});
return this.orderItems(items);
diff --git a/server/sonar-web/src/main/js/apps/system/section.js b/server/sonar-web/src/main/js/apps/system/section.js
index d4a6ee7f829..42d55466b31 100644
--- a/server/sonar-web/src/main/js/apps/system/section.js
+++ b/server/sonar-web/src/main/js/apps/system/section.js
@@ -22,7 +22,7 @@ import ItemValue from './item-value';
export default React.createClass({
render() {
- let items = this.props.items.map(item => {
+ const items = this.props.items.map(item => {
return <tr key={item.name}>
<td className="thin">
<div style={{ width: '25vw', overflow: 'hidden', textOverflow: 'ellipsis' }}>{item.name}</div>
diff --git a/server/sonar-web/src/main/js/apps/update-center/app.js b/server/sonar-web/src/main/js/apps/update-center/app.js
index 1e00828f263..3cf3adc9d38 100644
--- a/server/sonar-web/src/main/js/apps/update-center/app.js
+++ b/server/sonar-web/src/main/js/apps/update-center/app.js
@@ -80,4 +80,3 @@ App.on('start', function () {
window.sonarqube.appStarted.then(options => App.start(options));
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/controller.js b/server/sonar-web/src/main/js/apps/update-center/controller.js
index e7e091be69e..594cbb3299e 100644
--- a/server/sonar-web/src/main/js/apps/update-center/controller.js
+++ b/server/sonar-web/src/main/js/apps/update-center/controller.js
@@ -46,4 +46,3 @@ export default Marionette.Controller.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/footer-view.js b/server/sonar-web/src/main/js/apps/update-center/footer-view.js
index a96d7201040..72718dfaa5a 100644
--- a/server/sonar-web/src/main/js/apps/update-center/footer-view.js
+++ b/server/sonar-web/src/main/js/apps/update-center/footer-view.js
@@ -35,4 +35,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/header-view.js b/server/sonar-web/src/main/js/apps/update-center/header-view.js
index c7d8f6b1a3a..48132dcdc1a 100644
--- a/server/sonar-web/src/main/js/apps/update-center/header-view.js
+++ b/server/sonar-web/src/main/js/apps/update-center/header-view.js
@@ -50,4 +50,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/layout.js b/server/sonar-web/src/main/js/apps/update-center/layout.js
index 42e0d9c34ad..e69ef4bc87a 100644
--- a/server/sonar-web/src/main/js/apps/update-center/layout.js
+++ b/server/sonar-web/src/main/js/apps/update-center/layout.js
@@ -31,4 +31,3 @@ export default Marionette.LayoutView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/list-item-view.js b/server/sonar-web/src/main/js/apps/update-center/list-item-view.js
index b264732859c..b5410acb05d 100644
--- a/server/sonar-web/src/main/js/apps/update-center/list-item-view.js
+++ b/server/sonar-web/src/main/js/apps/update-center/list-item-view.js
@@ -72,6 +72,7 @@ export default Marionette.ItemView.extend({
e.stopPropagation();
$('body').click();
const index = $(e.currentTarget).data('idx');
+
// if show changelog of update, show details of this update
// otherwise show changelog of the available release
const update = this.model.has('release') ? this.model.toJSON() : this.model.get('updates')[index];
@@ -114,4 +115,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/list-view.js b/server/sonar-web/src/main/js/apps/update-center/list-view.js
index 31dc636adf7..1e4fe5023fa 100644
--- a/server/sonar-web/src/main/js/apps/update-center/list-view.js
+++ b/server/sonar-web/src/main/js/apps/update-center/list-view.js
@@ -25,4 +25,3 @@ export default Marionette.CollectionView.extend({
childView: ListItemView
});
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/plugin-changelog-view.js b/server/sonar-web/src/main/js/apps/update-center/plugin-changelog-view.js
index fd8e6c63306..4c9490a6e26 100644
--- a/server/sonar-web/src/main/js/apps/update-center/plugin-changelog-view.js
+++ b/server/sonar-web/src/main/js/apps/update-center/plugin-changelog-view.js
@@ -44,4 +44,3 @@ export default Popup.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/plugin.js b/server/sonar-web/src/main/js/apps/update-center/plugin.js
index 3997e5c9a8f..de5b07b2655 100644
--- a/server/sonar-web/src/main/js/apps/update-center/plugin.js
+++ b/server/sonar-web/src/main/js/apps/update-center/plugin.js
@@ -87,4 +87,3 @@ export default Backbone.Model.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/plugins.js b/server/sonar-web/src/main/js/apps/update-center/plugins.js
index 94317555e5d..cb2d23b048e 100644
--- a/server/sonar-web/src/main/js/apps/update-center/plugins.js
+++ b/server/sonar-web/src/main/js/apps/update-center/plugins.js
@@ -221,4 +221,3 @@ const Plugins = Backbone.Collection.extend({
export default Plugins;
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/router.js b/server/sonar-web/src/main/js/apps/update-center/router.js
index 211f90e2b4b..c049d998f01 100644
--- a/server/sonar-web/src/main/js/apps/update-center/router.js
+++ b/server/sonar-web/src/main/js/apps/update-center/router.js
@@ -53,4 +53,3 @@ export default Backbone.Router.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/update-center/search-view.js b/server/sonar-web/src/main/js/apps/update-center/search-view.js
index 90cfa892ce9..2cf558354a8 100644
--- a/server/sonar-web/src/main/js/apps/update-center/search-view.js
+++ b/server/sonar-web/src/main/js/apps/update-center/search-view.js
@@ -102,4 +102,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/app.js b/server/sonar-web/src/main/js/apps/users/app.js
index fcbe54cafb8..14ea47e63e3 100644
--- a/server/sonar-web/src/main/js/apps/users/app.js
+++ b/server/sonar-web/src/main/js/apps/users/app.js
@@ -65,4 +65,3 @@ App.on('start', function () {
window.sonarqube.appStarted.then(options => App.start(options));
-
diff --git a/server/sonar-web/src/main/js/apps/users/change-password-view.js b/server/sonar-web/src/main/js/apps/users/change-password-view.js
index 29178ba33f2..120703690a1 100644
--- a/server/sonar-web/src/main/js/apps/users/change-password-view.js
+++ b/server/sonar-web/src/main/js/apps/users/change-password-view.js
@@ -58,4 +58,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/create-view.js b/server/sonar-web/src/main/js/apps/users/create-view.js
index 58adadd3360..8f1768c6a8d 100644
--- a/server/sonar-web/src/main/js/apps/users/create-view.js
+++ b/server/sonar-web/src/main/js/apps/users/create-view.js
@@ -48,4 +48,3 @@ export default FormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/deactivate-view.js b/server/sonar-web/src/main/js/apps/users/deactivate-view.js
index 073e3a9b6fa..1a546ece3f2 100644
--- a/server/sonar-web/src/main/js/apps/users/deactivate-view.js
+++ b/server/sonar-web/src/main/js/apps/users/deactivate-view.js
@@ -46,4 +46,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/form-view.js b/server/sonar-web/src/main/js/apps/users/form-view.js
index 2f5b93ea492..80115329fd2 100644
--- a/server/sonar-web/src/main/js/apps/users/form-view.js
+++ b/server/sonar-web/src/main/js/apps/users/form-view.js
@@ -66,4 +66,3 @@ export default ModalForm.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/groups-view.js b/server/sonar-web/src/main/js/apps/users/groups-view.js
index f8a01ebc49a..fb3aede0dc6 100644
--- a/server/sonar-web/src/main/js/apps/users/groups-view.js
+++ b/server/sonar-web/src/main/js/apps/users/groups-view.js
@@ -56,4 +56,3 @@ export default Modal.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/header-view.js b/server/sonar-web/src/main/js/apps/users/header-view.js
index 3b5a06a3da7..82808910aec 100644
--- a/server/sonar-web/src/main/js/apps/users/header-view.js
+++ b/server/sonar-web/src/main/js/apps/users/header-view.js
@@ -53,4 +53,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/layout.js b/server/sonar-web/src/main/js/apps/users/layout.js
index 0d23b922dcd..8ab09ef5297 100644
--- a/server/sonar-web/src/main/js/apps/users/layout.js
+++ b/server/sonar-web/src/main/js/apps/users/layout.js
@@ -31,4 +31,3 @@ export default Marionette.LayoutView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/list-footer-view.js b/server/sonar-web/src/main/js/apps/users/list-footer-view.js
index 817fcd380e1..d1e34200cc7 100644
--- a/server/sonar-web/src/main/js/apps/users/list-footer-view.js
+++ b/server/sonar-web/src/main/js/apps/users/list-footer-view.js
@@ -50,4 +50,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/list-item-view.js b/server/sonar-web/src/main/js/apps/users/list-item-view.js
index e5b45bdaba7..f879001e909 100644
--- a/server/sonar-web/src/main/js/apps/users/list-item-view.js
+++ b/server/sonar-web/src/main/js/apps/users/list-item-view.js
@@ -146,4 +146,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/list-view.js b/server/sonar-web/src/main/js/apps/users/list-view.js
index 3bd5fd9060b..6fb416fc812 100644
--- a/server/sonar-web/src/main/js/apps/users/list-view.js
+++ b/server/sonar-web/src/main/js/apps/users/list-view.js
@@ -22,7 +22,6 @@ import Marionette from 'backbone.marionette';
import ListItemView from './list-item-view';
import Template from './templates/users-list.hbs';
-
export default Marionette.CompositeView.extend({
template: Template,
childView: ListItemView,
@@ -46,4 +45,3 @@ export default Marionette.CompositeView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/search-view.js b/server/sonar-web/src/main/js/apps/users/search-view.js
index c8c0df459ff..5f4a2245934 100644
--- a/server/sonar-web/src/main/js/apps/users/search-view.js
+++ b/server/sonar-web/src/main/js/apps/users/search-view.js
@@ -65,4 +65,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/tokens-view.js b/server/sonar-web/src/main/js/apps/users/tokens-view.js
index 883a2b8687e..ff85d106652 100644
--- a/server/sonar-web/src/main/js/apps/users/tokens-view.js
+++ b/server/sonar-web/src/main/js/apps/users/tokens-view.js
@@ -25,7 +25,6 @@ import Modal from '../../components/common/modals';
import Template from './templates/users-tokens.hbs';
import { getTokens, generateToken, revokeToken } from '../../api/user-tokens';
-
export default Modal.extend({
template: Template,
diff --git a/server/sonar-web/src/main/js/apps/users/update-view.js b/server/sonar-web/src/main/js/apps/users/update-view.js
index 7dc44aeff96..c010ed75376 100644
--- a/server/sonar-web/src/main/js/apps/users/update-view.js
+++ b/server/sonar-web/src/main/js/apps/users/update-view.js
@@ -44,4 +44,3 @@ export default FormView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/user.js b/server/sonar-web/src/main/js/apps/users/user.js
index d041faad611..f9898e9b176 100644
--- a/server/sonar-web/src/main/js/apps/users/user.js
+++ b/server/sonar-web/src/main/js/apps/users/user.js
@@ -92,4 +92,3 @@ export default Backbone.Model.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/apps/users/users.js b/server/sonar-web/src/main/js/apps/users/users.js
index 1d495078ac4..9f703940e72 100644
--- a/server/sonar-web/src/main/js/apps/users/users.js
+++ b/server/sonar-web/src/main/js/apps/users/users.js
@@ -55,4 +55,3 @@ export default Backbone.Collection.extend({
});
-
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Menu.js b/server/sonar-web/src/main/js/apps/web-api/components/Menu.js
index e5d58f5de94..09cf1727297 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/Menu.js
+++ b/server/sonar-web/src/main/js/apps/web-api/components/Menu.js
@@ -42,7 +42,6 @@ export default function Menu ({ domains, showInternal, showOnlyDeprecated, searc
})
.filter(domain => domain.filteredActions.length);
-
return (
<div className="api-documentation-results panel">
<div className="list-group">
diff --git a/server/sonar-web/src/main/js/components/RestartModal/index.js b/server/sonar-web/src/main/js/components/RestartModal/index.js
index 0501d3bb26c..3419139b365 100644
--- a/server/sonar-web/src/main/js/components/RestartModal/index.js
+++ b/server/sonar-web/src/main/js/components/RestartModal/index.js
@@ -22,7 +22,6 @@ import Template from './templates/template.hbs';
import RestartingTemplate from './templates/restarting.hbs';
import { restartAndWait } from '../../api/system';
-
const RestartModal = ModalForm.extend({
template: Template,
restartingTemplate: RestartingTemplate,
diff --git a/server/sonar-web/src/main/js/components/SelectList/index.js b/server/sonar-web/src/main/js/components/SelectList/index.js
index 283735516bc..5506d3e42a9 100644
--- a/server/sonar-web/src/main/js/components/SelectList/index.js
+++ b/server/sonar-web/src/main/js/components/SelectList/index.js
@@ -70,7 +70,6 @@ const SelectListCollection = Backbone.Collection.extend({
});
-
/*
* SelectList Item View
*/
@@ -147,7 +146,6 @@ const SelectListItemView = Backbone.View.extend({
}
});
-
/*
* SelectList View
*/
@@ -370,7 +368,6 @@ const SelectListView = Backbone.View.extend({
});
-
/*
* SelectList Entry Point
*/
@@ -393,7 +390,6 @@ window.SelectList = function (options) {
return this;
};
-
/*
* SelectList API Methods
*/
@@ -408,7 +404,6 @@ window.SelectList.prototype.search = function (query) {
return this;
};
-
/*
* SelectList Defaults
*/
diff --git a/server/sonar-web/src/main/js/components/charts/bar-chart.js b/server/sonar-web/src/main/js/components/charts/bar-chart.js
index a2448a60cd5..748474b25ad 100644
--- a/server/sonar-web/src/main/js/components/charts/bar-chart.js
+++ b/server/sonar-web/src/main/js/components/charts/bar-chart.js
@@ -56,12 +56,12 @@ export const BarChart = React.createClass({
if (!this.props.xTicks.length) {
return null;
}
- let ticks = this.props.xTicks.map((tick, index) => {
- let point = this.props.data[index];
- let x = Math.round(xScale(point.x) + xScale.rangeBand() / 2);
- let y = yScale.range()[0];
- let d = this.props.data[index];
- let tooltipAtts = {};
+ const ticks = this.props.xTicks.map((tick, index) => {
+ const point = this.props.data[index];
+ const x = Math.round(xScale(point.x) + xScale.rangeBand() / 2);
+ const y = yScale.range()[0];
+ const d = this.props.data[index];
+ const tooltipAtts = {};
if (d.tooltip) {
tooltipAtts['title'] = d.tooltip;
tooltipAtts['data-toggle'] = 'tooltip';
@@ -82,12 +82,12 @@ export const BarChart = React.createClass({
if (!this.props.xValues.length) {
return null;
}
- let ticks = this.props.xValues.map((value, index) => {
- let point = this.props.data[index];
- let x = Math.round(xScale(point.x) + xScale.rangeBand() / 2);
- let y = yScale(point.y);
- let d = this.props.data[index];
- let tooltipAtts = {};
+ const ticks = this.props.xValues.map((value, index) => {
+ const point = this.props.data[index];
+ const x = Math.round(xScale(point.x) + xScale.rangeBand() / 2);
+ const y = yScale(point.y);
+ const d = this.props.data[index];
+ const tooltipAtts = {};
if (d.tooltip) {
tooltipAtts['title'] = d.tooltip;
tooltipAtts['data-toggle'] = 'tooltip';
@@ -105,12 +105,12 @@ export const BarChart = React.createClass({
},
renderBars (xScale, yScale) {
- let bars = this.props.data.map((d, index) => {
- let x = Math.round(xScale(d.x));
- let maxY = yScale.range()[0];
- let y = Math.round(yScale(d.y)) - /* minimum bar height */ 1;
- let height = maxY - y;
- let tooltipAtts = {};
+ const bars = this.props.data.map((d, index) => {
+ const x = Math.round(xScale(d.x));
+ const maxY = yScale.range()[0];
+ const y = Math.round(yScale(d.y)) - /* minimum bar height */ 1;
+ const height = maxY - y;
+ const tooltipAtts = {};
if (d.tooltip) {
tooltipAtts['title'] = d.tooltip;
tooltipAtts['data-toggle'] = 'tooltip';
@@ -133,18 +133,18 @@ export const BarChart = React.createClass({
return <div/>;
}
- let availableWidth = this.state.width - this.props.padding[1] - this.props.padding[3];
- let availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
+ const availableWidth = this.state.width - this.props.padding[1] - this.props.padding[3];
+ const availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
const innerPadding = (availableWidth - this.props.barsWidth * this.props.data.length) /
(this.props.data.length - 1);
const relativeInnerPadding = innerPadding / (innerPadding + this.props.barsWidth);
- let maxY = d3.max(this.props.data, d => d.y);
- let xScale = d3.scale.ordinal()
+ const maxY = d3.max(this.props.data, d => d.y);
+ const xScale = d3.scale.ordinal()
.domain(this.props.data.map(d => d.x))
.rangeBands([0, availableWidth], relativeInnerPadding, 0);
- let yScale = d3.scale.linear()
+ const yScale = d3.scale.linear()
.domain([0, maxY])
.range([availableHeight, 0]);
diff --git a/server/sonar-web/src/main/js/components/charts/bubble-chart.js b/server/sonar-web/src/main/js/components/charts/bubble-chart.js
index c6e3ab0a165..5ab62b25e6d 100644
--- a/server/sonar-web/src/main/js/components/charts/bubble-chart.js
+++ b/server/sonar-web/src/main/js/components/charts/bubble-chart.js
@@ -24,10 +24,8 @@ import React from 'react';
import { ResizeMixin } from './../mixins/resize-mixin';
import { TooltipsMixin } from './../mixins/tooltips-mixin';
-
const TICKS_COUNT = 5;
-
export const Bubble = React.createClass({
propTypes: {
x: React.PropTypes.number.isRequired,
@@ -57,7 +55,6 @@ export const Bubble = React.createClass({
}
});
-
export const BubbleChart = React.createClass({
propTypes: {
items: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
@@ -109,7 +106,7 @@ export const BubbleChart = React.createClass({
},
getTicks(scale, format) {
- let ticks = scale.ticks(TICKS_COUNT).map(tick => format(tick));
+ const ticks = scale.ticks(TICKS_COUNT).map(tick => format(tick));
const uniqueTicksCount = _.uniq(ticks).length;
const ticksCount = uniqueTicksCount < TICKS_COUNT ? uniqueTicksCount - 1 : TICKS_COUNT;
return scale.ticks(ticksCount);
@@ -120,10 +117,10 @@ export const BubbleChart = React.createClass({
return null;
}
- let lines = ticks.map((tick, index) => {
- let x = xScale(tick);
- let y1 = yScale.range()[0];
- let y2 = yScale.range()[1];
+ const lines = ticks.map((tick, index) => {
+ const x = xScale(tick);
+ const y1 = yScale.range()[0];
+ const y2 = yScale.range()[1];
return <line key={index}
x1={x}
x2={x}
@@ -140,10 +137,10 @@ export const BubbleChart = React.createClass({
return null;
}
- let lines = ticks.map((tick, index) => {
- let y = yScale(tick);
- let x1 = xScale.range()[0];
- let x2 = xScale.range()[1];
+ const lines = ticks.map((tick, index) => {
+ const y = yScale(tick);
+ const x1 = xScale.range()[0];
+ const x2 = xScale.range()[1];
return <line key={index}
x1={x1}
x2={x2}
@@ -160,10 +157,10 @@ export const BubbleChart = React.createClass({
return null;
}
- let ticks = xTicks.map((tick, index) => {
- let x = xScale(tick);
- let y = yScale.range()[0];
- let innerText = this.props.formatXTick(tick);
+ const ticks = xTicks.map((tick, index) => {
+ const x = xScale(tick);
+ const y = yScale.range()[0];
+ const innerText = this.props.formatXTick(tick);
return <text key={index}
className="bubble-chart-tick"
x={x}
@@ -179,10 +176,10 @@ export const BubbleChart = React.createClass({
return null;
}
- let ticks = yTicks.map((tick, index) => {
- let x = xScale.range()[0];
- let y = yScale(tick);
- let innerText = this.props.formatYTick(tick);
+ const ticks = yTicks.map((tick, index) => {
+ const x = xScale.range()[0];
+ const y = yScale(tick);
+ const innerText = this.props.formatYTick(tick);
return <text key={index}
className="bubble-chart-tick bubble-chart-tick-y"
x={x}
@@ -199,28 +196,28 @@ export const BubbleChart = React.createClass({
return <div/>;
}
- let availableWidth = this.state.width - this.props.padding[1] - this.props.padding[3];
- let availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
+ const availableWidth = this.state.width - this.props.padding[1] - this.props.padding[3];
+ const availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
- let xScale = d3.scale.linear()
+ const xScale = d3.scale.linear()
.domain([0, d3.max(this.props.items, d => d.x)])
.range([0, availableWidth])
.nice();
- let yScale = d3.scale.linear()
+ const yScale = d3.scale.linear()
.domain([0, d3.max(this.props.items, d => d.y)])
.range([availableHeight, 0])
.nice();
- let sizeScale = d3.scale.linear()
+ const sizeScale = d3.scale.linear()
.domain([0, d3.max(this.props.items, d => d.size)])
.range(this.props.sizeRange);
- let xScaleOriginal = xScale.copy();
- let yScaleOriginal = yScale.copy();
+ const xScaleOriginal = xScale.copy();
+ const yScaleOriginal = yScale.copy();
xScale.range(this.getXRange(xScale, sizeScale, availableWidth));
yScale.range(this.getYRange(yScale, sizeScale, availableHeight));
- let bubbles = _.sortBy(this.props.items, (a, b) => b.size - a.size)
+ const bubbles = _.sortBy(this.props.items, (a, b) => b.size - a.size)
.map((item, index) => {
return <Bubble key={index}
link={item.link}
@@ -229,8 +226,8 @@ export const BubbleChart = React.createClass({
onClick={this.props.onBubbleClick}/>;
});
- let xTicks = this.getTicks(xScale, this.props.formatXTick);
- let yTicks = this.getTicks(yScale, this.props.formatYTick);
+ const xTicks = this.getTicks(xScale, this.props.formatXTick);
+ const yTicks = this.getTicks(yScale, this.props.formatYTick);
return <svg className="bubble-chart" width={this.state.width} height={this.state.height}>
<g transform={`translate(${this.props.padding[3]}, ${this.props.padding[0]})`}>
diff --git a/server/sonar-web/src/main/js/components/charts/donut-chart.js b/server/sonar-web/src/main/js/components/charts/donut-chart.js
index 95ca8cc7df8..3d3ce08e983 100644
--- a/server/sonar-web/src/main/js/components/charts/donut-chart.js
+++ b/server/sonar-web/src/main/js/components/charts/donut-chart.js
@@ -23,17 +23,15 @@ import React from 'react';
import { ResizeMixin } from './../mixins/resize-mixin';
import { TooltipsMixin } from './../mixins/tooltips-mixin';
-
const Sector = React.createClass({
render() {
- let arc = d3.svg.arc()
+ const arc = d3.svg.arc()
.outerRadius(this.props.radius)
.innerRadius(this.props.radius - this.props.thickness);
return <path d={arc(this.props.data)} style={{ fill: this.props.fill }}/>;
}
});
-
export const DonutChart = React.createClass({
propTypes: {
data: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
@@ -54,16 +52,16 @@ export const DonutChart = React.createClass({
return <div/>;
}
- let availableWidth = this.state.width - this.props.padding[1] - this.props.padding[3];
- let availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
+ const availableWidth = this.state.width - this.props.padding[1] - this.props.padding[3];
+ const availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
- let size = Math.min(availableWidth, availableHeight);
- let radius = Math.floor(size / 2);
+ const size = Math.min(availableWidth, availableHeight);
+ const radius = Math.floor(size / 2);
- let pie = d3.layout.pie()
+ const pie = d3.layout.pie()
.sort(null)
.value(d => d.value);
- let sectors = pie(this.props.data).map((d, i) => {
+ const sectors = pie(this.props.data).map((d, i) => {
return <Sector key={i}
data={d}
radius={radius}
diff --git a/server/sonar-web/src/main/js/components/charts/histogram.js b/server/sonar-web/src/main/js/components/charts/histogram.js
index c60163f6ac4..2fdcfea8d21 100644
--- a/server/sonar-web/src/main/js/components/charts/histogram.js
+++ b/server/sonar-web/src/main/js/components/charts/histogram.js
@@ -58,7 +58,7 @@ export const Histogram = React.createClass({
if (!this.props.yTicks.length) {
return null;
}
- let ticks = this.props.yTicks.map((tick, index) => {
+ const ticks = this.props.yTicks.map((tick, index) => {
const point = this.props.data[index];
const x = xScale.range()[0];
const y = Math.round(yScale(point.y) + yScale.rangeBand() / 2 + this.props.barsHeight / 2);
@@ -85,10 +85,10 @@ export const Histogram = React.createClass({
if (!this.props.yValues.length) {
return null;
}
- let ticks = this.props.yValues.map((value, index) => {
- let point = this.props.data[index];
- let x = xScale(point.x);
- let y = Math.round(yScale(point.y) + yScale.rangeBand() / 2 + this.props.barsHeight / 2);
+ const ticks = this.props.yValues.map((value, index) => {
+ const point = this.props.data[index];
+ const x = xScale(point.x);
+ const y = Math.round(yScale(point.y) + yScale.rangeBand() / 2 + this.props.barsHeight / 2);
return <text key={index}
onClick={this.props.onBarClick && this.handleClick.bind(this, point)}
className="bar-chart-tick histogram-value"
@@ -102,9 +102,9 @@ export const Histogram = React.createClass({
},
renderBars (xScale, yScale) {
- let bars = this.props.data.map((d, index) => {
- let x = Math.round(xScale(d.x)) + /* minimum bar width */ 1;
- let y = Math.round(yScale(d.y) + yScale.rangeBand() / 2);
+ const bars = this.props.data.map((d, index) => {
+ const x = Math.round(xScale(d.x)) + /* minimum bar width */ 1;
+ const y = Math.round(yScale(d.y) + yScale.rangeBand() / 2);
return <rect key={index}
className="bar-chart-bar"
onClick={this.props.onBarClick && this.handleClick.bind(this, d)}
@@ -122,14 +122,14 @@ export const Histogram = React.createClass({
return <div/>;
}
- let availableWidth = this.state.width - this.props.padding[1] - this.props.padding[3];
- let availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
+ const availableWidth = this.state.width - this.props.padding[1] - this.props.padding[3];
+ const availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
- let maxX = d3.max(this.props.data, d => d.x);
- let xScale = d3.scale.linear()
+ const maxX = d3.max(this.props.data, d => d.x);
+ const xScale = d3.scale.linear()
.domain([0, maxX])
.range([0, availableWidth]);
- let yScale = d3.scale.ordinal()
+ const yScale = d3.scale.ordinal()
.domain(this.props.data.map(d => d.y))
.rangeRoundBands([0, availableHeight]);
diff --git a/server/sonar-web/src/main/js/components/charts/line-chart.js b/server/sonar-web/src/main/js/components/charts/line-chart.js
index 9d759e6a2af..7bf02a1dbce 100644
--- a/server/sonar-web/src/main/js/components/charts/line-chart.js
+++ b/server/sonar-web/src/main/js/components/charts/line-chart.js
@@ -23,7 +23,6 @@ import React from 'react';
import { ResizeMixin } from './../mixins/resize-mixin';
import { TooltipsMixin } from './../mixins/tooltips-mixin';
-
export const LineChart = React.createClass({
propTypes: {
data: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
@@ -61,7 +60,7 @@ export const LineChart = React.createClass({
return null;
}
- let area = d3.svg.area()
+ const area = d3.svg.area()
.x(d => xScale(d.x))
.y0(yScale.range()[0])
.y1(d => yScale(d.y))
@@ -69,7 +68,7 @@ export const LineChart = React.createClass({
let data = this.props.data;
if (this.props.backdropConstraints) {
- let c = this.props.backdropConstraints;
+ const c = this.props.backdropConstraints;
data = data.filter(d => c[0] <= d.x && d.x <= c[1]);
}
return <path className="line-chart-backdrop" d={area(data)}/>;
@@ -79,9 +78,9 @@ export const LineChart = React.createClass({
if (!this.props.displayPoints) {
return null;
}
- let points = this.props.data.map((point, index) => {
- let x = xScale(point.x);
- let y = yScale(point.y);
+ const points = this.props.data.map((point, index) => {
+ const x = xScale(point.x);
+ const y = yScale(point.y);
return <circle key={index}
className="line-chart-point"
r="3"
@@ -95,10 +94,10 @@ export const LineChart = React.createClass({
if (!this.props.displayVerticalGrid) {
return null;
}
- let lines = this.props.data.map((point, index) => {
- let x = xScale(point.x);
- let y1 = yScale.range()[0];
- let y2 = yScale(point.y);
+ const lines = this.props.data.map((point, index) => {
+ const x = xScale(point.x);
+ const y1 = yScale.range()[0];
+ const y2 = yScale(point.y);
return <line key={index}
className="line-chart-grid"
x1={x}
@@ -113,10 +112,10 @@ export const LineChart = React.createClass({
if (!this.props.xTicks.length) {
return null;
}
- let ticks = this.props.xTicks.map((tick, index) => {
- let point = this.props.data[index];
- let x = xScale(point.x);
- let y = yScale.range()[0];
+ const ticks = this.props.xTicks.map((tick, index) => {
+ const point = this.props.data[index];
+ const x = xScale(point.x);
+ const y = yScale.range()[0];
return <text key={index}
className="line-chart-tick"
x={x}
@@ -130,10 +129,10 @@ export const LineChart = React.createClass({
if (!this.props.xValues.length) {
return null;
}
- let ticks = this.props.xValues.map((value, index) => {
- let point = this.props.data[index];
- let x = xScale(point.x);
- let y = yScale(point.y);
+ const ticks = this.props.xValues.map((value, index) => {
+ const point = this.props.data[index];
+ const x = xScale(point.x);
+ const y = yScale(point.y);
return <text key={index}
className="line-chart-tick"
x={x}
@@ -144,7 +143,7 @@ export const LineChart = React.createClass({
},
renderLine (xScale, yScale) {
- let p = d3.svg.line()
+ const p = d3.svg.line()
.x(d => xScale(d.x))
.y(d => yScale(d.y))
.interpolate(this.props.interpolate);
@@ -157,14 +156,14 @@ export const LineChart = React.createClass({
return <div/>;
}
- let availableWidth = this.state.width - this.props.padding[1] - this.props.padding[3];
- let availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
+ const availableWidth = this.state.width - this.props.padding[1] - this.props.padding[3];
+ const availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
let maxY;
- let xScale = d3.scale.linear()
+ const xScale = d3.scale.linear()
.domain(d3.extent(this.props.data, d => d.x))
.range([0, availableWidth]);
- let yScale = d3.scale.linear()
+ const yScale = d3.scale.linear()
.range([availableHeight, 0]);
if (this.props.domain) {
diff --git a/server/sonar-web/src/main/js/components/charts/treemap-breadcrumbs.js b/server/sonar-web/src/main/js/components/charts/treemap-breadcrumbs.js
index b4cb41b53b6..16f97bec6ef 100644
--- a/server/sonar-web/src/main/js/components/charts/treemap-breadcrumbs.js
+++ b/server/sonar-web/src/main/js/components/charts/treemap-breadcrumbs.js
@@ -21,7 +21,6 @@ import React from 'react';
import QualifierIcon from '../shared/qualifier-icon';
-
export const TreemapBreadcrumbs = React.createClass({
propTypes: {
breadcrumbs: React.PropTypes.arrayOf(React.PropTypes.shape({
@@ -56,7 +55,7 @@ export const TreemapBreadcrumbs = React.createClass({
},
render() {
- let breadcrumbs = this.props.breadcrumbs.map(this.renderBreadcrumbsItems);
+ const breadcrumbs = this.props.breadcrumbs.map(this.renderBreadcrumbsItems);
return <div className="treemap-breadcrumbs">
{this.props.breadcrumbs.length ? this.renderHome() : null}
{breadcrumbs}
diff --git a/server/sonar-web/src/main/js/components/charts/treemap.js b/server/sonar-web/src/main/js/components/charts/treemap.js
index 25966512e4d..51be0727226 100644
--- a/server/sonar-web/src/main/js/components/charts/treemap.js
+++ b/server/sonar-web/src/main/js/components/charts/treemap.js
@@ -26,13 +26,11 @@ import { ResizeMixin } from './../mixins/resize-mixin';
import { TooltipsMixin } from './../mixins/tooltips-mixin';
import { translate } from '../../helpers/l10n';
-
const SIZE_SCALE = d3.scale.linear()
.domain([3, 15])
.range([11, 18])
.clamp(true);
-
function mostCommitPrefix (strings) {
const sortedStrings = strings.slice(0).sort();
const firstString = sortedStrings[0];
@@ -47,7 +45,6 @@ function mostCommitPrefix (strings) {
return prefix.substr(0, prefix.length - lastPrefixPart.length);
}
-
export const TreemapRect = React.createClass({
propTypes: {
x: React.PropTypes.number.isRequired,
@@ -85,7 +82,7 @@ export const TreemapRect = React.createClass({
'data-title': this.props.tooltip
};
}
- let cellStyles = {
+ const cellStyles = {
left: this.props.x,
top: this.props.y,
width: this.props.width,
@@ -95,19 +92,18 @@ export const TreemapRect = React.createClass({
lineHeight: `${this.props.height}px`,
cursor: typeof this.props.onClick === 'function' ? 'pointer' : 'default'
};
- let isTextVisible = this.props.width >= 40 && this.props.height >= 40;
+ const isTextVisible = this.props.width >= 40 && this.props.height >= 40;
return <div className="treemap-cell"
{...tooltipAttrs}
style={cellStyles}
onClick={this.props.onClick}>
<div className="treemap-inner" dangerouslySetInnerHTML={{ __html: this.props.label }}
- style={{ maxWidth: this.props.width, visibility: isTextVisible ? 'visible': 'hidden' }}/>
+ style={{ maxWidth: this.props.width, visibility: isTextVisible ? 'visible' : 'hidden' }}/>
{this.renderLink()}
</div>;
}
});
-
export const Treemap = React.createClass({
propTypes: {
items: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
@@ -139,22 +135,22 @@ export const Treemap = React.createClass({
return this.renderWhenNoData();
}
- let treemap = d3.layout.treemap()
+ const treemap = d3.layout.treemap()
.round(true)
.value(d => d.size)
.sort((a, b) => a.value - b.value)
.size([this.state.width, this.state.height]);
- let nodes = treemap
+ const nodes = treemap
.nodes({ children: this.props.items })
.filter(d => !d.children)
.filter(d => !!d.dx && !!d.dy);
- let prefix = mostCommitPrefix(this.props.items.map(item => item.label));
- let prefixLength = prefix.length;
+ const prefix = mostCommitPrefix(this.props.items.map(item => item.label));
+ const prefixLength = prefix.length;
- let rectangles = nodes.map(node => {
+ const rectangles = nodes.map(node => {
const key = node.label;
- let label = prefixLength ? `${prefix}<br>${node.label.substr(prefixLength)}` : node.label;
+ const label = prefixLength ? `${prefix}<br>${node.label.substr(prefixLength)}` : node.label;
const onClick = this.props.canBeClicked(node) ? () => this.props.onRectangleClick(node) : null;
return <TreemapRect key={key}
x={node.x}
diff --git a/server/sonar-web/src/main/js/components/charts/word-cloud.js b/server/sonar-web/src/main/js/components/charts/word-cloud.js
index 51f696cdca6..ccaa88d3cf8 100644
--- a/server/sonar-web/src/main/js/components/charts/word-cloud.js
+++ b/server/sonar-web/src/main/js/components/charts/word-cloud.js
@@ -43,7 +43,6 @@ export const Word = React.createClass({
}
});
-
export const WordCloud = React.createClass({
propTypes: {
items: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
@@ -59,16 +58,16 @@ export const WordCloud = React.createClass({
},
render () {
- let len = this.props.items.length;
- let sortedItems = _.sortBy(this.props.items, (item, idx) => {
- let index = len - idx;
+ const len = this.props.items.length;
+ const sortedItems = _.sortBy(this.props.items, (item, idx) => {
+ const index = len - idx;
return (index % 2) * (len - index) + index / 2;
});
- let sizeScale = d3.scale.linear()
+ const sizeScale = d3.scale.linear()
.domain([0, d3.max(this.props.items, d => d.size)])
.range(this.props.sizeRange);
- let words = sortedItems
+ const words = sortedItems
.map((item, index) => <Word key={index}
text={item.text}
size={sizeScale(item.size)}
diff --git a/server/sonar-web/src/main/js/components/common/action-options-view.js b/server/sonar-web/src/main/js/components/common/action-options-view.js
index 3151a4bbcab..56dc6dcf624 100644
--- a/server/sonar-web/src/main/js/components/common/action-options-view.js
+++ b/server/sonar-web/src/main/js/components/common/action-options-view.js
@@ -129,4 +129,3 @@ export default PopupView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/common/file-upload.js b/server/sonar-web/src/main/js/components/common/file-upload.js
index 5d5e52ab0ab..9aefa4ef2ed 100644
--- a/server/sonar-web/src/main/js/components/common/file-upload.js
+++ b/server/sonar-web/src/main/js/components/common/file-upload.js
@@ -61,4 +61,3 @@ export default function (options) {
return deferred.promise();
}
-
diff --git a/server/sonar-web/src/main/js/components/common/modal-form.js b/server/sonar-web/src/main/js/components/common/modal-form.js
index 1ee62b5f720..939cf8b7407 100644
--- a/server/sonar-web/src/main/js/components/common/modal-form.js
+++ b/server/sonar-web/src/main/js/components/common/modal-form.js
@@ -84,4 +84,3 @@ export default ModalView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/common/popup.js b/server/sonar-web/src/main/js/components/common/popup.js
index ac5586209d8..82639c56234 100644
--- a/server/sonar-web/src/main/js/components/common/popup.js
+++ b/server/sonar-web/src/main/js/components/common/popup.js
@@ -68,4 +68,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/common/selectable-collection-view.js b/server/sonar-web/src/main/js/components/common/selectable-collection-view.js
index 3c4a48906ab..f6097873998 100644
--- a/server/sonar-web/src/main/js/components/common/selectable-collection-view.js
+++ b/server/sonar-web/src/main/js/components/common/selectable-collection-view.js
@@ -82,4 +82,3 @@ export default Marionette.CollectionView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/issue/collections/issues.js b/server/sonar-web/src/main/js/components/issue/collections/issues.js
index c0cce9910f0..23e18757daa 100644
--- a/server/sonar-web/src/main/js/components/issue/collections/issues.js
+++ b/server/sonar-web/src/main/js/components/issue/collections/issues.js
@@ -103,4 +103,3 @@ export default Backbone.Collection.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/issue/issue-view.js b/server/sonar-web/src/main/js/components/issue/issue-view.js
index 51c7162c716..b3ea2c3637c 100644
--- a/server/sonar-web/src/main/js/components/issue/issue-view.js
+++ b/server/sonar-web/src/main/js/components/issue/issue-view.js
@@ -259,4 +259,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/issue/models/changelog.js b/server/sonar-web/src/main/js/components/issue/models/changelog.js
index d4859628929..a50102a756b 100644
--- a/server/sonar-web/src/main/js/components/issue/models/changelog.js
+++ b/server/sonar-web/src/main/js/components/issue/models/changelog.js
@@ -29,4 +29,3 @@ export default Backbone.Collection.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/issue/models/issue.js b/server/sonar-web/src/main/js/components/issue/models/issue.js
index 8a282647b41..030f58cf35e 100644
--- a/server/sonar-web/src/main/js/components/issue/models/issue.js
+++ b/server/sonar-web/src/main/js/components/issue/models/issue.js
@@ -158,17 +158,17 @@ export default Backbone.Model.extend({
* @private
*/
_action (options) {
- const model = this;
+ const that = this;
const success = function (r) {
- const attrs = model.parse(r);
- model.reset(attrs);
+ const attrs = that.parse(r);
+ that.reset(attrs);
if (options.success) {
- options.success(model, r, options);
+ options.success(that, r, options);
}
};
const opts = _.extend({ type: 'POST' }, options, { success });
const xhr = options.xhr = Backbone.ajax(opts);
- model.trigger('request', model, xhr, opts);
+ this.trigger('request', this, xhr, opts);
return xhr;
},
@@ -231,7 +231,6 @@ export default Backbone.Model.extend({
});
},
-
/**
* Set type of issue
* @param {String|null} issueType Issue type
@@ -246,7 +245,6 @@ export default Backbone.Model.extend({
return this._action(opts);
},
-
/**
* Do a custom (plugin) action
* @param {String} actionKey Action Key
@@ -279,5 +277,3 @@ export default Backbone.Model.extend({
return locations;
}
});
-
-
diff --git a/server/sonar-web/src/main/js/components/issue/views/changelog-view.js b/server/sonar-web/src/main/js/components/issue/views/changelog-view.js
index 412ae881f4e..9f965981163 100644
--- a/server/sonar-web/src/main/js/components/issue/views/changelog-view.js
+++ b/server/sonar-web/src/main/js/components/issue/views/changelog-view.js
@@ -35,4 +35,3 @@ export default PopupView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/issue/views/comment-form-view.js b/server/sonar-web/src/main/js/components/issue/views/comment-form-view.js
index 8b4c0c629c5..1dca51c00ad 100644
--- a/server/sonar-web/src/main/js/components/issue/views/comment-form-view.js
+++ b/server/sonar-web/src/main/js/components/issue/views/comment-form-view.js
@@ -108,4 +108,3 @@ export default PopupView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/issue/views/issue-popup.js b/server/sonar-web/src/main/js/components/issue/views/issue-popup.js
index 970c350f1fc..ccfa4d2a558 100644
--- a/server/sonar-web/src/main/js/components/issue/views/issue-popup.js
+++ b/server/sonar-web/src/main/js/components/issue/views/issue-popup.js
@@ -47,4 +47,3 @@ export default PopupView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/issue/views/set-severity-form-view.js b/server/sonar-web/src/main/js/components/issue/views/set-severity-form-view.js
index eaa0ccf4085..1617eabb074 100644
--- a/server/sonar-web/src/main/js/components/issue/views/set-severity-form-view.js
+++ b/server/sonar-web/src/main/js/components/issue/views/set-severity-form-view.js
@@ -50,4 +50,3 @@ export default ActionOptionsView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/issue/views/set-type-form-view.js b/server/sonar-web/src/main/js/components/issue/views/set-type-form-view.js
index 22a1d7e8bda..6c831db8253 100644
--- a/server/sonar-web/src/main/js/components/issue/views/set-type-form-view.js
+++ b/server/sonar-web/src/main/js/components/issue/views/set-type-form-view.js
@@ -50,4 +50,3 @@ export default ActionOptionsView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/issue/views/tags-form-view.js b/server/sonar-web/src/main/js/components/issue/views/tags-form-view.js
index ca096aa4d2a..ac0ae0ec342 100644
--- a/server/sonar-web/src/main/js/components/issue/views/tags-form-view.js
+++ b/server/sonar-web/src/main/js/components/issue/views/tags-form-view.js
@@ -192,4 +192,3 @@ export default ActionOptionsView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/issue/views/transitions-form-view.js b/server/sonar-web/src/main/js/components/issue/views/transitions-form-view.js
index 34e5d6c1cdd..255756fbb64 100644
--- a/server/sonar-web/src/main/js/components/issue/views/transitions-form-view.js
+++ b/server/sonar-web/src/main/js/components/issue/views/transitions-form-view.js
@@ -39,4 +39,3 @@ export default ActionOptionsView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/mixins/tooltips-mixin.js b/server/sonar-web/src/main/js/components/mixins/tooltips-mixin.js
index 410c5556157..4536c61dbb3 100644
--- a/server/sonar-web/src/main/js/components/mixins/tooltips-mixin.js
+++ b/server/sonar-web/src/main/js/components/mixins/tooltips-mixin.js
@@ -21,7 +21,6 @@ import $ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
-
export const TooltipsMixin = {
componentDidMount () {
this.initTooltips();
@@ -61,7 +60,6 @@ export const TooltipsMixin = {
}
};
-
export const TooltipsContainer = React.createClass({
componentDidMount () {
this.initTooltips();
diff --git a/server/sonar-web/src/main/js/components/navigator/controller.js b/server/sonar-web/src/main/js/components/navigator/controller.js
index 7eb88e37704..c97a8e5d482 100644
--- a/server/sonar-web/src/main/js/components/navigator/controller.js
+++ b/server/sonar-web/src/main/js/components/navigator/controller.js
@@ -155,4 +155,3 @@ export default Marionette.Controller.extend({
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/facets-view.js b/server/sonar-web/src/main/js/components/navigator/facets-view.js
index b7a67411a61..2bf2158f036 100644
--- a/server/sonar-web/src/main/js/components/navigator/facets-view.js
+++ b/server/sonar-web/src/main/js/components/navigator/facets-view.js
@@ -51,4 +51,3 @@ export default Marionette.CollectionView.extend({
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/facets/base-facet.js b/server/sonar-web/src/main/js/components/navigator/facets/base-facet.js
index f496ba66143..b6b2946729b 100644
--- a/server/sonar-web/src/main/js/components/navigator/facets/base-facet.js
+++ b/server/sonar-web/src/main/js/components/navigator/facets/base-facet.js
@@ -118,4 +118,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/ajax-select-filters.js b/server/sonar-web/src/main/js/components/navigator/filters/ajax-select-filters.js
index 461d4113348..cc4421cd3aa 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/ajax-select-filters.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/ajax-select-filters.js
@@ -27,7 +27,6 @@ import ListTemplate from '../templates/choice-filter-item.hbs';
const PAGE_SIZE = 100;
-
const Suggestions = Backbone.Collection.extend({
comparator: 'text',
@@ -36,13 +35,11 @@ const Suggestions = Backbone.Collection.extend({
this.page = 0;
},
-
parse (r) {
this.more = r.more;
return r.results;
},
-
fetch (options) {
this.data = _.extend({
p: 1,
@@ -53,7 +50,6 @@ const Suggestions = Backbone.Collection.extend({
return Backbone.Collection.prototype.fetch.call(this, settings);
},
-
fetchNextPage (options) {
if (this.more) {
this.data.p += 1;
@@ -65,7 +61,6 @@ const Suggestions = Backbone.Collection.extend({
});
-
const UserSuggestions = Suggestions.extend({
url () {
@@ -80,7 +75,6 @@ const UserSuggestions = Suggestions.extend({
});
-
const ProjectSuggestions = Suggestions.extend({
url () {
@@ -89,7 +83,6 @@ const ProjectSuggestions = Suggestions.extend({
});
-
const ComponentSuggestions = Suggestions.extend({
url () {
@@ -116,13 +109,11 @@ const ComponentSuggestions = Suggestions.extend({
});
-
const AjaxSelectDetailsFilterView = ChoiceFilters.DetailsChoiceFilterView.extend({
template: Template,
listTemplate: ListTemplate,
searchKey: 's',
-
render () {
ChoiceFilters.DetailsChoiceFilterView.prototype.render.apply(this, arguments);
@@ -148,7 +139,6 @@ const AjaxSelectDetailsFilterView = ChoiceFilters.DetailsChoiceFilterView.extend
.on('scroll', throttledScroll);
},
-
search () {
const that = this;
this.query = this.$('.navigator-filter-search input').val();
@@ -182,13 +172,11 @@ const AjaxSelectDetailsFilterView = ChoiceFilters.DetailsChoiceFilterView.extend
}
},
-
showSearchError () {
this.$el.removeClass('fetching');
this.$('.navigator-filter-search').addClass('fetching-error');
},
-
scroll () {
const that = this;
const el = this.$('.choices');
@@ -201,14 +189,12 @@ const AjaxSelectDetailsFilterView = ChoiceFilters.DetailsChoiceFilterView.extend
}
},
-
keydown (e) {
if (_([38, 40, 13]).indexOf(e.keyCode) !== -1) {
e.preventDefault();
}
},
-
resetChoices () {
const that = this;
this.options.filterView.choices.reset(this.options.filterView.choices.filter(function (item) {
@@ -219,7 +205,6 @@ const AjaxSelectDetailsFilterView = ChoiceFilters.DetailsChoiceFilterView.extend
});
},
-
onShow () {
ChoiceFilters.DetailsChoiceFilterView.prototype.onShow.apply(this, arguments);
this.resetChoices();
@@ -229,7 +214,6 @@ const AjaxSelectDetailsFilterView = ChoiceFilters.DetailsChoiceFilterView.extend
});
-
const AjaxSelectFilterView = ChoiceFilters.ChoiceFilterView.extend({
initialize (options) {
@@ -238,12 +222,10 @@ const AjaxSelectFilterView = ChoiceFilters.ChoiceFilterView.extend({
});
},
-
isDefaultValue () {
return this.getSelected().length === 0;
},
-
renderInput () {
const value = this.model.get('value') || [];
const input = $('<input>')
@@ -254,7 +236,6 @@ const AjaxSelectFilterView = ChoiceFilters.ChoiceFilterView.extend({
input.appendTo(this.$el);
},
-
restoreFromQuery (q) {
let param = _.findWhere(q, { key: this.model.get('property') });
@@ -282,7 +263,6 @@ const AjaxSelectFilterView = ChoiceFilters.ChoiceFilterView.extend({
}
},
-
restore (value, param) {
const that = this;
if (_.isString(value)) {
@@ -316,7 +296,6 @@ const AjaxSelectFilterView = ChoiceFilters.ChoiceFilterView.extend({
}
},
-
restoreFromText (value, text) {
const that = this;
_.each(value, function (v, i) {
@@ -329,7 +308,6 @@ const AjaxSelectFilterView = ChoiceFilters.ChoiceFilterView.extend({
this.onRestore(value);
},
-
restoreByRequests (value) {
const that = this;
const requests = _.map(value, function (v) {
@@ -341,13 +319,11 @@ const AjaxSelectFilterView = ChoiceFilters.ChoiceFilterView.extend({
});
},
-
onRestore () {
this.projectsView.updateLists();
this.renderBase();
},
-
clear () {
this.model.unset('value');
if (this.choices) {
@@ -356,13 +332,11 @@ const AjaxSelectFilterView = ChoiceFilters.ChoiceFilterView.extend({
this.render();
},
-
createRequest () {
}
});
-
const ComponentFilterView = AjaxSelectFilterView.extend({
initialize () {
@@ -372,7 +346,6 @@ const ComponentFilterView = AjaxSelectFilterView.extend({
this.choices = new ComponentSuggestions();
},
-
createRequest (v) {
const that = this;
return $
@@ -391,7 +364,6 @@ const ComponentFilterView = AjaxSelectFilterView.extend({
});
-
const ProjectFilterView = AjaxSelectFilterView.extend({
initialize () {
@@ -402,7 +374,6 @@ const ProjectFilterView = AjaxSelectFilterView.extend({
this.choices = new ProjectSuggestions();
},
-
createRequest (v) {
const that = this;
return $
@@ -422,7 +393,6 @@ const ProjectFilterView = AjaxSelectFilterView.extend({
});
-
const AssigneeFilterView = AjaxSelectFilterView.extend({
initialize () {
@@ -452,7 +422,6 @@ const AssigneeFilterView = AjaxSelectFilterView.extend({
});
-
/*
* Export public classes
*/
@@ -466,4 +435,3 @@ export default {
AssigneeFilterView
};
-
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/base-filters.js b/server/sonar-web/src/main/js/components/navigator/filters/base-filters.js
index 44705c1de1b..ef9cb3c8315 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/base-filters.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/base-filters.js
@@ -35,17 +35,14 @@ const Filter = Backbone.Model.extend({
});
-
const Filters = Backbone.Collection.extend({
model: Filter
});
-
const DetailsFilterView = Marionette.ItemView.extend({
template: DetailsTemplate,
className: 'navigator-filter-details',
-
initialize () {
this.$el.on('click', function (e) {
e.stopPropagation();
@@ -53,7 +50,6 @@ const DetailsFilterView = Marionette.ItemView.extend({
this.$el.attr('id', 'filter-' + this.model.get('property'));
},
-
onShow () {
},
@@ -61,12 +57,10 @@ const DetailsFilterView = Marionette.ItemView.extend({
}
});
-
const BaseFilterView = Marionette.ItemView.extend({
template: Template,
className: 'navigator-filter',
-
events () {
return {
'click': 'toggleDetails',
@@ -74,7 +68,6 @@ const BaseFilterView = Marionette.ItemView.extend({
};
},
-
modelEvents: {
'change:enabled': 'focus',
'change:value': 'renderBase',
@@ -83,12 +76,11 @@ const BaseFilterView = Marionette.ItemView.extend({
'change:filters': 'render'
},
-
initialize (options) {
Marionette.ItemView.prototype.initialize.apply(this, arguments);
- const detailsView = (options && options.projectsView) || DetailsFilterView;
- this.projectsView = new detailsView({
+ const DetailsView = (options && options.projectsView) || DetailsFilterView;
+ this.projectsView = new DetailsView({
model: this.model,
filterView: this
});
@@ -96,12 +88,10 @@ const BaseFilterView = Marionette.ItemView.extend({
this.model.view = this;
},
-
attachDetailsView () {
this.projectsView.$el.detach().appendTo($('body'));
},
-
render () {
this.renderBase();
@@ -117,7 +107,6 @@ const BaseFilterView = Marionette.ItemView.extend({
this.model.get('optional'));
},
-
renderBase () {
Marionette.ItemView.prototype.render.apply(this, arguments);
this.renderInput();
@@ -127,16 +116,13 @@ const BaseFilterView = Marionette.ItemView.extend({
this.$el.attr('data-property', this.model.get('property'));
},
-
renderInput () {
},
-
focus () {
this.render();
},
-
toggleDetails (e) {
e.stopPropagation();
this.options.filterBarView.selected = this.options.filterBarView.getEnabledFilters().index(this.$el);
@@ -149,7 +135,6 @@ const BaseFilterView = Marionette.ItemView.extend({
}
},
-
showDetails () {
this.registerShowedDetails();
@@ -161,35 +146,29 @@ const BaseFilterView = Marionette.ItemView.extend({
this.projectsView.onShow();
},
-
registerShowedDetails () {
this.options.filterBarView.hideDetails();
this.options.filterBarView.showedView = this;
},
-
hideDetails () {
this.projectsView.$el.removeClass('active');
this.$el.removeClass('active');
this.projectsView.onHide();
},
-
isActive () {
return this.$el.is('.active');
},
-
renderValue () {
return this.model.get('value') || 'unset';
},
-
isDefaultValue () {
return true;
},
-
restoreFromQuery (q) {
const param = _.findWhere(q, { key: this.model.get('property') });
if (param && param.value) {
@@ -200,18 +179,15 @@ const BaseFilterView = Marionette.ItemView.extend({
}
},
-
restore (value) {
this.model.set({ value }, { silent: true });
this.renderBase();
},
-
clear () {
this.model.unset('value');
},
-
disable (e) {
e.stopPropagation();
this.hideDetails();
@@ -222,7 +198,6 @@ const BaseFilterView = Marionette.ItemView.extend({
});
},
-
formatValue () {
const q = {};
if (this.model.has('property') && this.model.has('value') && this.model.get('value')) {
@@ -231,7 +206,6 @@ const BaseFilterView = Marionette.ItemView.extend({
return q;
},
-
serializeData () {
return _.extend({}, this.model.toJSON(), {
value: this.renderValue(),
@@ -241,7 +215,6 @@ const BaseFilterView = Marionette.ItemView.extend({
});
-
/*
* Export public classes
*/
@@ -252,5 +225,3 @@ export default {
BaseFilterView,
DetailsFilterView
};
-
-
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/checkbox-filters.js b/server/sonar-web/src/main/js/components/navigator/filters/checkbox-filters.js
index f337e0ee9a2..78b2e1c7fcc 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/checkbox-filters.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/checkbox-filters.js
@@ -25,18 +25,15 @@ export default BaseFilters.BaseFilterView.extend({
template: Template,
className: 'navigator-filter navigator-filter-inline',
-
events () {
return {
'click .navigator-filter-disable': 'disable'
};
},
-
showDetails () {
},
-
renderInput () {
if (this.model.get('enabled')) {
$('<input>')
@@ -49,17 +46,14 @@ export default BaseFilters.BaseFilterView.extend({
}
},
-
renderValue () {
return this.model.get('value');
},
-
isDefaultValue () {
return false;
},
-
restore (value) {
this.model.set({
value,
@@ -69,4 +63,3 @@ export default BaseFilters.BaseFilterView.extend({
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/choice-filters.js b/server/sonar-web/src/main/js/components/navigator/filters/choice-filters.js
index 1bf7b2f4cc7..7f1b82d9b3a 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/choice-filters.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/choice-filters.js
@@ -29,20 +29,17 @@ const DetailsChoiceFilterView = BaseFilters.DetailsFilterView.extend({
template: Template,
itemTemplate: ItemTemplate,
-
events () {
return {
'click label': 'onCheck'
};
},
-
render () {
BaseFilters.DetailsFilterView.prototype.render.apply(this, arguments);
this.updateLists();
},
-
renderList (collection, selector) {
const that = this;
const container = this.$(selector);
@@ -57,7 +54,6 @@ const DetailsChoiceFilterView = BaseFilters.DetailsFilterView.extend({
});
},
-
updateLists () {
const choices = new Backbone.Collection(this.options.filterView.choices.reject(function (item) {
return item.get('id')[0] === '!';
@@ -73,7 +69,6 @@ const DetailsChoiceFilterView = BaseFilters.DetailsFilterView.extend({
this.updateCurrent(current);
},
-
onCheck (e) {
const checkbox = $(e.currentTarget);
const id = checkbox.data('id');
@@ -102,32 +97,27 @@ const DetailsChoiceFilterView = BaseFilters.DetailsFilterView.extend({
this.updateLists();
},
-
updateValue () {
this.model.set('value', this.options.filterView.getSelected().map(function (m) {
return m.get('id');
}));
},
-
updateCurrent (index) {
this.currentChoice = index;
this.$('label').removeClass('current')
.eq(this.currentChoice).addClass('current');
},
-
onShow () {
this.bindedOnKeyDown = _.bind(this.onKeyDown, this);
$('body').on('keydown', this.bindedOnKeyDown);
},
-
onHide () {
$('body').off('keydown', this.bindedOnKeyDown);
},
-
onKeyDown (e) {
switch (e.keyCode) {
case 38:
@@ -143,12 +133,12 @@ const DetailsChoiceFilterView = BaseFilters.DetailsFilterView.extend({
this.selectCurrent();
break;
default:
+
// Not a functional key - then skip
break;
}
},
-
selectNextChoice () {
if (this.$('label').length > this.currentChoice + 1) {
this.updateCurrent(this.currentChoice + 1);
@@ -156,7 +146,6 @@ const DetailsChoiceFilterView = BaseFilters.DetailsFilterView.extend({
}
},
-
scrollNext () {
const currentLabel = this.$('label').eq(this.currentChoice);
if (currentLabel.length > 0) {
@@ -170,7 +159,6 @@ const DetailsChoiceFilterView = BaseFilters.DetailsFilterView.extend({
}
},
-
selectPrevChoice () {
if (this.currentChoice > 0) {
this.updateCurrent(this.currentChoice - 1);
@@ -178,7 +166,6 @@ const DetailsChoiceFilterView = BaseFilters.DetailsFilterView.extend({
}
},
-
scrollPrev () {
const currentLabel = this.$('label').eq(this.currentChoice);
if (currentLabel.length > 0) {
@@ -191,13 +178,11 @@ const DetailsChoiceFilterView = BaseFilters.DetailsFilterView.extend({
}
},
-
selectCurrent () {
const cb = this.$('label').eq(this.currentChoice);
cb.click();
},
-
serializeData () {
return _.extend({}, this.model.toJSON(), {
choices: new Backbone.Collection(this.options.filterView.choices.reject(function (item) {
@@ -211,7 +196,6 @@ const DetailsChoiceFilterView = BaseFilters.DetailsFilterView.extend({
});
-
const ChoiceFilterView = BaseFilters.BaseFilterView.extend({
initialize (options) {
@@ -240,14 +224,12 @@ const ChoiceFilterView = BaseFilters.BaseFilterView.extend({
);
},
-
getSelected () {
return this.choices.filter(function (m) {
return m.get('checked');
});
},
-
renderInput () {
const input = $('<select>')
.prop('name', this.model.get('property'))
@@ -263,7 +245,6 @@ const ChoiceFilterView = BaseFilters.BaseFilterView.extend({
input.appendTo(this.$el);
},
-
renderValue () {
const value = this.getSelected().map(function (item) {
return item.get('text');
@@ -275,13 +256,11 @@ const ChoiceFilterView = BaseFilters.BaseFilterView.extend({
return this.isDefaultValue() ? defaultValue : value.join(', ');
},
-
isDefaultValue () {
const selected = this.getSelected();
return selected.length === 0;
},
-
disable () {
this.choices.each(function (item) {
item.set('checked', false);
@@ -289,7 +268,6 @@ const ChoiceFilterView = BaseFilters.BaseFilterView.extend({
BaseFilters.BaseFilterView.prototype.disable.apply(this, arguments);
},
-
restoreFromQuery (q) {
let param = _.findWhere(q, { key: this.model.get('property') });
@@ -322,7 +300,6 @@ const ChoiceFilterView = BaseFilters.BaseFilterView.extend({
}
},
-
restore (value) {
if (_.isString(value)) {
value = value.split(',');
@@ -359,7 +336,6 @@ const ChoiceFilterView = BaseFilters.BaseFilterView.extend({
}
},
-
clear () {
if (this.choices) {
this.choices.each(function (item) {
@@ -373,7 +349,6 @@ const ChoiceFilterView = BaseFilters.BaseFilterView.extend({
}
},
-
formatValue () {
const q = {};
if (this.model.has('property') && this.model.has('value') && this.model.get('value').length > 0) {
@@ -398,7 +373,6 @@ const ChoiceFilterView = BaseFilters.BaseFilterView.extend({
});
-
/*
* Export public classes
*/
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/favorite-filters.js b/server/sonar-web/src/main/js/components/navigator/filters/favorite-filters.js
index 1c14e30f127..2ba0b86e5a6 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/favorite-filters.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/favorite-filters.js
@@ -27,24 +27,20 @@ import DetailsTemplate from '../templates/favorite-details-filter.hbs';
const DetailsFavoriteFilterView = BaseFilters.DetailsFilterView.extend({
template: DetailsTemplate,
-
events: {
'click label[data-id]': 'applyFavorite',
'click .manage label': 'manage'
},
-
applyFavorite (e) {
const id = $(e.target).data('id');
window.location = window.baseUrl + this.model.get('favoriteUrl') + '/' + id;
},
-
manage () {
window.location = window.baseUrl + this.model.get('manageUrl');
},
-
serializeData () {
const choices = this.model.get('choices');
const choicesArray =
@@ -61,35 +57,29 @@ const DetailsFavoriteFilterView = BaseFilters.DetailsFilterView.extend({
});
-
const FavoriteFilterView = ChoiceFilters.ChoiceFilterView.extend({
template: Template,
className: 'navigator-filter navigator-filter-favorite',
-
initialize () {
ChoiceFilters.ChoiceFilterView.prototype.initialize.call(this, {
projectsView: DetailsFavoriteFilterView
});
},
-
renderValue () {
return '';
},
-
renderInput () {
},
-
isDefaultValue () {
return false;
}
});
-
/*
* Export public classes
*/
@@ -99,4 +89,3 @@ export default {
FavoriteFilterView
};
-
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/filter-bar.js b/server/sonar-web/src/main/js/components/navigator/filters/filter-bar.js
index 843ac9184ad..5182e73e415 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/filter-bar.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/filter-bar.js
@@ -26,17 +26,14 @@ import MoreCriteriaFilters from './more-criteria-filters';
export default Marionette.CompositeView.extend({
childViewContainer: '.navigator-filters-list',
-
collectionEvents: {
'change:enabled': 'changeEnabled'
},
-
getChildView (item) {
return item.get('type') || BaseFilters.BaseFilterView;
},
-
childViewOptions () {
return {
filterBarView: this,
@@ -44,7 +41,6 @@ export default Marionette.CompositeView.extend({
};
},
-
initialize () {
Marionette.CompositeView.prototype.initialize.apply(this, arguments);
@@ -90,7 +86,6 @@ export default Marionette.CompositeView.extend({
});
},
-
getEnabledFilters () {
return this.$(this.childViewContainer).children()
.not('.navigator-filter-disabled')
@@ -98,13 +93,11 @@ export default Marionette.CompositeView.extend({
.not('.navigator-filter-favorite');
},
-
selectFirst () {
this.selected = -1;
this.selectNext();
},
-
selectPrev () {
const filters = this.getEnabledFilters();
if (this.selected > 0) {
@@ -115,7 +108,6 @@ export default Marionette.CompositeView.extend({
}
},
-
selectNext () {
const filters = this.getEnabledFilters();
if (this.selected < filters.length - 1) {
@@ -129,7 +121,6 @@ export default Marionette.CompositeView.extend({
}
},
-
addMoreCriteriaFilter () {
const disabledFilters = this.collection.where({ enabled: false });
if (disabledFilters.length > 0) {
@@ -143,14 +134,12 @@ export default Marionette.CompositeView.extend({
}
},
-
onAddChild (childView) {
if (childView.model.get('type') === MoreCriteriaFilters.FavoriteFilterView) {
$('.navigator-header').addClass('navigator-header-favorite');
}
},
-
restoreFromQuery (q) {
this.collection.each(function (item) {
item.set('enabled', !item.get('optional'));
@@ -159,14 +148,12 @@ export default Marionette.CompositeView.extend({
});
},
-
hideDetails () {
if (_.isObject(this.showedView)) {
this.showedView.hideDetails();
}
},
-
enableFilter (id) {
const filter = this.collection.get(id);
const filterView = filter.view;
@@ -176,7 +163,6 @@ export default Marionette.CompositeView.extend({
filterView.showDetails();
},
-
changeEnabled () {
const disabledFilters = _.reject(this.collection.where({ enabled: false }), function (filter) {
return filter.get('type') === MoreCriteriaFilters.MoreCriteriaFilterView;
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/metric-filters.js b/server/sonar-web/src/main/js/components/navigator/filters/metric-filters.js
index 1753c1cd138..dba09ff94a8 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/metric-filters.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/metric-filters.js
@@ -26,12 +26,10 @@ import { translate } from '../../../helpers/l10n';
const DetailsMetricFilterView = BaseFilters.DetailsFilterView.extend({
template: Template,
-
events: {
'change :input': 'inputChanged'
},
-
inputChanged () {
const metric = this.$('[name=metric]').val();
const isDifferentialMetric = metric.indexOf('new_') === 0;
@@ -68,7 +66,6 @@ const DetailsMetricFilterView = BaseFilters.DetailsFilterView.extend({
this.model.set('value', value);
},
-
updateDataType (value) {
const metric = _.find(window.SS.metrics, function (m) {
return m.metric.name === value.metric;
@@ -84,7 +81,6 @@ const DetailsMetricFilterView = BaseFilters.DetailsFilterView.extend({
}
},
-
onRender () {
const periodZeroLabel = this.$('[name=period]').children('[value="0"]').html();
this.periodZeroOption = `<option value="0">${periodZeroLabel}</option>`;
@@ -108,7 +104,6 @@ const DetailsMetricFilterView = BaseFilters.DetailsFilterView.extend({
this.inputChanged();
},
-
onShow () {
const select = this.$('[name=metric]');
if (this.model.get('value').metric === '') {
@@ -120,7 +115,6 @@ const DetailsMetricFilterView = BaseFilters.DetailsFilterView.extend({
});
-
export default BaseFilters.BaseFilterView.extend({
initialize () {
@@ -131,7 +125,6 @@ export default BaseFilters.BaseFilterView.extend({
this.groupMetrics();
},
-
groupMetrics () {
const metrics = _.map(this.model.get('metrics'), function (metric) {
return metric.metric;
@@ -151,7 +144,6 @@ export default BaseFilters.BaseFilterView.extend({
this.model.set('groupedMetrics', groupedMetrics);
},
-
renderValue () {
return this.isDefaultValue() ?
translate('measure_filter.criteria.metric.not_set') :
@@ -159,7 +151,6 @@ export default BaseFilters.BaseFilterView.extend({
this.model.get('value').valText;
},
-
renderInput () {
const that = this;
const value = this.model.get('value');
@@ -181,7 +172,6 @@ export default BaseFilters.BaseFilterView.extend({
}
},
-
isDefaultValue () {
const value = this.model.get('value');
if (!_.isObject(value)) {
@@ -190,7 +180,6 @@ export default BaseFilters.BaseFilterView.extend({
return !(value.metric && value.op && (value.val != null));
},
-
restoreFromQuery (q) {
const that = this;
const value = {};
@@ -213,4 +202,3 @@ export default BaseFilters.BaseFilterView.extend({
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/more-criteria-filters.js b/server/sonar-web/src/main/js/components/navigator/filters/more-criteria-filters.js
index 0d148321b1a..acf1f0b812a 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/more-criteria-filters.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/more-criteria-filters.js
@@ -26,18 +26,15 @@ import DetailsTemplate from '../templates/more-criteria-details-filter.hbs';
const DetailsMoreCriteriaFilterView = ChoiceFilters.DetailsChoiceFilterView.extend({
template: DetailsTemplate,
-
events: {
'click label[data-id]:not(.inactive)': 'enableFilter'
},
-
enableById (id) {
this.model.view.options.filterBarView.enableFilter(id);
this.model.view.hideDetails();
},
-
enableByProperty (property) {
const filter = _.find(this.model.get('filters'), function (f) {
return f.get('property') === property;
@@ -47,19 +44,16 @@ const DetailsMoreCriteriaFilterView = ChoiceFilters.DetailsChoiceFilterView.exte
}
},
-
enableFilter (e) {
const id = $(e.target).data('id');
this.enableById(id);
this.updateCurrent(0);
},
-
selectCurrent () {
this.$('label').eq(this.currentChoice).click();
},
-
serializeData () {
const filters = this.model.get('filters').map(function (filter) {
return _.extend(filter.toJSON(), { id: filter.cid });
@@ -74,41 +68,34 @@ const DetailsMoreCriteriaFilterView = ChoiceFilters.DetailsChoiceFilterView.exte
});
-
const MoreCriteriaFilterView = ChoiceFilters.ChoiceFilterView.extend({
template: Template,
className: 'navigator-filter navigator-filter-more-criteria',
-
initialize () {
ChoiceFilters.ChoiceFilterView.prototype.initialize.call(this, {
projectsView: DetailsMoreCriteriaFilterView
});
},
-
renderValue () {
return '';
},
-
renderInput () {
},
-
renderBase () {
ChoiceFilters.ChoiceFilterView.prototype.renderBase.call(this);
this.$el.prop('title', '');
},
-
isDefaultValue () {
return false;
}
});
-
/*
* Export public classes
*/
@@ -118,4 +105,3 @@ export default {
MoreCriteriaFilterView
};
-
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/range-filters.js b/server/sonar-web/src/main/js/components/navigator/filters/range-filters.js
index 964e73d10a7..3ae434f9e5e 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/range-filters.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/range-filters.js
@@ -26,12 +26,10 @@ import { translate } from '../../../helpers/l10n';
const DetailsRangeFilterView = BaseFilters.DetailsFilterView.extend({
template: Template,
-
events: {
'change input': 'change'
},
-
change () {
const value = {};
const valueFrom = this.$('input').eq(0).val();
@@ -48,7 +46,6 @@ const DetailsRangeFilterView = BaseFilters.DetailsFilterView.extend({
this.model.set('value', value);
},
-
populateInputs () {
const value = this.model.get('value');
const propertyFrom = this.model.get('propertyFrom');
@@ -60,14 +57,12 @@ const DetailsRangeFilterView = BaseFilters.DetailsFilterView.extend({
this.$('input').eq(1).val(valueTo || '');
},
-
onShow () {
this.$(':input:first').focus();
}
});
-
const RangeFilterView = BaseFilters.BaseFilterView.extend({
initialize () {
@@ -76,7 +71,6 @@ const RangeFilterView = BaseFilters.BaseFilterView.extend({
});
},
-
renderValue () {
if (!this.isDefaultValue()) {
const value = _.values(this.model.get('value'));
@@ -86,7 +80,6 @@ const RangeFilterView = BaseFilters.BaseFilterView.extend({
}
},
-
renderInput () {
const value = this.model.get('value');
const propertyFrom = this.model.get('propertyFrom');
@@ -109,7 +102,6 @@ const RangeFilterView = BaseFilters.BaseFilterView.extend({
.appendTo(this.$el);
},
-
isDefaultValue () {
const value = this.model.get('value');
const propertyFrom = this.model.get('propertyFrom');
@@ -120,7 +112,6 @@ const RangeFilterView = BaseFilters.BaseFilterView.extend({
return !valueFrom && !valueTo;
},
-
restoreFromQuery (q) {
const paramFrom = _.findWhere(q, { key: this.model.get('propertyFrom') });
const paramTo = _.findWhere(q, { key: this.model.get('propertyTo') });
@@ -144,7 +135,6 @@ const RangeFilterView = BaseFilters.BaseFilterView.extend({
}
},
-
restore (value) {
if (this.choices && this.selection && value.length > 0) {
const that = this;
@@ -169,12 +159,10 @@ const RangeFilterView = BaseFilters.BaseFilterView.extend({
}
},
-
formatValue () {
return this.model.get('value');
},
-
clear () {
this.model.unset('value');
this.projectsView.render();
@@ -182,7 +170,6 @@ const RangeFilterView = BaseFilters.BaseFilterView.extend({
});
-
const DateRangeFilterView = RangeFilterView.extend({
render () {
@@ -199,7 +186,6 @@ const DateRangeFilterView = RangeFilterView.extend({
});
},
-
renderValue () {
if (!this.isDefaultValue()) {
const value = _.values(this.model.get('value'));
@@ -211,7 +197,6 @@ const DateRangeFilterView = RangeFilterView.extend({
});
-
/*
* Export public classes
*/
@@ -221,4 +206,3 @@ export default {
DateRangeFilterView
};
-
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/string-filters.js b/server/sonar-web/src/main/js/components/navigator/filters/string-filters.js
index b6f6f8124db..b1ff255083e 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/string-filters.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/string-filters.js
@@ -25,23 +25,19 @@ import Template from '../templates/string-filter.hbs';
const DetailsStringFilterView = BaseFilters.DetailsFilterView.extend({
template: Template,
-
events: {
'change input': 'change'
},
-
change (e) {
this.model.set('value', $(e.target).val());
},
-
onShow () {
BaseFilters.DetailsFilterView.prototype.onShow.apply(this, arguments);
this.$(':input').focus();
},
-
serializeData () {
return _.extend({}, this.model.toJSON(), {
value: this.model.get('value') || ''
@@ -50,7 +46,6 @@ const DetailsStringFilterView = BaseFilters.DetailsFilterView.extend({
});
-
export default BaseFilters.BaseFilterView.extend({
initialize () {
@@ -59,12 +54,10 @@ export default BaseFilters.BaseFilterView.extend({
});
},
-
renderValue () {
return this.isDefaultValue() ? '—' : this.model.get('value');
},
-
renderInput () {
$('<input>')
.prop('name', this.model.get('property'))
@@ -74,12 +67,10 @@ export default BaseFilters.BaseFilterView.extend({
.appendTo(this.$el);
},
-
isDefaultValue () {
return !this.model.get('value');
},
-
restore (value) {
this.model.set({
value,
@@ -87,7 +78,6 @@ export default BaseFilters.BaseFilterView.extend({
});
},
-
clear () {
this.model.unset('value');
this.projectsView.render();
@@ -95,4 +85,3 @@ export default BaseFilters.BaseFilterView.extend({
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/models/facet.js b/server/sonar-web/src/main/js/components/navigator/models/facet.js
index 0013e2ad525..d2658e314a0 100644
--- a/server/sonar-web/src/main/js/components/navigator/models/facet.js
+++ b/server/sonar-web/src/main/js/components/navigator/models/facet.js
@@ -36,4 +36,3 @@ export default Backbone.Model.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/models/facets.js b/server/sonar-web/src/main/js/components/navigator/models/facets.js
index 3880f3b545d..052ad93bf84 100644
--- a/server/sonar-web/src/main/js/components/navigator/models/facets.js
+++ b/server/sonar-web/src/main/js/components/navigator/models/facets.js
@@ -24,4 +24,3 @@ export default Backbone.Collection.extend({
model: Facet
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/models/state.js b/server/sonar-web/src/main/js/components/navigator/models/state.js
index a0aa949a522..8c287de5e15 100644
--- a/server/sonar-web/src/main/js/components/navigator/models/state.js
+++ b/server/sonar-web/src/main/js/components/navigator/models/state.js
@@ -70,4 +70,3 @@ export default Backbone.Model.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/router.js b/server/sonar-web/src/main/js/components/navigator/router.js
index 1a60a737968..4e3415026d5 100644
--- a/server/sonar-web/src/main/js/components/navigator/router.js
+++ b/server/sonar-web/src/main/js/components/navigator/router.js
@@ -43,4 +43,3 @@ export default Backbone.Router.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/workspace-header-view.js b/server/sonar-web/src/main/js/components/navigator/workspace-header-view.js
index 775f94b50f1..10610eb1b91 100644
--- a/server/sonar-web/src/main/js/components/navigator/workspace-header-view.js
+++ b/server/sonar-web/src/main/js/components/navigator/workspace-header-view.js
@@ -96,4 +96,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/workspace-list-item-view.js b/server/sonar-web/src/main/js/components/navigator/workspace-list-item-view.js
index d5d6b97c80f..dfda1b59a4b 100644
--- a/server/sonar-web/src/main/js/components/navigator/workspace-list-item-view.js
+++ b/server/sonar-web/src/main/js/components/navigator/workspace-list-item-view.js
@@ -40,4 +40,3 @@ export default Marionette.ItemView.extend({
});
-
diff --git a/server/sonar-web/src/main/js/components/navigator/workspace-list-view.js b/server/sonar-web/src/main/js/components/navigator/workspace-list-view.js
index cba0d33701a..b533058a41c 100644
--- a/server/sonar-web/src/main/js/components/navigator/workspace-list-view.js
+++ b/server/sonar-web/src/main/js/components/navigator/workspace-list-view.js
@@ -132,4 +132,3 @@ export default Marionette.CompositeView.extend({
});
-
diff --git a/server/sonar-web/src/main/js/components/router/router.js b/server/sonar-web/src/main/js/components/router/router.js
index 8e38ba9812a..aacb5b9af1d 100644
--- a/server/sonar-web/src/main/js/components/router/router.js
+++ b/server/sonar-web/src/main/js/components/router/router.js
@@ -19,7 +19,6 @@
*/
let listener;
-
export const RouterMixin = {
getDefaultProps() {
return { urlRoot: '/' };
@@ -39,6 +38,7 @@ export const RouterMixin = {
},
componentDidMount () {
+ /* jscs:disable safeContextKeyword */
listener = this;
window.addEventListener('popstate', this.handleRouteChange);
},
@@ -59,7 +59,6 @@ export const RouterMixin = {
}
};
-
export function navigate (route) {
if (listener) {
listener.navigate(route);
diff --git a/server/sonar-web/src/main/js/components/select-list/controls.js b/server/sonar-web/src/main/js/components/select-list/controls.js
index 92241acfb80..35e6d2456a3 100644
--- a/server/sonar-web/src/main/js/components/select-list/controls.js
+++ b/server/sonar-web/src/main/js/components/select-list/controls.js
@@ -27,7 +27,7 @@ export default React.createClass({
},
search() {
- let query = this.refs.search.value;
+ const query = this.refs.search.value;
this.props.search(query);
},
@@ -45,9 +45,9 @@ export default React.createClass({
},
render() {
- let selectionDisabled = !!this.props.query;
+ const selectionDisabled = !!this.props.query;
- let selectionOptions = [
+ const selectionOptions = [
{ value: 'selected', label: 'Selected' },
{ value: 'deselected', label: 'Not Selected' },
{ value: 'all', label: 'All' }
diff --git a/server/sonar-web/src/main/js/components/select-list/footer.js b/server/sonar-web/src/main/js/components/select-list/footer.js
index 9b74e516342..215644688b8 100644
--- a/server/sonar-web/src/main/js/components/select-list/footer.js
+++ b/server/sonar-web/src/main/js/components/select-list/footer.js
@@ -32,7 +32,7 @@ export default React.createClass({
},
renderLoadMoreLink() {
- let hasMore = this.props.total > this.props.count;
+ const hasMore = this.props.total > this.props.count;
if (!hasMore) {
return null;
}
diff --git a/server/sonar-web/src/main/js/components/select-list/item.js b/server/sonar-web/src/main/js/components/select-list/item.js
index dcf2e53e119..2e3d84289cf 100644
--- a/server/sonar-web/src/main/js/components/select-list/item.js
+++ b/server/sonar-web/src/main/js/components/select-list/item.js
@@ -37,7 +37,7 @@ export default React.createClass({
},
render() {
- let renderedItem = this.props.renderItem(this.props.item);
+ const renderedItem = this.props.renderItem(this.props.item);
return (
<li className="panel panel-vertical">
<div className="display-inline-block text-middle spacer-right">
diff --git a/server/sonar-web/src/main/js/components/select-list/list.js b/server/sonar-web/src/main/js/components/select-list/list.js
index 7d606247194..c514ca13430 100644
--- a/server/sonar-web/src/main/js/components/select-list/list.js
+++ b/server/sonar-web/src/main/js/components/select-list/list.js
@@ -30,8 +30,8 @@ export default React.createClass({
},
render() {
- let renderedItems = this.props.items.map(item => {
- let key = this.props.getItemKey(item);
+ const renderedItems = this.props.items.map(item => {
+ const key = this.props.getItemKey(item);
return <Item key={key} {...this.props} item={item} />;
});
return (
diff --git a/server/sonar-web/src/main/js/components/select-list/main.js b/server/sonar-web/src/main/js/components/select-list/main.js
index e17fca31a0d..cf6e2dd25fd 100644
--- a/server/sonar-web/src/main/js/components/select-list/main.js
+++ b/server/sonar-web/src/main/js/components/select-list/main.js
@@ -31,7 +31,6 @@ export default React.createClass({
deselectItem: React.PropTypes.func.isRequired
},
-
getInitialState() {
return { items: [], total: 0, selection: 'selected', query: null };
},
@@ -41,7 +40,7 @@ export default React.createClass({
},
loadItems() {
- let options = {
+ const options = {
selection: this.state.selection,
query: this.state.query,
page: 1
@@ -52,13 +51,13 @@ export default React.createClass({
},
loadMoreItems() {
- let options = {
+ const options = {
selection: this.state.selection,
query: this.state.query,
page: this.state.page + 1
};
this.props.loadItems(options, (items, paging) => {
- let newItems = [].concat(this.state.items, items);
+ const newItems = [].concat(this.state.items, items);
this.setState({ items: newItems, total: paging.total, page: paging.pageIndex });
});
},
diff --git a/server/sonar-web/src/main/js/components/shared/FavoriteIssueFilter.js b/server/sonar-web/src/main/js/components/shared/FavoriteIssueFilter.js
index fb7d817557c..e06c617f425 100644
--- a/server/sonar-web/src/main/js/components/shared/FavoriteIssueFilter.js
+++ b/server/sonar-web/src/main/js/components/shared/FavoriteIssueFilter.js
@@ -49,7 +49,7 @@ export default React.createClass({
},
renderSVG() {
- /* eslint max-len: 0 */
+ /* jscs:disable maximumLineLength */
return (
<svg width="16" height="16" style={{ fillRule: 'evenodd', clipRule: 'evenodd', strokeLinejoin: 'round', strokeMiterlimit: 1.41421 }}>
<path d="M15.4275,5.77678C15.4275,5.90773 15.3501,6.05059 15.1953,6.20536L11.9542,9.36608L12.7221,13.8304C12.728,13.872 12.731,13.9316 12.731,14.0089C12.731,14.1339 12.6998,14.2396 12.6373,14.3259C12.5748,14.4122 12.484,14.4554 12.3649,14.4554C12.2518,14.4554 12.1328,14.4197 12.0078,14.3482L7.99888,12.2411L3.98995,14.3482C3.85901,14.4197 3.73996,14.4554 3.63281,14.4554C3.50781,14.4554 3.41406,14.4122 3.35156,14.3259C3.28906,14.2396 3.25781,14.1339 3.25781,14.0089C3.25781,13.9732 3.26377,13.9137 3.27567,13.8304L4.04353,9.36608L0.793531,6.20536C0.644719,6.04464 0.570313,5.90178 0.570313,5.77678C0.570313,5.55654 0.736979,5.41964 1.07031,5.36606L5.55245,4.71428L7.56138,0.651781C7.67447,0.407729 7.8203,0.285703 7.99888,0.285703C8.17745,0.285703 8.32328,0.407729 8.43638,0.651781L10.4453,4.71428L14.9274,5.36606C15.2608,5.41964 15.4274,5.55654 15.4274,5.77678L15.4275,5.77678Z"
diff --git a/server/sonar-web/src/main/js/components/shared/FavoriteMeasureFilter.js b/server/sonar-web/src/main/js/components/shared/FavoriteMeasureFilter.js
index 620583e57ae..c4bc895e610 100644
--- a/server/sonar-web/src/main/js/components/shared/FavoriteMeasureFilter.js
+++ b/server/sonar-web/src/main/js/components/shared/FavoriteMeasureFilter.js
@@ -49,7 +49,7 @@ export default React.createClass({
},
renderSVG() {
- /* eslint max-len: 0 */
+ /* jscs:disable maximumLineLength */
return (
<svg width="16" height="16" style={{ fillRule: 'evenodd', clipRule: 'evenodd', strokeLinejoin: 'round', strokeMiterlimit: 1.41421 }}>
<path d="M15.4275,5.77678C15.4275,5.90773 15.3501,6.05059 15.1953,6.20536L11.9542,9.36608L12.7221,13.8304C12.728,13.872 12.731,13.9316 12.731,14.0089C12.731,14.1339 12.6998,14.2396 12.6373,14.3259C12.5748,14.4122 12.484,14.4554 12.3649,14.4554C12.2518,14.4554 12.1328,14.4197 12.0078,14.3482L7.99888,12.2411L3.98995,14.3482C3.85901,14.4197 3.73996,14.4554 3.63281,14.4554C3.50781,14.4554 3.41406,14.4122 3.35156,14.3259C3.28906,14.2396 3.25781,14.1339 3.25781,14.0089C3.25781,13.9732 3.26377,13.9137 3.27567,13.8304L4.04353,9.36608L0.793531,6.20536C0.644719,6.04464 0.570313,5.90178 0.570313,5.77678C0.570313,5.55654 0.736979,5.41964 1.07031,5.36606L5.55245,4.71428L7.56138,0.651781C7.67447,0.407729 7.8203,0.285703 7.99888,0.285703C8.17745,0.285703 8.32328,0.407729 8.43638,0.651781L10.4453,4.71428L14.9274,5.36606C15.2608,5.41964 15.4274,5.55654 15.4274,5.77678L15.4275,5.77678Z"
diff --git a/server/sonar-web/src/main/js/components/shared/assignee-helper.js b/server/sonar-web/src/main/js/components/shared/assignee-helper.js
index 590a7e019f8..76bcbf30f3f 100644
--- a/server/sonar-web/src/main/js/components/shared/assignee-helper.js
+++ b/server/sonar-web/src/main/js/components/shared/assignee-helper.js
@@ -23,9 +23,9 @@ import { translate } from '../../helpers/l10n';
export default class Assignee extends React.Component {
render () {
- let avatar = this.props.user ?
+ const avatar = this.props.user ?
<span className="spacer-right"><Avatar email={this.props.user.email} size={16}/></span> : null;
- let name = this.props.user ? this.props.user.name : translate('unassigned');
+ const name = this.props.user ? this.props.user.name : translate('unassigned');
return <span>{avatar}{name}</span>;
}
}
diff --git a/server/sonar-web/src/main/js/components/shared/checkbox.js b/server/sonar-web/src/main/js/components/shared/checkbox.js
index 05ad7cd93dd..978e146e6cd 100644
--- a/server/sonar-web/src/main/js/components/shared/checkbox.js
+++ b/server/sonar-web/src/main/js/components/shared/checkbox.js
@@ -43,14 +43,14 @@ export default React.createClass({
},
render() {
- let classNames = ['icon-checkbox'];
+ const classNames = ['icon-checkbox'];
if (this.state.checked) {
classNames.push('icon-checkbox-checked');
}
if (this.props.thirdState) {
classNames.push('icon-checkbox-single');
}
- let className = classNames.join(' ');
+ const className = classNames.join(' ');
return <a onClick={this.toggle} className={className} href="#"/>;
}
});
diff --git a/server/sonar-web/src/main/js/components/shared/drilldown-link.js b/server/sonar-web/src/main/js/components/shared/drilldown-link.js
index 633797d5451..c3ee5902ac7 100644
--- a/server/sonar-web/src/main/js/components/shared/drilldown-link.js
+++ b/server/sonar-web/src/main/js/components/shared/drilldown-link.js
@@ -24,7 +24,6 @@ import React from 'react';
import { IssuesLink } from './issues-link';
import { getComponentDrilldownUrl } from '../../helpers/urls';
-
const ISSUE_MEASURES = [
'violations',
'new_violations',
@@ -50,7 +49,6 @@ const ISSUE_MEASURES = [
'new_vulnerabilities'
];
-
export const DrilldownLink = React.createClass({
isIssueMeasure() {
return ISSUE_MEASURES.indexOf(this.props.metric) !== -1;
diff --git a/server/sonar-web/src/main/js/components/shared/favorite.js b/server/sonar-web/src/main/js/components/shared/favorite.js
index 00dd7d8359f..20726776f26 100644
--- a/server/sonar-web/src/main/js/components/shared/favorite.js
+++ b/server/sonar-web/src/main/js/components/shared/favorite.js
@@ -51,7 +51,7 @@ export default React.createClass({
},
renderSVG() {
- /* eslint max-len: 0 */
+ /* jscs:disable maximumLineLength */
return (
<svg width="16" height="16" style={{ fillRule: 'evenodd', clipRule: 'evenodd', strokeLinejoin: 'round', strokeMiterlimit: 1.41421 }}>
<path d="M15.4275,5.77678C15.4275,5.90773 15.3501,6.05059 15.1953,6.20536L11.9542,9.36608L12.7221,13.8304C12.728,13.872 12.731,13.9316 12.731,14.0089C12.731,14.1339 12.6998,14.2396 12.6373,14.3259C12.5748,14.4122 12.484,14.4554 12.3649,14.4554C12.2518,14.4554 12.1328,14.4197 12.0078,14.3482L7.99888,12.2411L3.98995,14.3482C3.85901,14.4197 3.73996,14.4554 3.63281,14.4554C3.50781,14.4554 3.41406,14.4122 3.35156,14.3259C3.28906,14.2396 3.25781,14.1339 3.25781,14.0089C3.25781,13.9732 3.26377,13.9137 3.27567,13.8304L4.04353,9.36608L0.793531,6.20536C0.644719,6.04464 0.570313,5.90178 0.570313,5.77678C0.570313,5.55654 0.736979,5.41964 1.07031,5.36606L5.55245,4.71428L7.56138,0.651781C7.67447,0.407729 7.8203,0.285703 7.99888,0.285703C8.17745,0.285703 8.32328,0.407729 8.43638,0.651781L10.4453,4.71428L14.9274,5.36606C15.2608,5.41964 15.4274,5.55654 15.4274,5.77678L15.4275,5.77678Z"
diff --git a/server/sonar-web/src/main/js/components/shared/issues-link.js b/server/sonar-web/src/main/js/components/shared/issues-link.js
index 290ec84874c..e550faa81d4 100644
--- a/server/sonar-web/src/main/js/components/shared/issues-link.js
+++ b/server/sonar-web/src/main/js/components/shared/issues-link.js
@@ -21,10 +21,9 @@ import React from 'react';
import { getComponentIssuesUrl } from '../../helpers/urls';
-
export const IssuesLink = React.createClass({
render() {
- let url = getComponentIssuesUrl(this.props.component, this.props.params);
+ const url = getComponentIssuesUrl(this.props.component, this.props.params);
return <a className={this.props.className} href={url}>{this.props.children}</a>;
}
});
diff --git a/server/sonar-web/src/main/js/components/shared/list-footer.js b/server/sonar-web/src/main/js/components/shared/list-footer.js
index fd9392b05ab..f21757c4a3a 100644
--- a/server/sonar-web/src/main/js/components/shared/list-footer.js
+++ b/server/sonar-web/src/main/js/components/shared/list-footer.js
@@ -22,7 +22,6 @@ import React from 'react';
import { translate } from '../../helpers/l10n';
import { formatMeasure } from '../../helpers/measures';
-
export default React.createClass({
propTypes: {
count: React.PropTypes.number.isRequired,
@@ -54,9 +53,9 @@ export default React.createClass({
},
render() {
- let hasMore = this.props.total > this.props.count;
- let loadMoreLink = <a onClick={this.handleLoadMore} className="spacer-left" href="#">show more</a>;
- let className = classNames('spacer-top note text-center', { 'new-loading': !this.props.ready });
+ const hasMore = this.props.total > this.props.count;
+ const loadMoreLink = <a onClick={this.handleLoadMore} className="spacer-left" href="#">show more</a>;
+ const className = classNames('spacer-top note text-center', { 'new-loading': !this.props.ready });
return (
<footer className={className}>
{formatMeasure(this.props.count, 'INT')} of {formatMeasure(this.props.total, 'INT')} shown
diff --git a/server/sonar-web/src/main/js/components/shared/pending-icon.js b/server/sonar-web/src/main/js/components/shared/pending-icon.js
index 8a9488ff0e5..51dbfa48dcb 100644
--- a/server/sonar-web/src/main/js/components/shared/pending-icon.js
+++ b/server/sonar-web/src/main/js/components/shared/pending-icon.js
@@ -21,7 +21,7 @@ import React from 'react';
export default React.createClass({
render() {
- /* eslint max-len: 0 */
+ /* jscs:disable maximumLineLength */
return (
<svg width="16" height="16" className="icon-pending">
<g transform="matrix(0.0364583,0,0,0.0364583,1,-0.166667)">
diff --git a/server/sonar-web/src/main/js/components/shared/pin-icon.js b/server/sonar-web/src/main/js/components/shared/pin-icon.js
index 49c57355992..5a6c1870697 100644
--- a/server/sonar-web/src/main/js/components/shared/pin-icon.js
+++ b/server/sonar-web/src/main/js/components/shared/pin-icon.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.
*/
-/* eslint max-len: 0 */
+/* jscs:disable maximumLineLength */
import React from 'react';
const PinIcon = () => (
@@ -29,4 +29,3 @@ const PinIcon = () => (
);
export default PinIcon;
-
diff --git a/server/sonar-web/src/main/js/components/shared/quality-gate-link.js b/server/sonar-web/src/main/js/components/shared/quality-gate-link.js
index c0f506ce69a..069fb395dab 100644
--- a/server/sonar-web/src/main/js/components/shared/quality-gate-link.js
+++ b/server/sonar-web/src/main/js/components/shared/quality-gate-link.js
@@ -19,10 +19,9 @@
*/
import React from 'react';
-
export const QualityGateLink = React.createClass({
render() {
- let url = `${window.baseUrl}/quality_gates/show/${this.props.gate}`;
+ const url = `${window.baseUrl}/quality_gates/show/${this.props.gate}`;
return <a href={url}>{this.props.children}</a>;
}
});
diff --git a/server/sonar-web/src/main/js/components/shared/quality-profile-link.js b/server/sonar-web/src/main/js/components/shared/quality-profile-link.js
index 681c1494258..a4deb7700c7 100644
--- a/server/sonar-web/src/main/js/components/shared/quality-profile-link.js
+++ b/server/sonar-web/src/main/js/components/shared/quality-profile-link.js
@@ -19,10 +19,9 @@
*/
import React from 'react';
-
export const QualityProfileLink = React.createClass({
render() {
- let url = `${window.baseUrl}/profiles/show?key=${encodeURIComponent(this.props.profile)}`;
+ const url = `${window.baseUrl}/profiles/show?key=${encodeURIComponent(this.props.profile)}`;
return <a href={url}>{this.props.children}</a>;
}
});
diff --git a/server/sonar-web/src/main/js/components/shared/radio-toggle.js b/server/sonar-web/src/main/js/components/shared/radio-toggle.js
index 7866cf71753..aff2443f12a 100644
--- a/server/sonar-web/src/main/js/components/shared/radio-toggle.js
+++ b/server/sonar-web/src/main/js/components/shared/radio-toggle.js
@@ -32,13 +32,13 @@ export default React.createClass({
},
onChange(e) {
- let newValue = e.currentTarget.value;
+ const newValue = e.currentTarget.value;
this.props.onCheck(newValue);
},
renderOption(option) {
- let checked = option.value === this.props.value;
- let htmlId = this.props.name + '__' + option.value;
+ const checked = option.value === this.props.value;
+ const htmlId = this.props.name + '__' + option.value;
return (
<li key={option.value}>
<input onChange={this.onChange}
@@ -54,7 +54,7 @@ export default React.createClass({
},
render() {
- let options = this.props.options.map(this.renderOption);
+ const options = this.props.options.map(this.renderOption);
return (
<ul className="radio-toggle">{options}</ul>
);
diff --git a/server/sonar-web/src/main/js/components/shared/rating.js b/server/sonar-web/src/main/js/components/shared/rating.js
index 2c1a3679742..51022ee6ede 100644
--- a/server/sonar-web/src/main/js/components/shared/rating.js
+++ b/server/sonar-web/src/main/js/components/shared/rating.js
@@ -21,14 +21,13 @@ import React from 'react';
import { formatMeasure } from '../../helpers/measures';
-
export const Rating = React.createClass({
render() {
if (this.props.value == null || isNaN(this.props.value)) {
return null;
}
- let formatted = formatMeasure(this.props.value, 'RATING');
- let className = 'rating rating-' + formatted;
+ const formatted = formatMeasure(this.props.value, 'RATING');
+ const className = 'rating rating-' + formatted;
return <span className={className}>{formatted}</span>;
}
});
diff --git a/server/sonar-web/src/main/js/components/source-viewer/header.js b/server/sonar-web/src/main/js/components/source-viewer/header.js
index 07a191a6061..86b0df62980 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/header.js
+++ b/server/sonar-web/src/main/js/components/source-viewer/header.js
@@ -47,8 +47,7 @@ export default Marionette.ItemView.extend({
that.model.set('fav', false);
that.render();
});
- }
- else {
+ } else {
$.ajax({
url: API_FAVORITE,
type: 'POST',
@@ -98,4 +97,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/source-viewer/helpers/code-with-issue-locations-helper.js b/server/sonar-web/src/main/js/components/source-viewer/helpers/code-with-issue-locations-helper.js
index 0b5d1aa57ba..a34f928b998 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/helpers/code-with-issue-locations-helper.js
+++ b/server/sonar-web/src/main/js/components/source-viewer/helpers/code-with-issue-locations-helper.js
@@ -31,7 +31,6 @@ function intersect (s1, e1, s2, e2) {
return { from: Math.max(s1, s2), to: Math.min(e1, e2) };
}
-
/**
* Get the substring of a string
* @param {string} str A string
@@ -45,7 +44,6 @@ function part (str, from, to, acc) {
return from >= acc ? str.substr(from - acc, to - from) : str.substr(0, to - from);
}
-
/**
* Split a code html into tokens
* @param {string} code
@@ -68,7 +66,6 @@ function splitByTokens (code) {
return tokens;
}
-
/**
* Highlight issue locations in the list of tokens
* @param {Array} tokens
@@ -103,7 +100,6 @@ function highlightIssueLocations (tokens, issueLocations, className) {
return tokens;
}
-
/**
* Generate an html string from the list of tokens
* @param {Array} tokens
@@ -115,7 +111,6 @@ function generateHTML (tokens) {
}).join('');
}
-
/**
* Take the initial source code, split by tokens,
* highlight issues and generate result html
@@ -131,7 +126,5 @@ function doTheStuff (code, issueLocations, optionalClassName) {
return generateHTML(highlightIssueLocations(splitByTokens(_code), _issueLocations, _className));
}
-
export default doTheStuff;
-
diff --git a/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js b/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js
index 44d9837f70c..5ab4958e57e 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js
+++ b/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js
@@ -22,7 +22,6 @@ import _ from 'underscore';
import ModalView from '../common/modals';
import Template from './templates/source-viewer-measures.hbs';
-
export default ModalView.extend({
template: Template,
testsOrder: ['ERROR', 'FAILURE', 'OK', 'SKIPPED'],
@@ -120,7 +119,6 @@ export default ModalView.extend({
return metrics;
},
-
calcAdditionalMeasures (measures) {
if (measures.lines_to_cover && measures.uncovered_lines) {
measures.covered_lines = measures.lines_to_cover_raw - measures.uncovered_lines_raw;
@@ -137,7 +135,6 @@ export default ModalView.extend({
return measures;
},
-
prepareMetrics (metrics) {
metrics = _.filter(metrics, function (metric) {
return metric.value != null;
@@ -153,7 +150,6 @@ export default ModalView.extend({
);
},
-
requestMeasures () {
const that = this;
const url = window.baseUrl + '/api/resources';
@@ -291,4 +287,3 @@ export default ModalView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/source-viewer/more-actions.js b/server/sonar-web/src/main/js/components/source-viewer/more-actions.js
index 2eb43571996..91e42331749 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/more-actions.js
+++ b/server/sonar-web/src/main/js/components/source-viewer/more-actions.js
@@ -67,4 +67,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/source-viewer/popups/line-actions-popup.js b/server/sonar-web/src/main/js/components/source-viewer/popups/line-actions-popup.js
index 0dc4d4ab012..51a661305b2 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/popups/line-actions-popup.js
+++ b/server/sonar-web/src/main/js/components/source-viewer/popups/line-actions-popup.js
@@ -29,10 +29,9 @@ export default Popup.extend({
getPermalink (e) {
e.preventDefault();
- const url = `${window.baseUrl}/component/index?id=${encodeURIComponent(this.model.key())}&line=${this.options.line}`;
+ const url =
+ `${window.baseUrl}/component/index?id=${encodeURIComponent(this.model.key())}&line=${this.options.line}`;
const windowParams = 'resizable=1,scrollbars=1,status=1';
window.open(url, this.model.get('name'), windowParams);
}
});
-
-
diff --git a/server/sonar-web/src/main/js/components/source-viewer/source.js b/server/sonar-web/src/main/js/components/source-viewer/source.js
index 47e11177646..189c093f779 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/source.js
+++ b/server/sonar-web/src/main/js/components/source-viewer/source.js
@@ -107,4 +107,3 @@ export default Backbone.Model.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/workspace/main.js b/server/sonar-web/src/main/js/components/workspace/main.js
index b41e3e1440f..79735999c64 100644
--- a/server/sonar-web/src/main/js/components/workspace/main.js
+++ b/server/sonar-web/src/main/js/components/workspace/main.js
@@ -25,7 +25,6 @@ import ItemsView from './views/items-view';
import ViewerView from './views/viewer-view';
import RuleView from './views/rule-view';
-
let instance = null;
const Workspace = function () {
if (instance != null) {
@@ -144,4 +143,3 @@ Workspace.getInstance = function () {
export default Workspace.getInstance();
-
diff --git a/server/sonar-web/src/main/js/components/workspace/models/item.js b/server/sonar-web/src/main/js/components/workspace/models/item.js
index 10c26d02b9f..69f855577a9 100644
--- a/server/sonar-web/src/main/js/components/workspace/models/item.js
+++ b/server/sonar-web/src/main/js/components/workspace/models/item.js
@@ -47,4 +47,3 @@ export default Backbone.Model.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/workspace/models/items.js b/server/sonar-web/src/main/js/components/workspace/models/items.js
index 4ba5ea6e48e..bc96b47c910 100644
--- a/server/sonar-web/src/main/js/components/workspace/models/items.js
+++ b/server/sonar-web/src/main/js/components/workspace/models/items.js
@@ -60,4 +60,3 @@ export default Backbone.Collection.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/workspace/views/base-viewer-view.js b/server/sonar-web/src/main/js/components/workspace/views/base-viewer-view.js
index 2135c13e036..bd6655953a5 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/base-viewer-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/base-viewer-view.js
@@ -53,4 +53,3 @@ export default Marionette.LayoutView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/workspace/views/item-view.js b/server/sonar-web/src/main/js/components/workspace/views/item-view.js
index 803b8bb5c0f..7ba8f4f7a92 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/item-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/item-view.js
@@ -56,4 +56,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/workspace/views/items-view.js b/server/sonar-web/src/main/js/components/workspace/views/items-view.js
index 6a755bef25a..67d2683f206 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/items-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/items-view.js
@@ -32,4 +32,3 @@ export default Marionette.CompositeView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/workspace/views/rule-view.js b/server/sonar-web/src/main/js/components/workspace/views/rule-view.js
index 749784c54df..3bb1fd3347c 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/rule-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/rule-view.js
@@ -41,4 +41,3 @@ export default BaseView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js b/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js
index dbd02a8bac9..1f87fed1db4 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js
@@ -110,4 +110,3 @@ export default Marionette.ItemView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/components/workspace/views/viewer-view.js b/server/sonar-web/src/main/js/components/workspace/views/viewer-view.js
index 5e1146162bd..f944db98b5c 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/viewer-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/viewer-view.js
@@ -48,4 +48,3 @@ export default BaseView.extend({
}
});
-
diff --git a/server/sonar-web/src/main/js/helpers/handlebars/formatFacetValue.js b/server/sonar-web/src/main/js/helpers/handlebars/formatFacetValue.js
index 1f69a00d6d8..366f77c6678 100644
--- a/server/sonar-web/src/main/js/helpers/handlebars/formatFacetValue.js
+++ b/server/sonar-web/src/main/js/helpers/handlebars/formatFacetValue.js
@@ -24,4 +24,3 @@ module.exports = function (value, facetMode) {
return formatMeasure(value, formatter);
};
-
diff --git a/server/sonar-web/src/main/js/helpers/latinize.js b/server/sonar-web/src/main/js/helpers/latinize.js
index 60f6e978ca3..c16ff7ee23c 100644
--- a/server/sonar-web/src/main/js/helpers/latinize.js
+++ b/server/sonar-web/src/main/js/helpers/latinize.js
@@ -22,6 +22,7 @@
* From http://stackoverflow.com/questions/990904/javascript-remove-accents-in-strings
*/
/* eslint max-len: 0 */
+ /* jscs:disable maximumLineLength */
const defaultDiacriticsRemovalap = [
{
'base': 'A',
diff --git a/server/sonar-web/src/main/js/helpers/measures.js b/server/sonar-web/src/main/js/helpers/measures.js
index 2e1e6ac1331..0a66ef903b7 100644
--- a/server/sonar-web/src/main/js/helpers/measures.js
+++ b/server/sonar-web/src/main/js/helpers/measures.js
@@ -21,7 +21,6 @@ import numeral from 'numeral';
import _ from 'underscore';
import { translate, translateWithParameters } from './l10n';
-
/**
* Format a measure value for a given type
* @param {string|number} value
@@ -32,7 +31,6 @@ export function formatMeasure (value, type) {
return useFormatter(value, formatter);
}
-
/**
* Format a measure variation for a given type
* @param {string|number} value
@@ -43,7 +41,6 @@ export function formatMeasureVariation (value, type) {
return useFormatter(value, formatter);
}
-
/**
* Return a localized metric name
* @param {string} metricKey
@@ -53,7 +50,6 @@ export function localizeMetric (metricKey) {
return translate('metric', metricKey, 'name');
}
-
/**
* Group list of metrics by their domain
* @param {Array} metrics
@@ -70,7 +66,6 @@ export function groupByDomain (metrics) {
return _.sortBy(domains, 'domain');
}
-
/**
* Return corresponding "short" for better display in UI
* @param {string} type
@@ -85,7 +80,6 @@ export function getShortType (type) {
return type;
}
-
/*
* Helpers
*/
@@ -125,12 +119,10 @@ function getVariationFormatter (type) {
return FORMATTERS[type] || noFormatter;
}
-
/*
* Formatters
*/
-
function noFormatter (value) {
return value;
}
@@ -189,6 +181,7 @@ function ratingFormatter (value) {
function levelFormatter (value) {
const l10nKey = 'metric.level.' + value;
const result = translate(l10nKey);
+
// if couldn't translate, return the initial value
return l10nKey !== result ? result : value;
}
@@ -213,7 +206,6 @@ function millisecondsVariationFormatter (value) {
return value < 0 ? `-${formattedValue}` : `+${formattedValue}`;
}
-
/*
* Debt Formatters
*/
diff --git a/server/sonar-web/src/main/js/helpers/path.js b/server/sonar-web/src/main/js/helpers/path.js
index a03c1421bf1..d808c74c2b7 100644
--- a/server/sonar-web/src/main/js/helpers/path.js
+++ b/server/sonar-web/src/main/js/helpers/path.js
@@ -19,7 +19,6 @@
*/
import _ from 'underscore';
-
export function collapsePath (path, limit = 30) {
if (typeof path !== 'string') {
return '';
@@ -45,7 +44,6 @@ export function collapsePath (path, limit = 30) {
return body.join('/');
}
-
/**
* Return a collapsed path without a file name
* @example
@@ -77,7 +75,6 @@ export function collapsedDirFromPath (path) {
}
}
-
/**
* Return a file name for a given file path
* * @example
@@ -95,7 +92,6 @@ export function fileFromPath (path) {
}
}
-
export function splitPath (path) {
if (typeof path === 'string') {
const tokens = path.split('/');
diff --git a/server/sonar-web/src/main/js/helpers/request.js b/server/sonar-web/src/main/js/helpers/request.js
index e1fd843f605..de67a630f8e 100644
--- a/server/sonar-web/src/main/js/helpers/request.js
+++ b/server/sonar-web/src/main/js/helpers/request.js
@@ -28,7 +28,6 @@ const OPTIONS = {
credentials: 'same-origin'
};
-
/**
* Default request headers
* @type {{Accept: string}}
@@ -37,7 +36,6 @@ const HEADERS = {
'Accept': 'application/json'
};
-
/**
* Create a query string from an object
* @param {object} parameters
@@ -49,7 +47,6 @@ function queryString (parameters) {
.join('&');
}
-
/**
* Request
*/
@@ -86,7 +83,6 @@ class Request {
}
}
-
/**
* Make a request
* @param {string} url
@@ -96,7 +92,6 @@ export function request (url) {
return new Request(url);
}
-
/**
* Check that response status is ok
* @param response
@@ -112,7 +107,6 @@ export function checkStatus (response) {
}
}
-
/**
* Parse response as JSON
* @param response
@@ -122,7 +116,6 @@ export function parseJSON (response) {
return response.json();
}
-
/**
* Shortcut to do a GET request and return response json
* @param url
@@ -136,7 +129,6 @@ export function getJSON (url, data) {
.then(parseJSON);
}
-
/**
* Shortcut to do a POST request and return response json
* @param url
@@ -151,7 +143,6 @@ export function postJSON (url, data) {
.then(parseJSON);
}
-
/**
* Shortcut to do a POST request and return response json
* @param url
@@ -165,7 +156,6 @@ export function post (url, data) {
.then(checkStatus);
}
-
/**
* Delay promise for testing purposes
* @param response
diff --git a/server/sonar-web/src/main/js/helpers/urls.js b/server/sonar-web/src/main/js/helpers/urls.js
index ef621da701a..645cf9adb8e 100644
--- a/server/sonar-web/src/main/js/helpers/urls.js
+++ b/server/sonar-web/src/main/js/helpers/urls.js
@@ -26,7 +26,6 @@ export function getComponentUrl (componentKey) {
return window.baseUrl + '/dashboard?id=' + encodeURIComponent(componentKey);
}
-
/**
* Generate URL for a component's issues page
* @param {string} componentKey
@@ -40,7 +39,6 @@ export function getComponentIssuesUrl (componentKey, query) {
return window.baseUrl + '/component_issues?id=' + encodeURIComponent(componentKey) + '#' + serializedQuery;
}
-
/**
* Generate URL for a component's drilldown page
* @param {string} componentKey
@@ -51,7 +49,6 @@ export function getComponentDrilldownUrl (componentKey, metric) {
return `${window.baseUrl}/component_measures/metric/${metric}?id=${encodeURIComponent(componentKey)}`;
}
-
/**
* Generate URL for a component's dashboard
* @param {string} componentKey
@@ -68,7 +65,6 @@ export function getComponentDashboardUrl (componentKey, dashboardKey, period) {
return url;
}
-
/**
* Generate URL for a fixed component's dashboard (overview)
* @param {string} componentKey
@@ -79,7 +75,6 @@ export function getComponentFixedDashboardUrl (componentKey, dashboardKey) {
return window.baseUrl + '/overview' + dashboardKey + '?id=' + encodeURIComponent(componentKey);
}
-
/**
* Generate URL for a component's dashboards management page
* @param {string} componentKey
diff --git a/server/sonar-web/src/main/js/main/app.js b/server/sonar-web/src/main/js/main/app.js
index c1dc38a4907..331e5429d71 100644
--- a/server/sonar-web/src/main/js/main/app.js
+++ b/server/sonar-web/src/main/js/main/app.js
@@ -37,7 +37,6 @@ import * as request from '../helpers/request';
// set the Backbone's $
Backbone.$ = $;
-
function requestLocalizationBundle () {
if (!window.sonarqube.bannedNavigation) {
installGlobal();
@@ -84,7 +83,6 @@ window.sonarqube.appStarted = Promise.resolve()
.then(startNavigation)
.then(prepareAppOptions);
-
// expose libraries
window.require = module => {
switch (module) {
diff --git a/server/sonar-web/src/main/js/main/nav/app.js b/server/sonar-web/src/main/js/main/nav/app.js
index fa0849c8c22..9c0526f57a0 100644
--- a/server/sonar-web/src/main/js/main/nav/app.js
+++ b/server/sonar-web/src/main/js/main/nav/app.js
@@ -26,16 +26,15 @@ import ComponentNav from './component/component-nav';
import SettingsNav from './settings/settings-nav';
import { getGlobalNavigation, getComponentNavigation, getSettingsNavigation } from '../../api/nav';
-
export default class App {
start () {
- let options = window.sonarqube;
+ const options = window.sonarqube;
require('../../components/workspace/main');
return new Promise((resolve) => {
- let response = {};
- let requests = [];
+ const response = {};
+ const requests = [];
requests.push(
App.renderGlobalNav(options).then(r => response.global = r)
@@ -77,8 +76,8 @@ export default class App {
static renderSettingsNav (options) {
return getSettingsNavigation().then(r => {
- let el = document.getElementById('context-navigation');
- let opts = _.extend(r, options);
+ const el = document.getElementById('context-navigation');
+ const opts = _.extend(r, options);
if (el) {
ReactDOM.render(<SettingsNav {...opts}/>, el);
}
diff --git a/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js b/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js
index fe7f6d4a53d..2d5bfc632b7 100644
--- a/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js
+++ b/server/sonar-web/src/main/js/main/nav/component/component-nav-menu.js
@@ -43,7 +43,6 @@ const SETTINGS_URLS = [
'/project/deletion'
];
-
export default React.createClass({
mixins: [LinksMixin],
@@ -69,13 +68,13 @@ export default React.createClass({
isFixedDashboardActive() {
const path = window.location.pathname;
- return path.indexOf(window.baseUrl + '/overview') === 0|| path.indexOf(window.baseUrl + '/governance') === 0;
+ return path.indexOf(window.baseUrl + '/overview') === 0 || path.indexOf(window.baseUrl + '/governance') === 0;
},
isCustomDashboardActive(customDashboard) {
const path = window.location.pathname;
const params = qs.parse(window.location.search.substr(1));
- return path.indexOf(window.baseUrl + '/dashboard') === 0 && params['did'] === `${customDashboard.key}`;
+ return path.indexOf(window.baseUrl + '/dashboard') === 0 && params.did === `${customDashboard.key}`;
},
isCustomDashboardsActive () {
diff --git a/server/sonar-web/src/main/js/main/nav/component/component-nav-meta.js b/server/sonar-web/src/main/js/main/nav/component/component-nav-meta.js
index 27e52fc7508..fddc39b98c5 100644
--- a/server/sonar-web/src/main/js/main/nav/component/component-nav-meta.js
+++ b/server/sonar-web/src/main/js/main/nav/component/component-nav-meta.js
@@ -24,12 +24,13 @@ import { translate, translateWithParameters } from '../../../helpers/l10n';
export default React.createClass({
render() {
- let metaList = [];
- let canSeeBackgroundTasks = this.props.conf.showBackgroundTasks;
- let backgroundTasksUrl = `${window.baseUrl}/project/background_tasks?id=${encodeURIComponent(this.props.component.key)}`;
+ const metaList = [];
+ const canSeeBackgroundTasks = this.props.conf.showBackgroundTasks;
+ const backgroundTasksUrl =
+ `${window.baseUrl}/project/background_tasks?id=${encodeURIComponent(this.props.component.key)}`;
if (this.props.isInProgress) {
- let tooltip = canSeeBackgroundTasks ?
+ const tooltip = canSeeBackgroundTasks ?
translateWithParameters('component_navigation.status.in_progress.admin', backgroundTasksUrl) :
translate('component_navigation.status.in_progress');
metaList.push(
@@ -40,7 +41,7 @@ export default React.createClass({
</li>
);
} else if (this.props.isPending) {
- let tooltip = canSeeBackgroundTasks ?
+ const tooltip = canSeeBackgroundTasks ?
translateWithParameters('component_navigation.status.pending.admin', backgroundTasksUrl) :
translate('component_navigation.status.pending');
metaList.push(
@@ -49,7 +50,7 @@ export default React.createClass({
</li>
);
} else if (this.props.isFailed) {
- let tooltip = canSeeBackgroundTasks ?
+ const tooltip = canSeeBackgroundTasks ?
translateWithParameters('component_navigation.status.failed.admin', backgroundTasksUrl) :
translate('component_navigation.status.failed');
metaList.push(
diff --git a/server/sonar-web/src/main/js/main/nav/component/component-nav.js b/server/sonar-web/src/main/js/main/nav/component/component-nav.js
index 7145efe09c8..7e950e515db 100644
--- a/server/sonar-web/src/main/js/main/nav/component/component-nav.js
+++ b/server/sonar-web/src/main/js/main/nav/component/component-nav.js
@@ -46,7 +46,7 @@ export default React.createClass({
},
populateRecentHistory() {
- let qualifier = _.last(this.props.component.breadcrumbs).qualifier;
+ const qualifier = _.last(this.props.component.breadcrumbs).qualifier;
if (['TRK', 'VW', 'DEV'].indexOf(qualifier) !== -1) {
RecentHistory.add(this.props.component.key, this.props.component.name, qualifier.toLowerCase());
}
diff --git a/server/sonar-web/src/main/js/main/nav/global/global-nav-branding.js b/server/sonar-web/src/main/js/main/nav/global/global-nav-branding.js
index 150e8f524be..b556b3f740f 100644
--- a/server/sonar-web/src/main/js/main/nav/global/global-nav-branding.js
+++ b/server/sonar-web/src/main/js/main/nav/global/global-nav-branding.js
@@ -22,10 +22,10 @@ import { translate } from '../../../helpers/l10n';
export default React.createClass({
renderLogo() {
- let url = this.props.logoUrl || `${window.baseUrl}/images/logo.svg`;
- let width = this.props.logoWidth || 100;
- let height = 30;
- let title = translate('layout.sonar.slogan');
+ const url = this.props.logoUrl || `${window.baseUrl}/images/logo.svg`;
+ const width = this.props.logoWidth || 100;
+ const height = 30;
+ const title = translate('layout.sonar.slogan');
return <img src={url}
width={width}
height={height}
diff --git a/server/sonar-web/src/main/js/main/nav/global/global-nav-search.js b/server/sonar-web/src/main/js/main/nav/global/global-nav-search.js
index 4e2df1883e9..7e02371b055 100644
--- a/server/sonar-web/src/main/js/main/nav/global/global-nav-search.js
+++ b/server/sonar-web/src/main/js/main/nav/global/global-nav-search.js
@@ -63,7 +63,7 @@ export default React.createClass({
},
renderSearchView() {
- let searchContainer = this.refs.container;
+ const searchContainer = this.refs.container;
this.searchView = new SearchView({
model: new Backbone.Model(this.props),
hide: this.closeSearch
diff --git a/server/sonar-web/src/main/js/main/nav/global/search-view.js b/server/sonar-web/src/main/js/main/nav/global/search-view.js
index 80c05243334..7dba2f34a5d 100644
--- a/server/sonar-web/src/main/js/main/nav/global/search-view.js
+++ b/server/sonar-web/src/main/js/main/nav/global/search-view.js
@@ -207,7 +207,8 @@ export default Marionette.LayoutView.extend({
collection.push(_.extend(item, {
q: domain.q,
extra: index === 0 ? domain.name : null,
- url: window.baseUrl + '/dashboard/index?id=' + encodeURIComponent(item.key) + window.dashboardParameters(true)
+ url: window.baseUrl + '/dashboard/index?id=' + encodeURIComponent(item.key) +
+ window.dashboardParameters(true)
}));
});
});
diff --git a/server/sonar-web/src/main/js/main/nav/global/shortcuts-help-view.js b/server/sonar-web/src/main/js/main/nav/global/shortcuts-help-view.js
index d449964f488..7fbdd302469 100644
--- a/server/sonar-web/src/main/js/main/nav/global/shortcuts-help-view.js
+++ b/server/sonar-web/src/main/js/main/nav/global/shortcuts-help-view.js
@@ -25,4 +25,3 @@ export default ModalView.extend({
template: ShortcutsHelpTemplate
});
-
diff --git a/server/sonar-web/src/main/js/main/nav/links-mixin.js b/server/sonar-web/src/main/js/main/nav/links-mixin.js
index 5db7233ba3c..4b39a6738e2 100644
--- a/server/sonar-web/src/main/js/main/nav/links-mixin.js
+++ b/server/sonar-web/src/main/js/main/nav/links-mixin.js
@@ -27,8 +27,8 @@ export default {
},
renderLink(url, title, highlightUrl = url) {
- let fullUrl = window.baseUrl + url;
- let check = _.isFunction(highlightUrl) ? highlightUrl : this.activeLink;
+ const fullUrl = window.baseUrl + url;
+ const check = _.isFunction(highlightUrl) ? highlightUrl : this.activeLink;
return (
<li key={url} className={check(highlightUrl)}>
<a href={fullUrl}>{title}</a>
@@ -37,8 +37,8 @@ export default {
},
renderNewLink(url, title, highlightUrl = url) {
- let fullUrl = window.baseUrl + url;
- let check = _.isFunction(highlightUrl) ? highlightUrl : this.activeLink;
+ const fullUrl = window.baseUrl + url;
+ const check = _.isFunction(highlightUrl) ? highlightUrl : this.activeLink;
return (
<li key={highlightUrl} className={check(highlightUrl)}>
<a href={fullUrl} className="nowrap">{title} <span className="spacer-left badge">New</span></a>
diff --git a/server/sonar-web/src/main/js/main/processes.js b/server/sonar-web/src/main/js/main/processes.js
index 17a4d6551b0..b884ee74bd2 100644
--- a/server/sonar-web/src/main/js/main/processes.js
+++ b/server/sonar-web/src/main/js/main/processes.js
@@ -105,7 +105,6 @@ const ProcessesView = Marionette.ItemView.extend({
}
});
-
const processes = new Processes();
const processesView = new ProcessesView({
collection: processes
@@ -164,7 +163,6 @@ function handleAjaxError (jqXHR) {
}
}
-
$.ajaxSetup({
beforeSend (jqXHR) {
jqXHR.processId = addBackgroundProcess();
@@ -182,7 +180,6 @@ $.ajaxSetup({
}
});
-
$(function () {
processesView.render().$el.insertBefore('#footer');
});
diff --git a/server/sonar-web/src/main/js/widgets/issue-filter/widget.js b/server/sonar-web/src/main/js/widgets/issue-filter/widget.js
index 4e768bdd01a..64c5d09fbe4 100644
--- a/server/sonar-web/src/main/js/widgets/issue-filter/widget.js
+++ b/server/sonar-web/src/main/js/widgets/issue-filter/widget.js
@@ -31,7 +31,6 @@ import StatusesTemplate from './templates/widget-issue-filter-statuses.hbs';
import { translate } from '../../helpers/l10n';
-
const FACET_LIMIT = 15;
const defaultComparator = function (item) {
diff --git a/server/sonar-web/src/main/js/widgets/old/base.js b/server/sonar-web/src/main/js/widgets/old/base.js
index 5e3001e44e7..df3b6294cf4 100644
--- a/server/sonar-web/src/main/js/widgets/old/base.js
+++ b/server/sonar-web/src/main/js/widgets/old/base.js
@@ -40,7 +40,6 @@ import _ from 'underscore';
BaseWidget.prototype.colorsLevel = ['#d4333f', '#ff9900', '#85bb43', '##b4b4b4'];
BaseWidget.prototype.colorUnknown = '#777';
-
BaseWidget.prototype.addField = function (name, defaultValue) {
const privateName = '_' + name;
this[privateName] = defaultValue;
diff --git a/server/sonar-web/src/main/js/widgets/old/bubble-chart.js b/server/sonar-web/src/main/js/widgets/old/bubble-chart.js
index 9e9d4ac1a33..d133c5e964c 100644
--- a/server/sonar-web/src/main/js/widgets/old/bubble-chart.js
+++ b/server/sonar-web/src/main/js/widgets/old/bubble-chart.js
@@ -17,6 +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.
*/
+ /* jscs:disable safeContextKeyword */
import $ from 'jquery';
import { collapsedDirFromPath, fileFromPath } from '../../helpers/path';
@@ -84,7 +85,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
};
};
-
window.SonarWidgets.BubbleChart.prototype.hasValidData = function () {
const widget = this;
let noInvalidEntry = true;
@@ -102,7 +102,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
return !!noInvalidEntry && !!atLeastOneValueOnX && !!atLeastOneValueOnY;
};
-
window.SonarWidgets.BubbleChart.prototype.init = function (container) {
this.width(container.property('offsetWidth'));
@@ -126,7 +125,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.attr('transform', trans(this.margin().left, this.margin().top));
};
-
window.SonarWidgets.BubbleChart.prototype.initMetrics = function () {
const widget = this;
@@ -146,7 +144,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
};
};
-
window.SonarWidgets.BubbleChart.prototype.initScales = function () {
const widget = this;
this
@@ -182,7 +179,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
}
};
-
window.SonarWidgets.BubbleChart.prototype.initBubbles = function () {
const widget = this;
@@ -190,7 +186,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.items = this.plotWrap.selectAll('.item')
.data(this.components());
-
// Render bubbles
this.items.enter().append('g')
.attr('class', 'item')
@@ -237,7 +232,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
window.SonarWidgets.BubbleChart.prototype.initBubbleEvents = function () {
const widget = this;
this.items
@@ -254,7 +248,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
window.SonarWidgets.BubbleChart.prototype.initAxes = function () {
// X
this.xAxis = d3.svg.axis()
@@ -266,7 +259,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.style('font-weight', 'bold')
.style('text-anchor', 'middle');
-
// Y
this.yAxis = d3.svg.axis()
.scale(this.y)
@@ -280,7 +272,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.style('text-anchor', 'middle');
};
-
window.SonarWidgets.BubbleChart.prototype.initGrid = function () {
this.gxGridLines = this.gxGrid.selectAll('line').data(this.x.ticks()).enter()
.append('line');
@@ -293,7 +284,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.style('stroke-opacity', 0.25);
};
-
window.SonarWidgets.BubbleChart.prototype.render = function (container) {
const containerS = container;
@@ -318,9 +308,9 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
return this;
};
-
window.SonarWidgets.BubbleChart.prototype.adjustScalesAfterUpdate = function () {
const widget = this;
+
// X
const minX = d3.min(this.components(), function (d) {
return widget.x(widget.getXMetric(d)) - widget.size(widget.getSizeMetric(d));
@@ -343,7 +333,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
const dMaxY = maxY > this.y.range()[0] ? maxY - this.y.range()[0] : 0;
this.y.range([this.availableHeight - dMaxY, dMinY]);
-
// Format improvement for log scales
// X
if (this.xLog()) {
@@ -366,7 +355,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.y.nice();
};
-
window.SonarWidgets.BubbleChart.prototype.updateScales = function () {
const widget = this;
this.x.range([0, this.availableWidth]);
@@ -412,7 +400,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
}
};
-
window.SonarWidgets.BubbleChart.prototype.updateBubbles = function () {
const widget = this;
this.items
@@ -422,7 +409,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
window.SonarWidgets.BubbleChart.prototype.updateAxes = function () {
// X
this.gxAxis.attr('transform', trans(0, this.availableHeight + this.margin().bottom - 40));
@@ -453,7 +439,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.attr('transform', trans(-45, this.availableHeight / 2) + ' rotate(-90)');
};
-
window.SonarWidgets.BubbleChart.prototype.updateGrid = function () {
const widget = this;
this.gxGridLines
@@ -483,7 +468,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
window.SonarWidgets.BubbleChart.prototype.update = function (container) {
container = d3.select(container);
@@ -507,7 +491,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.updateGrid();
};
-
window.SonarWidgets.BubbleChart.defaults = {
width: 350,
height: 150,
@@ -518,7 +501,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
bubbleColorUndefined: '#b3b3b3'
};
-
// Some helper functions
// Gets or sets parameter
diff --git a/server/sonar-web/src/main/js/widgets/old/pie-chart.js b/server/sonar-web/src/main/js/widgets/old/pie-chart.js
index 0508af5152a..82799623db2 100644
--- a/server/sonar-web/src/main/js/widgets/old/pie-chart.js
+++ b/server/sonar-web/src/main/js/widgets/old/pie-chart.js
@@ -19,6 +19,7 @@
*/
/*global d3:false */
/*jshint eqnull:true */
+/* jscs:disable safeContextKeyword */
window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
@@ -39,7 +40,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this._lineHeight = 20;
-
// Export global variables
this.metrics = function (_) {
return param.call(this, '_metrics', _);
@@ -88,7 +88,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
container = d3.select(container);
-
const validData = this.components().reduce(function (p, c) {
return p && !!c.measures[widget.metricsPriority()[0]];
}, true);
@@ -98,7 +97,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
return;
}
-
this.width(container.property('offsetWidth'));
this.svg = container.append('svg')
@@ -111,33 +109,27 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.gWrap
.attr('transform', trans(this.margin().left, this.margin().top));
-
// Configure metrics
this.mainMetric = this.metricsPriority()[0];
this.getMainMetric = function (d) {
return d.measures[widget.mainMetric].val;
};
-
// Configure scales
this.color = d3.scale.category10();
-
// Configure arc
this.arc = d3.svg.arc()
.innerRadius(0);
-
// Configure pie
this.pie = d3.layout.pie()
.sort(null)
.value(function (d) { return widget.getMainMetric(d); });
-
// Configure legend
this.legendWrap = this.gWrap.append('g');
-
// Configure details
this._metricsCount = Object.keys(this.metrics()).length + 1;
this._detailsHeight = this._lineHeight * this._metricsCount;
@@ -163,14 +155,12 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.style('text-anchor', 'middle')
.text(this.metrics()[this.mainMetric].name);
-
// Update widget
this.update(containerS);
return this;
};
-
window.SonarWidgets.PieChart.prototype.updateLegend = function () {
const widget = this;
this.legendWrap
@@ -203,7 +193,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
window.SonarWidgets.PieChart.prototype.updateDetails = function () {
const widget = this;
this.detailsWrap
@@ -226,7 +215,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.style('font-size', fz + 'px');
};
-
window.SonarWidgets.PieChart.prototype.configureEvents = function () {
const widget = this;
const updateMetrics = function (metrics) {
@@ -322,7 +310,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
window.SonarWidgets.PieChart.prototype.update = function (container) {
container = d3.select(container);
@@ -330,13 +317,11 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
const width = container.property('offsetWidth');
this.width(width > 100 ? width : 100);
-
// Update svg canvas
this.svg
.attr('width', this.width())
.attr('height', this.height());
-
// Update available size
this.availableWidth = this.width() - this.margin().left - this.margin().right -
this.legendWidth() - this.legendMargin();
@@ -346,18 +331,15 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this._legendSymbols = Math.floor((this.width() - this.margin().left - this.margin().right -
this.legendMargin() - 2 * this.radius) / 6.2);
-
// Update plot
this.plotWrap
.attr('transform', trans(this.radius, this.radius));
-
// Update arc
this.arc
.innerRadius(this.radius / 2)
.outerRadius(this.radius);
-
// Configure sectors
this.sectors = this.plotWrap.selectAll('.arc')
.data(this.pie(this.components()));
@@ -375,13 +357,11 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.sectors
.exit().remove();
-
this.updateLegend();
this.updateDetails();
this.configureEvents();
};
-
window.SonarWidgets.PieChart.defaults = {
width: 350,
height: 300,
@@ -390,7 +370,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
legendMargin: 30
};
-
// Some helper functions
// Gets or sets parameter
diff --git a/server/sonar-web/src/main/js/widgets/old/stack-area.js b/server/sonar-web/src/main/js/widgets/old/stack-area.js
index f8f9fb61327..c1de55441d9 100644
--- a/server/sonar-web/src/main/js/widgets/old/stack-area.js
+++ b/server/sonar-web/src/main/js/widgets/old/stack-area.js
@@ -17,6 +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.
*/
+ /* jscs:disable safeContextKeyword */
import moment from 'moment';
window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
@@ -32,7 +33,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.container = d3.select(container);
-
// Set default values
this._data = [];
this._metrics = [];
@@ -73,7 +73,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
};
-
window.SonarWidgets.StackArea.prototype.initScales = function () {
const widget = this;
const colorsLength = widget.colors().length;
@@ -100,7 +99,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
};
};
-
window.SonarWidgets.StackArea.prototype.initAxis = function () {
this.timeAxis = d3.svg.axis()
.scale(this.time)
@@ -108,7 +106,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.ticks(5);
};
-
window.SonarWidgets.StackArea.prototype.initArea = function () {
const widget = this;
this.area = d3.svg.area()
@@ -121,7 +118,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.y(function (d) { return widget.y(d.y0 + d.y); });
};
-
window.SonarWidgets.StackArea.prototype.initInfo = function () {
const widget = this;
this.infoWrap
@@ -169,7 +165,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
window.SonarWidgets.StackArea.prototype.initEvents = function () {
const widget = this;
this.events = widget.snapshots()
@@ -184,7 +179,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.attr('class', 'event-tick')
.attr('y2', -8);
-
this.selectSnapshot = function (cl) {
const dataX = widget.data()[0][cl].x;
const sx = widget.time(dataX);
@@ -196,7 +190,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.attr('x1', sx)
.attr('x2', sx);
-
// Update metric labels
const metricsLines = widget.data().map(function (d, i) {
const value = d[cl].fy || d[cl].y;
@@ -207,7 +200,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
widget.infoMetrics[i].select('text').text(d);
});
-
// Update snapshot info
this.snapshots().forEach(function (d, i) {
if (d.d - dataX === 0) {
@@ -220,7 +212,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.text(this.snapshots()[snapshotIndex].e.join(', '));
}
-
// Update info
widget.infoDate
.text(moment(widget.data()[0][cl].x).format('LL'));
@@ -230,7 +221,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
widget.infoTotal
.text('Total: ' + totalValue);
-
// Update event
this.events.forEach(function (d, i) {
if (d.d - dataX === 0) {
@@ -242,7 +232,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
d3.select(widget.gevents[0][eventIndex]).attr('y2', -12);
};
-
// Set event listeners
this.svg.on('mousemove', function () {
const mx = d3.mouse(widget.plotWrap.node())[0];
@@ -251,7 +240,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
window.SonarWidgets.StackArea.prototype.render = function () {
this.svg = this.container.append('svg')
.attr('class', 'sonar-d3');
@@ -295,35 +283,29 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
return this;
};
-
window.SonarWidgets.StackArea.prototype.update = function () {
const widget = this;
const width = this.container.property('offsetWidth');
this.width(width > 100 ? width : 100);
-
// Update svg canvas
this.svg
.attr('width', this.width())
.attr('height', this.height());
-
// Update available size
this.availableWidth = this.width() - this.margin().left - this.margin().right;
this.availableHeight = this.height() - this.margin().top - this.margin().bottom;
-
// Update scales
this.time.range([0, this.availableWidth]);
this.y.range([widget.availableHeight, 0]);
-
// Update the axis
this.gtimeAxis.attr('transform', trans(0, this.availableHeight + this.margin().bottom - 30));
this.gtimeAxis.transition().call(this.timeAxis);
-
// Update area
this.garea = this.plotWrap.selectAll('.area')
.data(this.stackData)
@@ -342,11 +324,9 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.style('fill', 'none')
.style('stroke', '#808080');
-
// Update scanner
this.scanner.attr('y2', this.availableHeight + 10);
-
// Update events
this.gevents
.transition()
@@ -354,7 +334,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
return trans(widget.time(d.d), widget.availableHeight + 10);
});
-
// Select latest values if this it the first update
if (!this.firstUpdate) {
this.selectSnapshot(widget.data()[0].length - 1);
@@ -364,14 +343,12 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
};
-
window.SonarWidgets.StackArea.defaults = {
width: 350,
height: 150,
margin: { top: 80, right: 10, bottom: 40, left: 40 }
};
-
// Some helper functions
// Gets or sets parameter
diff --git a/server/sonar-web/src/main/js/widgets/old/timeline.js b/server/sonar-web/src/main/js/widgets/old/timeline.js
index c41af66c976..654f2133a18 100644
--- a/server/sonar-web/src/main/js/widgets/old/timeline.js
+++ b/server/sonar-web/src/main/js/widgets/old/timeline.js
@@ -17,6 +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.
*/
+ /* jscs:disable safeContextKeyword */
import moment from 'moment';
window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
@@ -72,7 +73,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
};
-
window.SonarWidgets.Timeline.prototype.initScalesAndAxis = function () {
// Configure scales
const timeDomain = this.data()
@@ -101,7 +101,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.ticks(5);
};
-
window.SonarWidgets.Timeline.prototype.initEvents = function () {
const widget = this;
this.events(this.events().filter(function (event) {
@@ -119,7 +118,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this.gevents.exit().remove();
-
this.selectSnapshot = function (cl) {
const sx = widget.time(widget.data()[0][cl].x);
@@ -157,7 +155,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
// Set event listeners
this.svg.on('mousemove', function () {
const mx = d3.mouse(widget.plotWrap.node())[0];
@@ -166,7 +163,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
window.SonarWidgets.Timeline.prototype.render = function () {
const widget = this;
@@ -225,13 +221,11 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
widget.markers.push(marker);
});
-
// Configure scanner
this.scanner
.attr('class', 'scanner')
.attr('y1', 0);
-
// Configure info
this.infoWrap
.attr('transform', trans(0, -30));
@@ -264,7 +258,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
return this;
};
-
window.SonarWidgets.Timeline.prototype.showLimitHistoryMessage = function () {
const minEvent = d3.min(this.events(), function (d) {
return d.d;
@@ -276,24 +269,20 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
}
};
-
window.SonarWidgets.Timeline.prototype.update = function () {
const widget = this;
const width = this.container.property('offsetWidth');
this.width(width > 100 ? width : 100);
-
// Update svg canvas
this.svg
.attr('width', this.width())
.attr('height', this.height());
-
// Update available width
this.availableWidth = this.width() - this.margin().left - this.margin().right;
-
// Update metric lines
let metricY = -1;
this.infoMetrics.forEach(function (metric, i) {
@@ -317,7 +306,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
// Update available width
this.availableHeight = this.height() - this.margin().top - this.margin().bottom - metricY;
-
// Update scales
this.time
.range([0, this.availableWidth]);
@@ -326,19 +314,16 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
scale.range([widget.availableHeight, 0]);
});
-
// Update plot
this.plotWrap
.transition()
.attr('transform', trans(0, metricY));
-
// Update the axis
this.gtimeAxis.attr('transform', trans(0, this.availableHeight + this.margin().bottom - 30 + metricY));
this.gtimeAxis.transition().call(this.timeAxis);
-
// Update lines and points
this.data().forEach(function (_, i) {
widget.glines[i]
@@ -351,12 +336,10 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.attr('transform', function (d) { return trans(widget.time(d.x), widget.y[i](d.y)); });
});
-
// Update scanner
this.scanner
.attr('y2', this.availableHeight + 10);
-
// Update events
this.infoEvent
.attr('transform', trans(0, metricY > -1 ? metricY : 18));
@@ -365,7 +348,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.transition()
.attr('transform', function (d) { return trans(widget.time(d.d), widget.availableHeight + 10 + metricY); });
-
// Select latest values if this it the first update
if (!this.firstUpdate) {
this.selectSnapshot(widget.data()[0].length - 1);
@@ -375,14 +357,12 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
};
-
window.SonarWidgets.Timeline.defaults = {
width: 350,
height: 150,
margin: { top: 50, right: 10, bottom: 40, left: 10 }
};
-
// Some helper functions
// Gets or sets parameter
diff --git a/server/sonar-web/src/main/js/widgets/old/widget.js b/server/sonar-web/src/main/js/widgets/old/widget.js
index 661f371b2c9..9d3dfb905b1 100644
--- a/server/sonar-web/src/main/js/widgets/old/widget.js
+++ b/server/sonar-web/src/main/js/widgets/old/widget.js
@@ -32,7 +32,6 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
this._height = null;
this._options = {};
-
// Export global variables
this.type = function (_) {
return param.call(this, '_type', _);
@@ -55,12 +54,11 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
};
};
-
- window.SonarWidgets.Widget.prototype.render = function(container) {
+ window.SonarWidgets.Widget.prototype.render = function (container) {
const that = this;
this.showSpinner(container);
- d3.json(this.source(), function(error, response) {
+ d3.json(this.source(), function (error, response) {
if (response && !error) {
that.hideSpinner();
if (typeof response.components === 'undefined' || response.components.length > 0) {
@@ -86,29 +84,24 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
});
};
-
- window.SonarWidgets.Widget.prototype.showSpinner = function(container) {
+ window.SonarWidgets.Widget.prototype.showSpinner = function (container) {
this.spinner = d3.select(container).append('i').classed('spinner', true);
};
-
- window.SonarWidgets.Widget.prototype.hideSpinner = function() {
+ window.SonarWidgets.Widget.prototype.hideSpinner = function () {
if (this.spinner) {
this.spinner.remove();
}
};
-
- window.SonarWidgets.Widget.prototype.update = function(container) {
+ window.SonarWidgets.Widget.prototype.update = function (container) {
return this.widget && this.widget.update(container);
};
-
-
// Some helper functions
// Gets or sets parameter
- function param(name, value) {
+ function param (name, value) {
if (value == null) {
return this[name];
} else {