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

Side by Side Diff: appengine/swarming/elements/polymer05/stats-request-chart.html

Issue 2408743002: Move elements/ to ui/ (Closed)
Patch Set: rebase again Created 4 years, 2 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 <!--
2 # Copyright 2015 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file.
5
6 -->
7
8 <!--
9 @group Swarming Elements
10
11 `stats-request-chart' encapsulates a 'google-chart' element and data formating
12 logic specific for Http Request chart of the Swarming statistics app.
13 This element exposes a 'data' attribute which is a JSON serialized
14 `google.visualization.DataTable` object, and a `resolution` attribute that is
15 'minutes', 'hours', or 'days'.
16
17 Example:
18 <stats-request-chart data="{{data_table}}"></stats-request-chart>
19
20 @element stats-request-chart
21 -->
22
23 <link rel="import" href="bower_components/polymer/polymer.html">
24 <link rel="import" href="stats-chart-base.html">
25
26 <polymer-element name="stats-request-chart" extends="stats-chart-base" attribute s="data resolution">
27 <script>
28 Polymer('stats-request-chart', {
29 titleText: 'Requests',
30
31 populate: function() {
32 if (this.hidden) {
33 return;
34 }
35 this.resetFormattedData();
36
37 // These indexes are relative to stats_gviz._Summary.ORDER.
38 this.getKeyFormatter().format(this.dataTable, 0);
39
40 var view = new google.visualization.DataView(this.dataTable);
41 view.setColumns([0, 1, 2]);
42 this.attachView(view);
43 }
44 });
45 </script>
46 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698