You've already forked netbox-proxmox-power-button
added proxmox power button plugin 0.1
This commit is contained in:
21
proxmox_power_button/template_content.py
Normal file
21
proxmox_power_button/template_content.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2026 Bryan Joshua Pedini
|
||||
from netbox.plugins import PluginTemplateExtension
|
||||
|
||||
|
||||
class VMPowerButtons(PluginTemplateExtension):
|
||||
"""
|
||||
Inject start/stop/reboot buttons into the VM detail page button bar.
|
||||
|
||||
Rendered via {% plugin_buttons %} in generic/object.html, which sits in the
|
||||
`controls` block *before* `extra_controls` (where "Add Components" lives) —
|
||||
so these land to the left of it, as required.
|
||||
"""
|
||||
|
||||
models = ['virtualization.virtualmachine']
|
||||
|
||||
def buttons(self):
|
||||
return self.render('proxmox_power_button/vm_power_buttons.html')
|
||||
|
||||
|
||||
template_extensions = [VMPowerButtons]
|
||||
Reference in New Issue
Block a user