| OLD | NEW |
| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 if (!shouldDisplayChild(childNode, threshold)) { | 74 if (!shouldDisplayChild(childNode, threshold)) { |
| 75 continue; | 75 continue; |
| 76 } | 76 } |
| 77 var row = new ProfileCodeTrieNodeTreeRow(profile, root, childNode, this); | 77 var row = new ProfileCodeTrieNodeTreeRow(profile, root, childNode, this); |
| 78 children.add(row); | 78 children.add(row); |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 | 81 |
| 82 void onHide() { | 82 void onHide() { |
| 83 } | 83 } |
| 84 |
| 85 bool hasChildren() { |
| 86 return node.children.length > 0; |
| 87 } |
| 84 } | 88 } |
| 85 | 89 |
| 86 /// Displays an IsolateProfile | 90 /// Displays an IsolateProfile |
| 87 @CustomTag('isolate-profile') | 91 @CustomTag('isolate-profile') |
| 88 class IsolateProfileElement extends ObservatoryElement { | 92 class IsolateProfileElement extends ObservatoryElement { |
| 89 IsolateProfileElement.created() : super.created(); | 93 IsolateProfileElement.created() : super.created(); |
| 90 @published ServiceMap profile; | 94 @published ServiceMap profile; |
| 91 @observable bool hideTagsChecked; | 95 @observable bool hideTagsChecked; |
| 92 @observable String sampleCount = ''; | 96 @observable String sampleCount = ''; |
| 93 @observable String refreshTime = ''; | 97 @observable String refreshTime = ''; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 if (row is TableRowElement) { | 194 if (row is TableRowElement) { |
| 191 // Subtract 1 to get 0 based indexing. | 195 // Subtract 1 to get 0 based indexing. |
| 192 try { | 196 try { |
| 193 tree.toggle(row.rowIndex - 1); | 197 tree.toggle(row.rowIndex - 1); |
| 194 } catch (e, stackTrace) { | 198 } catch (e, stackTrace) { |
| 195 Logger.root.warning('toggleExpanded', e, stackTrace); | 199 Logger.root.warning('toggleExpanded', e, stackTrace); |
| 196 } | 200 } |
| 197 } | 201 } |
| 198 } | 202 } |
| 199 } | 203 } |
| OLD | NEW |