Fix table HTML 93/21393/1
authormaxbr <maxbr@mi.fu-berlin.de>
Mon, 19 Sep 2016 08:10:54 +0000 (10:10 +0200)
committermaxbr <maxbr@mi.fu-berlin.de>
Mon, 19 Sep 2016 08:10:54 +0000 (10:10 +0200)
JIRA: RELENG-12

Change-Id: I780c1fc0daab9ee2f2599c51f31eb416a2c7dbbf
Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
tools/pharos-dashboard/static/js/flot-pie-chart.js
tools/pharos-dashboard/templates/account/user_list.html
tools/pharos-dashboard/templates/booking/booking_table.html
tools/pharos-dashboard/templates/dashboard/ci_pods.html
tools/pharos-dashboard/templates/dashboard/dev_pods.html
tools/pharos-dashboard/templates/dashboard/jenkins_slaves.html
tools/pharos-dashboard/templates/dashboard/resource_detail.html
tools/pharos-dashboard/templates/dashboard/server_table.html

index 98d174e..cf8d976 100644 (file)
@@ -4,14 +4,12 @@ function loadChartData(chart_id, url) {
         type: 'get',
         success: function (data) {
             var data = data['data'];
-            $(function () {
-                var plotObj = $.plot($("#" + chart_id), data, {
-                    series: {
-                        pie: {
-                            show: true
-                        }
+            var plotObj = $.plot($("#" + chart_id), data, {
+                series: {
+                    pie: {
+                        show: true
                     }
-                });
+                }
             });
         },
         failure: function (data) {
index 7618dc9..c2b8193 100644 (file)
     <tbody>
     {% for user in users %}
         <tr>
-            <th>
+            <td>
                 {{ user.username }}
-            </th>
-            <th>
+            </td>
+            <td>
                 {{ user.userprofile.company }}
-            </th>
-            <th>
-                <a href={{ user.userprofile.ssh_public_key.url }}>Download</a>
-            </th>
-            <th>
-                <a href={{ user.userprofile.pgp_public_key.url }}>Download</a>
-            </th>
+            </td>
+            <td>
+               {% if user.userprofile.ssh_public_key %}
+                <a href={{ user.userprofile.ssh_public_key.url }}>SSH</a>
+               {% endif %}
+            </td>
+            <td>
+               {% if user.userprofile.pgp_public_key %}
+                <a href={{ user.userprofile.pgp_public_key.url }}>GPG</a>
+               {% endif %}
+            </td>
         </tr>
     {% endfor %}
     </tbody>
@@ -39,4 +43,4 @@
             });
         });
     </script>
-{% endblock tablejs %}
\ No newline at end of file
+{% endblock tablejs %}
index 3d0b757..216eaf5 100644 (file)
 <tbody>
 {% for booking in bookings %}
     <tr>
-        <th>
+        <td>
             {{ booking.user.username }}
-        </th>
-        <th>
+        </td>
+        <td>
             {{ booking.purpose }}
-        </th>
-        <th>
+        </td>
+        <td>
             {{ booking.start }}
-        </th>
-        <th>
+        </td>
+        <td>
             {{ booking.end }}
-        </th>
-        <th><a target='_blank'
+        </td>
+        <td><a target='_blank'
                href={{ booking.get_jira_issue | jira_issue_url }}>{{ booking.get_jira_issue }}</a>
-        </th>
+        </td>
     </tr>
 {% endfor %}
 </tbody>
\ No newline at end of file
index a754252..7ef62a4 100644 (file)
     <tbody>
     {% for pod in ci_pods %}
         <tr>
-            <th>
+            <td>
                 <a target='_blank' href={{ pod.url }}>{{ pod.name }}</a>
-            </th>
-            <th>
+            </td>
+            <td>
                 <a target='_blank' href={{ pod.slave.url }}>{{ pod.slave.name }}</a>
-            </th>
-            <th style="background-color:{{ pod.slave.status | jenkins_status_color }}">
+            </td>
+            <td style="background-color:{{ pod.slave.status | jenkins_status_color }}">
                 {{ pod.slave.status }}
-            </th>
-            <th {{ pod.slave.last_job_result | jenkins_job_blink }}>
+            </td>
+            <td {{ pod.slave.last_job_result | jenkins_job_blink }}>
                 {{ pod.slave.last_job_installer }}
-            </th>
-            <th {{ pod.slave.last_job_result | jenkins_job_blink }}>
+            </td>
+            <td {{ pod.slave.last_job_result | jenkins_job_blink }}>
                 {{ pod.slave.last_job_scenario }}
-            </th>
-            <th {{ pod.slave.last_job_result | jenkins_job_blink }}>
+            </td>
+            <td {{ pod.slave.last_job_result | jenkins_job_blink }}>
                 {{ pod.slave.last_job_branch }}
-            </th>
-            <th><a {{ pod.slave.last_job_result | jenkins_job_blink }}
+            </td>
+            <td><a {{ pod.slave.last_job_result | jenkins_job_blink }}
                     style="color:{{ pod.slave.last_job_result | jenkins_job_color }}"
                     target='_blank'
                     href={{ pod.slave.last_job_url }}>{{ pod.slave.last_job_name }}</a>
-            </th>
+            </td>
         </tr>
     {% endfor %}
     </tbody>
index c4cb1ba..2b4b017 100644 (file)
     <tbody>
     {% for pod, booking, utilization in dev_pods %}
         <tr>
-            <th>
+            <td>
                 <a href={% url 'dashboard:resource' resource_id=pod.id %}>{{ pod.name }}</a>
-            </th>
-            <th>
+            </td>
+            <td>
                 <a target='_blank' href={{ pod.slave.url }}>{{ pod.slave.name }}</a>
-            </th>
-            <th>
+            </td>
+            <td>
                 {{ booking.user.username }}
-            </th>
-            <th>
+            </td>
+            <td>
                 {{ booking.end }}
-            </th>
-            <th>
+            </td>
+            <td>
                 {{ booking.purpose }}
-            </th>
-            <th>
+            </td>
+            <td>
                 {{ utilization }}
-            </th>
-            <th style="background-color:{{ pod.slave.status | jenkins_status_color }}">
+            </td>
+            <td style="background-color:{{ pod.slave.status | jenkins_status_color }}">
                 {{ pod.slave.status }}
-            </th>
-            <th>
+            </td>
+            <td>
                 <a href="{% url 'booking:create' resource_id=pod.id %}" class="btn btn-primary">
                     Book
                 </a>
-            </th>
-            <th>
+            </td>
+            <td>
                 <a href="{% url 'dashboard:resource' resource_id=pod.id %}" class="btn btn-primary">
                     Info
                 </a>
-            </th>
+            </td>
         </tr>
     {% endfor %}
     </tbody>
index 830ed19..aa74507 100644 (file)
     <tbody>
     {% for slave in slaves %}
         <tr>
-            <th><a target='_blank'
+            <td><a target='_blank'
                    href={{ slave.url }}>{{ slave.name }}</a>
-            </th>
-            <th style="background-color:{{ slave.status | jenkins_status_color }}">
+            </td>
+            <td style="background-color:{{ slave.status | jenkins_status_color }}">
                 {{ slave.status }}
-            </th>
-            <th><a {{ slave.last_job_result | jenkins_job_blink }}
+            </td>
+            <td><a {{ slave.last_job_result | jenkins_job_blink }}
                     style="color:{{ slave.last_job_result | jenkins_job_color }}"
                     target="_blank" href={{ slave.last_job_url }}>
                 {{ slave.last_job_name }}</a>
-            </th>
+            </td>
         </tr>
     {% endfor %}
     </tbody>
index 6067e1e..657d565 100644 (file)
                         <tbody>
                         {% for user in resource.vpn_users.all %}
                             <tr>
-                                <th>
+                                <td>
                                     {{ user.username }}
-                                </th>
-                                <th>
+                                </td>
+                                <td>
                                     {{ user.email }}
-                                </th>
-                                <th>
+                                </td>
+                                <td>
                                     {{ user.userprofile.company }}
-                                </th>
+                                </td>
                             </tr>
                         {% endfor %}
                     </table>
index fee7e8b..f01bd60 100644 (file)
 <tbody>
 {% for server in resource.server_set.all %}
     <tr>
-        <th>
+        <td>
             {{ server.name }}
-        </th>
-        <th>
+        </td>
+        <td>
             {{ server.model }}
-        </th>
-        <th>
+        </td>
+        <td>
             {{ server.cpu }}
-        </th>
-        <th>
+        </td>
+        <td>
             {{ server.ram }}
-        </th>
-        <th>
+        </td>
+        <td>
             {{ server.storage }}
-        </th>
+        </td>
     </tr>
 {% endfor %}
 </tbody>
\ No newline at end of file