This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch performance
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git

commit fed6906b4192eefc2ea4699be5051e3aba7020da
Author: Dmitrii Ryabov <somefire...@gmail.com>
AuthorDate: Tue Sep 18 19:51:36 2018 +0300

    Green table header for PRs without possible blockers. - Fixes #13.
    
    Signed-off-by: Dmitriy Pavlov <dpav...@apache.org>
---
 .../apache/ignite/ci/web/model/current/UpdateInfo.java   | 12 ++++++------
 ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js | 16 +++++++++++-----
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/UpdateInfo.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/UpdateInfo.java
index 59e64ec..2aeafc6 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/UpdateInfo.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/UpdateInfo.java
@@ -24,13 +24,13 @@ import org.apache.ignite.ci.IAnalyticsEnabledTeamcity;
  */
 @SuppressWarnings("WeakerAccess") public class UpdateInfo {
     /** TeamCity auth token availability flag. */
-    public static int TEAMCITY_FLAG = 1;
+    public static final int TEAMCITY_FLAG = 1;
 
     /** GitHub auth token availability flag. */
-    public static int GITHUB_FLAG = 2;
+    public static final int GITHUB_FLAG = 2;
 
     /** JIRA auth token availability flag. */
-    public static int JIRA_FLAG = 2;
+    public static final int JIRA_FLAG = 4;
 
     /** Flags to use in javascript. */
     public Integer javaFlags = 0;
@@ -58,12 +58,12 @@ import org.apache.ignite.ci.IAnalyticsEnabledTeamcity;
      */
     public void setJavaFlags(IAnalyticsEnabledTeamcity teamcity) {
         if (teamcity.isTeamCityTokenAvailable())
-            javaFlags = javaFlags | TEAMCITY_FLAG;
+            javaFlags |= TEAMCITY_FLAG;
 
         if (teamcity.isGitTokenAvailable())
-            javaFlags = javaFlags | GITHUB_FLAG;
+            javaFlags |= GITHUB_FLAG;
 
         if (teamcity.isJiraTokenAvailable())
-            javaFlags = javaFlags | JIRA_FLAG;
+            javaFlags |= JIRA_FLAG;
     }
 }
diff --git a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js 
b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
index dd01b11..67d5c18 100644
--- a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
+++ b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
@@ -211,14 +211,20 @@ function addBlockersData(server, settings) {
             blockers += showSuiteData(suite, settings);
     }
 
-    if (blockers !== "") {
+    if (blockers === "") {
+        blockers = "<tr bgcolor='#D6F7C1'><th colspan='3' 
class='table-title'>" +
+            "<b>Possible Blockers not found!</b></th>" +
+            "<th class='table-title'>Base Branch</th></tr>";
+    }
+    else {
         blockers = "<tr bgcolor='#F5F5FF'><th colspan='3' 
class='table-title'><b>Possible Blockers</b></th>" +
-            "<th  class='table-title'>Base Branch</th></tr>" +
-            blockers +
-            "<tr bgcolor='#F5F5FF'><th colspan='3' class='table-title'><b>All 
Failures</b></th>" +
-            "<th  class='table-title'>Base Branch</th></tr>";
+            "<th class='table-title'>Base Branch</th></tr>" +
+            blockers
     }
 
+    blockers += "<tr bgcolor='#F5F5FF'><th colspan='3' 
class='table-title'><b>All Failures</b></th>" +
+        "<th class='table-title'>Base Branch</th></tr>";
+
     return blockers;
 }
 

Reply via email to