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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/observatory_elements/instance_ref.html

Issue 164183003: Add expandable instances and lists to the vm service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <head> 1 <head>
2 <link rel="import" href="observatory_element.html"> 2 <link rel="import" href="observatory_element.html">
3 <link rel="import" href="service_ref.html"> 3 <link rel="import" href="service_ref.html">
4 </head> 4 </head>
5 <polymer-element name="instance-ref" extends="service-ref"> 5 <polymer-element name="instance-ref" extends="service-ref">
6 <template> 6 <template>
7 <div> 7 <style>
8 <template if="{{ (ref['type'] == 'null') }}"> 8 .memberList {
9 unexpected null 9 margin-left: 3em;
10 border-spacing: 0;
11 border-collapse: collapse;
12 }
13 .member {
14 vertical-align: top;
15 padding: 0 1em;
16 }
17 </style>
18 <div>
19 <template if="{{ isUnexpectedRef(ref['type']) }}">
20 unexpected reference type &lt;{{ ref['type'] }}&gt;
21 </template>
22
23 <template if="{{ isNullRef(ref['type']) }}">
24 {{ name }}
25 </template>
26
27 <template if="{{ (isStringRef(ref['type']) ||
28 isBoolRef(ref['type']) ||
29 isIntRef(ref['type'])) }}">
30 <a href="{{ url }}">{{ name }}</a>
31 </template>
32
33 <template if="{{ isInstanceRef(ref['type']) }}">
34 <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em></a> {
35 <a on-click="{{ toggleExpand }}">...</a>
36 <template if="{{ expanded }}">
37 <table class="memberList">
38 <tr template repeat="{{ field in ref['fields'] }}">
39
40 <td class="member">{{ field['decl']['user_name'] }}</td>
41 <td class="member">
42 <instance-ref app="{{ app }}" ref="{{ field['value'] }}"></insta nce-ref>
43 </td>
44 </tr>
45 </table>
46 </template>
47 }
48 </template>
49
50 <template if="{{ isListRef(ref['type']) }}">
51 <a href="{{ url }}"><em>{{ ref['class']['user_name'] }}</em> ({{ ref['le ngth']}})</a> {
52 <a on-click="{{ toggleExpand }}">...</a>
53 <template if="{{ expanded }}">
54 <table class="memberList">
55 <tr template repeat="{{ element in ref['elements'] }}">
56 <td class="member">[{{ element['index']}}]</td>
57 <td class="member">
58 <instance-ref app="{{ app }}" ref="{{ element['value'] }}"></ins tance-ref>
59 </td>
60 </tr>
61 </table>
62 </template>
63 }
64 </template>
65
66 </div>
10 </template> 67 </template>
11 <template if="{{ (ref['type'] == '@Null') }}"> 68 <script type="application/dart" src="instance_ref.dart"></script>
12 {{ name }}
13 </template>
14 <template if="{{ (ref['type'] != 'null') && ref['type'] != '@Null' }}">
15 <a href="{{ url }}">{{ name }} </a>
16 </template>
17 </div>
18 </template>
19 <script type="application/dart" src="instance_ref.dart"></script>
20 </polymer-element> 69 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698