Closes #3706: Increase available_power maximum value on PowerFeed

This commit is contained in:
Jeremy Stretch
2019-12-11 21:12:18 -05:00
parent 7bbd9be389
commit 5aa17bc42a
4 changed files with 26 additions and 7 deletions

View File

@@ -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)"
)

View 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),
),
]

View File

@@ -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
)