OLD | NEW |
1 <link rel="import" href="../../../../packages/polymer/polymer.html"> | 1 <link rel="import" href="../../../../packages/polymer/polymer.html"> |
2 <link rel="import" href="nav_bar.html"> | 2 <link rel="import" href="nav_bar.html"> |
3 <link rel="import" href="observatory_element.html"> | 3 <link rel="import" href="observatory_element.html"> |
4 <link rel="import" href="view_footer.html"> | |
5 | |
6 <polymer-element name="vm-connect-target" extends="observatory-element"> | |
7 <template> | |
8 <style> | |
9 .delete-button { | |
10 padding: 4px; | |
11 background: transparent; | |
12 border: none !important; | |
13 } | |
14 .delete-button:hover { | |
15 background: #ff0000; | |
16 } | |
17 </style> | |
18 <link rel="stylesheet" href="css/shared.css"> | |
19 <span> | |
20 <template if="{{ isCurrentTarget }}"> | |
21 <a on-click="{{ connectToVm }}" _href="{{ gotoLinkForwardingParameters('
/vm') }}">{{ target.name }} (Connected)</a> | |
22 </template> | |
23 <template if="{{ !isCurrentTarget }}"> | |
24 <a on-click="{{ connectToVm }}" _href="{{ gotoLinkForwardingParameters('
/vm') }}">{{ target.name }}</a> | |
25 </template> | |
26 <button class="delete-button" on-click="{{ deleteVm }}">✖ Remove</b
utton> | |
27 </span> | |
28 </template> | |
29 </polymer-element> | |
30 | 4 |
31 <polymer-element name="vm-connect" extends="observatory-element"> | 5 <polymer-element name="vm-connect" extends="observatory-element"> |
32 <template> | 6 <template> |
33 <link rel="stylesheet" href="css/shared.css"> | 7 <link rel="stylesheet" href="css/shared.css"> |
34 <style> | 8 <style> |
35 .textbox { | 9 .textbox { |
36 width: 20em; | 10 width: 20em; |
37 font: 400 16px 'Montserrat', sans-serif; | 11 font: 400 16px 'Montserrat', sans-serif; |
38 } | 12 } |
39 </style> | 13 </style> |
40 | 14 |
41 <nav-bar> | 15 <nav-bar> |
42 <top-nav-menu last="{{ true }}"></top-nav-menu> | 16 <top-nav-menu last="{{ true }}"></top-nav-menu> |
43 </nav-bar> | 17 </nav-bar> |
44 | 18 |
45 <div class="content-centered"> | 19 <div class="content-centered"> |
46 <h1>Connect to a Dart VM</h1> | 20 <h1>Connect to a Dart VM</h1> |
47 <br> | 21 <br> |
48 <hr> | 22 <hr> |
49 <div class="flex-row"> | 23 <div class="flex-row"> |
50 <div class="flex-item-40-percent"> | 24 <div class="flex-item-40-percent"> |
51 <h2>WebSocket</h2> | 25 <h2>WebSocket</h2> |
52 <br> | 26 <br> |
53 <ul> | 27 <ul> |
54 <template repeat="{{ target in app.targets.history }}"> | 28 <template repeat="{{ target in app.targets.history }}"> |
55 <template if="{{ target.standalone }}"> | 29 <template if="{{ target.standalone }}"> |
56 <li><vm-connect-target target="{{ target }}"></vm-connect-target
></li> | 30 <li> |
| 31 <vm-connect-target target="{{ target }}"></vm-connect-target> |
| 32 </li> |
57 </template> | 33 </template> |
58 </template> | 34 </template> |
59 </ul> | 35 </ul> |
60 <hr> | 36 <hr> |
61 <form autocomplete="on"> | 37 <form autocomplete="on"> |
62 <input class="textbox" placeholder="localhost:8181" type="text" valu
e="{{ standaloneVmAddress }}"> | 38 <input class="textbox" placeholder="localhost:8181" |
63 <input class="button" type="submit" value="Connect" on-click="{{ con
nectStandalone }}"> | 39 type="text" value="{{ standaloneVmAddress }}"> |
| 40 <input class="button" type="submit" value="Connect" |
| 41 on-click="{{ connectStandalone }}"> |
64 </form> | 42 </form> |
65 <br> | 43 <br> |
66 <pre class="well">Run Standalone with: '--observe'</pre> | 44 <pre class="well">Run Standalone with: '--observe'</pre> |
67 <hr> | 45 <hr> |
68 </div> | 46 </div> |
69 | 47 |
70 <div class="flex-item-20-percent"></div> | 48 <div class="flex-item-20-percent"></div> |
71 <div class="flex-item-40-percent"> | 49 <div class="flex-item-40-percent"> |
72 <h2>Crash dump</h2> | 50 <h2>Crash dump</h2> |
73 <br> | 51 <br> |
74 <input type="file" id="crashDumpFile"> | 52 <input type="file" id="crashDumpFile"> |
75 <br> | 53 <br> |
76 <br> | 54 <br> |
77 <pre class="well">Request a crash dump with: | 55 <pre class="well">Request a crash dump with: |
78 'curl localhost:8181/_getCrashDump > dump.json'</pre> | 56 'curl localhost:8181/_getCrashDump > dump.json'</pre> |
79 <hr> | 57 <hr> |
80 </div> | 58 </div> |
81 </div> | 59 </div> |
82 </div> | 60 </div> |
83 <view-footer></view-footer> | 61 <view-footer></view-footer> |
84 </template> | 62 </template> |
85 </polymer-element> | 63 </polymer-element> |
86 | 64 |
87 <script type="application/dart" src="vm_connect.dart"></script> | 65 <script type="application/dart" src="vm_connect.dart"></script> |
OLD | NEW |