diff mbox

[Branch,~linaro-validation/lava-scheduler/trunk] Rev 78: better default sorts and sizes for the scheduler tables

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

Commit Message

Michael-Doyle Hudson Aug. 30, 2011, 4:51 a.m. UTC
------------------------------------------------------------
revno: 78
fixes bug(s): https://launchpad.net/bugs/837061
committer: Michael-Doyle Hudson <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Tue 2011-08-30 16:49:17 +1200
message:
  better default sorts and sizes for the scheduler tables
modified:
  lava_scheduler_app/templates/lava_scheduler_app/alljobs.html
  lava_scheduler_app/templates/lava_scheduler_app/index.html


--
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/templates/lava_scheduler_app/alljobs.html'
--- lava_scheduler_app/templates/lava_scheduler_app/alljobs.html	2011-08-22 05:20:36 +0000
+++ lava_scheduler_app/templates/lava_scheduler_app/alljobs.html	2011-08-30 04:49:17 +0000
@@ -39,7 +39,9 @@ 
       "bJQueryUI": true,
       "aoColumnDefs": [
         { "sType": "num-html", "aTargets": [ "id" ] }
-      ]
+      ],
+      "aaSorting": [[0, "desc"]],
+      "iDisplayLength": 25
     });
   }
 );

=== modified file 'lava_scheduler_app/templates/lava_scheduler_app/index.html'
--- lava_scheduler_app/templates/lava_scheduler_app/index.html	2011-08-22 05:20:36 +0000
+++ lava_scheduler_app/templates/lava_scheduler_app/index.html	2011-08-30 04:49:17 +0000
@@ -3,23 +3,23 @@ 
 {% block content %}
 <h2>Devices</h2>
 
-<table class="display data">
+<table class="display data device">
   <thead>
     <tr>
+      <th>Hostname</th>
       <th>Type</th>
-      <th>Hostname</th>
       <th>Status</th>
     </tr>
   </thead>
   <tbody>
     {% for device in devices %}
     <tr>
-      <td>{{ device.device_type }}</td>
       <td>
         <a href="{% url lava_scheduler_app.views.device pk=device.pk %}">
           {{ device.hostname }}
         </a>
       </td>
+      <td>{{ device.device_type }}</td>
       <td>{{ device.get_status_display }}</td>
     </tr>
     {% endfor %}
@@ -28,7 +28,7 @@ 
 
 <h2>Active Jobs</h2>
 
-<table class="data display">
+<table class="data display job">
   <thead>
     <tr>
       <th class="id">ID</th>
@@ -56,11 +56,16 @@ 
 <script>
 $(document).ready(
   function() {
-    $("table.data").dataTable({
+    $("table.data.device").dataTable({
+      "bJQueryUI": true,
+      "aaSorting": [[0, "asc"]]
+    });
+    $("table.data.job").dataTable({
       "bJQueryUI": true,
       "aoColumnDefs": [
         { "sType": "num-html", "aTargets": [ "id" ] }
-      ]
+      ],
+      "aaSorting": [[0, "asc"]]
     });
   }
 );