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