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

Side by Side Diff: web/apps/logdog-app/elements/routing.html

Issue 2991253003: [logdog] Replace list view with query view. (Closed)
Patch Set: handle enter for submit Created 3 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
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 <link rel="import" href="../inc/logdog-app-base/logdog-app-base.html"> 7 <link rel="import" href="../inc/logdog-app-base/logdog-app-base.html">
8 8
9 <script> 9 <script>
10 window.addEventListener('WebComponentsReady', function() { 10 window.addEventListener('WebComponentsReady', function() {
(...skipping 30 matching lines...) Expand all
41 41
42 // Routes 42 // Routes
43 page("*", scrollToTop, closeDrawer, function(ctx, next) { 43 page("*", scrollToTop, closeDrawer, function(ctx, next) {
44 next(); 44 next();
45 }); 45 });
46 46
47 page("/", function() { 47 page("/", function() {
48 app.route = "root"; 48 app.route = "root";
49 }); 49 });
50 50
51 page("/list/*", function(data) { 51 page("/query/*", function(data) {
52 app.route = "list"; 52 app.route = "query";
53 app.$.list.base = logdog.correctStreamPath(data.params[0]); 53 app.$.query.base = logdog.correctStreamPath(data.params[0]);
54 }); 54 });
55 55
56 page("/stream/*", function(data) { 56 page("/stream/*", function(data) {
57 app.route = "stream"; 57 app.route = "stream";
58 app.$.stream.streams = logdog.getQueryValues(data.querystring, "s"). 58 app.$.stream.streams = logdog.getQueryValues(data.querystring, "s").
59 map(logdog.correctStreamPath); 59 map(logdog.correctStreamPath);
60 }); 60 });
61 61
62 // 404 62 // 404
63 page(function() { 63 page(function() {
64 app.$.toast.text = "Can't find: " + window.location.href + 64 app.$.toast.text = "Can't find: " + window.location.href +
65 ". Redirected you to Home Page"; 65 ". Redirected you to Home Page";
66 app.$.toast.show(); 66 app.$.toast.show();
67 page.redirect(app.baseUrl); 67 page.redirect(app.baseUrl);
68 }); 68 });
69 69
70 page({ 70 page({
71 hashbang: true, 71 hashbang: true,
72 }); 72 });
73 }); 73 });
74 </script> 74 </script>
OLDNEW
« no previous file with comments | « web/apps/logdog-app/elements/logdog-app/logdog-app.html ('k') | web/inc/apps/logdog-app/main.ts » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698