mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Closes #3706: Increase available_power maximum value on PowerFeed
This commit is contained in:
parent
7bbd9be389
commit
5aa17bc42a
@ -232,6 +232,7 @@ PATCH) to maintain backward compatibility. This behavior will be discontinued be
|
||||
scripts
|
||||
* [#3655](https://github.com/digitalocean/netbox/issues/3655) - Add `description` field to organizational models
|
||||
* [#3664](https://github.com/digitalocean/netbox/issues/3664) - Enable applying configuration contexts by tags
|
||||
* [#3706](https://github.com/digitalocean/netbox/issues/3706) - Increase `available_power` maximum value on PowerFeed
|
||||
* [#3731](https://github.com/digitalocean/netbox/issues/3731) - Change Graph.type to a ContentType foreign key field
|
||||
|
||||
## API Changes
|
||||
|
@ -1026,12 +1026,12 @@ class PowerPortTemplateCreateForm(ComponentForm):
|
||||
maximum_draw = forms.IntegerField(
|
||||
min_value=1,
|
||||
required=False,
|
||||
help_text="Maximum current draw (watts)"
|
||||
help_text="Maximum power draw (watts)"
|
||||
)
|
||||
allocated_draw = forms.IntegerField(
|
||||
min_value=1,
|
||||
required=False,
|
||||
help_text="Allocated current draw (watts)"
|
||||
help_text="Allocated power draw (watts)"
|
||||
)
|
||||
|
||||
|
||||
|
18
netbox/dcim/migrations/0088_powerfeed_available_power.py
Normal file
18
netbox/dcim/migrations/0088_powerfeed_available_power.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.2.8 on 2019-12-12 02:09
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('dcim', '0087_role_descriptions'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='powerfeed',
|
||||
name='available_power',
|
||||
field=models.PositiveIntegerField(default=0, editable=False),
|
||||
),
|
||||
]
|
@ -1260,13 +1260,13 @@ class PowerPortTemplate(ComponentTemplateModel):
|
||||
blank=True,
|
||||
null=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
help_text="Maximum current draw (watts)"
|
||||
help_text="Maximum power draw (watts)"
|
||||
)
|
||||
allocated_draw = models.PositiveSmallIntegerField(
|
||||
blank=True,
|
||||
null=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
help_text="Allocated current draw (watts)"
|
||||
help_text="Allocated power draw (watts)"
|
||||
)
|
||||
|
||||
objects = NaturalOrderingManager()
|
||||
@ -2182,13 +2182,13 @@ class PowerPort(CableTermination, ComponentModel):
|
||||
blank=True,
|
||||
null=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
help_text="Maximum current draw (watts)"
|
||||
help_text="Maximum power draw (watts)"
|
||||
)
|
||||
allocated_draw = models.PositiveSmallIntegerField(
|
||||
blank=True,
|
||||
null=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
help_text="Allocated current draw (watts)"
|
||||
help_text="Allocated power draw (watts)"
|
||||
)
|
||||
_connected_poweroutlet = models.OneToOneField(
|
||||
to='dcim.PowerOutlet',
|
||||
@ -3316,7 +3316,7 @@ class PowerFeed(ChangeLoggedModel, CableTermination, CustomFieldModel):
|
||||
default=80,
|
||||
help_text="Maximum permissible draw (percentage)"
|
||||
)
|
||||
available_power = models.PositiveSmallIntegerField(
|
||||
available_power = models.PositiveIntegerField(
|
||||
default=0,
|
||||
editable=False
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user