| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library nav_bar_element; | 5 library nav_bar_element; |
| 6 | 6 |
| 7 import 'dart:html' hide Notification; | 7 import 'dart:html' hide Notification; |
| 8 import 'observatory_element.dart'; | 8 import 'observatory_element.dart'; |
| 9 import 'package:observatory/service.dart'; | 9 import 'package:observatory/service.dart'; |
| 10 import 'package:observatory/app.dart' show Notification; | 10 import 'package:observatory/app.dart' show Notification; |
| 11 import 'package:polymer/polymer.dart'; | 11 import 'package:polymer/polymer.dart'; |
| 12 | 12 |
| 13 @CustomTag('vm-nav-menu') | |
| 14 class VMNavMenuElement extends ObservatoryElement { | |
| 15 @published bool last = false; | |
| 16 @published VM vm; | |
| 17 | |
| 18 String nameAndAddress(name, target) { | |
| 19 if (name != null && target != null) { | |
| 20 return '${name}@${target.networkAddress}'; | |
| 21 } else { | |
| 22 return '<initializing>'; | |
| 23 } | |
| 24 } | |
| 25 | |
| 26 VMNavMenuElement.created() : super.created(); | |
| 27 } | |
| 28 | |
| 29 @CustomTag('library-nav-menu') | 13 @CustomTag('library-nav-menu') |
| 30 class LibraryNavMenuElement extends ObservatoryElement { | 14 class LibraryNavMenuElement extends ObservatoryElement { |
| 31 @published Library library; | 15 @published Library library; |
| 32 @published bool last = false; | 16 @published bool last = false; |
| 33 | 17 |
| 34 LibraryNavMenuElement.created() : super.created(); | 18 LibraryNavMenuElement.created() : super.created(); |
| 35 } | 19 } |
| 36 | 20 |
| 37 @CustomTag('class-nav-menu') | 21 @CustomTag('class-nav-menu') |
| 38 class ClassNavMenuElement extends ObservatoryElement { | 22 class ClassNavMenuElement extends ObservatoryElement { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 @observable get isUnexpectedError { | 67 @observable get isUnexpectedError { |
| 84 return (exception is! NetworkRpcException); | 68 return (exception is! NetworkRpcException); |
| 85 } | 69 } |
| 86 | 70 |
| 87 void closeItem(MouseEvent e, var detail, Element target) { | 71 void closeItem(MouseEvent e, var detail, Element target) { |
| 88 notifications.remove(notification); | 72 notifications.remove(notification); |
| 89 } | 73 } |
| 90 | 74 |
| 91 NavNotifyExceptionElement.created() : super.created(); | 75 NavNotifyExceptionElement.created() : super.created(); |
| 92 } | 76 } |
| OLD | NEW |