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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/elements/isolate_profile.dart

Issue 221263002: Miscellaneous Observatory UI improvements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 isolate_profile_element; 5 library isolate_profile_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'observatory_element.dart'; 8 import 'observatory_element.dart';
9 import 'package:logging/logging.dart'; 9 import 'package:logging/logging.dart';
10 import 'package:observatory/service.dart'; 10 import 'package:observatory/service.dart';
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 return 'padding-left: ${row.depth * 16}px;'; 227 return 'padding-left: ${row.depth * 16}px;';
228 } 228 }
229 229
230 @observable String coloring(TableTreeRow row) { 230 @observable String coloring(TableTreeRow row) {
231 const colors = const ['active', 'success', 'warning', 'danger', 'info']; 231 const colors = const ['active', 'success', 'warning', 'danger', 'info'];
232 var index = row.depth % colors.length; 232 var index = row.depth % colors.length;
233 return colors[index]; 233 return colors[index];
234 } 234 }
235 235
236 @observable void toggleExpanded(Event e, var detail, Element target) { 236 @observable void toggleExpanded(Event e, var detail, Element target) {
237 // We only want to expand a tree row if the target of the click is
238 // the table cell (passed in as target) or the span containing the
239 // expander symbol (#expand).
240 if ((e.target.id != 'expand') && (e.target != target)) {
241 // Target of click was not the expander span or the table cell.
242 return;
243 }
237 var row = target.parent; 244 var row = target.parent;
238 if (row is TableRowElement) { 245 if (row is TableRowElement) {
239 // Subtract 1 to get 0 based indexing. 246 // Subtract 1 to get 0 based indexing.
240 tree.toggle(row.rowIndex - 1); 247 tree.toggle(row.rowIndex - 1);
241 } 248 }
242 } 249 }
243
244 } 250 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698