Remove duplicate code from Buildbot.js in dashboard
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jul 2017 21:38:04 +0000 (21:38 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Jul 2017 21:38:04 +0000 (21:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174870

Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype.javaScriptCoreTestFailuresURLForIteration): Remove duplicate code and reuse buildPageURLForIteration() to construct URL.
(Buildbot.prototype.javaScriptCoreTestStdioUrlForIteration): Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbot.js:
(MockBuildbot.prototype.javaScriptCoreTestStdioUrlForIteration): Ditto for tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@219963 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbot.js
Tools/ChangeLog

index b38daa6..3e9d78b 100644 (file)
@@ -153,12 +153,12 @@ Buildbot.prototype = {
 
     javaScriptCoreTestFailuresURLForIteration: function(iteration, name)
     {
-        return this.baseURL + "builders/" + encodeURIComponent(iteration.queue.id) + "/builds/" + iteration.id + "/steps/" + name + "/logs/json/text";
+        return this.buildPageURLForIteration(iteration) + "/steps/" + name + "/logs/json/text";
     },
 
     javaScriptCoreTestStdioUrlForIteration: function(iteration, name)
     {
-        return this.baseURL + "builders/" + encodeURIComponent(iteration.queue.id) + "/builds/" + iteration.id + "/steps/" + name + "/logs/stdio";
+        return this.buildPageURLForIteration(iteration) + "/steps/" + name + "/logs/stdio";
     },
 
     layoutTestResultsDirectoryURLForIteration: function(iteration)
index 7724c66..c5ec583 100644 (file)
@@ -40,7 +40,6 @@ MockBuildbot.prototype = {
 
     javaScriptCoreTestStdioUrlForIteration: function(iteration, name)
     {
-        return this.baseURL + "builders/" + encodeURIComponent(iteration.queue.id) + "/builds/" + iteration.id + "/steps/" + name + "/logs/stdio";
-
+        return this.buildPageURLForIteration(iteration) + "/steps/" + name + "/logs/stdio";
     },
 }
index 66b5c1a..6c94104 100644 (file)
@@ -1,3 +1,16 @@
+2017-07-26  Aakash Jain  <aakash_jain@apple.com>
+
+        Remove duplicate code from Buildbot.js in dashboard
+        https://bugs.webkit.org/show_bug.cgi?id=174870
+
+        Reviewed by Daniel Bates.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
+        (Buildbot.prototype.javaScriptCoreTestFailuresURLForIteration): Remove duplicate code and reuse buildPageURLForIteration() to construct URL.
+        (Buildbot.prototype.javaScriptCoreTestStdioUrlForIteration): Ditto.
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/resources/MockBuildbot.js:
+        (MockBuildbot.prototype.javaScriptCoreTestStdioUrlForIteration): Ditto for tests.
+
 2017-07-26  Brady Eidson  <beidson@apple.com>
 
         Add test to verify certain child processes are not launched as a side effect of enabling ResourceLoadStatistics.