diff mbox

[Branch,~linaro-validation/lava-scheduler/trunk] Rev 92: Export new menu to lava-server

Message ID 20111109001213.12469.24120.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Zygmunt Krynicki Nov. 9, 2011, 12:12 a.m. UTC
------------------------------------------------------------
revno: 92
committer: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
branch nick: lava-scheduler
timestamp: Wed 2011-11-09 00:56:49 +0100
message:
  Export new menu to lava-server
modified:
  lava_scheduler_app/extension.py


--
lp:lava-scheduler
https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk

You are subscribed to branch lp:lava-scheduler.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_scheduler_app/extension.py'
--- lava_scheduler_app/extension.py	2011-07-26 04:36:41 +0000
+++ lava_scheduler_app/extension.py	2011-11-08 23:56:49 +0000
@@ -17,7 +17,7 @@ 
 # along with LAVA Server.  If not, see <http://www.gnu.org/licenses/>.
 
 import versiontools
-from lava_server.extension import LavaServerExtension
+from lava_server.extension import LavaServerExtension, Menu
 
 import lava_scheduler_app
 
@@ -45,6 +45,15 @@ 
     def main_view_name(self):
         return "lava_scheduler_app.views.index"
 
+    def get_menu(self):
+        from django.core.urlresolvers import reverse
+        menu = super(SchedulerExtension, self).get_menu()
+        menu.sub_menu = [
+            Menu("Status", reverse("lava.scheduler")),
+            Menu("Jobs", reverse("lava.scheduler.job.list")),
+        ]
+        return menu
+
     @property
     def description(self):
         return "Scheduler application for LAVA server"