Skip to content

Commit

Permalink
Lint JS
Browse files Browse the repository at this point in the history
  • Loading branch information
fdaugan committed Sep 26, 2023
1 parent 833091a commit dfa7196
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ protected SonarProject getProject(final Map<String, String> parameters, final St
List<SonarBranch> branches = Collections.emptyList();

// Get the JSON project
final String queryUrl, defaultMetrics;
final String queryUrl;
final String defaultMetrics;
if (is63API(version)) {
queryUrl = "api/measures/component?component=" + encodedId + "&metricKeys=";
defaultMetrics = DEFAULT_METRICS_63;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
package org.ligoj.app.plugin.qa.sonar;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
import org.ligoj.bootstrap.core.IDescribableBean;
import org.ligoj.bootstrap.core.NamedBean;

import java.util.List;
import java.util.Map;

/**
* SonarQube project retrieved from REST API. Name, and also some additional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define(function () {
var current = {
const current = {

configureSubscriptionParameters: function (configuration) {
current.$super('registerXServiceSelect2')(configuration, 'service:qa:sonarqube:project', 'service/qa/sonarqube/');
Expand Down Expand Up @@ -76,7 +76,7 @@ define(function () {
}
description += `: ${value}`;
} else {
if (value > 1000000) {
if (value > 1000000000) {
displayValue = Math.round(value/1000000000);
unit = 'G';
} else if (value > 1000000) {
Expand Down Expand Up @@ -125,7 +125,7 @@ define(function () {
let branchMetrics = current.renderMetrics(subscription, b);
return `<div class="branch">${url}${branchMetrics}</div>`;
}).join(' ');
return result + `${branches ? `<div class="branches">${branches}</div>`: ''}`;
return result + (branches ? `<div class="branches">${branches}</div>`: '');
}
};
return current;
Expand Down

0 comments on commit dfa7196

Please sign in to comment.