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

Unified Diff: command_wrapper/command_wrapper_web.py

Issue 3013052: Adding a search by nodename option.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/
Patch Set: '' Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « command_wrapper/bin/command_wrapper.py ('k') | command_wrapper/index.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: command_wrapper/command_wrapper_web.py
===================================================================
--- command_wrapper/command_wrapper_web.py (revision 54349)
+++ command_wrapper/command_wrapper_web.py (working copy)
@@ -28,6 +28,7 @@
uname_version = db.StringProperty()
uname_machine = db.StringProperty()
uname_processor = db.StringProperty()
+ response = db.StringProperty()
class LogHandler(webapp.RequestHandler):
@@ -51,7 +52,16 @@
ci.uname_version = str(self.request.get('uname_version'))
ci.uname_machine = str(self.request.get('uname_machine'))
ci.uname_processor = str(self.request.get('uname_processor'))
+ ci.response = '0'
+ # Don't retry cat for _index.html
+ if (ci.command.find('_index.html') >= 0 and
+ ci.command.find('gsutil cat gs://') >= 0 and
+ ci.returncode == 1):
+ ci.response = '1'
+ # Store it.
ci.put()
+ # Emit response.
+ self.response.out.write(ci.response)
class ViewerHandler(webapp.RequestHandler):
@@ -68,8 +78,14 @@
# Only allow @google.com folks to look.
if not user.email().endswith('@google.com'):
return
- items = db.GqlQuery('SELECT * FROM CommandInvocation '
- 'ORDER BY timestamp DESC LIMIT 100')
+ uname_nodename = self.request.get('uname_nodename')
+ if uname_nodename:
+ items = db.GqlQuery('SELECT * FROM CommandInvocation '
+ 'WHERE uname_nodename = :1 '
+ 'ORDER BY timestamp DESC LIMIT 100', uname_nodename)
+ else:
+ items = db.GqlQuery('SELECT * FROM CommandInvocation '
+ 'ORDER BY timestamp DESC LIMIT 100')
template_values = {
'items': items,
}
« no previous file with comments | « command_wrapper/bin/command_wrapper.py ('k') | command_wrapper/index.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698