Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: pkg/analysis_server/lib/src/status/get_handler.dart

Issue 1436343002: Status page indicator for contexts w/o .packages. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 bool first = true; 1293 bool first = true;
1294 folders.forEach((Folder folder) { 1294 folders.forEach((Folder folder) {
1295 if (first) { 1295 if (first) {
1296 first = false; 1296 first = false;
1297 } else { 1297 } else {
1298 buffer.write('<br>'); 1298 buffer.write('<br>');
1299 } 1299 }
1300 String key = folder.shortName; 1300 String key = folder.shortName;
1301 buffer.write(makeLink(CONTEXT_PATH, {CONTEXT_QUERY_PARAM: folder.path}, 1301 buffer.write(makeLink(CONTEXT_PATH, {CONTEXT_QUERY_PARAM: folder.path},
1302 key, _hasException(folderMap[folder]))); 1302 key, _hasException(folderMap[folder])));
1303 if (!folder.getChild('.packages').exists) {
1304 buffer.write(' <b>[No .packages file]</b>');
1305 }
1303 }); 1306 });
1304 // TODO(brianwilkerson) Add items for the SDK contexts (currently only one ). 1307 // TODO(brianwilkerson) Add items for the SDK contexts (currently only one ).
1305 buffer.write('</p>'); 1308 buffer.write('</p>');
1306 1309
1307 buffer.write('<p><b>Options</b></p>'); 1310 buffer.write('<p><b>Options</b></p>');
1308 buffer.write('<p>'); 1311 buffer.write('<p>');
1309 _writeOption( 1312 _writeOption(
1310 buffer, 'Analyze functon bodies', options.analyzeFunctionBodies); 1313 buffer, 'Analyze functon bodies', options.analyzeFunctionBodies);
1311 _writeOption(buffer, 'Cache size', options.cacheSize); 1314 _writeOption(buffer, 'Cache size', options.cacheSize);
1312 _writeOption( 1315 _writeOption(
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1937 */ 1940 */
1938 static String makeLink( 1941 static String makeLink(
1939 String path, Map<String, String> params, String innerHtml, 1942 String path, Map<String, String> params, String innerHtml,
1940 [bool hasError = false]) { 1943 [bool hasError = false]) {
1941 Uri uri = new Uri(path: path, queryParameters: params); 1944 Uri uri = new Uri(path: path, queryParameters: params);
1942 String href = HTML_ESCAPE.convert(uri.toString()); 1945 String href = HTML_ESCAPE.convert(uri.toString());
1943 String classAttribute = hasError ? ' class="error"' : ''; 1946 String classAttribute = hasError ? ' class="error"' : '';
1944 return '<a href="$href"$classAttribute>$innerHtml</a>'; 1947 return '<a href="$href"$classAttribute>$innerHtml</a>';
1945 } 1948 }
1946 } 1949 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698