| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 updateWithNode: function(node) | 89 updateWithNode: function(node) |
| 90 { | 90 { |
| 91 $(this._what).empty(); | 91 $(this._what).empty(); |
| 92 this._what.appendChild(node); | 92 this._what.appendChild(node); |
| 93 } | 93 } |
| 94 }); | 94 }); |
| 95 | 95 |
| 96 ui.notifications.FailingTestGroup = base.extends('li', { | 96 ui.notifications.FailingTestGroup = base.extends('li', { |
| 97 init: function(groupName, testNameList) | 97 init: function(groupName, testNameList) |
| 98 { | 98 { |
| 99 this.appendChild(base.createLinkNode(ui.urlForFlakinessDashboard(testNam
eList), groupName, '_blank')); | 99 this.appendChild(base.createLinkNode(ui.urlForFlakinessDashboard(testNam
eList), groupName)); |
| 100 } | 100 } |
| 101 }); | 101 }); |
| 102 | 102 |
| 103 var Cause = base.extends('li', { | 103 var Cause = base.extends('li', { |
| 104 init: function() | 104 init: function() |
| 105 { | 105 { |
| 106 this._description = this.appendChild(document.createElement('div')); | 106 this._description = this.appendChild(document.createElement('div')); |
| 107 this._description.className = 'description'; | 107 this._description.className = 'description'; |
| 108 } | 108 } |
| 109 }); | 109 }); |
| 110 | 110 |
| 111 ui.notifications.SuspiciousCommit = base.extends(Cause, { | 111 ui.notifications.SuspiciousCommit = base.extends(Cause, { |
| 112 init: function(commitData) | 112 init: function(commitData) |
| 113 { | 113 { |
| 114 this._revision = commitData.revision; | 114 this._revision = commitData.revision; |
| 115 this._description.appendChild(base.createLinkNode(trac.changesetURL(comm
itData.revision), commitData.revision, '_blank')); | 115 this._description.appendChild(base.createLinkNode(trac.changesetURL(comm
itData.revision), commitData.revision)); |
| 116 this._details = this._description.appendChild(document.createElement('sp
an')); | 116 this._details = this._description.appendChild(document.createElement('sp
an')); |
| 117 this._addDetail('summary', commitData); | 117 this._addDetail('summary', commitData); |
| 118 this._addDetail('author', commitData); | 118 this._addDetail('author', commitData); |
| 119 this._addDetail('reviewer', commitData); | 119 this._addDetail('reviewer', commitData); |
| 120 // FIXME: Add bugID detail. | 120 // FIXME: Add bugID detail. |
| 121 // this._addDetail('bugID', commitData, bugzilla.bugURL); | 121 // this._addDetail('bugID', commitData, bugzilla.bugURL); |
| 122 }, | 122 }, |
| 123 hasRevision: function(revision) | 123 hasRevision: function(revision) |
| 124 { | 124 { |
| 125 return this._revision == revision; | 125 return this._revision == revision; |
| 126 }, | 126 }, |
| 127 _addDetail: function(part, commitData, linkFunction) | 127 _addDetail: function(part, commitData, linkFunction) |
| 128 { | 128 { |
| 129 var content = commitData[part]; | 129 var content = commitData[part]; |
| 130 if (!content) | 130 if (!content) |
| 131 return; | 131 return; |
| 132 | 132 |
| 133 var span = this._details.appendChild(document.createElement('span')); | 133 var span = this._details.appendChild(document.createElement('span')); |
| 134 span.className = part; | 134 span.className = part; |
| 135 | 135 |
| 136 if (linkFunction) { | 136 if (linkFunction) { |
| 137 var link = base.createLinkNode(linkFunction(content), content, '_bla
nk'); | 137 var link = base.createLinkNode(linkFunction(content), content); |
| 138 span.appendChild(link); | 138 span.appendChild(link); |
| 139 } else | 139 } else |
| 140 span.textContent = content; | 140 span.textContent = content; |
| 141 } | 141 } |
| 142 }); | 142 }); |
| 143 | 143 |
| 144 ui.notifications.Failure = base.extends(ui.notifications.Notification, { | 144 ui.notifications.Failure = base.extends(ui.notifications.Notification, { |
| 145 init: function() | 145 init: function() |
| 146 { | 146 { |
| 147 this._time = this._how.appendChild(new ui.RelativeTime()); | 147 this._time = this._how.appendChild(new ui.RelativeTime()); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 $(this._effects).empty().append(Object.keys(failuresList).map(function(b
uilderName) { | 255 $(this._effects).empty().append(Object.keys(failuresList).map(function(b
uilderName) { |
| 256 var effect = document.createElement('li'); | 256 var effect = document.createElement('li'); |
| 257 effect.className = 'builder'; | 257 effect.className = 'builder'; |
| 258 effect.appendChild(new ui.failures.Builder(builderName, failuresList
[builderName])); | 258 effect.appendChild(new ui.failures.Builder(builderName, failuresList
[builderName])); |
| 259 return effect; | 259 return effect; |
| 260 })); | 260 })); |
| 261 } | 261 } |
| 262 }); | 262 }); |
| 263 | 263 |
| 264 })(); | 264 })(); |
| OLD | NEW |