Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: runtime/observatory/lib/src/elements/nav_bar.html

Issue 1120133002: Rework error handling in the service protocol and in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <link rel="import" href="../../../../packages/polymer/polymer.html"> 1 <link rel="import" href="../../../../packages/polymer/polymer.html">
2 <link rel="import" href="action_link.html"> 2 <link rel="import" href="action_link.html">
3 <link rel="import" href="observatory_element.html"> 3 <link rel="import" href="observatory_element.html">
4 4
5 <polymer-element name="nav-bar" extends="observatory-element"> 5 <polymer-element name="nav-bar" extends="observatory-element">
6 <template> 6 <template>
7 <link rel="stylesheet" href="css/shared.css"> 7 <link rel="stylesheet" href="css/shared.css">
8 <style> 8 <style>
9 nav { 9 nav {
10 position: fixed; 10 position: fixed;
(...skipping 15 matching lines...) Expand all
26 nav ul:after { 26 nav ul:after {
27 content: ""; clear: both; display: block; 27 content: ""; clear: both; display: block;
28 } 28 }
29 .vertical-spacer { 29 .vertical-spacer {
30 height: 40px; 30 height: 40px;
31 background-color: #0489c3; 31 background-color: #0489c3;
32 } 32 }
33 </style> 33 </style>
34 <nav> 34 <nav>
35 <ul> 35 <ul>
36 <template if="{{ showNotify }}"> 36 <nav-notify notifications="{{ app.notifications }}"
37 <nav-notify events="{{ app.notifications }}"></nav-notify> 37 notifyOnPause="{{ notifyOnPause }}"></nav-notify>
38 </template>
39 <content></content> 38 <content></content>
40 </ul> 39 </ul>
41 </nav> 40 </nav>
42 <div class="vertical-spacer"> 41 <div class="vertical-spacer">
43 </div> 42 </div>
44 <template if="{{ pad }}"> 43 <template if="{{ pad }}">
45 <br> 44 <br>
46 </template> 45 </template>
47 </template> 46 </template>
48 </polymer-element> 47 </polymer-element>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 <template if="{{ !active }}"> 163 <template if="{{ !active }}">
165 <button class="idle" on-click="{{ buttonClick }}">{{ label }}</button> 164 <button class="idle" on-click="{{ buttonClick }}">{{ label }}</button>
166 </template> 165 </template>
167 </li> 166 </li>
168 </template> 167 </template>
169 </polymer-element> 168 </polymer-element>
170 169
171 <polymer-element name="top-nav-menu"> 170 <polymer-element name="top-nav-menu">
172 <template> 171 <template>
173 <nav-menu link="/vm" anchor="Observatory" last="{{ last }}"> 172 <nav-menu link="/vm" anchor="Observatory" last="{{ last }}">
174 <nav-menu-item link="/vm-connect" anchor="Connect to a different VM"></nav -menu-item> 173 <nav-menu-item link="/vm-connect" anchor="Connect to a VM"></nav-menu-item >
175 <content></content> 174 <content></content>
176 </nav-menu> 175 </nav-menu>
177 </template> 176 </template>
178 </polymer-element> 177 </polymer-element>
179 178
180 <polymer-element name="vm-nav-menu"> 179 <polymer-element name="vm-nav-menu">
181 <template> 180 <template>
182 <nav-menu link="/vm" anchor="{{ vm.target.name }}" last="{{ last }}"> 181 <nav-menu link="/vm" anchor="{{ vm.target.name }}" last="{{ last }}">
183 <template repeat="{{ isolate in vm.isolates }}"> 182 <template repeat="{{ isolate in vm.isolates }}">
184 <nav-menu-item link="{{ makeLink('/inspect', isolate) }}" 183 <nav-menu-item link="{{ makeLink('/inspect', isolate) }}"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 width: auto; 238 width: auto;
240 z-index: 1000; 239 z-index: 1000;
241 font: 400 12px 'Montserrat', sans-serif; 240 font: 400 12px 'Montserrat', sans-serif;
242 color: white; 241 color: white;
243 background: none; 242 background: none;
244 } 243 }
245 </style> 244 </style>
246 245
247 <div class="menu"> 246 <div class="menu">
248 <div class="list"> 247 <div class="list">
249 <template repeat="{{ event in events }}"> 248 <template repeat="{{ notification in notifications }}">
250 <nav-notify-item events="{{ events }}" event="{{ event }}"> 249 <template if="{{ notification.event != null }}">
251 </nav-notify-item> 250 <nav-notify-event notifications="{{ notifications }}"
251 notification="{{ notification }}"
252 event="{{ notification.event }}"
253 notifyOnPause="{{ notifyOnPause }}">
254 </nav-notify-event>
255 </template>
256 <template if="{{ notification.exception != null }}">
257 <nav-notify-exception notifications="{{ notifications }}"
258 notification="{{ notification }}"
259 exception="{{ notification.exception }}"
260 stacktrace="{{ notification.stacktrace }}">
261 </nav-notify-exception>
262 </template>
252 </template> 263 </template>
253 </div> 264 </div>
254 </div> 265 </div>
255 </template> 266 </template>
256 </polymer-element> 267 </polymer-element>
257 268
258 <polymer-element name="nav-notify-item" extends="observatory-element"> 269 <polymer-element name="nav-notify-event" extends="observatory-element">
259 <template> 270 <template>
260 <style> 271 <style>
261 .item { 272 .item {
262 position: relative; 273 position: relative;
263 padding: 16px; 274 padding: 16px;
264 margin-top: 10px; 275 margin-top: 10px;
265 margin-right: 10px; 276 margin-right: 10px;
266 padding-right: 25px; 277 padding-right: 25px;
267 width: 225px; 278 width: 250px;
268 color: #ddd; 279 color: #ddd;
269 background: rgba(0,0,0,.6); 280 background: rgba(0,0,0,.6);
270 border: solid 2px white; 281 border: solid 2px white;
271 box-shadow: 0 0 5px black; 282 box-shadow: 0 0 5px black;
272 border-radius: 5px; 283 border-radius: 5px;
273 animation: fadein 1s; 284 animation: fadein 1s;
274 } 285 }
275 286
276 @keyframes fadein { 287 @keyframes fadein {
277 from { opacity: 0; } 288 from { opacity: 0; }
(...skipping 19 matching lines...) Expand all
297 border-radius: 9px; 308 border-radius: 9px;
298 color: white; 309 color: white;
299 font-size: 18px; 310 font-size: 18px;
300 cursor: pointer; 311 cursor: pointer;
301 text-align: center; 312 text-align: center;
302 } 313 }
303 a.boxclose:hover { 314 a.boxclose:hover {
304 background: rgba(255,255,255,0.5); 315 background: rgba(255,255,255,0.5);
305 } 316 }
306 </style> 317 </style>
307 <template if="{{ event.eventType == 'IsolateInterrupted' || 318 <template if="{{ event != null }}">
308 event.eventType == 'BreakpointReached' || 319 <template if="{{ notifyOnPause && event.isPauseEvent }}">
309 event.eventType == 'ExceptionThrown' }}"> 320 <div class="item">
310 <div class="item"> 321 Isolate
311 Isolate 322 <a class="link" on-click="{{ goto }}"
312 <a class="link" on-click="{{ goto }}" 323 _href="{{ gotoLink('/inspect', event.isolate) }}">{{ event.isolate. name }}</a>
313 _href="{{ gotoLink('/inspect', event.isolate) }}">{{ event.isolate.na me }}</a> 324 is paused
314 is paused 325 <template if="{{ event.eventType == 'PauseStart' }}">
315 <template if="{{ event.breakpoint != null }}"> 326 at isolate start
316 at breakpoint {{ event.breakpoint.number }} 327 </template>
317 </template> 328 <template if="{{ event.eventType == 'PauseExit' }}">
318 <template if="{{ event.eventType == 'ExceptionThrown' }}"> 329 at isolate exit
319 at exception 330 </template>
320 </template> 331 <template if="{{ event.breakpoint != null }}">
332 at breakpoint {{ event.breakpoint.number }}
333 </template>
334 <template if="{{ event.eventType == 'PauseException' }}">
335 due to exception
336 </template>
321 337
322 <br><br> 338 <br><br>
323 [<a class="link" on-click="{{ goto }}" 339 [<a class="link" on-click="{{ goto }}"
324 _href="{{ gotoLink('/debugger', event.isolate) }}">debug</a>] 340 _href="{{ gotoLink('/debugger', event.isolate) }}">debug</a>]
325 341
326 <a class="boxclose" on-click="{{ closeItem }}">&times;</a> 342 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
327 </div> 343 </div>
328 </template> 344 </template>
329 <template if="{{ event.eventType == 'VMDisconnected' }}"> 345 <template if="{{ event.eventType == 'ConnectionClosed' }}">
330 <div class="item"> 346 <div class="item">
331 Disconnected from VM 347 Disconnected from VM: {{ event.reason }}
332 <br><br> 348 <br><br>
333 <a class="boxclose" on-click="{{ closeItem }}">&times;</a> 349 [<a class="link" on-click="{{ goto }}"
334 </div> 350 _href="{{ gotoLink('/vm-connect') }}">Connect to a VM</a>]
335 </template> 351 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
336 <template if="{{ event.eventType == 'Inspect' }}"> 352 </div>
337 <div class="item"> 353 </template>
338 Inspect <any-service-ref ref="{{ event.inspectee }}"></any-service-ref> 354 <template if="{{ event.eventType == 'Inspect' }}">
339 <br><br> 355 <div class="item">
340 <a class="boxclose" on-click="{{ closeItem }}">&times;</a> 356 Inspect <any-service-ref ref="{{ event.inspectee }}"></any-service-ref >
341 </div> 357 <br><br>
358 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
359 </div>
360 </template>
342 </template> 361 </template>
343 </template> 362 </template>
344 </polymer-element> 363 </polymer-element>
364
365
366 <polymer-element name="nav-notify-exception" extends="observatory-element">
367 <template>
368 <style>
369 .item {
370 position: relative;
371 padding: 16px;
372 margin-top: 10px;
373 margin-right: 10px;
374 padding-right: 25px;
375 width: 250px;
376 color: #ddd;
377 background: rgba(0,0,0,.6);
378 border: solid 2px white;
379 box-shadow: 0 0 5px black;
380 border-radius: 5px;
381 animation: fadein 1s;
382 }
383
384 @keyframes fadein {
385 from { opacity: 0; }
386 to { opacity: 1; }
387 }
388
389 a.link {
390 color: white;
391 text-decoration: none;
392 }
393 a.link:hover {
394 text-decoration: underline;
395 }
396 .indent {
397 margin-left:20px;
398 }
399
400 a.boxclose {
401 position: absolute;
402 display: block;
403 top: 4px;
404 right: 4px;
405 height: 18px;
406 width: 18px;
407 line-height: 16px;
408 border-radius: 9px;
409 color: white;
410 font-size: 18px;
411 cursor: pointer;
412 text-align: center;
413 }
414 a.boxclose:hover {
415 background: rgba(255,255,255,0.5);
416 }
417 </style>
418 <template if="{{ isUnexpectedError }}">
419 <!-- TODO(turnidge): Add a file-a-bug link to this notification -->
420 <div class="item">
421 Unexpected exception:<br><br>
422 <div class="indent">{{ exception.toString() }}</div><br>
423 <template if="{{ stacktrace != null }}">
424 Stacktrace:<br><br>
425 <div class="indent">{{ stacktrace.toString() }}</div>
426 <br>
427 </template>
428 [<a class="link" on-click="{{ goto }}"
429 _href="{{ gotoLink('vm-connect') }}">Connect to a different VM</a>]
430 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
431 </div>
432 </template>
433 <template if="{{ isNetworkError }}">
434 <div class="item">
435 The request cannot be completed because the VM is currently
436 disconnected.
437 <br><br>
438 [<a class="link" on-click="{{ goto }}"
439 _href="{{ gotoLink('vm-connect') }}">Connect to a different VM</a>]
440 <a class="boxclose" on-click="{{ closeItem }}">&times;</a>
441 </div>
442 </template>
443 </template>
444 </polymer-element>
345 445
346 446
347 <script type="application/dart" src="nav_bar.dart"></script> 447 <script type="application/dart" src="nav_bar.dart"></script>
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/nav_bar.dart ('k') | runtime/observatory/lib/src/elements/object_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698