diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-10-26 16:35:55 +0200 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-10-27 08:46:10 +0200 |
commit | 89e8da171ea22dd75b6ac1e83b1354983ed209e6 (patch) | |
tree | ac8bc2bc8efe3b6ef2afc84f30e4d9ec8b9a0ce7 | |
parent | 80706fcaec0e458ef2e3d05ee2086582577149ef (diff) | |
download | sonarqube-89e8da171ea22dd75b6ac1e83b1354983ed209e6.tar.gz sonarqube-89e8da171ea22dd75b6ac1e83b1354983ed209e6.zip |
Fix quality flaws
5 files changed, 5 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx index 732b7ea3170..5b906826ecc 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx @@ -44,7 +44,7 @@ export default class ComponentNavBgTaskNotif extends React.PureComponent<Props> renderMessage(messageKey: string) { const { component } = this.props; const canSeeBackgroundTasks = - component.configuration != undefined && component.configuration.showBackgroundTasks; + component.configuration !== undefined && component.configuration.showBackgroundTasks; const bgTaskUrl = getComponentBackgroundTaskUrl(component.key); if (canSeeBackgroundTasks) { diff --git a/server/sonar-web/src/main/js/apps/system/components/App.tsx b/server/sonar-web/src/main/js/apps/system/components/App.tsx index c6d333563ab..2211ed17dd5 100644 --- a/server/sonar-web/src/main/js/apps/system/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/App.tsx @@ -123,7 +123,7 @@ export default class App extends React.PureComponent<Props, State> { loading={loading} isCluster={isCluster(sysInfoData)} logLevel={getSystemLogsLevel(sysInfoData)} - showActions={sysInfoData != undefined} + showActions={sysInfoData !== undefined} onLogLevelChange={this.fetchSysInfo} /> {this.renderSysInfo()} diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js index 2cfee3e3c05..3b2b9593366 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js @@ -689,8 +689,6 @@ export default class SourceViewerBase extends React.PureComponent { 'source-duplications-expanded': this.state.displayDuplications }); - const displaySources = !notAccessible && !sourceRemoved; - return ( <div className={className} ref={node => (this.node = node)}> <SourceViewerHeader @@ -703,7 +701,7 @@ export default class SourceViewerBase extends React.PureComponent { {translate('code_viewer.no_source_code_displayed_due_to_source_removed')} </div> )} - {displaySources && sources != null && this.renderCode(sources)} + {!sourceRemoved && sources != null && this.renderCode(sources)} </div> ); } diff --git a/server/sonar-web/src/main/js/components/issue/Issue.js b/server/sonar-web/src/main/js/components/issue/Issue.js index 6637f8e87dc..11ff2e01a19 100644 --- a/server/sonar-web/src/main/js/components/issue/Issue.js +++ b/server/sonar-web/src/main/js/components/issue/Issue.js @@ -111,6 +111,7 @@ export default class Issue extends React.PureComponent { this.props.onCheck(this.props.issue.key); return false; } + return undefined; }); } diff --git a/server/sonar-web/src/main/js/helpers/dates.ts b/server/sonar-web/src/main/js/helpers/dates.ts index 3bba40df67e..571e73b20ae 100644 --- a/server/sonar-web/src/main/js/helpers/dates.ts +++ b/server/sonar-web/src/main/js/helpers/dates.ts @@ -41,7 +41,7 @@ export function parseDate(rawDate: ParsableDate): Date { export function toShortNotSoISOString(rawDate: ParsableDate): string { const date = parseDate(rawDate); - return date.getFullYear() + '-' + pad(date.getMonth() + 1) + '-' + pad(date.getDate()); + return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`; } export function toNotSoISOString(rawDate: ParsableDate): string { |