Show historical domain CPU usage if available.
[invirt/packages/invirt-web.git] / code / templates / info.mako
index 0d1b66b..9628e70 100644 (file)
@@ -12,6 +12,11 @@ Info on ${machine.name}
   <tr><td>${key}:</td><td>${value}</td></tr>
   % endfor
 </table>
+% if on:
+ % if 'monitoring' in config and len(config.monitoring) and 'baseuri' in config.monitoring[0]:
+  <img src="${config.monitoring[0].baseuri}usage.cgi?type=cpu;uuid=${machine.uuid}" alt="Domain CPU usage" />
+ % endif
+% endif
 </%def>
 
 <%def name="commands()">
@@ -47,7 +52,6 @@ Info on ${machine.name}
   <div>
        ${command_button("Delete VM", "delete", extra='''onclick="return confirm('Are you sure that you want to delete this VM?');"''')}
   </div>
-</form>
 </%def>
 
 <%def name="modifyForm()">