OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 import 'package:observatory/models.dart' as M; |
| 6 |
| 7 /// Utility class for URIs generation. |
| 8 abstract class Uris { |
| 9 static String _isolatePage(String path, M.IsolateRef isolate, |
| 10 {M.ObjectRef object}) { |
| 11 return '#' + new Uri(path: path, queryParameters: { |
| 12 'isolateId': isolate.id, |
| 13 'objectId': object?.id |
| 14 }).toString(); |
| 15 } |
| 16 |
| 17 static String inspect(M.IsolateRef isolate, {M.ObjectRef object}) |
| 18 => _isolatePage('/inspect', isolate, object: object); |
| 19 static String debugger(M.IsolateRef isolate) |
| 20 => _isolatePage('/debugger', isolate); |
| 21 static String classTree(M.IsolateRef isolate) |
| 22 => _isolatePage('/class-tree', isolate); |
| 23 static String cpuProfiler(M.IsolateRef isolate) |
| 24 => _isolatePage('/profiler', isolate); |
| 25 static String cpuProfilerTable(M.IsolateRef isolate) |
| 26 => _isolatePage('/profiler-table', isolate); |
| 27 static String allocationProfiler(M.IsolateRef isolate) |
| 28 => _isolatePage('/allocation-profiler', isolate); |
| 29 static String heapMap(M.IsolateRef isolate) |
| 30 => _isolatePage('/heap-map', isolate); |
| 31 static String metrics(M.IsolateRef isolate) |
| 32 => _isolatePage('/metrics', isolate); |
| 33 static String heapSnapshot(M.IsolateRef isolate) |
| 34 => _isolatePage('/heap-snapshot', isolate); |
| 35 static String persistentHandles(M.IsolateRef isolate) |
| 36 => _isolatePage('/persistent-handles', isolate); |
| 37 static String ports(M.IsolateRef isolate) |
| 38 => _isolatePage('/ports', isolate); |
| 39 static String logging(M.IsolateRef isolate) |
| 40 => _isolatePage('/logging', isolate); |
| 41 static String vm() => '#/vm'; |
| 42 static String vmConnect() => '#/vm-connect'; |
| 43 } |
OLD | NEW |