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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/elements/service_view.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 service_object_view_element; 5 library service_object_view_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:logging/logging.dart'; 8 import 'package:logging/logging.dart';
9 import 'package:observatory/service.dart'; 9 import 'package:observatory/service.dart';
10 import 'package:observatory/elements.dart'; 10 import 'package:observatory/elements.dart';
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 return element; 92 return element;
93 case 'StackTrace': 93 case 'StackTrace':
94 StackTraceElement element = new Element.tag('stack-trace'); 94 StackTraceElement element = new Element.tag('stack-trace');
95 element.trace = object; 95 element.trace = object;
96 return element; 96 return element;
97 case 'VM': 97 case 'VM':
98 VMViewElement element = new Element.tag('vm-view'); 98 VMViewElement element = new Element.tag('vm-view');
99 element.vm = object; 99 element.vm = object;
100 return element; 100 return element;
101 default: 101 default:
102 return null; 102 JsonViewElement element = new Element.tag('json-view');
103 element.map = object;
104 return element;
103 } 105 }
104 } 106 }
105 107
106 objectChanged(oldValue) { 108 objectChanged(oldValue) {
107 // Remove the current view. 109 // Remove the current view.
108 children.clear(); 110 children.clear();
109 if (object == null) { 111 if (object == null) {
110 Logger.root.info('Viewing null object.'); 112 Logger.root.info('Viewing null object.');
111 return; 113 return;
112 } 114 }
113 var type = object.serviceType; 115 var type = object.serviceType;
114 var element = _constructElementForObject(); 116 var element = _constructElementForObject();
115 if (element == null) { 117 if (element == null) {
116 Logger.root.info('Unable to find a view element for \'${type}\''); 118 Logger.root.info('Unable to find a view element for \'${type}\'');
117 return; 119 return;
118 } 120 }
119 children.add(element); 121 children.add(element);
120 Logger.root.info('Viewing object of \'${type}\''); 122 Logger.root.info('Viewing object of \'${type}\'');
121 } 123 }
122 } 124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698