| <!-- |
| This in an HTML Import-able file that contains the definition |
| of the following elements: |
| |
| <taskspec-popup-sk> |
| |
| To use this file import it: |
| |
| <link href="/res/imp/taskspec-popup-sk.html" rel="import" /> |
| |
| Usage: |
| |
| <taskspec-popup-sk></taskspec-popup-sk> |
| |
| Properties: |
| task_spec: The details for a task spec. |
| repo: The name (not the URL) of the repository of the commit. |
| swarming_url: The URL of the Swarming server. |
| |
| Note: |
| The unobfuscate-status-page extension relies on the name and contents of |
| this element. |
| --> |
| <link rel="import" href="/res/common/imp/comments-sk.html"> |
| <link rel="import" href="status-popup.html"> |
| <dom-module id="taskspec-popup-sk"> |
| <template> |
| <style include="status-popup"> |
| a { |
| color: #000; |
| } |
| paper-checkbox { |
| margin-top: 10px; |
| margin-right: 10px; |
| } |
| </style> |
| <h3> |
| <a href$="[[swarming_url]]/tasklist?f=sk_name%3A[[task_spec.name]]" target="_blank">[[task_spec.name]]</a> |
| </h3> |
| <hr/> |
| <comments-sk |
| comments="{{task_spec.comments}}" |
| add_comment_url="[[_makeAddCommentURL(task_spec,repo)]]" |
| on-submit="_commentAdded" |
| extra_fields="[[_extra_fields]]" |
| allow_add_comment |
| allow_delete_comment |
| allow_empty_comments> |
| </comments-sk> |
| </template> |
| <script> |
| Polymer({ |
| is: "taskspec-popup-sk", |
| behaviors: [SkiaBehaviors.StatusPopup], |
| |
| properties: { |
| task_spec: { |
| type: Object, |
| }, |
| repo: { |
| type: String, |
| }, |
| swarming_url: { |
| type: String, |
| value: "", |
| }, |
| |
| // private |
| _extra_fields: { |
| type: Array, |
| value: function(){ |
| return [ |
| { name: "flaky", |
| label: "Flaky", |
| type: "bool"}, |
| { name: "ignoreFailure", |
| label: "Ignore Failure", |
| type: "bool"}, |
| ]; |
| }, |
| }, |
| }, |
| |
| _makeAddCommentURL: function (task_spec, repo) { |
| return "/json/"+repo+"/taskSpecs/"+task_spec.name+"/comments"; |
| }, |
| |
| _commentAdded: function() { |
| this.hide(); |
| this.fire("reload", {}); |
| }, |
| }); |
| </script> |
| </dom-module> |