| OLD | NEW |
| (Empty) | |
| 1 <!-- The <fuzzer-status-sk> element displays the status of the fuzzer |
| 2 |
| 3 Attributes: |
| 4 hash - the MD5 hash of the fuzz's source code |
| 5 |
| 6 Events: |
| 7 None |
| 8 |
| 9 Methods: |
| 10 None |
| 11 |
| 12 |
| 13 --> |
| 14 <dom-module id="fuzzer-status-sk"> |
| 15 <template> |
| 16 <style> |
| 17 span { |
| 18 margin-left: auto; |
| 19 } |
| 20 </style> |
| 21 <span> |
| 22 <a href="https://skia.googlesource.com/skia/+/{{lastCommit.hash}}" target=
"_blank">Last Commit In Fuzz: {{ lastCommit.shortHash }} - {{ lastCommit.author
}}</a> |
| 23 </span> |
| 24 </template> |
| 25 <script> |
| 26 Polymer({ |
| 27 is: "fuzzer-status-sk", |
| 28 |
| 29 properties: { |
| 30 lastCommit: { |
| 31 type: Object, |
| 32 value: function() { |
| 33 // limitTo is a custom filter that returns the first len characters of |
| 34 // a string or all characters before '(' - depending on len. |
| 35 var limitTo = function(val, len) { |
| 36 if (len > 0) { |
| 37 return val.substr(0, len); |
| 38 } |
| 39 var idx = val.indexOf('('); |
| 40 return val.substring(0, (idx === -1) ? val.length : idx); |
| 41 } |
| 42 // TODO(kjlubick): Fetch this from somewhere |
| 43 var orig = { |
| 44 hash: "bbadbeefalksjdflkjsadifsdnfolsdf", |
| 45 authors: ["nobody (Nobody Smith)", "somebody (Somebody Jones)"] |
| 46 }; |
| 47 |
| 48 return { |
| 49 hash: orig.hash, |
| 50 shortHash: limitTo(orig.hash, 7), |
| 51 author: limitTo(orig.authors[0], 0) |
| 52 }; |
| 53 } |
| 54 } |
| 55 }, |
| 56 |
| 57 |
| 58 }); |
| 59 </script> |
| 60 </dom-module> |
| OLD | NEW |