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

Unified Diff: tracing/tracing/value/ui/generic_set_span.html

Issue 3003153002: Make generic-set-span support URLs. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | tracing/tracing/value/ui/generic_set_span_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/ui/generic_set_span.html
diff --git a/tracing/tracing/value/ui/generic_set_span.html b/tracing/tracing/value/ui/generic_set_span.html
index 8e0353df53f417cba9a985a20651c66b56db55aa..5a92b8ebcc5684a35957af08f8b4514e7a0ca947 100644
--- a/tracing/tracing/value/ui/generic_set_span.html
+++ b/tracing/tracing/value/ui/generic_set_span.html
@@ -5,13 +5,29 @@ Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
+<link rel="import" href="/tracing/base/utils.html">
<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
<link rel="import" href="/tracing/value/ui/diagnostic_span_behavior.html">
<dom-module id="tr-v-ui-generic-set-span">
<template>
+ <style>
+ a {
+ display: block;
+ }
+ </style>
+
<tr-ui-a-generic-object-view id="generic"></tr-ui-a-generic-object-view>
- <template is="dom-repeat" items="{{strings_}}">[[item]]<br></template>
+
+ <template is="dom-repeat" items="{{strings_}}">
+ <template is="dom-if" if="[[isUrl_(item)]]">
+ <a href="[[item]]">[[item]]</a>
+ </template>
+
+ <template is="dom-if" if="[[!isUrl_(item)]]">
+ <div>[[item]]</div>
+ </template>
+ </template>
</template>
</dom-module>
@@ -28,6 +44,10 @@ tr.exportTo('tr.v.ui', function() {
},
},
+ isUrl_(s) {
+ return tr.b.isUrl(s);
+ },
+
updateContents_() {
if (this.diagnostic === undefined) {
this.$.generic.object = undefined;
« no previous file with comments | « no previous file | tracing/tracing/value/ui/generic_set_span_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698