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

Side by Side Diff: appengine/swarming/ui/res/imp/tasklist/task-list.html

Issue 2676513004: Add task-list summary (Closed)
Patch Set: rebase Created 3 years, 10 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
1 <!-- 1 <!--
2 Copyright 2016 The LUCI Authors. All rights reserved. 2 Copyright 2016 The LUCI Authors. All rights reserved.
3 Use of this source code is governed under the Apache License, Version 2.0 3 Use of this source code is governed under the Apache License, Version 2.0
4 that can be found in the LICENSE file. 4 that can be found in the LICENSE file.
5 5
6 This in an HTML Import-able file that contains the definition 6 This in an HTML Import-able file that contains the definition
7 of the following elements: 7 of the following elements:
8 8
9 <task-list> 9 <task-list>
10 10
(...skipping 20 matching lines...) Expand all
31 31
32 <link rel="import" href="/res/imp/common/dynamic-table-behavior.html"> 32 <link rel="import" href="/res/imp/common/dynamic-table-behavior.html">
33 <link rel="import" href="/res/imp/common/pageable-data.html"> 33 <link rel="import" href="/res/imp/common/pageable-data.html">
34 <link rel="import" href="/res/imp/common/sort-toggle.html"> 34 <link rel="import" href="/res/imp/common/sort-toggle.html">
35 <link rel="import" href="/res/imp/common/swarming-app.html"> 35 <link rel="import" href="/res/imp/common/swarming-app.html">
36 <link rel="import" href="/res/imp/common/task-behavior.html"> 36 <link rel="import" href="/res/imp/common/task-behavior.html">
37 <link rel="import" href="/res/imp/common/url-param.html"> 37 <link rel="import" href="/res/imp/common/url-param.html">
38 38
39 <link rel="import" href="task-filters.html"> 39 <link rel="import" href="task-filters.html">
40 <link rel="import" href="task-list-data.html"> 40 <link rel="import" href="task-list-data.html">
41 <link rel="import" href="task-list-summary.html">
41 <link rel="import" href="task-mass-cancel.html"> 42 <link rel="import" href="task-mass-cancel.html">
42 43
43 <dom-module id="task-list"> 44 <dom-module id="task-list">
44 <template> 45 <template>
45 <style include="iron-flex iron-flex-alignment iron-positioning swarming-app- style dynamic-table-style task-style"> 46 <style include="iron-flex iron-flex-alignment iron-positioning swarming-app- style dynamic-table-style task-style">
46 task-filters { 47 task-filters, task-list-summary {
47 margin-bottom: 8px; 48 margin-bottom: 8px;
48 margin-right: 10px; 49 margin-right: 10px;
49 } 50 }
50 .task-list th > span { 51 .task-list th > span {
51 /* Leave space for sort-toggle*/ 52 /* Leave space for sort-toggle*/
52 padding-right: 30px; 53 padding-right: 30px;
53 } 54 }
54 </style> 55 </style>
55 56
56 <url-param name="s" 57 <url-param name="s"
57 value="{{_sortstr}}" 58 value="{{_sortstr}}"
58 default_value="created_ts:desc"> 59 default_value="created_ts:desc">
59 </url-param> 60 </url-param>
60 61
61 <swarming-app 62 <swarming-app
62 client_id="[[client_id]]" 63 client_id="[[client_id]]"
63 auth_headers="{{_auth_headers}}" 64 auth_headers="{{_auth_headers}}"
64 permissions="{{_permissions}}" 65 permissions="{{_permissions}}"
65 signed_in="{{_signed_in}}" 66 signed_in="{{_signed_in}}"
66 busy="[[_or(_busy1,_busy2)]]" 67 busy="[[_or(_busy1,_busy2,_busy3)]]"
67 name="Swarming Task List"> 68 name="Swarming Task List">
68 69
69 <h2 hidden$="[[_signed_in]]">You must sign in to see anything useful.</h2> 70 <h2 hidden$="[[_signed_in]]">You must sign in to see anything useful.</h2>
70 71
71 <div hidden$="[[_not(_signed_in)]]"> 72 <div hidden$="[[_not(_signed_in)]]">
72 <task-list-data 73 <task-list-data
73 id="data" 74 id="data"
74 auth_headers="[[_auth_headers]]" 75 auth_headers="[[_auth_headers]]"
75 query_params="[[_query_params]]" 76 query_params="[[_query_params]]"
76 tasks="[[_items]]" 77 tasks="[[_items]]"
(...skipping 10 matching lines...) Expand all
87 primary_map="[[_primary_map]]" 88 primary_map="[[_primary_map]]"
88 primary_arr="[[_primary_arr]]" 89 primary_arr="[[_primary_arr]]"
89 special_columns="[[_specialColumns]]" 90 special_columns="[[_specialColumns]]"
90 91
91 columns="{{_columns}}" 92 columns="{{_columns}}"
92 query_params="{{_query_params}}" 93 query_params="{{_query_params}}"
93 filter="{{_filter}}" 94 filter="{{_filter}}"
94 95
95 on-cancel-all="_promptCancelAll"> 96 on-cancel-all="_promptCancelAll">
96 </task-filters> 97 </task-filters>
98
99 <task-list-summary
100 auth_headers="[[_auth_headers]]"
101 busy="{{_busy3}}"
102 columns="[[_columns]]"
103 count_params="[[_query_params]]"
104 num_tasks="[[_filteredSortedItems.length]]"
105 sort="[[_sortstr]]">
106 </task-list-summary>
97 </div> 107 </div>
98 108
99 <table class="task-list"> 109 <table class="task-list">
100 <thead on-sort_change="_sortChange"> 110 <thead on-sort_change="_sortChange">
101 <!-- To allow for dynamic columns without having a lot of copy-pasted 111 <!-- To allow for dynamic columns without having a lot of copy-pasted
102 code, we break columns up into "special" and "plain" columns. Special 112 code, we break columns up into "special" and "plain" columns. Special
103 columns require some sort of HTML output (e.g. anchor tags) and plain 113 columns require some sort of HTML output (e.g. anchor tags) and plain
104 columns just output text. The plain columns use Polymer functions to 114 columns just output text. The plain columns use Polymer functions to
105 insert their text [_header(), _column(), _deviceColumn()]. Polymer 115 insert their text [_header(), _column(), _deviceColumn()]. Polymer
106 functions do not allow HTML (to avoid XSS), so special columns, like i d 116 functions do not allow HTML (to avoid XSS), so special columns, like i d
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 return task.tagMap[col]; 486 return task.tagMap[col];
477 }, 487 },
478 488
479 _taskClass: function(task) { 489 _taskClass: function(task) {
480 return this.stateClass(this._column("state", task)); 490 return this.stateClass(this._column("state", task));
481 } 491 }
482 }); 492 });
483 })(); 493 })();
484 </script> 494 </script>
485 </dom-module> 495 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698