OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014, 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 log_view_element; |
| 6 |
| 7 import 'observatory_element.dart'; |
| 8 import 'package:observatory/service.dart'; |
| 9 |
| 10 import 'package:polymer/polymer.dart'; |
| 11 |
| 12 @CustomTag('log-entry') |
| 13 class LogEntryElement extends ObservatoryElement { |
| 14 @published ServiceMap entry; |
| 15 |
| 16 @observable String time; |
| 17 @observable String message; |
| 18 |
| 19 entryChanged(oldValue) { |
| 20 var t = new DateTime.fromMillisecondsSinceEpoch(entry['time']); |
| 21 time = '${t.hour}:${t.minute}:${t.second}'; |
| 22 message = entry['message']; |
| 23 } |
| 24 |
| 25 LogEntryElement.created() : super.created(); |
| 26 } |
| 27 |
| 28 |
| 29 |
| 30 @CustomTag('log-view') |
| 31 class LogViewElement extends ObservatoryElement { |
| 32 @published ServiceMap log; |
| 33 LogViewElement.created() : super.created(); |
| 34 } |
OLD | NEW |