mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 01:06:11 -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_MARGIN_WIDTH = 15
|
||||
|
||||
RACK_STARTING_UNIT_DEFAULT = 1
|
||||
|
||||
|
||||
#
|
||||
# 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)],
|
||||
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(
|
||||
default=False,
|
||||
verbose_name='Descending units',
|
||||
|
Loading…
Reference in New Issue
Block a user