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

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

Issue 2988823002: DeviceInfo into GenericSets (Closed)
Patch Set: Remove how-to-write-metrics-device image 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
« no previous file with comments | « tracing/tracing/value/ui/diagnostic_span.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!--
3 Copyright 2017 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-merged-device-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-merged-device-info-span',
19
20 ready() {
21 this.diagnostic_ = undefined;
22 this.$.table.showHeader = false;
23 this.$.table.tableColumns = [
24 {value: row => row[0]},
25 {value: row => row[1]},
26 ];
27 },
28
29 get diagnostic() {
30 return this.diagnostic_;
31 },
32
33 set diagnostic(d) {
34 this.diagnostic_ = d;
35 this.updateContents_();
36 },
37
38 updateContents_() {
39 if (this.diagnostic === undefined) {
40 this.$.table.tableRows = [];
41 return;
42 }
43
44 const rows = [];
45
46 if (this.diagnostic.chromeVersions.size) {
47 rows.push([
48 'chrome versions',
49 Array.from(this.diagnostic.chromeVersions).join(', ')
50 ]);
51 }
52 if (this.diagnostic.osNames.size) {
53 rows.push([
54 'os names',
55 Array.from(this.diagnostic.osNames).join(', ')
56 ]);
57 }
58 if (this.diagnostic.osVersions.size) {
59 rows.push([
60 'os versions',
61 Array.from(this.diagnostic.osVersions).join(', ')
62 ]);
63 }
64 this.$.table.tableRows = rows;
65 }
66 });
67 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/ui/diagnostic_span.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698