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

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

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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/base/table.html">
9
10 <dom-module id="tr-v-ui-iteration-info-span">
11 <template>
12 <tr-ui-b-table id="table"></tr-ui-b-table>
13 </template>
14 </dom-module>
15 <script>
16 'use strict';
17 Polymer({
18 is: 'tr-v-ui-iteration-info-span',
19
20 ready: function() {
21 this.diagnostic_ = undefined;
22 this.$.table.showHeader = false;
23 this.$.table.tableColumns = [
24 {
25 value: function(row) {
26 return row[0];
27 },
28 },
29 {
30 value: function(row) {
31 return row[1];
32 }
33 }
34 ];
35 },
36
37 get diagnostic() {
38 return this.diagnostic_;
39 },
40
41 set diagnostic(d) {
42 this.diagnostic_ = d;
43 this.updateContents_();
44 },
45
46 updateContents_: function() {
47 if (this.diagnostic === undefined) {
48 this.$.table.tableRows = [];
49 return;
50 }
51
52 var rows = [
53 ['benchmark name', this.diagnostic.benchmarkName],
54 ['benchmark start', this.diagnostic.benchmarkStartString],
55 ['url', this.diagnostic.storyUrl],
56 ['story', this.diagnostic.storyDisplayName],
57 ['storyset repeat', this.diagnostic.storysetRepeatCounter],
58 ['story repeat', this.diagnostic.storyRepeatCounter],
59 ];
60
61 if (this.diagnostic.label)
62 rows.push(['label', this.diagnostic.label]);
63
64 if (this.diagnostic.storyGroupingKeys &&
65 (tr.b.dictionaryLength(this.diagnostic.storyGroupingKeys) > 0)) {
66 var gov = document.createElement('tr-ui-a-generic-object-view');
67 gov.object = this.diagnostic.storyGroupingKeys;
68 rows.push(['grouping keys', gov]);
69 }
70
71 rows.sort((x, y) => x[0].localeCompare(y[0]));
72 this.$.table.tableRows = rows;
73 }
74 });
75 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/ui/histogram_span_test.html ('k') | tracing/tracing/value/ui/numeric_stats_span.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698