diff options
Diffstat (limited to 'chromium/chrome/browser/resources/media/webrtc_logs.js')
-rw-r--r-- | chromium/chrome/browser/resources/media/webrtc_logs.js | 108 |
1 files changed, 68 insertions, 40 deletions
diff --git a/chromium/chrome/browser/resources/media/webrtc_logs.js b/chromium/chrome/browser/resources/media/webrtc_logs.js index 508af7d00c1..cb3d50d7d58 100644 --- a/chromium/chrome/browser/resources/media/webrtc_logs.js +++ b/chromium/chrome/browser/resources/media/webrtc_logs.js @@ -27,49 +27,77 @@ function updateWebRtcLogsList(uploads, version) { var upload = uploads[i]; var logBlock = document.createElement('div'); + var title = document.createElement('h3'); - title.textContent = loadTimeData.getStringF('webrtcLogHeaderFormat', - upload['id']); + title.textContent = + loadTimeData.getStringF('webrtcLogHeaderFormat', + upload['capture_time'].length != 0 ? + upload['capture_time'] : + upload['upload_time']); logBlock.appendChild(title); - var date = document.createElement('p'); - date.textContent = loadTimeData.getStringF('webrtcLogTimeFormat', - upload['time']); - logBlock.appendChild(date); - var linkBlock = document.createElement('p'); - var link = document.createElement('a'); - var commentLines = [ - 'Chrome Version: ' + version, - // TODO(tbreisacher): fill in the OS automatically? - 'Operating System: e.g., "Windows 7", "Mac OSX 10.6"', - '', - 'URL (if applicable) where the problem occurred:', - '', - 'Can you reproduce this problem?', - '', - 'What steps will reproduce this problem? (or if it\'s not ' + - 'reproducible, what were you doing just before the problem)?', - '', - '1.', '2.', '3.', - '', - '*Please note that issues filed with no information filled in ' + - 'above will be marked as WontFix*', - '', - '****DO NOT CHANGE BELOW THIS LINE****', - 'report_id:' + upload.id - ]; - var params = { - template: 'Defect report from user', - comment: commentLines.join('\n'), - }; - var href = 'http://code.google.com/p/chromium/issues/entry'; - for (var param in params) { - href = appendParam(href, param, params[param]); + + var localFileLine = document.createElement('p'); + if (upload['local_file'].length == 0) { + localFileLine.textContent = + loadTimeData.getString('noLocalLogFileMessage'); + } else { + localFileLine.textContent = + loadTimeData.getString('webrtcLogLocalFileLabelFormat') + ' '; + var localFileLink = document.createElement('a'); + localFileLink.href = 'file://' + upload['local_file']; + localFileLink.textContent = + loadTimeData.getStringF('webrtcLogLocalFileFormat', + upload['local_file']); + localFileLine.appendChild(localFileLink); } - link.href = href; - link.target = '_blank'; - link.textContent = loadTimeData.getString('bugLinkText'); - linkBlock.appendChild(link); - logBlock.appendChild(linkBlock); + logBlock.appendChild(localFileLine); + + var uploadLine = document.createElement('p'); + if (upload['id'].length == 0) { + uploadLine.textContent = + loadTimeData.getString('webrtcLogNotUploadedMessage'); + } else { + uploadLine.textContent = + loadTimeData.getStringF('webrtcLogUploadTimeFormat', + upload['upload_time']) + '. ' + + loadTimeData.getStringF('webrtcLogReportIdFormat', + upload['id']) + '. '; + var link = document.createElement('a'); + var commentLines = [ + 'Chrome Version: ' + version, + // TODO(tbreisacher): fill in the OS automatically? + 'Operating System: e.g., "Windows 7", "Mac OSX 10.6"', + '', + 'URL (if applicable) where the problem occurred:', + '', + 'Can you reproduce this problem?', + '', + 'What steps will reproduce this problem? (or if it\'s not ' + + 'reproducible, what were you doing just before the problem)?', + '', + '1.', '2.', '3.', + '', + '*Please note that issues filed with no information filled in ' + + 'above will be marked as WontFix*', + '', + '****DO NOT CHANGE BELOW THIS LINE****', + 'report_id:' + upload.id + ]; + var params = { + template: 'Defect report from user', + comment: commentLines.join('\n'), + }; + var href = 'http://code.google.com/p/chromium/issues/entry'; + for (var param in params) { + href = appendParam(href, param, params[param]); + } + link.href = href; + link.target = '_blank'; + link.textContent = loadTimeData.getString('bugLinkText'); + uploadLine.appendChild(link); + } + logBlock.appendChild(uploadLine); + logSection.appendChild(logBlock); } |