Changeset 161090 in webkit
- Timestamp:
- Dec 26, 2013 10:01:50 AM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js
r159484 r161090 61 61 function appendBuilderQueueStatus(queue) 62 62 { 63 var pendingBuildCount = queue.pendingIterationsCount; 64 if (pendingBuildCount) { 65 var message = pendingBuildCount === 1 ? "pending build" : "pending builds"; 66 var status = new StatusLineView(message, StatusLineView.Status.Neutral, null, pendingBuildCount); 67 this.element.appendChild(status.element); 68 } 63 this._appendPendingRevisionCount(queue) 69 64 70 65 var firstRecentFailedIteration = queue.firstRecentFailedIteration; -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js
r161078 r161090 51 51 }.bind(this)); 52 52 53 webkitTrac.addEventListener(Trac.Event.NewCommitsRecorded, this._newCommitsRecorded, this); 54 if (typeof internalTrac != "undefined") 55 internalTrac.addEventListener(Trac.Event.NewCommitsRecorded, this._newCommitsRecorded, this); 56 53 57 this.updateTimer = null; 54 58 this._updateHiddenState(); … … 82 86 }, 83 87 88 _appendPendingRevisionCount: function(queue) 89 { 90 for (var i = 0; i < queue.iterations.length; ++i) { 91 var iteration = queue.iterations[i]; 92 if (!iteration.loaded || !iteration.finished) 93 continue; 94 95 var latestRecordedOpenSourceRevisionNumber = webkitTrac.latestRecordedRevisionNumber; 96 if (!latestRecordedOpenSourceRevisionNumber) 97 return; 98 99 var openSourceRevisionsBehind = latestRecordedOpenSourceRevisionNumber - iteration.openSourceRevision; 100 if (openSourceRevisionsBehind < 0) 101 openSourceRevisionsBehind = 0; 102 103 if (iteration.internalRevision) { 104 var latestRecordedInternalRevisionNumber = internalTrac.latestRecordedRevisionNumber; 105 if (!latestRecordedInternalRevisionNumber) 106 return; 107 108 var internalRevisionsBehind = latestRecordedInternalRevisionNumber - iteration.internalRevision; 109 if (internalRevisionsBehind < 0) 110 internalRevisionsBehind = 0; 111 if (openSourceRevisionsBehind || internalRevisionsBehind) { 112 var message = openSourceRevisionsBehind + " \uff0b " + internalRevisionsBehind + " revisions behind"; 113 var status = new StatusLineView(message, StatusLineView.Status.NoBubble); 114 this.element.appendChild(status.element); 115 } 116 } else if (openSourceRevisionsBehind) { 117 var message = openSourceRevisionsBehind + " " + (openSourceRevisionsBehind === 1 ? "revision behind" : "revisions behind"); 118 var status = new StatusLineView(message, StatusLineView.Status.NoBubble); 119 this.element.appendChild(status.element); 120 } 121 122 return; 123 } 124 }, 125 84 126 revisionLinksForIteration: function(iteration) 85 127 { 86 function linkForRevision(revision, internal)128 function linkForRevision(revision, trac) 87 129 { 88 130 var linkElement = document.createElement("a"); 89 linkElement.href = iteration.queue.buildbot.tracRevisionURL(revision, internal);131 linkElement.href = trac.revisionURL(revision); 90 132 linkElement.target = "_blank"; 91 133 linkElement.textContent = "r" + revision; … … 96 138 97 139 console.assert(iteration.openSourceRevision); 98 var openSourceLink = linkForRevision(iteration.openSourceRevision, false);140 var openSourceLink = linkForRevision(iteration.openSourceRevision, webkitTrac); 99 141 100 142 if (!iteration.internalRevision) 101 143 return openSourceLink; 102 144 103 var internalLink = linkForRevision(iteration.internalRevision, true);145 var internalLink = linkForRevision(iteration.internalRevision, internalTrac); 104 146 105 147 var fragment = document.createDocumentFragment(); … … 142 184 { 143 185 this.updateSoon(); 186 }, 187 188 _newCommitsRecorded: function(event) 189 { 190 this.updateSoon(); 144 191 } 145 192 }; -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js
r159484 r161090 45 45 function appendBuilderQueueStatus(queue) 46 46 { 47 var pendingRunsCount = queue.pendingIterationsCount; 48 if (pendingRunsCount) { 49 var message = pendingRunsCount === 1 ? "pending test run" : "pending test runs"; 50 var status = new StatusLineView(message, StatusLineView.Status.Neutral, null, pendingRunsCount); 51 this.element.appendChild(status.element); 52 } 47 this._appendPendingRevisionCount(queue); 53 48 54 49 var appendedStatus = false; -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js
r159352 r161090 26 26 var settings = new Settings; 27 27 var buildbot = new WebKitBuildbot; 28 var webkitTrac = new Trac("http://trac.webkit.org/"); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js
r159382 r161090 36 36 this._statusBubbleElement = document.createElement("div"); 37 37 this._statusBubbleElement.classList.add("bubble"); 38 this.element.appendChild(this._statusBubbleElement); 38 if (status != StatusLineView.Status.NoBubble) 39 this.element.appendChild(this._statusBubbleElement); 39 40 40 41 this._labelElement = document.createElement("div"); … … 58 59 59 60 StatusLineView.Status = { 61 NoBubble: "no-bubble", 60 62 Neutral: "neutral", 61 63 Good: "good", -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js
r156685 r161090 51 51 }; 52 52 53 function loadXML(url, callback) { 54 console.assert(url); 55 56 if (!(callback instanceof Function)) 57 return; 58 59 var request = new XMLHttpRequest; 60 request.onreadystatechange = function() { 61 if (this.readyState !== 4) 62 return; 63 64 // Allow a status of 0 for easier testing with local files. 65 if (!this.status || this.status === 200) 66 callback(request.responseXML); 67 }; 68 69 request.open("GET", url); 70 request.send(); 71 }; 72 53 73 Element.prototype.removeChildren = function() 54 74 { -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js
r158192 r161090 60 60 __proto__: Buildbot.prototype, 61 61 62 tracRevisionURL: function(revision)63 {64 return "http://trac.webkit.org/changeset/" + revision;65 },66 67 62 buildLogURLForIteration: function(iteration) 68 63 { -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css
r159601 r161090 122 122 123 123 .status-line.neutral .label, 124 .status-line.neutral .message { 124 .status-line.neutral .message, 125 .status-line.no-bubble .label, 126 .status-line.no-bubble .message { 125 127 color: rgb(145, 135, 95); 126 128 } -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html
r159352 r161090 46 46 <script src="Scripts/StatusLineView.js"></script> 47 47 <script src="Scripts/Settings.js"></script> 48 <script src="Scripts/Trac.js"></script> 48 49 <script src="Scripts/Initialization.js"></script> 49 50 <script src="Scripts/Main.js"></script> -
trunk/Tools/ChangeLog
r161082 r161090 1 2013-12-25 Alexey Proskuryakov <ap@apple.com> 2 3 Please clarify "pending" reporting at build.webkit.org/dashboard 4 https://bugs.webkit.org/show_bug.cgi?id=122191 5 6 Reviewed by Timothy Hatcher. 7 8 Reporting the count of pending runs didn't make a lot of sense - first, runs are 9 coalesced and sometimes even out of order, and second, buildbot's notion of pending 10 run was confusingly different from dashboard's. 11 12 Let's display how many SVN revisions are pending. This can be somewhat misleading 13 too, because some revisions (like those for other platforms) don't trigger builds, 14 but it's better than what we had. 15 16 This patch also lays the groundwork for displaying detailed information about 17 pending revisions. 18 19 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js: 20 (BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus): Instead of 21 building pending status line directly, call newly added base class method. 22 23 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js: 24 (BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus): Ditto. 25 26 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js: 27 (BuildbotQueueView): Listen for events when new SVN revisions are landed, and update the view. 28 (BuildbotQueueView.prototype._appendPendingRevisionCount): Add a line for pending 29 SVN revisions. It uses a new style, StatusLineView.Status.NoBubble, because this 30 information is secondary, and doesn't need as much attention. 31 (BuildbotQueueView.prototype.revisionLinksForIteration): Build revisionURL through 32 Trac, not through Buildbot. 33 (BuildbotQueueView.prototype._newCommitsRecorded): Schedule an update, just like when 34 iterations are updated. 35 36 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js: 37 Initialize a global webkitTrac object. 38 39 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js: 40 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css: 41 Added a new style for messages without a bubble. 42 43 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js: 44 Added a model class for Trac, which keeps track of SVN timeline, and notifies 45 listeners of changes. It uses an RSS interface to Trac, because there is no JSON one. 46 47 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js: 48 (loadXML): Added a function to load XML asynchronouly, just like existing JSON.load. 49 50 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js: 51 Removed tracRevisionURL() function. Now that we have a Trac object, it just makes 52 more sense to build trac URLs through it. 53 54 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html: 55 Load Trac.js. 56 1 57 2013-12-25 Jongwoo Choi <jw0330.choi@samsung.com> 2 58
Note: See TracChangeset
for help on using the changeset viewer.