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

Unified Diff: runtime/observatory/lib/src/elements/helpers/uris.dart

Issue 2168463004: Converted Observatory isolate-nav-menu element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed long line Created 4 years, 5 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
« no previous file with comments | « runtime/observatory/lib/service.dart ('k') | runtime/observatory/lib/src/elements/nav/isolate_menu.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/helpers/uris.dart
diff --git a/runtime/observatory/lib/src/elements/helpers/uris.dart b/runtime/observatory/lib/src/elements/helpers/uris.dart
new file mode 100644
index 0000000000000000000000000000000000000000..179a4ee59f6a4c91d420c78e5b0d86e51061eab7
--- /dev/null
+++ b/runtime/observatory/lib/src/elements/helpers/uris.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:observatory/models.dart' as M;
+
+/// Utility class for URIs generation.
+abstract class Uris {
+ static String _isolatePage(String path, M.IsolateRef isolate,
+ {M.ObjectRef object}) {
+ return '#' + new Uri(path: path, queryParameters: {
+ 'isolateId': isolate.id,
+ 'objectId': object?.id
+ }).toString();
+ }
+
+ static String inspect(M.IsolateRef isolate, {M.ObjectRef object})
+ => _isolatePage('/inspect', isolate, object: object);
+ static String debugger(M.IsolateRef isolate)
+ => _isolatePage('/debugger', isolate);
+ static String classTree(M.IsolateRef isolate)
+ => _isolatePage('/class-tree', isolate);
+ static String cpuProfiler(M.IsolateRef isolate)
+ => _isolatePage('/profiler', isolate);
+ static String cpuProfilerTable(M.IsolateRef isolate)
+ => _isolatePage('/profiler-table', isolate);
+ static String allocationProfiler(M.IsolateRef isolate)
+ => _isolatePage('/allocation-profiler', isolate);
+ static String heapMap(M.IsolateRef isolate)
+ => _isolatePage('/heap-map', isolate);
+ static String metrics(M.IsolateRef isolate)
+ => _isolatePage('/metrics', isolate);
+ static String heapSnapshot(M.IsolateRef isolate)
+ => _isolatePage('/heap-snapshot', isolate);
+ static String persistentHandles(M.IsolateRef isolate)
+ => _isolatePage('/persistent-handles', isolate);
+ static String ports(M.IsolateRef isolate)
+ => _isolatePage('/ports', isolate);
+ static String logging(M.IsolateRef isolate)
+ => _isolatePage('/logging', isolate);
+ static String vm() => '#/vm';
+ static String vmConnect() => '#/vm-connect';
+}
« no previous file with comments | « runtime/observatory/lib/service.dart ('k') | runtime/observatory/lib/src/elements/nav/isolate_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698