OLD | NEW |
1 <script> | 1 <script> |
2 (function () { | 2 (function () { |
3 // TODO(akalin): Make aboutInfo have key names likeThis and not | 3 // TODO(akalin): Make aboutInfo have key names likeThis and not |
4 // like_this. | 4 // like_this. |
5 function refreshAboutInfo(aboutInfo) { | 5 function refreshAboutInfo(aboutInfo) { |
6 var aboutInfoDiv = document.getElementById('aboutInfo'); | 6 var aboutInfoDiv = document.getElementById('aboutInfo'); |
7 jstProcess(new JsEvalContext(aboutInfo), aboutInfoDiv); | 7 jstProcess(new JsEvalContext(aboutInfo), aboutInfoDiv); |
8 } | 8 } |
9 | 9 |
10 function onLoad() { | 10 function onLoad() { |
11 chrome.sync.getAboutInfo(refreshAboutInfo); | 11 chrome.sync.getAboutInfo(refreshAboutInfo); |
12 chrome.sync.onSyncServiceStateChanged.addListener(function() { | 12 chrome.sync.onSyncServiceStateChanged.addListener(function() { |
13 chrome.sync.getAboutInfo(refreshAboutInfo); | 13 chrome.sync.getAboutInfo(refreshAboutInfo); |
14 }); | 14 }); |
15 } | 15 } |
16 | 16 |
17 document.addEventListener("DOMContentLoaded", onLoad, false); | 17 document.addEventListener("DOMContentLoaded", onLoad, false); |
18 })(); | 18 })(); |
19 </script> | 19 </script> |
| 20 |
| 21 <style> |
| 22 div.column { |
| 23 display: inline-block; |
| 24 padding-right: 5em; |
| 25 vertical-align: top; |
| 26 } |
| 27 |
| 28 div#aboutInfo h2 { |
| 29 color: #4a8ee6; |
| 30 font-size: 100%; |
| 31 } |
| 32 |
| 33 div#aboutInfo .err { |
| 34 color: red; |
| 35 } |
| 36 |
| 37 table#aboutDetails tr:nth-child(odd) { |
| 38 background: #eff3ff; |
| 39 } |
| 40 |
| 41 table#routingInfo tr:nth-child(odd) { |
| 42 background: #ccffcc; |
| 43 } |
| 44 </style> |
| 45 |
20 <div id='aboutInfo'> | 46 <div id='aboutInfo'> |
21 <div id='header'> | 47 <div class="column"> |
22 <h1>Sync Internals</h1> | 48 <h2>Summary</h2> |
23 <p>Sync engine diagnostic data</p> | 49 <p jscontent="summary"/> |
24 </div> | 50 <p jsdisplay="unrecoverable_error_detected"> |
25 <div id='content'> | 51 <span class="err">Unrecoverable Error Detected!</span> |
26 <table width="100%"> | 52 <span jscontent="unrecoverable_error_message"></span> |
27 <tr> | 53 <span jscontent="unrecoverable_error_location"></span> |
28 <td width="20%"> | 54 </p> |
29 <span class="desc"><h2>Summary</h2></span> | 55 |
30 <strong jscontent="summary"></strong> | 56 <h2>Sync URL</h2> |
31 </td> | 57 <p jscontent="service_url"/> |
32 <td> | 58 |
33 <div class="desc" jsdisplay="unrecoverable_error_detected"> | 59 <h2>Details</h2> |
34 <span class="err">Unrecoverable Error Detected!</span> | 60 <table id="aboutDetails"> |
35 <div jscontent="unrecoverable_error_message"></div> | 61 <tr> |
36 <div jscontent="unrecoverable_error_location"></div> | 62 <td>Authenticated</td> |
37 </div> | 63 <td> |
38 </td> | 64 <span jscontent="authenticated"></span> |
39 </tr> | 65 <span jsdisplay="!authenticated" class="err" jscontent="auth_problem"></
span> |
40 <tr> | |
41 <td colspan="2"> | |
42 <span class="desc"><h2>Sync URL</h2></span> | |
43 <strong jscontent="service_url"></strong> | |
44 </td> | |
45 </tr> | |
46 </table> | |
47 <br /><br /><br /> | |
48 <table> | |
49 <tr> | |
50 <td> | |
51 <div class="desc"><h2>Details</h2></div> | |
52 <table class='list' id='details'> | |
53 <tr> | |
54 <td class='name'>Authenticated</td> | |
55 <td class='number'> | |
56 <div jscontent="authenticated"></div> | |
57 <div jsdisplay="!authenticated" | |
58 class="err" | |
59 jscontent="auth_problem"></div> | |
60 </td> | |
61 </tr> | |
62 <tr> | |
63 <td class='name'>Last Synced</td> | |
64 <td class='number' jscontent="time_since_sync"></td> | |
65 </tr> | |
66 <tr jsselect="details"> | |
67 <td class='name'> | |
68 <div jscontent="stat_name"></div> | |
69 </td> | |
70 <td class='number'> | |
71 <div jscontent="stat_value"></div> | |
72 </td> | |
73 </tr> | |
74 </table> | |
75 </td> | 66 </td> |
76 <td valign="top"> | 67 </tr> |
77 <div class="desc"><h2>Routing Info</h2></div> | 68 <tr> |
78 <table class='list' id='details2'> | 69 <td>Last Synced</td> |
79 <tr jsselect="routing_info"> | 70 <td jscontent="time_since_sync"/> |
80 <td class ='name'> | 71 </tr> |
81 <div jscontent="model_type"></div> | 72 <tr jsselect="details"> |
82 </td> | 73 <td jscontent="stat_name"/> |
83 <td class='number'> | 74 <td jscontent="stat_value"/> |
84 <div jscontent="group"></div> | 75 </tr> |
85 </td> | 76 </table> |
86 </tr> | |
87 </table> | |
88 </td> | |
89 </table> | |
90 </div> | |
91 </div> | 77 </div> |
| 78 |
| 79 <div class="column"> |
| 80 <h2>Routing Info</h2> |
| 81 <table id="routingInfo"> |
| 82 <tr jsselect="routing_info"> |
| 83 <td jscontent="model_type"/> |
| 84 <td jscontent="group"/> |
| 85 </tr> |
| 86 </table> |
| 87 </div> |
| 88 </div> |
OLD | NEW |