Index: dashboard/dashboard/elements/benchmark-quality-report-page.html |
diff --git a/dashboard/dashboard/elements/benchmark-quality-report-page.html b/dashboard/dashboard/elements/benchmark-quality-report-page.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..647389e448fee6877770fee3115b3afe1c9a9ef7 |
--- /dev/null |
+++ b/dashboard/dashboard/elements/benchmark-quality-report-page.html |
@@ -0,0 +1,62 @@ |
+<!DOCTYPE html> |
+<!-- |
+Copyright 2017 The Chromium Authors. All rights reserved. |
+Use of this source code is governed by a BSD-style license that can be |
+found in the LICENSE file. |
+--> |
+<link rel="import" href="/components/polymer/polymer.html"> |
+ |
+<link rel="import" href="/dashboard/elements/benchmark-quality-report-details.html"> |
+<link rel="import" href="/dashboard/elements/benchmark-quality-report-list.html"> |
+<link rel="import" href="/dashboard/static/uri.html"> |
+ |
+<dom-module id="benchmark-quality-report-page"> |
+ <template> |
+ <template is="dom-if" if="{{computeShowList(pageType)}}"> |
+ <benchmark-quality-report-list |
+ master="{{master}}" |
+ num-days="{{numDays}}"></benchmark-quality-report-list> |
+ </template> |
+ <template is="dom-if" if="{{computeShowBenchmark(pageType)}}"> |
+ <benchmark-quality-report-details |
+ benchmark="{{benchmark}}" |
+ num-days="{{numDays}}" |
+ master="{{master}}"></benchmark-quality-report-details> |
+ </template> |
sullivan
2017/02/17 16:30:13
This element parses the uri parameters and shows e
|
+ </template> |
+ <script> |
+ 'use strict'; |
+ Polymer({ |
+ is: 'benchmark-quality-report-page', |
+ properties: { |
+ pageType: { |
+ type: String |
+ }, |
+ master: { |
+ type: String |
+ }, |
+ numDays: { |
+ type: Number |
+ }, |
+ benchmark: { |
+ type: String |
+ } |
+ }, |
+ |
+ computeShowList: pageType => pageType == 'list', |
+ |
+ computeShowBenchmark: pageType => pageType == 'benchmark', |
+ |
+ /** |
+ * The url params determine what data to request from |
+ * /group_report. sid is a hash of a group of keys. |
+ */ |
+ ready: function() { |
+ this.benchmark = uri.getParameter('benchmark'); |
+ this.master = uri.getParameter('master', 'ChromiumPerf'); |
+ this.numDays = uri.getParameter('num_days', 30); |
+ this.pageType = this.benchmark ? 'benchmark' : 'list'; |
+ } |
+ }); |
+ </script> |
+</dom-module> |