You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2018/10/11 13:11:44 UTC

[ignite-teamcity-bot] branch master updated: Trigger bug fixed

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 608fefa  Trigger bug fixed
608fefa is described below

commit 608fefaafcdafc512b8274d335b06ef1f5e1df49
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Thu Oct 11 16:11:42 2018 +0300

    Trigger bug fixed
---
 ignite-tc-helper-web/src/main/webapp/js/prs-1.0.js | 35 +++++++++++++---------
 1 file changed, 21 insertions(+), 14 deletions(-)

diff --git a/ignite-tc-helper-web/src/main/webapp/js/prs-1.0.js b/ignite-tc-helper-web/src/main/webapp/js/prs-1.0.js
index e6fb4fe..ca21ef6 100644
--- a/ignite-tc-helper-web/src/main/webapp/js/prs-1.0.js
+++ b/ignite-tc-helper-web/src/main/webapp/js/prs-1.0.js
@@ -213,6 +213,7 @@ function showContributionStatus(status, prId, row, srvId, suiteId) {
     let buildIsCompleted = isDefinedAndFilled(finishedBranch);
     let hasJiraIssue = isDefinedAndFilled(row.jiraIssueId);
     let hasQueued = status.queuedBuilds > 0 || status.runningBuilds > 0;
+    let queuedStatus = "Has queued builds: " + status.queuedBuilds  + " queued " + " ";
     if (buildIsCompleted) {
         tdForPr.html("<a id='link_" + prId + "' href='" + prShowHref(srvId, suiteId, finishedBranch) + "'>" +
             "<button id='show_" + prId + "'>Show " + finishedBranch + " report</button></a>");
@@ -243,32 +244,40 @@ function showContributionStatus(status, prId, row, srvId, suiteId) {
     showStageResult(2, prId, noNeedToTrigger, false);
     showStageResult(3, prId, buildIsCompleted, false);
     if(hasQueued) {
-        showWaitingResults(3, prId, "Has queued builds: " + status.queuedBuilds  + " queued " + " ");
-
+        showWaitingResults(3, prId, queuedStatus);
     }
 
     if(isDefinedAndFilled(status.observationsStatus)) {
         showWaitingResults(4, prId, status.observationsStatus);
     }
 
+    function prepareStatusOfTrigger() {
+        var res  = "";
+        if (hasQueued || buildIsCompleted) {
+            res += " class='disabledbtn'";
+            if (hasQueued)
+                res += " title='" + queuedStatus + "'";
+            else
+                res += " title='Results are ready. It is still possible to trigger Build'";
+        }
+        return res;
+    }
+
     if (isDefinedAndFilled(status.resolvedBranch)) {
         var jiraOptional = hasJiraIssue ? row.jiraIssueId : "";
         // triggerBuilds(serverId, suiteIdList, branchName, top, observe, ticketId)  defined in test fails
-        var trig = "<button onClick='" +
+        var res = "<button onClick='" +
             "triggerBuilds(" +
             "\"" + srvId + "\", " +
             "\"" + suiteId + "\", " +
             "\"" + status.resolvedBranch + "\"," +
             " false," +
-            " true," +
+            " false," +
             "\"" + jiraOptional + "\")'";
+        res += prepareStatusOfTrigger();
 
-        if (noNeedToTrigger) {
-            trig += " class='disabledbtn'";
-        }
-
-        trig += ">Trigger build</button>";
-        $("#triggerBuildFor" + prId).html(trig);
+        res += ">Trigger build</button>";
+        $("#triggerBuildFor" + prId).html(res);
     }
 
     if (hasJiraIssue && isDefinedAndFilled(status.resolvedBranch)) {
@@ -279,12 +288,10 @@ function showContributionStatus(status, prId, row, srvId, suiteId) {
             "\"" + suiteId + "\", " +
             "\"" + status.resolvedBranch + "\"," +
             " false," +
-            " false," +
+            " true," +
             "\"" + jiraOptional + "\")'";
 
-        if (noNeedToTrigger) {
-            trigAndObs += " class='disabledbtn'";
-        }
+        trigAndObs += prepareStatusOfTrigger();
 
         trigAndObs += ">Trigger build and comment JIRA after finish</button>";