| Index: dashboard/dashboard/elements/speed-releasing-table.html
|
| diff --git a/dashboard/dashboard/elements/speed-releasing-page.html b/dashboard/dashboard/elements/speed-releasing-table.html
|
| similarity index 54%
|
| copy from dashboard/dashboard/elements/speed-releasing-page.html
|
| copy to dashboard/dashboard/elements/speed-releasing-table.html
|
| index ed6200e25085b003bb349da35d44cd3daf2f313f..0e76b150c6ec94500e3d0662c7e3fcc476c4f480 100644
|
| --- a/dashboard/dashboard/elements/speed-releasing-page.html
|
| +++ b/dashboard/dashboard/elements/speed-releasing-table.html
|
| @@ -12,8 +12,9 @@ found in the LICENSE file.
|
| <link rel="import" href="/components/paper-item/paper-item.html">
|
| <link rel="import" href="/components/paper-listbox/paper-listbox.html">
|
| <link rel="import" href="/components/polymer/polymer.html">
|
| +<link rel="import" href="/dashboard/static/uri.html">
|
|
|
| -<dom-module id="speed-releasing-page">
|
| +<dom-module id="speed-releasing-table">
|
| <template>
|
| <style>
|
| .error {
|
| @@ -26,23 +27,16 @@ found in the LICENSE file.
|
| padding: 10px;
|
| }
|
|
|
| - #content {
|
| - display: inline-flex;
|
| - display: -webkit-inline-flex;
|
| - flex-direction: column;
|
| - -webkit-flex-direction: column;
|
| - align-items: flex-start;
|
| - -webkit-align-items: flex-start;
|
| - }
|
| -
|
| #loading-spinner {
|
| width: 100%;
|
| display: flex;
|
| justify-content: center;
|
| }
|
| </style>
|
| +
|
| <template is="dom-if" if="{{loading}}">
|
| - <div id="loading-spinner"><img src="//www.google.com/images/loading.gif"></div>
|
| + <div id="loading-spinner"><img src="//www.google.com/images/loading.gif">
|
| + </div>
|
| </template>
|
| <template is="dom-if" if="{{!loading}}">
|
| <template is="dom-if" if="{{error}}">
|
| @@ -50,17 +44,38 @@ found in the LICENSE file.
|
| </template>
|
| <template is="dom-if" if="{{!error}}">
|
| <div id="content">
|
| - <p>Coming soon.</p>
|
| + <table id="speed-releasing">
|
| + <thead>{{tableConfig.name}}</thead>
|
| + <template is="dom-repeat" items="{{tableConfig.tableBots}}">
|
| + <tr>
|
| + <td>{{item}}</td>
|
| + <template is="dom-repeat"
|
| + items="{{tableConfig.tableTests}}" as="tests">
|
| + <td>{{tests}}</td>
|
| + </template>
|
| + </tr>
|
| + </template>
|
| + </table>
|
| </div>
|
| </template>
|
| </template>
|
| +
|
| </template>
|
| <script>
|
| 'use strict';
|
| Polymer({
|
|
|
| - is: 'speed-releasing-page',
|
| + is: 'speed-releasing-table',
|
| properties: {
|
| + tableConfig: {
|
| + type: Object,
|
| + value: {},
|
| + notify: true,
|
| + },
|
| + tableName: {
|
| + type: String,
|
| + notify: true,
|
| + },
|
| loading: {
|
| type: Boolean,
|
| value: false,
|
| @@ -79,17 +94,22 @@ found in the LICENSE file.
|
|
|
| ready: function() {
|
| var params = {};
|
| - simple_xhr.send('/speed_releasing', params,
|
| - function(response) {
|
| - this.xsrfToken = response['xsrf_token'];
|
| - this.loading = false;
|
| - }.bind(this),
|
| - function(msg) {
|
| - this.error = msg;
|
| - this.loading = false;
|
| - }.bind(this));
|
| + var path = this.tableName;
|
| + this.loading = true;
|
| + simple_xhr.send('/speed_releasing/' + path, params,
|
| + function(response) {
|
| + this.tableConfig.tableBots = response['table_bots'];
|
| + this.tableConfig.tableTests = response['table_tests'];
|
| + this.tableConfig.tableLayout = response['table_layout'];
|
| + this.tableConfig.name = response['name'];
|
| + this.xsrfToken = response['xsrf_token'];
|
| + this.loading = false;
|
| + }.bind(this),
|
| + function(msg) {
|
| + this.error = msg;
|
| + this.loading = false;
|
| + }.bind(this));
|
| }
|
| -
|
| });
|
| </script>
|
| </dom-module>
|
|
|