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

Unified Diff: runtime/bin/vmservice/observatory/deployed/web/packages/observatory/src/elements/instance_ref.html

Issue 511413002: Revert "Give instances their own model class; move DartErrors out of instance-ref into their own er… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
Index: runtime/bin/vmservice/observatory/deployed/web/packages/observatory/src/elements/instance_ref.html
diff --git a/runtime/bin/vmservice/observatory/deployed/web/packages/observatory/src/elements/instance_ref.html b/runtime/bin/vmservice/observatory/deployed/web/packages/observatory/src/elements/instance_ref.html
index 5559d53fb1725265bd743edcd5ec4ce8055c44ef..2143546578be3486bdce9c3a8ae3052a061a3178 100644
--- a/runtime/bin/vmservice/observatory/deployed/web/packages/observatory/src/elements/instance_ref.html
+++ b/runtime/bin/vmservice/observatory/deployed/web/packages/observatory/src/elements/instance_ref.html
@@ -18,36 +18,50 @@
}
</style>
<span>
- <template if="{{ ref.isSentinel }}">
- <div title="{{ hoverText }}">{{ ref.valueAsString }}</div>
+ <template if="{{ isError(ref) }}">
+ <pre class="errorBox">{{ ref.message }}</pre>
</template>
- <template if="{{ ref.isString || ref.isBool || ref.isInt || ref.isDouble || ref.isNull }}">
- <a on-click="{{ goto }}" _href="{{ url }}">{{ ref.valueAsString }}</a>
+ <template if="{{ isUnexpected(ref) }}">
+ unexpected reference type &lt;{{ ref.serviceType }}&gt;
</template>
- <template if="{{ ref.isType }}">
- <a on-click="{{ goto }}" _href="{{ url }}">{{ ref.name }}</a>
+ <template if="{{ isSentinel(ref) }}">
+ <div title="{{ hoverText }}">{{ ref['valueAsString'] }}</div>
</template>
- <template if="{{ ref.isClosure }}">
+ <template if="{{ (isString(ref) ||
+ isBool(ref) ||
+ isNull(ref) ||
+ isInt(ref)) ||
+ isDouble(ref)) }}">
+ <a on-click="{{ goto }}" _href="{{ url }}">{{ ref['valueAsString'] }}</a>
+ </template>
+
+ <template if="{{ (isType(ref)) }}">
+ <a on-click="{{ goto }}" _href="{{ url }}">{{ ref['user_name'] }}</a>
+ </template>
+
+ <template if="{{ isInstance(ref) &&
+ ref['closureFunc'] != null}}">
<a on-click="{{ goto }}" _href="{{ url }}">
<!-- TODO(turnidge): Switch this to fully-qualified function -->
- {{ ref.closureFunc.name }}
+ {{ ref['closureFunc'].name }}
</a>
</template>
- <template if="{{ ref.isInstance && !ref.isClosure }}">
- <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref.clazz.name }}</em></a>
+ <template if="{{ isInstance(ref) &&
+ ref['closureFunc'] == null}}">
+ <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref['class'].name }}</em></a>
<curly-block callback="{{ expander() }}">
<div class="memberList">
- <template repeat="{{ field in ref.fields }}">
+ <template repeat="{{ field in ref['fields'] }}">
<div class="memberItem">
<div class="memberName">
{{ field['decl']['user_name'] }}
</div>
<div class="memberValue">
- <any-service-ref ref="{{ field['value'] }}"></any-service-ref>
+ <instance-ref ref="{{ field['value'] }}"></instance-ref>
</div>
</div>
</template>
@@ -55,15 +69,15 @@
</curly-block>
</template>
- <template if="{{ ref.isList }}">
- <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref.clazz.name }}</em> ({{ ref.length }})</a>
+ <template if="{{ isList(ref) }}">
+ <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref['class'].name }}</em> ({{ ref['length']}})</a>
<curly-block callback="{{ expander() }}">
<div class="memberList">
- <template repeat="{{ element in ref.elements }}">
+ <template repeat="{{ element in ref['elements'] }}">
<div class="memberItem">
<div class="memberName">[{{ element['index']}}]</div>
<div class="memberValue">
- <any-service-ref ref="{{ element['value'] }}"></instance-ref>
+ <instance-ref ref="{{ element['value'] }}"></instance-ref>
</div>
</div>
</template>

Powered by Google App Engine
This is Rietveld 408576698