Improves host details panel UI

* Hooks up the first two context menu buttons
* Makes the rename and details menu show up
    wherever the user's cursor's location
* Adds TopologyInventory and DeviceHost tables
* Adds design for host_id on the Device table
* Adds migrations for TopologyInventory
* Adds host_id to Device table
* Adds inventory_id and host_id tracking
* Auto-closes the right hand panel if focus is directed to the canvas.
* Retrieves the host details on inventory load.
* Adds back support for inventory and host_id tracking
* Adds host icon
* Changes rack icon to new icon
* Site icon replacement
* Fixes host icon "hitbox", and adding debug and construction
* Adds construction and debug lines for switch, router, rack, and site
* Adds some error handling for REST calls, as well as alert on
    host detail panel.
This commit is contained in:
Jared Tabor
2018-01-03 17:43:44 -08:00
committed by Ben Thomasson
parent 1c1844d889
commit 050f43e3bf
23 changed files with 1034 additions and 704 deletions

View File

@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('network_ui', '0024_auto_20171213_1949'),
]
operations = [
migrations.CreateModel(
name='DeviceHost',
fields=[
('device_host_id', models.AutoField(serialize=False, primary_key=True)),
('host_id', models.IntegerField()),
('device', models.ForeignKey(to='network_ui.Device')),
],
),
migrations.CreateModel(
name='TopologyInventory',
fields=[
('topology_inventory_id', models.AutoField(serialize=False, primary_key=True)),
('inventory_id', models.IntegerField()),
('topology', models.ForeignKey(to='network_ui.Topology')),
],
),
]

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('network_ui', '0025_devicehost_topologyinventory'),
]
operations = [
migrations.RemoveField(
model_name='devicehost',
name='device',
),
migrations.AddField(
model_name='device',
name='host_id',
field=models.IntegerField(default=0),
),
migrations.DeleteModel(
name='DeviceHost',
),
]