OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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 analysis_server.src.status.get_handler; | 5 library analysis_server.src.status.get_handler; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 import 'dart:convert'; | 9 import 'dart:convert'; |
10 import 'dart:io'; | 10 import 'dart:io'; |
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1700 buffer.write(makeLink(CONTEXT_DIAGNOSTICS_PATH, | 1700 buffer.write(makeLink(CONTEXT_DIAGNOSTICS_PATH, |
1701 {CONTEXT_QUERY_PARAM: folder.path}, 'diagnostics')); | 1701 {CONTEXT_QUERY_PARAM: folder.path}, 'diagnostics')); |
1702 buffer.write(']</b></small>'); | 1702 buffer.write(']</b></small>'); |
1703 if (!folder.getChild('.packages').exists) { | 1703 if (!folder.getChild('.packages').exists) { |
1704 buffer.write(' <small>[no .packages file]</small>'); | 1704 buffer.write(' <small>[no .packages file]</small>'); |
1705 } | 1705 } |
1706 }); | 1706 }); |
1707 // TODO(brianwilkerson) Add items for the SDK contexts (currently only one
). | 1707 // TODO(brianwilkerson) Add items for the SDK contexts (currently only one
). |
1708 buffer.write('</p>'); | 1708 buffer.write('</p>'); |
1709 | 1709 |
1710 int freq = AnalysisServer.performOperationDelayFreqency; | 1710 int freq = AnalysisServer.performOperationDelayFrequency; |
1711 String delay = freq > 0 ? '1 ms every $freq ms' : 'off'; | 1711 String delay = freq > 0 ? '1 ms every $freq ms' : 'off'; |
1712 | 1712 |
1713 buffer.write('<p><b>Performance Data</b></p>'); | 1713 buffer.write('<p><b>Performance Data</b></p>'); |
1714 buffer.write('<p>Perform operation delay: $delay</p>'); | 1714 buffer.write('<p>Perform operation delay: $delay</p>'); |
1715 buffer.write('<p>'); | 1715 buffer.write('<p>'); |
1716 buffer.write(makeLink(ANALYSIS_PERFORMANCE_PATH, {}, 'Task data')); | 1716 buffer.write(makeLink(ANALYSIS_PERFORMANCE_PATH, {}, 'Task data')); |
1717 buffer.write('</p>'); | 1717 buffer.write('</p>'); |
1718 }, (StringBuffer buffer) { | 1718 }, (StringBuffer buffer) { |
1719 _writeSubscriptionMap( | 1719 _writeSubscriptionMap( |
1720 buffer, AnalysisService.VALUES, analysisServer.analysisServices); | 1720 buffer, AnalysisService.VALUES, analysisServer.analysisServices); |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2483 */ | 2483 */ |
2484 static String makeLink( | 2484 static String makeLink( |
2485 String path, Map<String, String> params, String innerHtml, | 2485 String path, Map<String, String> params, String innerHtml, |
2486 [bool hasError = false]) { | 2486 [bool hasError = false]) { |
2487 Uri uri = new Uri(path: path, queryParameters: params); | 2487 Uri uri = new Uri(path: path, queryParameters: params); |
2488 String href = HTML_ESCAPE.convert(uri.toString()); | 2488 String href = HTML_ESCAPE.convert(uri.toString()); |
2489 String classAttribute = hasError ? ' class="error"' : ''; | 2489 String classAttribute = hasError ? ' class="error"' : ''; |
2490 return '<a href="$href"$classAttribute>$innerHtml</a>'; | 2490 return '<a href="$href"$classAttribute>$innerHtml</a>'; |
2491 } | 2491 } |
2492 } | 2492 } |
OLD | NEW |