OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 library ports; |
| 6 |
| 7 import 'dart:async'; |
| 8 import 'dart:html'; |
| 9 import 'observatory_element.dart'; |
| 10 import 'package:observatory/app.dart'; |
| 11 import 'package:observatory/service.dart'; |
| 12 import 'package:polymer/polymer.dart'; |
| 13 |
| 14 @CustomTag('ports-page') |
| 15 class PortsPageElement extends ObservatoryElement { |
| 16 PortsPageElement.created() : super.created(); |
| 17 |
| 18 @observable Isolate isolate; |
| 19 @observable ServiceObject ports; |
| 20 |
| 21 void isolateChanged(oldValue) { |
| 22 if (isolate != null) { |
| 23 isolate.getPorts().then(_refreshView); |
| 24 } |
| 25 } |
| 26 |
| 27 Future refresh() { |
| 28 return isolate.getPorts().then(_refreshView); |
| 29 } |
| 30 |
| 31 _refreshView(ServiceObject object) { |
| 32 ports = object['ports']; |
| 33 } |
| 34 } |
OLD | NEW |