mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
12175 add rack starting unit
This commit is contained in:
parent
4208b79514
commit
ec15336340
@ -16,6 +16,8 @@ RACK_ELEVATION_BORDER_WIDTH = 2
|
|||||||
RACK_ELEVATION_DEFAULT_LEGEND_WIDTH = 30
|
RACK_ELEVATION_DEFAULT_LEGEND_WIDTH = 30
|
||||||
RACK_ELEVATION_DEFAULT_MARGIN_WIDTH = 15
|
RACK_ELEVATION_DEFAULT_MARGIN_WIDTH = 15
|
||||||
|
|
||||||
|
RACK_STARTING_UNIT_DEFAULT = 1
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# RearPorts
|
# RearPorts
|
||||||
|
17
netbox/dcim/migrations/0174_rack_starting_unit.py
Normal file
17
netbox/dcim/migrations/0174_rack_starting_unit.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 4.1.9 on 2023-05-31 15:47
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
('dcim', '0173_remove_napalm_fields'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='rack',
|
||||||
|
name='starting_unit',
|
||||||
|
field=models.PositiveSmallIntegerField(default=1),
|
||||||
|
),
|
||||||
|
]
|
@ -129,6 +129,11 @@ class Rack(PrimaryModel, WeightMixin):
|
|||||||
validators=[MinValueValidator(1), MaxValueValidator(100)],
|
validators=[MinValueValidator(1), MaxValueValidator(100)],
|
||||||
help_text=_('Height in rack units')
|
help_text=_('Height in rack units')
|
||||||
)
|
)
|
||||||
|
starting_unit = models.PositiveSmallIntegerField(
|
||||||
|
default=RACK_STARTING_UNIT_DEFAULT,
|
||||||
|
verbose_name='Starting unit',
|
||||||
|
help_text=_('Starting unit for rack')
|
||||||
|
)
|
||||||
desc_units = models.BooleanField(
|
desc_units = models.BooleanField(
|
||||||
default=False,
|
default=False,
|
||||||
verbose_name='Descending units',
|
verbose_name='Descending units',
|
||||||
|
Loading…
Reference in New Issue
Block a user