OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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 logging_page; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 import 'dart:html'; | 6 import 'dart:html'; |
9 import 'package:logging/logging.dart'; | 7 import 'package:logging/logging.dart'; |
10 import 'package:observatory/models.dart' as M; | 8 import 'package:observatory/models.dart' as M; |
11 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; | 9 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; |
12 import 'package:observatory/src/elements/helpers/tag.dart'; | 10 import 'package:observatory/src/elements/helpers/tag.dart'; |
13 import 'package:observatory/utils.dart'; | 11 import 'package:observatory/utils.dart'; |
14 | 12 |
15 class LoggingListElement extends HtmlElement implements Renderable { | 13 class LoggingListElement extends HtmlElement implements Renderable { |
16 static const tag = const Tag<LoggingListElement>('logging-list'); | 14 static const tag = const Tag<LoggingListElement>('logging-list'); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 new SpanElement()..classes = ['time'] | 73 new SpanElement()..classes = ['time'] |
76 ..text = Utils.formatDateTime(logRecord['time']), | 74 ..text = Utils.formatDateTime(logRecord['time']), |
77 new SpanElement()..classes = ['message'] | 75 new SpanElement()..classes = ['message'] |
78 ..text = logRecord["message"].valueAsString | 76 ..text = logRecord["message"].valueAsString |
79 ] | 77 ] |
80 ).toList(); | 78 ).toList(); |
81 } | 79 } |
82 | 80 |
83 bool _shouldBeVisible(Map record) => _level.compareTo(record['level']) <= 0; | 81 bool _shouldBeVisible(Map record) => _level.compareTo(record['level']) <= 0; |
84 } | 82 } |
OLD | NEW |