| +  })(); </script> </dom-module><dom-module id="task-page-data" assetpath="/res/imp/taskpage/"> <script>!function(){var t,e=400;Polymer({is:"task-page-data",behaviors:[SwarmingBehaviors.CommonBehavior],properties:{auth_headers:{type:Object},task_id:{type:String},busy:{type:Boolean,computed:"_or(_busy1,_busy2,_busy3)",notify:!0},request:{type:Object,computed:"_parseRequest(_request)",notify:!0},result:{type:Array,computed:"_parseResult(_result)",notify:!0},stdout:{type:String,computed:"_parseStdout(_stdout)",notify:!0},_busy1:{type:Boolean,value:!1},_busy2:{type:Boolean,value:!1},_busy3:{type:Boolean,value:!1},_request:{type:Object},_result:{type:Object},_stdout:{type:Object}},observers:["reload(auth_headers,task_id)"],reload:function(){return this.task_id&&this.auth_headers?(t&&this.cancelAsync(t),void(t=this.async(function(){t=void 0;var e="/_ah/api/swarming/v1/task/"+this.task_id;this._getJsonAsync("_request",e+"/request","_busy1",this.auth_headers),this._getJsonAsync("_result",e+"/result?include_performance_stats=true","_busy2",this.auth_headers),this._getJsonAsync("_stdout",e+"/stdout","_busy3",this.auth_headers)},e))):void console.log("task_id and auth_headers can't be empty")},_parseRequest:function(t){return console.log(t),t?t:{}},_parseResult:function(t){return console.log(t),t?t:{}},_parseStdout:function(t){return console.log(t),t&&t.output?t.output:""}})}()</script> </dom-module><dom-module id="task-page" assetpath="/res/imp/taskpage/"> <template> <style include="iron-flex iron-flex-alignment iron-positioning swarming-app-style"></style> <url-param name="id" value="{{task_id}}"> </url-param> <swarming-app client_id="[[client_id]]" auth_headers="{{_auth_headers}}" signed_in="{{_signed_in}}" busy="[[_busy]]" name="Swarming Task Page"> <h2 hidden$="[[_signed_in]]">You must sign in to see anything useful.</h2> <div hidden$="[[_not(_signed_in)]]"> <task-page-data auth_headers="[[_auth_headers]]" task_id="[[task_id]]" busy="{{_busy}}" request="{{_request}}" result="{{_result}}" stdout="{{_stdout}}"> </task-page-data> <h1>Task Page Stub</h1> </div> </swarming-app> </template> <script>!function(){Polymer({is:"task-page",behaviors:[SwarmingBehaviors.CommonBehavior],properties:{task_id:{type:String},client_id:{type:String}}})}()</script> </dom-module></div></body></html> |