[Et-mgmt-commits-list] [SCM] virt-factory branch, master now at 28956037d1d5da9ac98f6421f8500889f3efafd7

Michael DeHaan mdehaan at redhat.com
Wed Apr 25 20:57:58 UTC 2007


Hello,

This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.

Updating branch, master,
       via  28956037d1d5da9ac98f6421f8500889f3efafd7 (commit)
       via  e067571fbd93bf4d85f841508ea35067cb7f49de (commit)
       via  2e2ea6d19d883e3e978bff377a72f87bcb8f1814 (commit)
       via  f5089d2f2231be2f256d2f831018155989352870 (commit)
      from  b2c5b50101a04436d3d33067862db96d8485303c (commit)

- Log -----------------------------------------------------------------
commit 28956037d1d5da9ac98f6421f8500889f3efafd7
Merge: e067571... b2c5b50...
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Wed Apr 25 16:59:26 2007 -0400

    Merge with git+ssh://g-mdehaan@et.redhat.com/git/virt-factory

commit e067571fbd93bf4d85f841508ea35067cb7f49de
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Wed Apr 25 16:59:03 2007 -0400

    Fix task display in WUI (element display name typo)

commit 2e2ea6d19d883e3e978bff377a72f87bcb8f1814
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Wed Apr 25 16:55:15 2007 -0400

    Dropdowns should select the -1 row to accomodate the DB "NOT NONE"
    restrictions, rather than using None.

commit f5089d2f2231be2f256d2f831018155989352870
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Wed Apr 25 16:48:00 2007 -0400

    Log inserts and edits at a higher priority than queries, so interesting
    data still appears in logs.
-----------------------------------------------------------------------

Diffstat:
 service/server/db_util.py                          |   17 +++++++++--------
 .../app/controllers/abstract_object_controller.rb  |    1 +
 wui/src/app/controllers/task_controller.rb         |    6 +++---
 wui/src/app/views/task/list.rhtml                  |    2 +-
 4 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/service/server/db_util.py b/service/server/db_util.py
index a807183..1d9a1ff 100755
--- a/service/server/db_util.py
+++ b/service/server/db_util.py
@@ -206,8 +206,8 @@ class DbUtil(object):
         buf = "UPDATE " + self.db_schema["table"] + " SET "
         buf = buf + ", ".join([x + "=:" + x for x in edit_keys])
         buf = buf + " WHERE id=:id"
-        self.logger.debug("SQL = %s" % buf)
-        self.logger.debug("ARGS = %s" % args)
+        self.logger.info("SQL = %s" % buf)
+        self.logger.info("ARGS = %s" % args)
         self.cursor.execute(buf, args)
         self.connection.commit()
         return success()  # FIXME: is this what edit should return?
@@ -228,23 +228,23 @@ class DbUtil(object):
         lock.acquire() 
 
         try:
-            self.logger.debug("SQL = %s" % buf)
-            self.logger.debug("ARGS = %s" % args)
+            self.logger.info("SQL = %s" % buf)
+            self.logger.info("ARGS = %s" % args)
             self.cursor.execute(buf, args)
             self.connection.commit()
         except Exception:
             lock.release()
             # temporary...
             (t, v, tb) = sys.exc_info()
-            self.logger.debug("Exception occured: %s" % t )
-            self.logger.debug("Exception value: %s" % v)
-            self.logger.debug("Exception Info:\n%s" % string.join(traceback.format_list(traceback.extract_tb(tb))))
+            self.logger.info("Exception occured: %s" % t )
+            self.logger.info("Exception value: %s" % v)
+            self.logger.info("Exception Info:\n%s" % string.join(traceback.format_list(traceback.extract_tb(tb))))
             raise SQLException(traceback=traceback.format_exc())
          
         rowid = self.cursor.lastrowid
         lock.release()
     
-        self.logger.debug("SUCCESS, rowid= %s" % rowid)
+        self.logger.info("SUCCESS, rowid= %s" % rowid)
         return success(rowid)
 
     def simple_delete(self,args):
@@ -255,6 +255,7 @@ class DbUtil(object):
             raise NoSuchObjectException()
 
         buf = "DELETE FROM " + self.db_schema["table"] + " WHERE id=:id" 
+        self.logger.info("DELETING, rowid=%s" % args["id"])
         self.cursor.execute(buf, args)
         self.connection.commit()
         return success()
diff --git a/wui/src/app/controllers/abstract_object_controller.rb b/wui/src/app/controllers/abstract_object_controller.rb
index f804fe0..e39cc30 100755
--- a/wui/src/app/controllers/abstract_object_controller.rb
+++ b/wui/src/app/controllers/abstract_object_controller.rb
@@ -8,6 +8,7 @@ class AbstractObjectController < ApplicationController
     # this is a variable that is used in making a blank entry in dropdowns for various things.  
     # FIXME: does this belong in this class?  Not sure.
     EMPTY_ENTRY = ["-None-", ""]
+    EMPTY_ENTRY_NOT_NONE = [ "-None-", -1]
 
     # by default, requesting a URL of the form /controller instead of /controller/action will
     # always redirect to the list page for controller.
diff --git a/wui/src/app/controllers/task_controller.rb b/wui/src/app/controllers/task_controller.rb
index f738898..cd65fc2 100755
--- a/wui/src/app/controllers/task_controller.rb
+++ b/wui/src/app/controllers/task_controller.rb
@@ -57,9 +57,9 @@ class TaskController < AbstractObjectController
            [ "Destroy Virt",  TASK_OPERATION_DESTROY_VIRT  ],
            [ "Test",          TASK_OPERATION_TEST          ],
        ]
-       @users.insert(0,EMPTY_ENTRY)
-       @machines.insert(0,EMPTY_ENTRY)
-       @deployments.insert(0,EMPTY_ENTRY)
+       @users.insert(0,EMPTY_ENTRY_NOT_NONE)
+       @machines.insert(0,EMPTY_ENTRY_NOT_NONE)
+       @deployments.insert(0,EMPTY_ENTRY_NOT_NONE)
 
        # FIXME: finish
     end
diff --git a/wui/src/app/views/task/list.rhtml b/wui/src/app/views/task/list.rhtml
index 2e28f17..bdff12f 100755
--- a/wui/src/app/views/task/list.rhtml
+++ b/wui/src/app/views/task/list.rhtml
@@ -20,7 +20,7 @@
       <% @items.each do |item| %>
          <TR>
              <TD> <% if item.get_user().username != "system" %>
-                      <%= link_to item.get_user().username, :controller => "user", :action => "edit", :id => userid %>
+                      <%= link_to item.get_user().username, :controller => "user", :action => "edit", :id => item.user_id %>
                   <% else %>
                       system
                   <% end %>

hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
  b2c5b50101a04436d3d33067862db96d8485303c \
  28956037d1d5da9ac98f6421f8500889f3efafd7




More information about the Et-mgmt-commits-list mailing list