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 io_view_element; | 5 library io_view_element; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'observatory_element.dart'; | 8 import 'observatory_element.dart'; |
9 import 'service_ref.dart'; | 9 import 'service_ref.dart'; |
10 import 'package:observatory/service.dart'; | 10 import 'package:observatory/service.dart'; |
11 import 'package:polymer/polymer.dart'; | 11 import 'package:polymer/polymer.dart'; |
12 | 12 |
13 @CustomTag('io-view') | 13 @CustomTag('io-view') |
14 class IOViewElement extends ObservatoryElement { | 14 class IOViewElement extends ObservatoryElement { |
15 @published ServiceMap io; | 15 @published ServiceMap io; |
16 | 16 |
17 IOViewElement.created() : super.created(); | 17 IOViewElement.created() : super.created(); |
18 | 18 |
19 void refresh(var done) { | 19 void refresh(var done) { |
20 io.reload().whenComplete(done); | 20 io.reload().whenComplete(done); |
21 } | 21 } |
22 } | 22 } |
23 | 23 |
| 24 @CustomTag('io-ref') |
| 25 class IORefElement extends ServiceRefElement { |
| 26 IORefElement.created() : super.created(); |
| 27 } |
| 28 |
24 @CustomTag('io-http-server-list-view') | 29 @CustomTag('io-http-server-list-view') |
25 class IOHttpServerListViewElement extends ObservatoryElement { | 30 class IOHttpServerListViewElement extends ObservatoryElement { |
26 @published ServiceMap list; | 31 @published ServiceMap list; |
27 | 32 |
28 IOHttpServerListViewElement.created() : super.created(); | 33 IOHttpServerListViewElement.created() : super.created(); |
29 | 34 |
30 void refresh(var done) { | 35 void refresh(var done) { |
31 list.reload().whenComplete(done); | 36 list.reload().whenComplete(done); |
32 } | 37 } |
33 } | 38 } |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 } | 227 } |
223 | 228 |
224 void leftView() { | 229 void leftView() { |
225 super.leftView(); | 230 super.leftView(); |
226 if (_updateTimer != null) { | 231 if (_updateTimer != null) { |
227 _updateTimer.cancel(); | 232 _updateTimer.cancel(); |
228 _updateTimer = null; | 233 _updateTimer = null; |
229 } | 234 } |
230 } | 235 } |
231 } | 236 } |
OLD | NEW |