Don't show renumber button for 'renumber' other_action
[invirt/packages/invirt-web.git] / code / templates / info.mako
index 1fb4284..7bec8fd 100644 (file)
@@ -20,6 +20,7 @@ Info on ${machine.name}
   % if on:
    % if 'monitoring' in config and len(config.monitoring) and 'baseuri' in config.monitoring[0]:
     <tr><td>CPU history:</td><td><img src="${config.monitoring[0].baseuri}usage.cgi?type=cpu;uuid=${machine.uuid}" alt="Domain CPU usage" /></td></tr>
+    <tr><td>Network history:</td><td><img src="${config.monitoring[0].baseuri}usage.cgi?type=net;uuid=${machine.uuid}" alt="Domain network usage" /></td></tr>
    % endif
   % endif
 </table>
@@ -46,6 +47,16 @@ Info on ${machine.name}
 % endif
 </form>
 </%def>
+  % if renumber:
+  <div>
+  <p>This machine's IP address is slated to be changed. Your machine's new IP address, netmask, and gateway are shown above. Please configure your machine for DHCP or update the machine's configuration and then press this button:</p>
+    % if on:
+    ${command_button("Power cycle and renumber", "renumber", extra='''onclick="return confirm('Are you sure that you want to power this VM off and on again?');"''')}
+    % else:
+    ${command_button("Renumber", "renumber")}
+    % endif
+  </div>
+  % endif
   <div>
        % if on:
        ${command_button("Power off", "destroy")}