| Index: fuzzer/res/imp/fuzzer-status-sk.html
|
| diff --git a/fuzzer/res/imp/fuzzer-status-sk.html b/fuzzer/res/imp/fuzzer-status-sk.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0711755a00f8ad193068d70b9121a86c22e262ef
|
| --- /dev/null
|
| +++ b/fuzzer/res/imp/fuzzer-status-sk.html
|
| @@ -0,0 +1,60 @@
|
| +<!-- The <fuzzer-status-sk> element displays the status of the fuzzer
|
| +
|
| + Attributes:
|
| + hash - the MD5 hash of the fuzz's source code
|
| +
|
| + Events:
|
| + None
|
| +
|
| + Methods:
|
| + None
|
| +
|
| +
|
| +-->
|
| +<dom-module id="fuzzer-status-sk">
|
| + <template>
|
| + <style>
|
| + span {
|
| + margin-left: auto;
|
| + }
|
| + </style>
|
| + <span>
|
| + <a href="https://skia.googlesource.com/skia/+/{{lastCommit.hash}}" target="_blank">Last Commit In Fuzz: {{ lastCommit.shortHash }} - {{ lastCommit.author }}</a>
|
| + </span>
|
| + </template>
|
| + <script>
|
| + Polymer({
|
| + is: "fuzzer-status-sk",
|
| +
|
| + properties: {
|
| + lastCommit: {
|
| + type: Object,
|
| + value: function() {
|
| + // limitTo is a custom filter that returns the first len characters of
|
| + // a string or all characters before '(' - depending on len.
|
| + var limitTo = function(val, len) {
|
| + if (len > 0) {
|
| + return val.substr(0, len);
|
| + }
|
| + var idx = val.indexOf('(');
|
| + return val.substring(0, (idx === -1) ? val.length : idx);
|
| + }
|
| + // TODO(kjlubick): Fetch this from somewhere
|
| + var orig = {
|
| + hash: "bbadbeefalksjdflkjsadifsdnfolsdf",
|
| + authors: ["nobody (Nobody Smith)", "somebody (Somebody Jones)"]
|
| + };
|
| +
|
| + return {
|
| + hash: orig.hash,
|
| + shortHash: limitTo(orig.hash, 7),
|
| + author: limitTo(orig.authors[0], 0)
|
| + };
|
| + }
|
| + }
|
| + },
|
| +
|
| +
|
| + });
|
| + </script>
|
| +</dom-module>
|
|
|