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; |
(...skipping 10 matching lines...) Expand all Loading... |
21 NavBarElement.created() : super.created(); | 21 NavBarElement.created() : super.created(); |
22 } | 22 } |
23 | 23 |
24 @CustomTag('top-nav-menu') | 24 @CustomTag('top-nav-menu') |
25 class TopNavMenuElement extends ObservatoryElement { | 25 class TopNavMenuElement extends ObservatoryElement { |
26 @published bool last = false; | 26 @published bool last = false; |
27 | 27 |
28 TopNavMenuElement.created() : super.created(); | 28 TopNavMenuElement.created() : super.created(); |
29 } | 29 } |
30 | 30 |
31 @CustomTag('vm-nav-menu') | |
32 class VMNavMenuElement extends ObservatoryElement { | |
33 @published bool last = false; | |
34 @published VM vm; | |
35 | |
36 String nameAndAddress(name, target) { | |
37 if (name != null && target != null) { | |
38 return '${name}@${target.networkAddress}'; | |
39 } else { | |
40 return '<initializing>'; | |
41 } | |
42 } | |
43 | |
44 VMNavMenuElement.created() : super.created(); | |
45 } | |
46 | |
47 @CustomTag('isolate-nav-menu') | 31 @CustomTag('isolate-nav-menu') |
48 class IsolateNavMenuElement extends ObservatoryElement { | 32 class IsolateNavMenuElement extends ObservatoryElement { |
49 @published bool last = false; | 33 @published bool last = false; |
50 @published Isolate isolate; | 34 @published Isolate isolate; |
51 | 35 |
52 IsolateNavMenuElement.created() : super.created(); | 36 IsolateNavMenuElement.created() : super.created(); |
53 } | 37 } |
54 | 38 |
55 @CustomTag('library-nav-menu') | 39 @CustomTag('library-nav-menu') |
56 class LibraryNavMenuElement extends ObservatoryElement { | 40 class LibraryNavMenuElement extends ObservatoryElement { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 @observable get isUnexpectedError { | 93 @observable get isUnexpectedError { |
110 return (exception is! NetworkRpcException); | 94 return (exception is! NetworkRpcException); |
111 } | 95 } |
112 | 96 |
113 void closeItem(MouseEvent e, var detail, Element target) { | 97 void closeItem(MouseEvent e, var detail, Element target) { |
114 notifications.remove(notification); | 98 notifications.remove(notification); |
115 } | 99 } |
116 | 100 |
117 NavNotifyExceptionElement.created() : super.created(); | 101 NavNotifyExceptionElement.created() : super.created(); |
118 } | 102 } |
OLD | NEW |