| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 persitent_handles_page; | 5 library persitent_handles_page; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'observatory_element.dart'; | 9 import 'observatory_element.dart'; |
| 10 import 'package:observatory/app.dart'; | 10 import 'package:observatory/app.dart'; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 cell = tr.insertCell(-1); | 93 cell = tr.insertCell(-1); |
| 94 cell = tr.insertCell(-1); | 94 cell = tr.insertCell(-1); |
| 95 cell = tr.insertCell(-1); | 95 cell = tr.insertCell(-1); |
| 96 | 96 |
| 97 // Add spacer. | 97 // Add spacer. |
| 98 cell = tr.insertCell(-1); | 98 cell = tr.insertCell(-1); |
| 99 cell.classes.add('left-border-spacer'); | 99 cell.classes.add('left-border-spacer'); |
| 100 | 100 |
| 101 // Add class ref. | 101 // Add class ref. |
| 102 cell = tr.insertCell(-1); | 102 cell = tr.insertCell(-1); |
| 103 AnyServiceRefElement objectRef = new Element.tag('any-service-ref'); | 103 AnyServiceRefElementWrapper objectRef = new Element.tag('any-service-ref'); |
| 104 cell.children.add(objectRef); | 104 cell.children.add(objectRef); |
| 105 | 105 |
| 106 // Add row to table. | 106 // Add row to table. |
| 107 tableBody.children.add(tr); | 107 tableBody.children.add(tr); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void _fillDomRow(TableRowElement tr, int rowIndex) { | 110 void _fillDomRow(TableRowElement tr, int rowIndex) { |
| 111 var row = rows[rowIndex]; | 111 var row = rows[rowIndex]; |
| 112 | 112 |
| 113 for (var i = 0; i < row.values.length - 2; i++) { | 113 for (var i = 0; i < row.values.length - 2; i++) { |
| 114 var cell = tr.children[i]; | 114 var cell = tr.children[i]; |
| 115 cell.title = row.values[i].toString(); | 115 cell.title = row.values[i].toString(); |
| 116 cell.text = getFormattedValue(rowIndex, i); | 116 cell.text = getFormattedValue(rowIndex, i); |
| 117 cell.style.paddingLeft = '1em'; | 117 cell.style.paddingLeft = '1em'; |
| 118 cell.style.paddingRight = '1em'; | 118 cell.style.paddingRight = '1em'; |
| 119 } | 119 } |
| 120 | 120 |
| 121 final int objectIndex = row.values.length - 1; | 121 final int objectIndex = row.values.length - 1; |
| 122 AnyServiceRefElement objectRef = tr.children[objectIndex].children[0]; | 122 AnyServiceRefElementWrapper objectRef = tr.children[objectIndex].children[0]
; |
| 123 objectRef.ref = row.values[objectIndex]; | 123 objectRef.ref = row.values[objectIndex]; |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 @CustomTag('persistent-handles-page') | 128 @CustomTag('persistent-handles-page') |
| 129 class PersistentHandlesPageElement extends ObservatoryElement { | 129 class PersistentHandlesPageElement extends ObservatoryElement { |
| 130 PersistentHandlesPageElement.created() : super.created(); | 130 PersistentHandlesPageElement.created() : super.created(); |
| 131 | 131 |
| 132 @observable Isolate isolate; | 132 @observable Isolate isolate; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 weakPersistentHandlesTable.sortDescending = true; | 169 weakPersistentHandlesTable.sortDescending = true; |
| 170 } else { | 170 } else { |
| 171 weakPersistentHandlesTable.sortDescending = | 171 weakPersistentHandlesTable.sortDescending = |
| 172 !weakPersistentHandlesTable.sortDescending; | 172 !weakPersistentHandlesTable.sortDescending; |
| 173 } | 173 } |
| 174 weakPersistentHandlesTable.sortAndDisplay( | 174 weakPersistentHandlesTable.sortAndDisplay( |
| 175 _weakPersistentHandlesTableBody); | 175 _weakPersistentHandlesTableBody); |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 } | 178 } |
| OLD | NEW |