Add stop/start and state for vps

This commit is contained in:
Mario
2024-08-04 23:24:04 +02:00
parent 00724077e1
commit b79dbe4708
3 changed files with 67 additions and 0 deletions

View File

@@ -6,7 +6,12 @@
<field name="arch" type="xml">
<form>
<header>
<button name="action_start" string="Start" type="object" icon="fa-play" attrs="{'invisible': [('state', '=', 'running')]}" class="oe_highlight"/>
<button name="action_shutdown" string="Shutdown" type="object" icon="fa-power-off" attrs="{'invisible': [('state', '!=', 'running')]}" class="oe_highlight"/>
<button name="action_stop" string="Stop" type="object" icon="fa-stop" attrs="{'invisible': [('state', '!=', 'running')]}" class="text-danger"/>
<button name="action_reboot" string="Reboot" type="object" icon="fa-refresh" attrs="{'invisible': [('state', '!=', 'running')]}" class="oe_highlight"/>
<button name="action_fetch_proxmox_data" string="Fetch Proxmox Data" type="object" class="oe_highlight"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<group>