mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 06:20:13 +00:00
Dynamic host and port in vm-connect element
Fixes https://github.com/dart-lang/sdk/issues/24014 R=johnmccutchan@google.com Review URL: https://codereview.chromium.org/2204943005 .
This commit is contained in:
parent
978abe4e32
commit
f151384596
2 changed files with 5 additions and 3 deletions
|
@ -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()
|
||||
]
|
||||
],
|
||||
|
|
|
@ -15,7 +15,7 @@ class TargetEvent {
|
|||
TargetEvent(this.target);
|
||||
}
|
||||
|
||||
class VMConnectTargetElement extends HtmlElement implements Renderable{
|
||||
class VMConnectTargetElement extends HtmlElement implements Renderable {
|
||||
|
||||
static const tag =
|
||||
const Tag<VMConnectTargetElement>('vm-connect-target');
|
||||
|
|
Loading…
Reference in a new issue