| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Variables for console Javascript access to the currently visible/selected rec
ords. | 5 // Variables for console Javascript access to the currently visible/selected rec
ords. |
| 6 var records = []; | 6 var records = []; |
| 7 var selectedRecords = []; | 7 var selectedRecords = []; |
| 8 | 8 |
| 9 var recentModule = (function(){ | 9 var recentModule = (function(){ |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 131 } |
| 132 | 132 |
| 133 function newDetailLinks(record) { | 133 function newDetailLinks(record) { |
| 134 var span = newElement('span'); | 134 var span = newElement('span'); |
| 135 span.appendChild(newJsonDialogLink(record)); | 135 span.appendChild(newJsonDialogLink(record)); |
| 136 var statusLink = newStatusLink(record.fields); | 136 var statusLink = newStatusLink(record.fields); |
| 137 if (statusLink) { | 137 if (statusLink) { |
| 138 span.appendChild(newElement('span', ' ')); | 138 span.appendChild(newElement('span', ' ')); |
| 139 span.appendChild(statusLink); | 139 span.appendChild(statusLink); |
| 140 } | 140 } |
| 141 var timelineLink = newTimelineLink(record.fields); | |
| 142 if (timelineLink) { | |
| 143 span.appendChild(newElement('span', ' ')); | |
| 144 span.appendChild(timelineLink); | |
| 145 } | |
| 146 var reviewLink = newReviewLink(record.fields); | 141 var reviewLink = newReviewLink(record.fields); |
| 147 if (reviewLink) { | 142 if (reviewLink) { |
| 148 span.appendChild(newElement('span', ' ')); | 143 span.appendChild(newElement('span', ' ')); |
| 149 span.appendChild(reviewLink); | 144 span.appendChild(reviewLink); |
| 150 } | 145 } |
| 151 return span; | 146 return span; |
| 152 } | 147 } |
| 153 | 148 |
| 154 function newJsonDialogLink(record) { | 149 function newJsonDialogLink(record) { |
| 155 var a = newLink('[json]'); | 150 var a = newLink('[json]'); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 172 return a; | 167 return a; |
| 173 } | 168 } |
| 174 | 169 |
| 175 function newStatusLink(fields) { | 170 function newStatusLink(fields) { |
| 176 if (!fields.issue || !fields.patchset) { | 171 if (!fields.issue || !fields.patchset) { |
| 177 return null; | 172 return null; |
| 178 } | 173 } |
| 179 return newLink('[status]', logServer + '/patch-status/' + fields.issue + '/' +
fields.patchset); | 174 return newLink('[status]', logServer + '/patch-status/' + fields.issue + '/' +
fields.patchset); |
| 180 } | 175 } |
| 181 | 176 |
| 182 function newTimelineLink(fields) { | |
| 183 if (!fields.issue || !fields.patchset) { | |
| 184 return null; | |
| 185 } | |
| 186 return newLink('[timeline]', logServer + '/patch-timeline/' + fields.issue + '
/' + fields.patchset); | |
| 187 } | |
| 188 | |
| 189 function newReviewLink(fields) { | 177 function newReviewLink(fields) { |
| 190 if (!fields.issue) { | 178 if (!fields.issue) { |
| 191 return null; | 179 return null; |
| 192 } | 180 } |
| 193 var patchset = fields.patchset ? '#ps' + fields.patchset : ''; | 181 var patchset = fields.patchset ? '#ps' + fields.patchset : ''; |
| 194 return newLink('[review]', reviewServer + '/' + fields.issue + patchset); | 182 return newLink('[review]', reviewServer + '/' + fields.issue + patchset); |
| 195 } | 183 } |
| 196 | 184 |
| 197 function updateFilterList() { | 185 function updateFilterList() { |
| 198 if (tags.length === 0) { | 186 if (tags.length === 0) { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 return { | 230 return { |
| 243 'main': main, | 231 'main': main, |
| 244 // Export methods for tests. | 232 // Export methods for tests. |
| 245 'init': init, | 233 'init': init, |
| 246 'processJSON': processJSON, | 234 'processJSON': processJSON, |
| 247 'document': currentDocument, | 235 'document': currentDocument, |
| 248 }; | 236 }; |
| 249 | 237 |
| 250 })(); | 238 })(); |
| 251 | 239 |
| OLD | NEW |