| <html> |
| <head> |
| <title>arb-status-sk demo</title> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes"> |
| <script src="/res/common/js/common.js"></script> |
| <script src="/res/imp/bower_components/webcomponentsjs/webcomponents-lite.js"></script> |
| <script type="text/javascript"> |
| var fakeStatus = { |
| "currentRollRev": "3c2d09f89ae119de506722f550a6e28305d4813f", |
| "numFailed": 1, |
| "numBehind": 10, |
| "childHead": "", |
| "currentRoll": { |
| "closed": false, |
| "commitQueue": true, |
| "committed": false, |
| "cqDryRun": false, |
| "created": "2017-08-28T18:01:25Z", |
| "issue": 638832, |
| "modified": "2017-08-28T18:02:24Z", |
| "patchSets": [ |
| 1 |
| ], |
| "result": "in progress", |
| "rollingFrom": "e94871bf8308b72ed44353956f1ff6c4ba6e7597", |
| "rollingTo": "3c2d09f89ae119de506722f550a6e28305d4813f", |
| "subject": "Roll src/third_party/skia/ e94871bf8..3c2d09f89 (10 commits)", |
| "tryResults": [ |
| { |
| "builder": "android_arm64_dbg_recipe", |
| "category": "cq", |
| "created_ts": "2017-08-28T18:03:49.65208Z", |
| "result": "", |
| "status": "STARTED", |
| "url": "https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/337040" |
| }, |
| { |
| "builder": "ios-simulator-xcode-clang", |
| "category": "cq_experimental", |
| "created_ts": "2017-08-28T18:03:44.26696Z", |
| "result": "SUCCESS", |
| "status": "COMPLETED", |
| "url": "http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xcode-clang/builds/136873" |
| }, |
| { |
| "builder": "win_optional_gpu_tests_rel", |
| "category": "cq", |
| "created_ts": "2017-08-28T18:03:49.65146Z", |
| "result": "FAILURE", |
| "status": "COMPLETED", |
| "url": "http://build.chromium.org/p/tryserver.chromium.win/builders/win_optional_gpu_tests_rel/builds/13936" |
| } |
| ] |
| }, |
| "error": "", |
| "issueUrlBase": "https://chromium-review.googlesource.com/c/", |
| "fullHistoryUrl": "https://chromium-review.googlesource.com/q/owner:skia-deps-roller@chromium.org", |
| "lastRoll": { |
| "closed": true, |
| "commitQueue": false, |
| "committed": false, |
| "cqDryRun": false, |
| "created": "2017-08-28T16:53:06Z", |
| "issue": 638315, |
| "modified": "2017-08-28T17:59:12Z", |
| "patchSets": [ |
| 1 |
| ], |
| "result": "failed", |
| "rollingFrom": "e94871bf8308b72ed44353956f1ff6c4ba6e7597", |
| "rollingTo": "7dda8dfb9d90f633af9a457b1c430f7cbf5536c5", |
| "subject": "Roll src/third_party/skia/ e94871bf8..7dda8dfb9 (3 commits)", |
| "tryResults": [] |
| }, |
| "lastRollRev": "e94871bf8308b72ed44353956f1ff6c4ba6e7597", |
| "mode": { |
| "message": "Let's roll!", |
| "mode": "running", |
| "time": "2017-08-19T21:37:00.149346729Z", |
| "user": "user@google.com" |
| }, |
| "parentWaterfall": "https://build.chromium.org", |
| "recent": [ |
| { |
| "closed": false, |
| "commitQueue": true, |
| "committed": false, |
| "cqDryRun": false, |
| "created": "2017-08-28T18:01:25Z", |
| "issue": 638832, |
| "modified": "2017-08-28T18:02:24Z", |
| "patchSets": [ |
| 1 |
| ], |
| "result": "in progress", |
| "rollingFrom": "e94871bf8308b72ed44353956f1ff6c4ba6e7597", |
| "rollingTo": "3c2d09f89ae119de506722f550a6e28305d4813f", |
| "subject": "Roll src/third_party/skia/ e94871bf8..3c2d09f89 (10 commits)", |
| "tryResults": [] |
| }, |
| { |
| "closed": true, |
| "commitQueue": false, |
| "committed": false, |
| "cqDryRun": false, |
| "created": "2017-08-28T16:53:06Z", |
| "issue": 638315, |
| "modified": "2017-08-28T17:59:12Z", |
| "patchSets": [ |
| 1 |
| ], |
| "result": "failed", |
| "rollingFrom": "e94871bf8308b72ed44353956f1ff6c4ba6e7597", |
| "rollingTo": "7dda8dfb9d90f633af9a457b1c430f7cbf5536c5", |
| "subject": "Roll src/third_party/skia/ e94871bf8..7dda8dfb9 (3 commits)", |
| "tryResults": [] |
| }, |
| { |
| "closed": true, |
| "commitQueue": true, |
| "committed": true, |
| "cqDryRun": false, |
| "created": "2017-08-28T15:18:11Z", |
| "issue": 638490, |
| "modified": "2017-08-28T16:50:02Z", |
| "patchSets": [ |
| 1, |
| 2 |
| ], |
| "result": "succeeded", |
| "rollingFrom": "26acbe8a89250a7c06f43d1668c3a0dea9da289d", |
| "rollingTo": "e94871bf8308b72ed44353956f1ff6c4ba6e7597", |
| "subject": "Roll src/third_party/skia/ 26acbe8a8..e94871bf8 (1 commit)", |
| "tryResults": [] |
| }, |
| { |
| "closed": true, |
| "commitQueue": true, |
| "committed": true, |
| "cqDryRun": false, |
| "created": "2017-08-28T10:46:01Z", |
| "issue": 637492, |
| "modified": "2017-08-28T12:09:41Z", |
| "patchSets": [ |
| 1, |
| 2 |
| ], |
| "result": "succeeded", |
| "rollingFrom": "c5feebf2231367dda7b5d2b4a01b4546977c1ce3", |
| "rollingTo": "26acbe8a89250a7c06f43d1668c3a0dea9da289d", |
| "subject": "Roll src/third_party/skia/ c5feebf22..26acbe8a8 (1 commit)", |
| "tryResults": [] |
| }, |
| { |
| "closed": true, |
| "commitQueue": true, |
| "committed": true, |
| "cqDryRun": false, |
| "created": "2017-08-28T09:08:01Z", |
| "issue": 637570, |
| "modified": "2017-08-28T10:19:22Z", |
| "patchSets": [ |
| 1, |
| 2 |
| ], |
| "result": "succeeded", |
| "rollingFrom": "95a34fe28a9de960ab9821c6e21fdfc3038f79c8", |
| "rollingTo": "c5feebf2231367dda7b5d2b4a01b4546977c1ce3", |
| "subject": "Roll src/third_party/skia/ 95a34fe28..c5feebf22 (1 commit)", |
| "tryResults": [] |
| }, |
| { |
| "closed": true, |
| "commitQueue": true, |
| "committed": true, |
| "cqDryRun": false, |
| "created": "2017-08-28T07:34:49Z", |
| "issue": 637065, |
| "modified": "2017-08-28T08:44:26Z", |
| "patchSets": [ |
| 1, |
| 2 |
| ], |
| "result": "succeeded", |
| "rollingFrom": "c4e5b04f9bfc3214896cb19074c7112eb27b3940", |
| "rollingTo": "95a34fe28a9de960ab9821c6e21fdfc3038f79c8", |
| "subject": "Roll src/third_party/skia/ c4e5b04f9..95a34fe28 (1 commit)", |
| "tryResults": [] |
| }, |
| { |
| "closed": true, |
| "commitQueue": true, |
| "committed": true, |
| "cqDryRun": false, |
| "created": "2017-08-28T05:08:04Z", |
| "issue": 636528, |
| "modified": "2017-08-28T06:53:55Z", |
| "patchSets": [ |
| 1, |
| 2 |
| ], |
| "result": "succeeded", |
| "rollingFrom": "b6ee256ae96c4445b213948da9405364efe5b912", |
| "rollingTo": "c4e5b04f9bfc3214896cb19074c7112eb27b3940", |
| "subject": "Roll src/third_party/skia/ b6ee256ae..c4e5b04f9 (1 commit)", |
| "tryResults": [] |
| }, |
| { |
| "closed": true, |
| "commitQueue": true, |
| "committed": true, |
| "cqDryRun": false, |
| "created": "2017-08-28T03:51:10Z", |
| "issue": 637243, |
| "modified": "2017-08-28T05:04:34Z", |
| "patchSets": [ |
| 1, |
| 2 |
| ], |
| "result": "succeeded", |
| "rollingFrom": "0b5cd8fed9541ba23b86d7d026e6160b340a4064", |
| "rollingTo": "b6ee256ae96c4445b213948da9405364efe5b912", |
| "subject": "Roll src/third_party/skia/ 0b5cd8fed..b6ee256ae (1 commit)", |
| "tryResults": [] |
| }, |
| { |
| "closed": true, |
| "commitQueue": true, |
| "committed": true, |
| "cqDryRun": false, |
| "created": "2017-08-27T20:35:54Z", |
| "issue": 636855, |
| "modified": "2017-08-27T21:41:47Z", |
| "patchSets": [ |
| 1, |
| 2 |
| ], |
| "result": "succeeded", |
| "rollingFrom": "7f810b4e1076c646b9ec7dd939ccaa1f87c659d4", |
| "rollingTo": "0b5cd8fed9541ba23b86d7d026e6160b340a4064", |
| "subject": "Roll src/third_party/skia/ 7f810b4e1..0b5cd8fed (1 commit)", |
| "tryResults": [] |
| }, |
| { |
| "closed": true, |
| "commitQueue": true, |
| "committed": true, |
| "cqDryRun": false, |
| "created": "2017-08-27T07:59:59Z", |
| "issue": 636849, |
| "modified": "2017-08-27T09:23:32Z", |
| "patchSets": [ |
| 1, |
| 2 |
| ], |
| "result": "succeeded", |
| "rollingFrom": "cd25f63484badeac976b91506ce67a7dbd3c904c", |
| "rollingTo": "7f810b4e1076c646b9ec7dd939ccaa1f87c659d4", |
| "subject": "Roll src/third_party/skia/ cd25f6348..7f810b4e1 (1 commit)", |
| "tryResults": [] |
| } |
| ], |
| "status": "safety throttled", |
| "strategy": { |
| "message": "Setting initial strategy", |
| "strategy": "batch", |
| "time": "2017-08-19T21:37:00.149346729Z", |
| "user": "user@google.com" |
| }, |
| "throttledUntil": 1594080000, |
| "validModes": [ |
| "running", |
| "stopped", |
| "dry run" |
| ], |
| "validStrategies": [ |
| "batch", |
| "single" |
| ] |
| }; |
| |
| |
| var params = sk.query.toParamSet(window.location.search.substring(1)); |
| if (params.status == "error") { |
| fakeStatus["status"] = "error"; |
| fakeStatus["error"] = "Error message goes here!"; |
| } |
| |
| // Mock out sk.get and sk.post so we can fake a response from the server. |
| sk.get = function(url) { |
| return new Promise(function (resolve, reject) { |
| if (url == "/json/status") { |
| resolve(JSON.stringify(fakeStatus)); |
| } else if (url == "/loginstatus/") { |
| resolve('{"Email":"user@google.com","LoginURL":"https://accounts.google.com/","IsAGoogler":true}'); |
| } else { |
| reject("Unknown url " + url); |
| } |
| }); |
| }; |
| |
| sk.post = function(url, body) { |
| if (url === "/json/mode") { |
| return new Promise(function(resolve, reject) { |
| var res = JSON.parse(body); |
| res["user"] = "you@google.com"; |
| var validMode = fakeStatus["validModes"].indexOf(res.mode); |
| if (validMode >= 0) { |
| fakeStatus["mode"] = res; |
| resolve(JSON.stringify(fakeStatus)); |
| } else { |
| reject("Invalid mode: " + res.mode + "; valid modes: " + fakeStatus["validModes"]); |
| } |
| }); |
| } else if (url === "/json/strategy") { |
| return new Promise(function(resolve, reject) { |
| var res = JSON.parse(body); |
| res["user"] = "you@google.com"; |
| var validStrategy = fakeStatus["validStrategies"].indexOf(res.strategy); |
| if (validStrategy >= 0) { |
| fakeStatus["strategy"] = res; |
| resolve(JSON.stringify(fakeStatus)); |
| } else { |
| reject("Invalid strategy: " + res.strategy + "; valid strategies: " + fakeStatus["validStrategies"]); |
| } |
| }); |
| } else if (url === "/json/unthrottle") { |
| return new Promise(function(resolve, reject) { |
| resolve(); |
| }); |
| } |
| }; |
| </script> |
| <link rel=import href="arb-status-sk.html"> |
| <link rel=import href="/res/common/imp/error-toast-sk.html"> |
| <link rel=import href="/res/common/imp/login.html"> |
| </head> |
| <body> |
| <login-sk style="display:none"></login-sk> |
| <h1>arb-status-sk demo</h1> |
| <arb-status-sk></arb-status-sk> |
| <error-toast-sk></error-toast-sk> |
| </body> |
| </html> |