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

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

Issue 2204943005: Dynamic host and port in vm-connect element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Removed dump.json Created 4 years, 4 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 | « no previous file | runtime/observatory/lib/src/elements/vm_connect_target.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/vm_connect.dart
diff --git a/runtime/observatory/lib/src/elements/vm_connect.dart b/runtime/observatory/lib/src/elements/vm_connect.dart
index 8539921608b9b833193bb0eec9848d351614262d..65487cf49402e4c0e6947cf16c3e068f53ded760 100644
--- a/runtime/observatory/lib/src/elements/vm_connect.dart
+++ b/runtime/observatory/lib/src/elements/vm_connect.dart
@@ -16,7 +16,7 @@ import 'package:observatory/src/elements/nav/top_menu.dart';
import 'package:observatory/src/elements/view_footer.dart';
import 'package:observatory/src/elements/vm_connect_target.dart';
-class VMConnectElement extends HtmlElement implements Renderable{
+class VMConnectElement extends HtmlElement implements Renderable {
static const tag = const Tag<VMConnectElement>('vm-connect',
dependencies: const [NavBarElement.tag,
NavTopMenuElement.tag,
@@ -67,6 +67,8 @@ class VMConnectElement extends HtmlElement implements Renderable{
}
void render() {
+ final host = window.location.hostname;
+ final port = window.location.port;
children = [
new NavBarElement(queue: _r.queue)
..children = [
@@ -125,7 +127,7 @@ class VMConnectElement extends HtmlElement implements Renderable{
new PreElement()
..classes = ['well']
..text = 'Request a crash dump with:\n'
- '\'curl localhost:8181/_getCrashDump > dump.json\'',
+ '\'curl $host:$port/_getCrashDump > dump.json\'',
new HRElement()
]
],
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/vm_connect_target.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698