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

Side by Side Diff: appengine/swarming/ui/res/imp/taskpage/task-retry-prompt.html

Issue 2813593002: Add editing of dimensions on retry (Closed)
Patch Set: Address feedback Created 3 years, 8 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 | « appengine/swarming/ui/res/imp/taskpage/task-page-demo.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 <!--
2 This in an HTML Import-able file that contains the definition
3 of the following elements:
4
5 <task-retry-prompt>
6
7 To use this file import it:
8
9 <link href="/res/imp/task-retry-prompt" rel="import" />
10
11 Usage:
12
13 <task-retry-prompt></task-retry-prompt>
14
15 Properties:
16 None.
17
18 Methods:
19 setDimensions(Array): Set the dimensions to show the user for editing.
20 Events:
21 None.
22 -->
23
24 <link rel="import" href="/res/imp/bower_components/paper-input/paper-input.html" >
25
26 <dom-module id="task-retry-prompt">
27 <template>
28 <style>
29 :host {
30 display: block;
31 }
32 th, td{
33 font-size: 16px;
34 }
35 paper-input {
36 --paper-input-container-input: {
37 font-family: sans-serif;
38 };
39 }
40 </style>
41
42 <h2>Are you sure you want to retry task [[task_id]]?</h2>
43
44 <div>If you want to modify any dimensions (e.g. specify a bot's id), do so now .</div>
45
46 <table>
47 <thead>
48 <tr>
49 <th>Key</th>
50 <th>Value</th>
51 </tr>
52 </thead>
53 <tbody>
54 <template is="dom-repeat" items="[[task_dimensions]]" as="dim">
55 <tr>
56 <td>
57 <paper-input
58 no-label-float=true
59 value="[[dim.key]]"
60 on-change="_updateKey">
61 </paper-input>
62 </td>
63 <td>
64 <paper-input
65 no-label-float=true
66 value="[[dim.value]]"
67 on-change="_updateValue">
68 </paper-input>
69 </td>
70 </tr>
71 </template>
72
73 </tbody>
74 </table>
75
76 </template>
77 <script>
78 Polymer({
79 is: "task-retry-prompt",
80 properties: {
81 task_id: {
82 type: String,
83 },
84 task_dimensions: {
85 type: Array,
86 notify: true,
87 }
88 },
89
90 setDimensions: function(dims) {
91 dims = dims || [];
92 while (dims.length < 6) {
93 dims.push({key:"", value: ""});
94 }
95 this.set("task_dimensions", dims);
96 },
97
98 _updateKey: function(e) {
99 this.set("task_dimensions."+e.model.index+".key",
100 e.currentTarget.value)
101 },
102
103 _updateValue: function(e) {
104 this.set("task_dimensions."+e.model.index+".value",
105 e.currentTarget.value)
106 }
107 });
108 </script>
109 </dom-module>
OLDNEW
« no previous file with comments | « appengine/swarming/ui/res/imp/taskpage/task-page-demo.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698