Index: runtime/bin/vmservice/client/lib/src/elements/io_view.dart |
diff --git a/runtime/bin/vmservice/client/lib/src/elements/io_view.dart b/runtime/bin/vmservice/client/lib/src/elements/io_view.dart |
index 9e93387e4137c5a295a285cac7b8e102450f770b..c0196b240c0860f51656bcb41926a26f344cdd99 100644 |
--- a/runtime/bin/vmservice/client/lib/src/elements/io_view.dart |
+++ b/runtime/bin/vmservice/client/lib/src/elements/io_view.dart |
@@ -77,6 +77,45 @@ class IOHttpServerViewElement extends ObservatoryElement { |
} |
} |
+@CustomTag('io-http-server-connection-view') |
+class IOHttpServerConnectionViewElement extends ObservatoryElement { |
+ @published ServiceMap connection; |
+ Timer _updateTimer; |
+ |
+ IOHttpServerConnectionViewElement.created() : super.created(); |
+ |
+ void refresh(var done) { |
+ connection.reload().whenComplete(done); |
+ } |
+ |
+ void _updateHttpServer() { |
+ refresh(() { |
+ if (_updateTimer != null) { |
+ _updateTimer = new Timer(new Duration(seconds: 1), _updateHttpServer); |
+ } |
+ }); |
+ } |
+ |
+ void enteredView() { |
+ super.enteredView(); |
+ // Start a timer to update the isolate summary once a second. |
+ _updateTimer = new Timer(new Duration(seconds: 1), _updateHttpServer); |
+ } |
+ |
+ void leftView() { |
+ super.leftView(); |
+ if (_updateTimer != null) { |
+ _updateTimer.cancel(); |
+ _updateTimer = null; |
+ } |
+ } |
+} |
+ |
+@CustomTag('io-http-server-connection-ref') |
+class IOHttpServerConnectionRefElement extends ServiceRefElement { |
+ IOHttpServerConnectionRefElement.created() : super.created(); |
+} |
+ |
@CustomTag('io-socket-ref') |
class IOSocketRefElement extends ServiceRefElement { |
IOSocketRefElement.created() : super.created(); |