Chromium Code Reviews| Index: chrome/browser/resources/chromeos/drive_internals.js |
| diff --git a/chrome/browser/resources/chromeos/drive_internals.js b/chrome/browser/resources/chromeos/drive_internals.js |
| index 8e07931593549732e6110687364e54006ccd43eb..42003db971beeef174ab855583634a2b13c4c7f2 100644 |
| --- a/chrome/browser/resources/chromeos/drive_internals.js |
| +++ b/chrome/browser/resources/chromeos/drive_internals.js |
| @@ -79,6 +79,31 @@ function updateLocalStorageUsage(localStorageSummary) { |
| } |
| /** |
| + * Updates the summary about in-flight operations. |
| + * @param {Object} operationsSummary Dictionaty describing the status of |
|
satorux1
2012/08/22 20:20:02
seems to me that operationsSummary is a list of di
Haruki Sato
2012/08/24 19:06:11
Yes. Done.
Thanks!
|
| + * in-flight operations. |
| + */ |
| +function updateInFlightOperations(operationsSummary) { |
| + for (var i = 0; i < operationsSummary.length; i++) { |
| + var operation = operationsSummary[i]; |
| + var tr = document.createElement('tr'); |
| + tr.appendChild(createElementFromText('td', operation.operation_id)); |
| + tr.appendChild(createElementFromText('td', operation.operation_type)); |
| + tr.appendChild(createElementFromText('td', operation.file_path)); |
| + tr.appendChild(createElementFromText('td', operation.transfer_state)); |
| + tr.appendChild(createElementFromText('td', operation.start_time)); |
| + var progress = operation.progress_current + '/' + operation.progress_total; |
| + if (operation.progress_total > 0) { |
| + progress += ' (' + |
| + (operation.progress_current / operation.progress_total * 100) + '%)'; |
| + } |
| + tr.appendChild(createElementFromText('td', progress)); |
| + |
| + $('in-flight-operations-contents').appendChild(tr); |
| + } |
|
satorux1
2012/08/22 20:20:02
I think we want to be able to monitor the in-fligh
Haruki Sato
2012/08/24 19:06:11
Done.
Added periodic update using setInterval.
|
| +} |
| + |
| +/** |
| * Creates an element named |elementName| containing the content |text|. |
| * @param {string} elementName Name of the new element to be created. |
| * @param {string} text Text to be contained in the new element. |