aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/system
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 /server/sonar-web/src/main/js/apps/system
parent7c90d26047935985378a3aa0f26ee316acba59e1 (diff)
downloadsonarqube-0bac18d71ccd2504254cd82c89ea208320a5fb30.tar.gz
sonarqube-0bac18d71ccd2504254cd82c89ea208320a5fb30.zip
enforce js code style5.5-M14
Diffstat (limited to 'server/sonar-web/src/main/js/apps/system')
-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
6 files changed, 8 insertions, 9 deletions
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>