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

Side by Side Diff: appengine/swarming/elements/res/imp/tasklist/task-list-demo.html

Issue 2266133002: Add filter to task-list (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@extract-filters
Patch Set: Fix default sort Created 4 years, 3 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
« no previous file with comments | « appengine/swarming/elements/res/imp/tasklist/task-list-data.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 under the Apache License, Version 2.0 3 Use of this source code is governed under the Apache License, Version 2.0
4 that can be found in the LICENSE file. 4 that can be found in the LICENSE file.
5 5
6 --> 6 -->
7 <!DOCTYPE html> 7 <!DOCTYPE html>
8 <html> 8 <html>
9 <head> 9 <head>
10 <title>task-list Demo</title> 10 <title>task-list Demo</title>
11 <meta charset="utf-8"> 11 <meta charset="utf-8">
12 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 12 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
13 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial- scale=1, user-scalable=yes"> 13 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial- scale=1, user-scalable=yes">
14 <script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></scri pt> 14 <script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></scri pt>
15 <script src="../../../node_modules/skia-common-js/common.js"></script> 15 <script src="../../../node_modules/skia-common-js/common.js"></script>
16 <script src="/res/js/common.js"></script> 16 <script src="/res/js/common.js"></script>
17 <script src="/res/js/alias.js"></script> 17 <script src="/res/js/alias.js"></script>
18 <script src="../../../node_modules/sinon/pkg/sinon-1.17.5.js"></script> 18 <script src="../../../node_modules/sinon/pkg/sinon-1.17.5.js"></script>
19 <!-- Makes a var called list--> 19 <!-- Makes a var called list-->
20 <script type="text/javascript" src="task-list-demo.json"></script> 20 <script type="text/javascript" src="task-list-demo.json"></script>
21 <!-- Makes a var called tags-->
22 <script type="text/javascript" src="task-tags-demo.json"></script>
23 <!-- Makes a var called fleetData-->
24 <script type="text/javascript" src="task-list-fleet-data-demo.json"></script>
21 25
22 <script type="text/javascript" charset="utf-8"> 26 <script type="text/javascript" charset="utf-8">
23 sinon.format = function(object) {return JSON.stringify(object);} 27 sinon.format = function(object) {return JSON.stringify(object);}
24 sinon.log = function(message) {console.log(message);}; 28 sinon.log = function(message) {console.log(message);};
25 var server = sinon.fakeServer.create(); 29 var server = sinon.fakeServer.create();
26 server.autoRespond = true; 30 server.autoRespond = true;
27 //server.autoRespondAfter = 2000; 31 server.autoRespondAfter = 1000;
28 32
29 var respond = function(request){ 33 var respond = function(request){
30 if (!request.requestHeaders.authorization) { 34 if (!request.requestHeaders.authorization) {
31 sinon.log("You must be logged in (check your Oauth?)"); 35 sinon.log("You must be logged in (check your Oauth?)");
32 request.respond(403, {}, "You must be logged in (check your Oauth?)"); 36 request.respond(403, {}, "You must be logged in (check your Oauth?)");
33 return; 37 return;
34 } 38 }
35 sinon.log("User authenticated :) "+ request.requestHeaders.authorization); 39 sinon.log("User authenticated :) "+ request.requestHeaders.authorization);
36 sinon.log("List Request: "+sinon.format(request)); 40 sinon.log("List Request: "+sinon.format(request));
37 request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(l ist)); 41 request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(l ist));
38 } 42 }
39 43
40 server.respondWith("GET", /^\/api\/swarming\/v1\/tasks\/list.*/, respond); 44 server.respondWith("GET", /^\/api\/swarming\/v1\/tasks\/list.*/, respond);
41 server.respondWith("GET", /^\/_ah\/api\/swarming\/v1\/tasks\/list.*/, respon d); 45 server.respondWith("GET", /^\/_ah\/api\/swarming\/v1\/tasks\/list.*/, respon d);
42 46
47 server.respondWith("GET", /^\/_ah\/api\/swarming\/v1\/tasks\/tags/, JSON.str ingify(tags));
48 server.respondWith("GET", /^\/api\/swarming\/v1\/tasks\/tags/, JSON.stringif y(tags));
49
50 server.respondWith("GET", /^\/_ah\/api\/swarming\/v1\/bots\/dimensions/, JSO N.stringify(fleetData));
51 server.respondWith("GET", /^\/api\/swarming\/v1\/bots\/dimensions/, JSON.str ingify(fleetData));
52
53 var cancel = function(request) {
54 console.log("Cancelling", request);
55 if (!request.requestHeaders.authorization) {
56 sinon.log("You must be logged in (check your Oauth?)");
57 request.respond(403, {}, "You must be logged in (check your Oauth?)");
58 return;
59 }
60 request.respond(200, {}, "Task has been cancelled");
61 }
62
63 server.respondWith("POST", /^\/_ah\/api\/swarming\/v1\/task\/.+\/cancel/, ca ncel);
64 server.respondWith("POST", /^\/api\/swarming\/v1\/task\/.+\/cancel/, cancel) ;
43 </script> 65 </script>
44 66
45 <link rel="import" href="task-list.html"> 67 <link rel="import" href="task-list.html">
46 </head> 68 </head>
47 <body> 69 <body>
48 70
49 <task-list 71 <task-list
50 client_id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercontent .com"> 72 client_id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercontent .com">
51 </task-list> 73 </task-list>
52 74
53 </body> 75 </body>
54 </html> 76 </html>
OLDNEW
« no previous file with comments | « appengine/swarming/elements/res/imp/tasklist/task-list-data.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698