Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: appengine/swarming/ui/res/imp/index/swarming-index-demo.html

Issue 2511463003: Move error-toast up and make server details problems easy to see (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 # Copyright 2016 The LUCI Authors. All rights reserved. 2 # Copyright 2016 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed by the Apache v2.0 license that can be 3 # Use of this source code is governed by the Apache v2.0 license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 --> 5 -->
6 <!DOCTYPE html> 6 <!DOCTYPE html>
7 <html> 7 <html>
8 <head> 8 <head>
9 <title>Swarming index Demo</title> 9 <title>Swarming index Demo</title>
10 <meta charset="utf-8"> 10 <meta charset="utf-8">
(...skipping 14 matching lines...) Expand all
25 var server = sinon.fakeServer.create(); 25 var server = sinon.fakeServer.create();
26 server.autoRespondAfter = 1200; 26 server.autoRespondAfter = 1200;
27 server.autoRespond = true; 27 server.autoRespond = true;
28 28
29 var details = { 29 var details = {
30 server_version: "1234-deadbeef", 30 server_version: "1234-deadbeef",
31 bot_version: "abcdoeraymeyouandme", 31 bot_version: "abcdoeraymeyouandme",
32 }; 32 };
33 33
34 var respond = function(request){ 34 var respond = function(request){
35 if (!request.requestHeaders.authorization) { 35 if (!request.requestHeaders.authorization || true) {
36 sinon.log("You must be logged in (check your Oauth?)"); 36 sinon.log("You must be logged in (check your Oauth?)");
37 request.respond(403, {}, "You must be logged in (check your Oauth?)"); 37 request.respond(403, {}, "You must be logged in (check your Oauth?)");
38 return; 38 return;
39 } 39 }
40 sinon.log("User authenticated :) "+ request.requestHeaders.authorization); 40 sinon.log("User authenticated :) "+ request.requestHeaders.authorization);
41 request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(d etails)); 41 request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(d etails));
42 } 42 }
43 43
44 server.respondWith("GET", /^\/_ah\/api\/swarming\/v1\/server\/details/, res pond); 44 server.respondWith("GET", /^\/_ah\/api\/swarming\/v1\/server\/details/, res pond);
45 server.respondWith("GET", /^\/api\/swarming\/v1\/server\/details/, respond); 45 server.respondWith("GET", /^\/api\/swarming\/v1\/server\/details/, respond);
(...skipping 16 matching lines...) Expand all
62 <link rel="import" href="swarming-index.html"> 62 <link rel="import" href="swarming-index.html">
63 </head> 63 </head>
64 <body> 64 <body>
65 65
66 <swarming-index 66 <swarming-index
67 client_id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercontent .com"> 67 client_id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercontent .com">
68 </swarming-index> 68 </swarming-index>
69 69
70 </body> 70 </body>
71 </html> 71 </html>
OLDNEW
« no previous file with comments | « appengine/swarming/ui/res/imp/common/swarming-app.html ('k') | appengine/swarming/ui/res/imp/tasklist/task-list.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698