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

Side by Side Diff: runtime/observatory/lib/src/elements/isolate_reconnect.dart

Issue 2310003004: Removed polymer & mirror from Observatory (Closed)
Patch Set: Fixed crash in heap-map page Created 4 years, 3 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
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 isolate_reconnect_element; 5 library isolate_reconnect_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'package:observatory/models.dart' as M; 9 import 'package:observatory/models.dart' as M;
10 import 'package:observatory/src/elements/helpers/nav_bar.dart';
10 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 11 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
11 import 'package:observatory/src/elements/helpers/tag.dart'; 12 import 'package:observatory/src/elements/helpers/tag.dart';
12 import 'package:observatory/src/elements/helpers/uris.dart'; 13 import 'package:observatory/src/elements/helpers/uris.dart';
13 import 'package:observatory/src/elements/nav/bar.dart';
14 import 'package:observatory/src/elements/nav/notify.dart'; 14 import 'package:observatory/src/elements/nav/notify.dart';
15 import 'package:observatory/src/elements/nav/top_menu.dart'; 15 import 'package:observatory/src/elements/nav/top_menu.dart';
16 import 'package:observatory/src/elements/view_footer.dart'; 16 import 'package:observatory/src/elements/view_footer.dart';
17 17
18 class IsolateReconnectElement extends HtmlElement implements Renderable{ 18 class IsolateReconnectElement extends HtmlElement implements Renderable{
19 static const tag = const Tag<IsolateReconnectElement>('isolate-reconnect', 19 static const tag = const Tag<IsolateReconnectElement>('isolate-reconnect',
20 dependencies: const [NavBarElement.tag, 20 dependencies: const [NavTopMenuElement.tag,
21 NavTopMenuElement.tag,
22 NavNotifyElement.tag, 21 NavNotifyElement.tag,
23 ViewFooterElement.tag]); 22 ViewFooterElement.tag]);
24 23
25 RenderingScheduler _r; 24 RenderingScheduler _r;
26 25
27 Stream<RenderedEvent<IsolateReconnectElement>> get onRendered => 26 Stream<RenderedEvent<IsolateReconnectElement>> get onRendered =>
28 _r.onRendered; 27 _r.onRendered;
29 28
30 M.VM _vm; 29 M.VM _vm;
31 String _missing; 30 String _missing;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 @override 70 @override
72 void detached() { 71 void detached() {
73 super.detached(); 72 super.detached();
74 children = []; 73 children = [];
75 _r.disable(notify: true); 74 _r.disable(notify: true);
76 _subscription.cancel(); 75 _subscription.cancel();
77 } 76 }
78 77
79 void render() { 78 void render() {
80 children = [ 79 children = [
81 new NavBarElement(queue: _r.queue) 80 navBar([
82 ..children = [ 81 new NavTopMenuElement(queue: _r.queue),
83 new NavTopMenuElement(last: true, queue: _r.queue), 82 new NavNotifyElement(_notifications, queue: _r.queue)
84 new NavNotifyElement(_notifications, queue: _r.queue) 83 ]),
85 ],
86 new DivElement() 84 new DivElement()
87 ..classes = ['content-centered'] 85 ..classes = ['content-centered']
88 ..children = [ 86 ..children = [
89 new HeadingElement.h1()..text = 'Isolate $_missing no longer exists', 87 new HeadingElement.h1()..text = 'Isolate $_missing no longer exists',
90 new BRElement(), new HRElement(), 88 new BRElement(), new HRElement(),
91 new DivElement()..classes = ['memberList'] 89 new DivElement()..classes = ['memberList']
92 ..children = (_vm.isolates.map((isolate) { 90 ..children = (_vm.isolates.map((isolate) {
93 final query = new Map.from(_uri.queryParameters); 91 final query = new Map.from(_uri.queryParameters);
94 query['isolateId'] = isolate.id; 92 query['isolateId'] = isolate.id;
95 final href = new Uri(path: _uri.path, queryParameters: query); 93 final href = new Uri(path: _uri.path, queryParameters: query);
96 return new DivElement()..classes = ['memberItem', 'doubleSpaced'] 94 return new DivElement()..classes = ['memberItem', 'doubleSpaced']
97 ..children = [ 95 ..children = [
98 new SpanElement()..text = 'Continue in ', 96 new SpanElement()..text = 'Continue in ',
99 new AnchorElement(href: '#$href')..classes = ['isolate-link'] 97 new AnchorElement(href: '#$href')..classes = ['isolate-link']
100 ..text = '${isolate.id} (${isolate.name})' 98 ..text = '${isolate.id} (${isolate.name})'
101 ]; 99 ];
102 }).toList()..add( 100 }).toList()..add(
103 new DivElement()..classes = ['memberItem', 'doubleSpaced'] 101 new DivElement()..classes = ['memberItem', 'doubleSpaced']
104 ..children = [ 102 ..children = [
105 new SpanElement()..text = 'Go to ', 103 new SpanElement()..text = 'Go to ',
106 new AnchorElement(href: Uris.vm()) 104 new AnchorElement(href: Uris.vm())
107 ..text = 'isolates summary', 105 ..text = 'isolates summary',
108 ] 106 ]
109 )) 107 ))
110 ], 108 ],
111 new ViewFooterElement(queue: _r.queue) 109 new ViewFooterElement(queue: _r.queue)
112 ]; 110 ];
113 } 111 }
114 } 112 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/instance_view.dart ('k') | runtime/observatory/lib/src/elements/isolate_ref.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698