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

Unified Diff: runtime/observatory/lib/src/elements/metrics.dart

Issue 2345023003: Use dartfmt on Observatory code (Closed)
Patch Set: merge 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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/lib/src/elements/metrics.dart
diff --git a/runtime/observatory/lib/src/elements/metrics.dart b/runtime/observatory/lib/src/elements/metrics.dart
index 12a3ef641a9b48149a2123e7912696f84c7670c1..4c769c7342f4861e304173271069d6b88c0d9494 100644
--- a/runtime/observatory/lib/src/elements/metrics.dart
+++ b/runtime/observatory/lib/src/elements/metrics.dart
@@ -20,16 +20,16 @@ import 'package:observatory/src/elements/nav/top_menu.dart';
import 'package:observatory/src/elements/nav/vm_menu.dart';
class MetricsPageElement extends HtmlElement implements Renderable {
- static const tag = const Tag<MetricsPageElement>('metrics-page',
- dependencies: const [
- MetricDetailsElement.tag,
- MetricGraphElement.tag,
- NavTopMenuElement.tag,
- NavVMMenuElement.tag,
- NavIsolateMenuElement.tag,
- NavRefreshElement.tag,
- NavNotifyElement.tag,
- ]);
+ static const tag =
+ const Tag<MetricsPageElement>('metrics-page', dependencies: const [
+ MetricDetailsElement.tag,
+ MetricGraphElement.tag,
+ NavTopMenuElement.tag,
+ NavVMMenuElement.tag,
+ NavIsolateMenuElement.tag,
+ NavRefreshElement.tag,
+ NavNotifyElement.tag,
+ ]);
RenderingScheduler<MetricsPageElement> _r;
@@ -43,16 +43,17 @@ class MetricsPageElement extends HtmlElement implements Renderable {
List<M.Metric> _available;
M.Metric _selected;
-
M.VMRef get vm => _vm;
M.IsolateRef get isolate => _isolate;
M.NotificationRepository get notifications => _notifications;
- factory MetricsPageElement(M.VM vm, M.IsolateRef isolate,
- M.EventRepository events,
- M.NotificationRepository notifications,
- M.MetricRepository metrics,
- {RenderingQueue queue}) {
+ factory MetricsPageElement(
+ M.VM vm,
+ M.IsolateRef isolate,
+ M.EventRepository events,
+ M.NotificationRepository notifications,
+ M.MetricRepository metrics,
+ {RenderingQueue queue}) {
assert(vm != null);
assert(isolate != null);
assert(events != null);
@@ -91,42 +92,50 @@ class MetricsPageElement extends HtmlElement implements Renderable {
new NavIsolateMenuElement(_isolate, _events, queue: _r.queue),
navMenu('metrics'),
new NavRefreshElement(queue: _r.queue)
- ..onRefresh.listen((e) {
- e.element.disabled = true;
- _refresh();
- }),
+ ..onRefresh.listen((e) {
+ e.element.disabled = true;
+ _refresh();
+ }),
new NavNotifyElement(_notifications, queue: _r.queue)
]),
- new DivElement()..classes = ['content-centered-big']
+ new DivElement()
+ ..classes = ['content-centered-big']
..children = [
new HeadingElement.h2()..text = 'Metrics',
new HRElement(),
- new DivElement()..classes = ['memberList']
+ new DivElement()
+ ..classes = ['memberList']
..children = [
- new DivElement()..classes = ['memberItem']
+ new DivElement()
+ ..classes = ['memberItem']
..children = [
- new DivElement()..classes = ['memberName']
+ new DivElement()
+ ..classes = ['memberName']
..text = 'Metric',
- new DivElement()..classes = ['memberValue']
+ new DivElement()
+ ..classes = ['memberValue']
..children = _available == null
- ? [new SpanElement()..text = 'Loading..']
- : _createMetricSelect()
+ ? [new SpanElement()..text = 'Loading..']
+ : _createMetricSelect()
]
],
new HRElement(),
new DivElement()
- ..children = _selected == null ? const []
- : [
- new MetricDetailsElement(_isolate, _selected, _metrics,
- queue: _r.queue)
- ],
+ ..children = _selected == null
+ ? const []
+ : [
+ new MetricDetailsElement(_isolate, _selected, _metrics,
+ queue: _r.queue)
+ ],
new HRElement(),
- new DivElement()..classes = ['graph']
- ..children = _selected == null ? const []
- : [
- new MetricGraphElement(_isolate, _selected, _metrics,
- queue: _r.queue)
- ]
+ new DivElement()
+ ..classes = ['graph']
+ ..children = _selected == null
+ ? const []
+ : [
+ new MetricGraphElement(_isolate, _selected, _metrics,
+ queue: _r.queue)
+ ]
],
];
}
@@ -145,14 +154,14 @@ class MetricsPageElement extends HtmlElement implements Renderable {
s = new SelectElement()
..value = _selected.name
..children = _available.map((metric) {
- return new OptionElement(value: metric.name,
- selected: _selected == metric)
- ..text = metric.name;
- }).toList(growable: false)
+ return new OptionElement(
+ value: metric.name,
+ selected: _selected == metric)..text = metric.name;
+ }).toList(growable: false)
..onChange.listen((_) {
- _selected = _available[s.selectedIndex];
- _r.dirty();
- })
+ _selected = _available[s.selectedIndex];
+ _r.dirty();
+ })
];
}
}
« no previous file with comments | « runtime/observatory/lib/src/elements/metric/graph.dart ('k') | runtime/observatory/lib/src/elements/nav/class_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698