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:async'; | 7 import 'dart:async'; |
8 import 'dart:html' hide Notification; | 8 import 'dart:html' hide Notification; |
9 import 'observatory_element.dart'; | 9 import 'observatory_element.dart'; |
10 import 'package:observatory/service.dart'; | 10 import 'package:observatory/service.dart'; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 @published bool last = false; | 69 @published bool last = false; |
70 | 70 |
71 TopNavMenuElement.created() : super.created(); | 71 TopNavMenuElement.created() : super.created(); |
72 } | 72 } |
73 | 73 |
74 @CustomTag('vm-nav-menu') | 74 @CustomTag('vm-nav-menu') |
75 class VMNavMenuElement extends ObservatoryElement { | 75 class VMNavMenuElement extends ObservatoryElement { |
76 @published bool last = false; | 76 @published bool last = false; |
77 @published VM vm; | 77 @published VM vm; |
78 | 78 |
| 79 String nameAndAddress(name, target) { |
| 80 if (name != null && target != null) { |
| 81 return '${name}@${target.networkAddress}'; |
| 82 } else { |
| 83 return '<initializing>'; |
| 84 } |
| 85 } |
| 86 |
79 VMNavMenuElement.created() : super.created(); | 87 VMNavMenuElement.created() : super.created(); |
80 } | 88 } |
81 | 89 |
82 @CustomTag('isolate-nav-menu') | 90 @CustomTag('isolate-nav-menu') |
83 class IsolateNavMenuElement extends ObservatoryElement { | 91 class IsolateNavMenuElement extends ObservatoryElement { |
84 @published bool last = false; | 92 @published bool last = false; |
85 @published Isolate isolate; | 93 @published Isolate isolate; |
86 | 94 |
87 IsolateNavMenuElement.created() : super.created(); | 95 IsolateNavMenuElement.created() : super.created(); |
88 } | 96 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 @observable get isUnexpectedError { | 152 @observable get isUnexpectedError { |
145 return (exception is! NetworkRpcException); | 153 return (exception is! NetworkRpcException); |
146 } | 154 } |
147 | 155 |
148 void closeItem(MouseEvent e, var detail, Element target) { | 156 void closeItem(MouseEvent e, var detail, Element target) { |
149 notifications.remove(notification); | 157 notifications.remove(notification); |
150 } | 158 } |
151 | 159 |
152 NavNotifyExceptionElement.created() : super.created(); | 160 NavNotifyExceptionElement.created() : super.created(); |
153 } | 161 } |
OLD | NEW |