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

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

Issue 2177353002: Add top level app element (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@hello-oauth
Patch Set: Address feedback and introduce new res/ layer of direction Created 4 years, 4 months 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
(Empty)
1 <!--
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
4 # found in the LICENSE file.
5 -->
6 <!DOCTYPE html>
7 <html>
8 <head>
9 <title>Swarming index Demo</title>
10 <meta charset="utf-8">
11 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
12 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial- scale=1, user-scalable=yes">
13 <script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></scri pt>
14 <script src="../../../node_modules/sinon/pkg/sinon-1.17.2.js"></script>
15
16 <script type="text/javascript" charset="utf-8">
17 sinon.format = function(object) {return JSON.stringify(object);}
18 sinon.log = function(message) {console.log(message);};
19 var server = sinon.fakeServer.create();
20 server.autoRespondAfter = 1200;
21 server.autoRespond = true;
22
23 var details = {
24 server_version: "not-quite-ready",
25 };
26
27 var respond = function(request){
28 if (!request.requestHeaders.authorization) {
29 sinon.log("You must be logged in (check your Oauth?)");
30 request.respond(403, {}, "You must be logged in (check your Oauth?)");
31 return;
32 }
33 sinon.log("User authenticated :) "+ request.requestHeaders.authorization);
34 request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(d etails));
35 }
36
37 server.respondWith("GET", "/_ah/api/swarming/v1/server/details", respond);
38 server.respondWith("GET", "/api/swarming/v1/server/details", respond);
39 </script>
40
41 <link rel="import" href="swarming-index.html">
42 </head>
43 <body>
44
45 <swarming-index></swarming-index>
46
47 </body>
48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698