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

Side by Side Diff: tracing/tracing/value/ui/related_histogram_set_span.html

Issue 2998043002: Remove RelatedHistogramSet. (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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
6 -->
7
8 <link rel="import" href="/tracing/ui/analysis/analysis_link.html">
9
10 <dom-module id="tr-v-ui-related-histogram-set-span">
11 <script>
12 'use strict';
13 Polymer({
14 is: 'tr-v-ui-related-histogram-set-span',
15
16 ready() {
17 this.diagnostic_ = undefined;
18 },
19
20 get diagnostic() {
21 return this.diagnostic_;
22 },
23
24 set diagnostic(d) {
25 this.diagnostic_ = d;
26 this.updateContents_();
27 },
28
29 addLink_(selection, content) {
30 const link = document.createElement('tr-ui-a-analysis-link');
31 link.setSelectionAndContent(selection, content);
32 Polymer.dom(this).appendChild(link);
33 Polymer.dom(this).appendChild(document.createElement('br'));
34 },
35
36 updateContents_() {
37 Polymer.dom(this).textContent = '';
38
39 const histogramNames = new Set();
40 for (const hist of this.diagnostic) {
41 histogramNames.add(hist.name);
42 }
43 if (histogramNames.size > 1) {
44 this.addLink_(Array.from(histogramNames), 'Select All');
45 }
46
47 for (const hist of this.diagnostic) {
48 this.addLink_([hist.name], hist.name);
49 }
50 }
51 });
52 </script>
53 </dom-module>
OLDNEW
« no previous file with comments | « tracing/tracing/value/ui/histogram_set_table_test.html ('k') | tracing/tracing/value/ui/related_histogram_set_span_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698