diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2017-03-21 14:17:08 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2017-03-21 14:20:23 +0100 |
commit | aacde0fd553ae382719099c4278cde9c9c542fc7 (patch) | |
tree | ecefaed3a2f5fda347f9ecb528681071e315f2b6 /server/sonar-web/src | |
parent | 7e3819c67725d92e4078c16c4cdd3d6cb8629d5d (diff) | |
download | sonarqube-aacde0fd553ae382719099c4278cde9c9c542fc7.tar.gz sonarqube-aacde0fd553ae382719099c4278cde9c9c542fc7.zip |
adjust formatting
Diffstat (limited to 'server/sonar-web/src')
12 files changed, 128 insertions, 125 deletions
diff --git a/server/sonar-web/src/main/js/app/components/MarkdownHelp.js b/server/sonar-web/src/main/js/app/components/MarkdownHelp.js index 4502435d47e..bf30a114454 100644 --- a/server/sonar-web/src/main/js/app/components/MarkdownHelp.js +++ b/server/sonar-web/src/main/js/app/components/MarkdownHelp.js @@ -23,109 +23,112 @@ import React from 'react'; export default class MarkdownHelp extends React.Component { render() { return ( - <div className="page page-limited"> - <h2 className="spacer-bottom">Markdown Syntax</h2> - <table className="width-100 data zebra"> - <thead> - <tr> - <th>Write:</th> - <th>To display:</th> - </tr> - </thead> - <tbody> - <tr> - <td>*this text is bold*</td> - <td className="markdown"><strong>this text is bold</strong></td> - </tr> - <tr> - <td>{'http://sonarqube.org'}</td> - <td className="markdown"><a href="http://sonarqube.org">{'http://sonarqube.org'}</a></td> - </tr> - <tr> - <td className="text-top"> - [SonarQube™ Home Page](http://www.sonarqube.org) - </td> - <td className="markdown text-top"> - <a href="http://www.sonarqube.org" target="_blank">SonarQube™ Home Page</a> - </td> - </tr> - <tr> - <td className="text-top">* first item<br /> - * second item - </td> - <td className="markdown"> - <ul> - <li>first item</li> - <li>second item</li> - </ul> - </td> - </tr> - <tr> - <td className="text-top">1. first item<br /> - 1. second item - </td> - <td className="markdown text-top"> - <ol> - <li>first item</li> - <li>second item</li> - </ol> - </td> - </tr> - <tr> - <td className="text-top"> - = Heading Level 1<br /> - == Heading Level 2<br /> - === Heading Level 3<br /> - ==== Heading Level 4<br /> - ===== Heading Level 5<br /> - ====== Heading Level 6<br /> - </td> - <td className="markdown text-top"> - <h1>Heading Level 1</h1> - <h2>Heading Level 2</h2> - <h3>Heading Level 3</h3> - <h4>Heading Level 4</h4> - <h5>Heading Level 5</h5> - <h6>Heading Level 6</h6> - </td> - </tr> - <tr> - <td className="text-top">``Lists#newArrayList()``</td> - <td className="markdown text-top"><code>Lists#newArrayList()</code></td> - </tr> - <tr> - <td className="text-top"> - ``<br /> - // code on multiple lines<br /> - {'public void foo() {'}<br /> - {'// do some logic here'}<br /> - {'}'}<br /> - `` - </td> - <td className="markdown text-top"> -<pre> - // code on multiple lines - public void foo() { - // do some logic here -} -</pre> - </td> - </tr> - <tr> - <td className="text-top"> - Standard text<br /> - > Blockquoted text<br /> - > that spans multiple lines<br /> - </td> - <td className="markdown text-top"> - <p>Standard text</p> - <blockquote>Blockquoted text<br /> - that spans multiple lines<br /></blockquote> - </td> - </tr> - </tbody> - </table> - </div> + <div className="page page-limited"> + <h2 className="spacer-bottom">Markdown Syntax</h2> + <table className="width-100 data zebra"> + <thead> + <tr> + <th>Write:</th> + <th>To display:</th> + </tr> + </thead> + <tbody> + <tr> + <td>*this text is bold*</td> + <td className="markdown"><strong>this text is bold</strong></td> + </tr> + <tr> + <td>{'http://sonarqube.org'}</td> + <td className="markdown"> + <a href="http://sonarqube.org">{'http://sonarqube.org'}</a> + </td> + </tr> + <tr> + <td className="text-top"> + [SonarQube™ Home Page](http://www.sonarqube.org) + </td> + <td className="markdown text-top"> + <a href="http://www.sonarqube.org" target="_blank">SonarQube™ Home Page</a> + </td> + </tr> + <tr> + <td className="text-top"> + * first item<br /> + * second item + </td> + <td className="markdown"> + <ul> + <li>first item</li> + <li>second item</li> + </ul> + </td> + </tr> + <tr> + <td className="text-top"> + 1. first item<br /> + 1. second item + </td> + <td className="markdown text-top"> + <ol> + <li>first item</li> + <li>second item</li> + </ol> + </td> + </tr> + <tr> + <td className="text-top"> + = Heading Level 1<br /> + == Heading Level 2<br /> + === Heading Level 3<br /> + ==== Heading Level 4<br /> + ===== Heading Level 5<br /> + ====== Heading Level 6<br /> + </td> + <td className="markdown text-top"> + <h1>Heading Level 1</h1> + <h2>Heading Level 2</h2> + <h3>Heading Level 3</h3> + <h4>Heading Level 4</h4> + <h5>Heading Level 5</h5> + <h6>Heading Level 6</h6> + </td> + </tr> + <tr> + <td className="text-top">``Lists#newArrayList()``</td> + <td className="markdown text-top"><code>Lists#newArrayList()</code></td> + </tr> + <tr> + <td className="text-top"> + ``<br /> + // code on multiple lines<br /> + {'public void foo() {'}<br /> + {'// do some logic here'}<br /> + {'}'}<br /> + `` + </td> + <td className="markdown text-top"> + <pre> + {'// code on multiple lines\npublic void foo() {\n // do some logic here\n}'} + </pre> + </td> + </tr> + <tr> + <td className="text-top"> + Standard text<br /> + > Blockquoted text<br /> + > that spans multiple lines<br /> + </td> + <td className="markdown text-top"> + <p>Standard text</p> + <blockquote> + Blockquoted text<br /> + that spans multiple lines<br /> + </blockquote> + </td> + </tr> + </tbody> + </table> + </div> ); } } diff --git a/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js b/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js index e98a0397a3a..fad3fad1704 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js +++ b/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js @@ -103,7 +103,7 @@ export default Marionette.LayoutView.extend({ }, events: { - 'submit': 'handleSubmit', + submit: 'handleSubmit', 'keydown .js-search-input': 'onKeyDown', 'keyup .js-search-input': 'onKeyUp' }, diff --git a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js index b64ee68739d..80568ff7d9e 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js @@ -36,8 +36,8 @@ export default WorkspaceListItemView.extend(RuleFilterMixin).extend({ }, events: { - 'click': 'selectCurrent', - 'dblclick': 'openRule', + click: 'selectCurrent', + dblclick: 'openRule', 'click .js-rule': 'openRule', 'click .js-rule-filter': 'onRuleFilterClick', 'click .coding-rules-detail-quality-profile-activate': 'activate', diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js index e42eaf2be69..4b506010676 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js @@ -71,19 +71,19 @@ export default class QualityGateCondition extends React.Component { } getUrlForBugsOrVulnerabilities(type: string, sinceLeakPeriod: boolean) { - const RATING_TO_SEVERITIES_MAPPING = { - '1': 'BLOCKER,CRITICAL,MAJOR,MINOR', - '2': 'BLOCKER,CRITICAL,MAJOR', - '3': 'BLOCKER,CRITICAL', - '4': 'BLOCKER' - }; + const RATING_TO_SEVERITIES_MAPPING = [ + 'BLOCKER,CRITICAL,MAJOR,MINOR', + 'BLOCKER,CRITICAL,MAJOR', + 'BLOCKER,CRITICAL', + 'BLOCKER' + ]; const { condition } = this.props; const threshold = condition.level === 'ERROR' ? condition.error : condition.warning; return this.getIssuesUrl(sinceLeakPeriod, { types: type, - severities: RATING_TO_SEVERITIES_MAPPING[threshold] + severities: RATING_TO_SEVERITIES_MAPPING[Number(threshold) - 1] }); } diff --git a/server/sonar-web/src/main/js/apps/projects/filters/Filter.js b/server/sonar-web/src/main/js/apps/projects/filters/Filter.js index ea5eb9e40f5..28f508b25fa 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/Filter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/Filter.js @@ -99,7 +99,7 @@ export default class Filter extends React.PureComponent { 'search-navigator-facet', 'projects-facet', { - 'active': this.isSelected(option), + active: this.isSelected(option), 'search-navigator-facet-half': this.props.halfWidth, 'search-navigator-facet-highlight-under': this.highlightUnder(option) }, 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 2d466e3100c..30802397395 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 @@ -32,8 +32,8 @@ export default Marionette.ItemView.extend({ modelEvents: { 'change:_hidden': 'toggleDisplay', - 'change': 'onModelChange', - 'request': 'onRequest' + change: 'onModelChange', + request: 'onRequest' }, events: { 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 15d1343c4b3..a4c92fc2dc6 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 @@ -22,10 +22,10 @@ import Backbone from 'backbone'; export default Backbone.Router.extend({ routes: { '': 'index', - 'installed': 'showInstalled', - 'updates': 'showUpdates', - 'available': 'showAvailable', - 'system': 'showSystemUpgrades' + installed: 'showInstalled', + updates: 'showUpdates', + available: 'showAvailable', + system: 'showSystemUpgrades' }, initialize(options) { 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 1ecd181f54a..026542309bc 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 @@ -46,7 +46,7 @@ export const Bubble = React.createClass({ if (this.props.tooltip) { tooltipAttrs = { 'data-toggle': 'tooltip', - 'title': this.props.tooltip + title: this.props.tooltip }; } return ( 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 b9fbaeb2959..f29ae2da943 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 @@ -35,7 +35,7 @@ export const Word = React.createClass({ if (this.props.tooltip) { tooltipAttrs = { 'data-toggle': 'tooltip', - 'title': this.props.tooltip + title: this.props.tooltip }; } return ( 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 4e46200ad04..eca902adbe9 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 @@ -47,7 +47,7 @@ export default Marionette.ItemView.extend({ events() { return { - 'click': 'handleClick', + click: 'handleClick', 'click .js-issue-comment': 'onComment', 'click .js-issue-comment-edit': 'editComment', 'click .js-issue-comment-delete': 'deleteComment', 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 8b83fc9600f..52d68bcd7c0 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 @@ -32,7 +32,7 @@ export default PopupView.extend({ }, events: { - 'click': 'onClick', + click: 'onClick', 'keydown @ui.textarea': 'onKeydown', 'keyup @ui.textarea': 'toggleSubmit', 'click @ui.cancelButton': 'cancel', 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 31d4b9a7bf6..e89d8a67fed 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 @@ -32,7 +32,7 @@ export default Marionette.ItemView.extend({ }, events: { - 'click': 'onClick', + click: 'onClick', 'click .js-close': 'onCloseClick' }, |