Index: runtime/bin/vmservice/client/lib/src/elements/log_view.dart |
diff --git a/runtime/bin/vmservice/client/lib/src/elements/log_view.dart b/runtime/bin/vmservice/client/lib/src/elements/log_view.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1c2ca9ad8c19213ee4cc7ef6eba38541a2751544 |
--- /dev/null |
+++ b/runtime/bin/vmservice/client/lib/src/elements/log_view.dart |
@@ -0,0 +1,34 @@ |
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+library log_view_element; |
+ |
+import 'observatory_element.dart'; |
+import 'package:observatory/service.dart'; |
+ |
+import 'package:polymer/polymer.dart'; |
+ |
+@CustomTag('log-entry') |
+class LogEntryElement extends ObservatoryElement { |
+ @published ServiceMap entry; |
+ |
+ @observable String time; |
+ @observable String message; |
+ |
+ entryChanged(oldValue) { |
+ var t = new DateTime.fromMillisecondsSinceEpoch(entry['time']); |
+ time = '${t.hour}:${t.minute}:${t.second}'; |
+ message = entry['message']; |
+ } |
+ |
+ LogEntryElement.created() : super.created(); |
+} |
+ |
+ |
+ |
+@CustomTag('log-view') |
+class LogViewElement extends ObservatoryElement { |
+ @published ServiceMap log; |
+ LogViewElement.created() : super.created(); |
+} |