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

Side by Side Diff: runtime/bin/vmservice/observatory/lib/src/elements/instance_ref.html

Issue 501583007: Treat null like the object it is in the Observatory and Service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: sync and build Created 6 years, 3 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 <link rel="import" href="../../../../packages/polymer/polymer.html"> 1 <link rel="import" href="../../../../packages/polymer/polymer.html">
2 <link rel="import" href="curly_block.html"> 2 <link rel="import" href="curly_block.html">
3 <link rel="import" href="observatory_element.html"> 3 <link rel="import" href="observatory_element.html">
4 <link rel="import" href="service_ref.html"> 4 <link rel="import" href="service_ref.html">
5 5
6 <polymer-element name="instance-ref" extends="service-ref"> 6 <polymer-element name="instance-ref" extends="service-ref">
7 <template> 7 <template>
8 <link rel="stylesheet" href="css/shared.css"> 8 <link rel="stylesheet" href="css/shared.css">
9 <style> 9 <style>
10 .errorBox { 10 .errorBox {
11 background-color: #f5f5f5; 11 background-color: #f5f5f5;
12 border: 1px solid #ccc; 12 border: 1px solid #ccc;
13 padding: 10px; 13 padding: 10px;
14 font-family: consolas, courier, monospace; 14 font-family: consolas, courier, monospace;
15 font-size: 1em; 15 font-size: 1em;
16 line-height: 1.2em; 16 line-height: 1.2em;
17 white-space: pre; 17 white-space: pre;
18 } 18 }
19 </style> 19 </style>
20 <span> 20 <span>
21 <template if="{{ isError(ref.serviceType) }}"> 21 <template if="{{ isError(ref) }}">
22 <pre class="errorBox">{{ ref.message }}</pre> 22 <pre class="errorBox">{{ ref.message }}</pre>
23 </template> 23 </template>
24 24
25 <template if="{{ isUnexpected(ref.serviceType) }}"> 25 <template if="{{ isUnexpected(ref) }}">
26 unexpected reference type &lt;{{ ref.serviceType }}&gt; 26 unexpected reference type &lt;{{ ref.serviceType }}&gt;
27 </template> 27 </template>
28 28
29 <template if="{{ isNull(ref.serviceType) }}"> 29 <template if="{{ isPsuedoNull(ref) }}">
30 <div title="{{ hoverText }}">{{ ref['valueAsString'] }}</div> 30 <div title="{{ hoverText }}">{{ ref['valueAsString'] }}</div>
31 </template> 31 </template>
32 32
33 <template if="{{ (isString(ref.serviceType) || 33 <template if="{{ (isString(ref) ||
34 isBool(ref.serviceType) || 34 isBool(ref) ||
35 isInt(ref.serviceType)) || 35 isNull(ref) ||
36 isDouble(ref.serviceType)) }}"> 36 isInt(ref)) ||
37 isDouble(ref)) }}">
37 <a on-click="{{ goto }}" href="{{ url }}">{{ ref['valueAsString'] }}</a> 38 <a on-click="{{ goto }}" href="{{ url }}">{{ ref['valueAsString'] }}</a>
38 </template> 39 </template>
39 40
40 <template if="{{ (isType(ref.serviceType)) }}"> 41 <template if="{{ (isType(ref)) }}">
41 <a on-click="{{ goto }}" href="{{ url }}">{{ ref['user_name'] }}</a> 42 <a on-click="{{ goto }}" href="{{ url }}">{{ ref['user_name'] }}</a>
42 </template> 43 </template>
43 44
44 <template if="{{ isInstance(ref.serviceType) && 45 <template if="{{ isInstance(ref) &&
45 ref['closureFunc'] != null}}"> 46 ref['closureFunc'] != null}}">
46 <a on-click="{{ goto }}" href="{{ url }}"> 47 <a on-click="{{ goto }}" href="{{ url }}">
47 <!-- TODO(turnidge): Switch this to fully-qualified function --> 48 <!-- TODO(turnidge): Switch this to fully-qualified function -->
48 {{ ref['closureFunc'].name }} 49 {{ ref['closureFunc'].name }}
49 </a> 50 </a>
50 </template> 51 </template>
51 52
52 <template if="{{ isInstance(ref.serviceType) && 53 <template if="{{ isInstance(ref) &&
53 ref['closureFunc'] == null}}"> 54 ref['closureFunc'] == null}}">
54 <a on-click="{{ goto }}" href="{{ url }}"><em>{{ ref['class'].name }}</e m></a> 55 <a on-click="{{ goto }}" href="{{ url }}"><em>{{ ref['class'].name }}</e m></a>
55 <curly-block callback="{{ expander() }}"> 56 <curly-block callback="{{ expander() }}">
56 <div class="memberList"> 57 <div class="memberList">
57 <template repeat="{{ field in ref['fields'] }}"> 58 <template repeat="{{ field in ref['fields'] }}">
58 <div class="memberItem"> 59 <div class="memberItem">
59 <div class="memberName"> 60 <div class="memberName">
60 {{ field['decl']['user_name'] }} 61 {{ field['decl']['user_name'] }}
61 </div> 62 </div>
62 <div class="memberValue"> 63 <div class="memberValue">
63 <instance-ref ref="{{ field['value'] }}"></instance-ref> 64 <instance-ref ref="{{ field['value'] }}"></instance-ref>
64 </div> 65 </div>
65 </div> 66 </div>
66 </template> 67 </template>
67 </div> 68 </div>
68 </curly-block> 69 </curly-block>
69 </template> 70 </template>
70 71
71 <template if="{{ isList(ref.serviceType) }}"> 72 <template if="{{ isList(ref) }}">
72 <a on-click="{{ goto }}" href="{{ url }}"><em>{{ ref['class'].name }}</e m> ({{ ref['length']}})</a> 73 <a on-click="{{ goto }}" href="{{ url }}"><em>{{ ref['class'].name }}</e m> ({{ ref['length']}})</a>
73 <curly-block callback="{{ expander() }}"> 74 <curly-block callback="{{ expander() }}">
74 <div class="memberList"> 75 <div class="memberList">
75 <template repeat="{{ element in ref['elements'] }}"> 76 <template repeat="{{ element in ref['elements'] }}">
76 <div class="memberItem"> 77 <div class="memberItem">
77 <div class="memberName">[{{ element['index']}}]</div> 78 <div class="memberName">[{{ element['index']}}]</div>
78 <div class="memberValue"> 79 <div class="memberValue">
79 <instance-ref ref="{{ element['value'] }}"></instance-ref> 80 <instance-ref ref="{{ element['value'] }}"></instance-ref>
80 </div> 81 </div>
81 </div> 82 </div>
82 </template> 83 </template>
83 </div> 84 </div>
84 </curly-block> 85 </curly-block>
85 </template> 86 </template>
86 </span> 87 </span>
87 </template> 88 </template>
88 </polymer-element> 89 </polymer-element>
89 90
90 <script type="application/dart" src="instance_ref.dart"></script> 91 <script type="application/dart" src="instance_ref.dart"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698