| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 import 'log/log.dart'; | 9 import 'log/log.dart'; |
| 10 import 'page/log_page.dart'; | 10 import 'page/log_page.dart'; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 response.statusCode = HttpStatus.NOT_FOUND; | 179 response.statusCode = HttpStatus.NOT_FOUND; |
| 180 response.headers.contentType = | 180 response.headers.contentType = |
| 181 new ContentType("text", "html", charset: "utf-8"); | 181 new ContentType("text", "html", charset: "utf-8"); |
| 182 response.write( | 182 response.write( |
| 183 '<html><head></head><body><h3>Page not found: "${request.uri.path}".</h3
></body></html>'); | 183 '<html><head></head><body><h3>Page not found: "${request.uri.path}".</h3
></body></html>'); |
| 184 response.close(); | 184 response.close(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void _writeLogPage(HttpRequest request, StringBuffer buffer) { | 187 void _writeLogPage(HttpRequest request, StringBuffer buffer) { |
| 188 Map<String, String> parameterMap = getParameterMap(request); | 188 Map<String, String> parameterMap = getParameterMap(request); |
| 189 String groupId = parameterMap['group']; |
| 189 String startIndex = parameterMap['start']; | 190 String startIndex = parameterMap['start']; |
| 190 LogPage page = new LogPage(log); | 191 LogPage page = new LogPage(log); |
| 192 page.selectedGroup = EntryGroup.withId(groupId ?? 'nonTask'); |
| 191 if (startIndex != null) { | 193 if (startIndex != null) { |
| 192 page.pageStart = int.parse(startIndex); | 194 page.pageStart = int.parse(startIndex); |
| 193 } else { | 195 } else { |
| 194 page.pageStart = 0; | 196 page.pageStart = 0; |
| 195 } | 197 } |
| 196 page.pageLength = 25; | 198 page.pageLength = 25; |
| 197 page.writePage(buffer); | 199 page.writePage(buffer); |
| 198 } | 200 } |
| 199 | 201 |
| 200 /** | 202 /** |
| (...skipping 26 matching lines...) Expand all Loading... |
| 227 page.analysisStart = int.parse(analysisStart); | 229 page.analysisStart = int.parse(analysisStart); |
| 228 if (start != null) { | 230 if (start != null) { |
| 229 page.pageStart = int.parse(start); | 231 page.pageStart = int.parse(start); |
| 230 } else { | 232 } else { |
| 231 page.pageStart = 0; | 233 page.pageStart = 0; |
| 232 } | 234 } |
| 233 page.pageLength = 25; | 235 page.pageLength = 25; |
| 234 page.writePage(buffer); | 236 page.writePage(buffer); |
| 235 } | 237 } |
| 236 } | 238 } |
| OLD | NEW |