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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/ui/res/imp/taskpage/task-retry-prompt.html
diff --git a/appengine/swarming/ui/res/imp/taskpage/task-retry-prompt.html b/appengine/swarming/ui/res/imp/taskpage/task-retry-prompt.html
new file mode 100644
index 0000000000000000000000000000000000000000..117770ca63f900ead1733f655db3735d55224d2c
--- /dev/null
+++ b/appengine/swarming/ui/res/imp/taskpage/task-retry-prompt.html
@@ -0,0 +1,109 @@
+<!--
+ This in an HTML Import-able file that contains the definition
+ of the following elements:
+
+ <task-retry-prompt>
+
+ To use this file import it:
+
+ <link href="/res/imp/task-retry-prompt" rel="import" />
+
+ Usage:
+
+ <task-retry-prompt></task-retry-prompt>
+
+ Properties:
+ None.
+
+ Methods:
+ setDimensions(Array): Set the dimensions to show the user for editing.
+ Events:
+ None.
+-->
+
+<link rel="import" href="/res/imp/bower_components/paper-input/paper-input.html">
+
+<dom-module id="task-retry-prompt">
+ <template>
+ <style>
+ :host {
+ display: block;
+ }
+ th, td{
+ font-size: 16px;
+ }
+ paper-input {
+ --paper-input-container-input: {
+ font-family: sans-serif;
+ };
+ }
+ </style>
+
+ <h2>Are you sure you want to retry task [[task_id]]?</h2>
+
+ <div>If you want to modify any dimensions (e.g. specify a bot's id), do so now.</div>
+
+ <table>
+ <thead>
+ <tr>
+ <th>Key</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ <template is="dom-repeat" items="[[task_dimensions]]" as="dim">
+ <tr>
+ <td>
+ <paper-input
+ no-label-float=true
+ value="[[dim.key]]"
+ on-change="_updateKey">
+ </paper-input>
+ </td>
+ <td>
+ <paper-input
+ no-label-float=true
+ value="[[dim.value]]"
+ on-change="_updateValue">
+ </paper-input>
+ </td>
+ </tr>
+ </template>
+
+ </tbody>
+ </table>
+
+ </template>
+ <script>
+ Polymer({
+ is: "task-retry-prompt",
+ properties: {
+ task_id: {
+ type: String,
+ },
+ task_dimensions: {
+ type: Array,
+ notify: true,
+ }
+ },
+
+ setDimensions: function(dims) {
+ dims = dims || [];
+ while (dims.length < 6) {
+ dims.push({key:"", value: ""});
+ }
+ this.set("task_dimensions", dims);
+ },
+
+ _updateKey: function(e) {
+ this.set("task_dimensions."+e.model.index+".key",
+ e.currentTarget.value)
+ },
+
+ _updateValue: function(e) {
+ this.set("task_dimensions."+e.model.index+".value",
+ e.currentTarget.value)
+ }
+ });
+ </script>
+</dom-module>
« 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