Browse Source

Clean up stray Font Awesome icons

Jeremy Stretch 5 years ago
parent
commit
6542a326c1

+ 5 - 5
netbox/dcim/tables.py

@@ -15,7 +15,7 @@ from .models import (
 
 MPTT_LINK = """
 {% if record.get_children %}
-    <span style="padding-left: {{ record.get_ancestors|length }}0px "><i class="fa fa-caret-right"></i>
+    <span style="padding-left: {{ record.get_ancestors|length }}0px "><i class="mdi mdi-chevron-right"></i>
 {% else %}
     <span style="padding-left: {{ record.get_ancestors|length }}9px">
 {% endif %}
@@ -44,7 +44,7 @@ DEVICE_LINK = """
 
 RACKGROUP_ELEVATIONS = """
 <a href="{% url 'dcim:rack_elevation_list' %}?site={{ record.site.slug }}&group_id={{ record.pk }}" class="btn btn-xs btn-primary" title="View elevations">
-    <i class="fa fa-eye"></i>
+    <i class="mdi mdi-server"></i>
 </a>
 """
 
@@ -58,7 +58,7 @@ DEVICE_COUNT = """
 
 RACKRESERVATION_ACTIONS = """
 <a href="{% url 'dcim:rackreservation_changelog' pk=record.pk %}" class="btn btn-default btn-xs" title="Change log">
-    <i class="fa fa-history"></i>
+    <i class="mdi mdi-history"></i>
 </a>
 {% if perms.dcim.change_rackreservation %}
     <a href="{% url 'dcim:rackreservation_edit' pk=record.pk %}?return_url={{ request.path }}" class="btn btn-xs btn-warning"><i class="mdi mdi-pencil" aria-hidden="true"></i></a>
@@ -67,7 +67,7 @@ RACKRESERVATION_ACTIONS = """
 
 MANUFACTURER_ACTIONS = """
 <a href="{% url 'dcim:manufacturer_changelog' slug=record.slug %}" class="btn btn-default btn-xs" title="Change log">
-    <i class="fa fa-history"></i>
+    <i class="mdi mdi-history"></i>
 </a>
 {% if perms.dcim.change_manufacturer %}
     <a href="{% url 'dcim:manufacturer_edit' slug=record.slug %}?return_url={{ request.path }}" class="btn btn-xs btn-warning"><i class="mdi mdi-pencil" aria-hidden="true"></i></a>
@@ -84,7 +84,7 @@ DEVICEROLE_VM_COUNT = """
 
 DEVICEROLE_ACTIONS = """
 <a href="{% url 'dcim:devicerole_changelog' slug=record.slug %}" class="btn btn-default btn-xs" title="Change log">
-    <i class="fa fa-history"></i>
+    <i class="mdi mdi-history"></i>
 </a>
 {% if perms.dcim.change_devicerole %}
     <a href="{% url 'dcim:devicerole_edit' slug=record.slug %}?return_url={{ request.path }}" class="btn btn-xs btn-warning"><i class="mdi mdi-pencil" aria-hidden="true"></i></a>

+ 9 - 9
netbox/dcim/tables/devices.py

@@ -253,7 +253,7 @@ class ConsolePortTable(DeviceComponentTable, PathEndpointTable):
 
 class DeviceConsolePortTable(ConsolePortTable):
     name = tables.TemplateColumn(
-        template_code='<i class="fa fa-keyboard-o"></i> <a href="{{ record.get_absolute_url }}">{{ value }}</a>'
+        template_code='<i class="mdi mdi-console"></i> <a href="{{ record.get_absolute_url }}">{{ value }}</a>'
     )
     actions = ButtonsColumn(
         model=ConsolePort,
@@ -285,7 +285,7 @@ class ConsoleServerPortTable(DeviceComponentTable, PathEndpointTable):
 
 class DeviceConsoleServerPortTable(ConsoleServerPortTable):
     name = tables.TemplateColumn(
-        template_code='<i class="fa fa-keyboard-o"></i> <a href="{{ record.get_absolute_url }}">{{ value }}</a>'
+        template_code='<i class="mdi mdi-console-network-outline"></i> <a href="{{ record.get_absolute_url }}">{{ value }}</a>'
     )
     actions = ButtonsColumn(
         model=ConsoleServerPort,
@@ -320,7 +320,7 @@ class PowerPortTable(DeviceComponentTable, PathEndpointTable):
 
 class DevicePowerPortTable(PowerPortTable):
     name = tables.TemplateColumn(
-        template_code='<i class="fa fa-bolt"></i> <a href="{{ record.get_absolute_url }}">{{ value }}</a>'
+        template_code='<i class="mdi mdi-power-plug-outline"></i> <a href="{{ record.get_absolute_url }}">{{ value }}</a>'
     )
     actions = ButtonsColumn(
         model=PowerPort,
@@ -362,7 +362,7 @@ class PowerOutletTable(DeviceComponentTable, PathEndpointTable):
 
 class DevicePowerOutletTable(PowerOutletTable):
     name = tables.TemplateColumn(
-        template_code='<i class="fa fa-bolt"></i> <a href="{{ record.get_absolute_url }}">{{ value }}</a>'
+        template_code='<i class="mdi mdi-power-socket"></i> <a href="{{ record.get_absolute_url }}">{{ value }}</a>'
     )
     actions = ButtonsColumn(
         model=PowerOutlet,
@@ -415,8 +415,8 @@ class InterfaceTable(DeviceComponentTable, BaseInterfaceTable, PathEndpointTable
 
 class DeviceInterfaceTable(InterfaceTable):
     name = tables.TemplateColumn(
-        template_code='<i class="fa fa-{% if iface.mgmt_only %}wrench{% elif iface.is_lag %}align-justify'
-                      '{% elif iface.is_virtual %}circle{% elif iface.is_wireless %}wifi{% else %}exchange'
+        template_code='<i class="mdi mdi-{% if iface.mgmt_only %}wrench{% elif iface.is_lag %}drag-horizontal-variant'
+                      '{% elif iface.is_virtual %}circle{% elif iface.is_wireless %}wifi{% else %}ethernet'
                       '{% endif %}"></i> <a href="{{ record.get_absolute_url }}">{{ value }}</a>'
     )
     lag = tables.Column(
@@ -466,7 +466,7 @@ class FrontPortTable(DeviceComponentTable, CableTerminationTable):
 
 class DeviceFrontPortTable(FrontPortTable):
     name = tables.TemplateColumn(
-        template_code='<i class="fa fa-square{% if not record.cable %}-o{% endif %}"></i> '
+        template_code='<i class="mdi mdi-square-rounded{% if not record.cable %}-outline{% endif %}"></i> '
                       '<a href="{{ record.get_absolute_url }}">{{ value }}</a>'
     )
     actions = ButtonsColumn(
@@ -503,7 +503,7 @@ class RearPortTable(DeviceComponentTable, CableTerminationTable):
 
 class DeviceRearPortTable(RearPortTable):
     name = tables.TemplateColumn(
-        template_code='<i class="fa fa-square{% if not record.cable %}-o{% endif %}"></i> '
+        template_code='<i class="fmdi mdi-square-rounded{% if not record.cable %}-outline{% endif %}"></i> '
                       '<a href="{{ record.get_absolute_url }}">{{ value }}</a>'
     )
     actions = ButtonsColumn(
@@ -544,7 +544,7 @@ class DeviceBayTable(DeviceComponentTable):
 
 class DeviceDeviceBayTable(DeviceBayTable):
     name = tables.TemplateColumn(
-        template_code='<i class="fa fa-square{% if record.installed_device %}dot-circle-o{% else %}circle-o{% endif %}'
+        template_code='<i class="mdi mdi-circle{% if record.installed_device %}slice-8{% else %}outline{% endif %}'
                       '"></i> <a href="{{ record.get_absolute_url }}">{{ value }}</a>'
     )
     actions = ButtonsColumn(

+ 12 - 12
netbox/dcim/tables/template_code.py

@@ -1,7 +1,7 @@
 CABLETERMINATION = """
 {% if value %}
     <a href="{{ value.parent.get_absolute_url }}">{{ value.parent }}</a>
-    <i class="fa fa-caret-right"></i>
+    <i class="mdi mdi-chevron-right"></i>
     <a href="{{ value.get_absolute_url }}">{{ value }}</a>
 {% else %}
     &mdash;
@@ -52,7 +52,7 @@ INTERFACE_TAGGED_VLANS = """
 
 MPTT_LINK = """
 {% if record.get_children %}
-    <span style="padding-left: {{ record.get_ancestors|length }}0px "><i class="fa fa-caret-right"></i>
+    <span style="padding-left: {{ record.get_ancestors|length }}0px "><i class="mdi mdi-chevron-right"></i>
 {% else %}
     <span style="padding-left: {{ record.get_ancestors|length }}9px">
 {% endif %}
@@ -63,19 +63,19 @@ MPTT_LINK = """
 POWERFEED_CABLE = """
 <a href="{{ value.get_absolute_url }}">{{ value }}</a>
 <a href="{% url 'dcim:powerfeed_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace">
-    <i class="fa fa-share-alt" aria-hidden="true"></i>
+    <i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
 </a>
 """
 
 POWERFEED_CABLETERMINATION = """
 <a href="{{ value.parent.get_absolute_url }}">{{ value.parent }}</a>
-<i class="fa fa-caret-right"></i>
+<i class="mdi mdi-chevron-right"></i>
 <a href="{{ value.get_absolute_url }}">{{ value }}</a>
 """
 
 RACKGROUP_ELEVATIONS = """
 <a href="{% url 'dcim:rack_elevation_list' %}?site={{ record.site.slug }}&group_id={{ record.pk }}" class="btn btn-xs btn-primary" title="View elevations">
-    <i class="fa fa-eye"></i>
+    <i class="mdi mdi-server"></i>
 </a>
 """
 
@@ -90,7 +90,7 @@ UTILIZATION_GRAPH = """
 
 CONSOLEPORT_BUTTONS = """
 {% if record.cable %}
-    <a href="{% url 'dcim:consoleport_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="fa fa-share-alt"></i></a>
+    <a href="{% url 'dcim:consoleport_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="mdi mdi-transit-connection-variant"></i></a>
     {% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
 {% elif perms.dcim.add_cable %}
     <span class="dropdown">
@@ -108,7 +108,7 @@ CONSOLEPORT_BUTTONS = """
 
 CONSOLESERVERPORT_BUTTONS = """
 {% if record.cable %}
-    <a href="{% url 'dcim:consoleserverport_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="fa fa-share-alt"></i></a>
+    <a href="{% url 'dcim:consoleserverport_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="mdi mdi-transit-connection-variant"></i></a>
     {% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
 {% elif perms.dcim.add_cable %}
     <span class="dropdown">
@@ -126,7 +126,7 @@ CONSOLESERVERPORT_BUTTONS = """
 
 POWERPORT_BUTTONS = """
 {% if record.cable %}
-    <a href="{% url 'dcim:powerport_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="fa fa-share-alt"></i></a>
+    <a href="{% url 'dcim:powerport_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="mdi mdi-transit-connection-variant"></i></a>
     {% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
 {% elif perms.dcim.add_cable %}
     <span class="dropdown">
@@ -143,7 +143,7 @@ POWERPORT_BUTTONS = """
 
 POWEROUTLET_BUTTONS = """
 {% if record.cable %}
-    <a href="{% url 'dcim:poweroutlet_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="fa fa-share-alt"></i></a>
+    <a href="{% url 'dcim:poweroutlet_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="mdi mdi-transit-connection-variant"></i></a>
     {% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
 {% elif perms.dcim.add_cable %}
     <a href="{% url 'dcim:poweroutlet_connect' termination_a_id=record.pk termination_b_type='power-port' %}?return_url={{ device.get_absolute_url }}" title="Connect" class="btn btn-success btn-xs">
@@ -159,7 +159,7 @@ INTERFACE_BUTTONS = """
     </a>
 {% endif %}
 {% if record.cable %}
-    <a href="{% url 'dcim:interface_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="fa fa-share-alt"></i></a>
+    <a href="{% url 'dcim:interface_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="mdi mdi-transit-connection-variant"></i></a>
     {% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
 {% elif record.is_connectable and perms.dcim.add_cable %}
     <span class="dropdown">
@@ -178,7 +178,7 @@ INTERFACE_BUTTONS = """
 
 FRONTPORT_BUTTONS = """
 {% if record.cable %}
-    <a href="{% url 'dcim:frontport_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="fa fa-share-alt"></i></a>
+    <a href="{% url 'dcim:frontport_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="mdi mdi-transit-connection-variant"></i></a>
     {% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
 {% elif perms.dcim.add_cable %}
     <span class="dropdown">
@@ -199,7 +199,7 @@ FRONTPORT_BUTTONS = """
 
 REARPORT_BUTTONS = """
 {% if record.cable %}
-    <a href="{% url 'dcim:rearport_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="fa fa-share-alt"></i></a>
+    <a href="{% url 'dcim:rearport_trace' pk=record.pk %}" class="btn btn-primary btn-xs" title="Trace"><i class="mdi mdi-transit-connection-variant"></i></a>
     {% include 'dcim/inc/cable_toggle_buttons.html' with cable=record.cable %}
 {% elif perms.dcim.add_cable %}
     <span class="dropdown">

+ 2 - 2
netbox/extras/templatetags/custom_links.py

@@ -61,7 +61,7 @@ def custom_links(context, obj):
                     )
             except Exception as e:
                 template_code += '<a class="btn btn-sm btn-default" disabled="disabled" title="{}">' \
-                                 '<i class="fa fa-warning"></i> {}</a>\n'.format(e, cl.name)
+                                 '<i class="mdi mdi-alert"></i> {}</a>\n'.format(e, cl.name)
 
     # Add grouped links to template
     for group, links in group_names.items():
@@ -80,7 +80,7 @@ def custom_links(context, obj):
             except Exception as e:
                 links_rendered.append(
                     '<li><a disabled="disabled" title="{}"><span class="text-muted">'
-                    '<i class="fa fa-warning"></i> {}</span></a></li>'.format(e, cl.name)
+                    '<i class="mdi mdi-alert"></i> {}</span></a></li>'.format(e, cl.name)
                 )
 
         if links_rendered:

+ 2 - 2
netbox/extras/tests/dummy_plugin/navigation.py

@@ -9,12 +9,12 @@ menu_items = (
             PluginMenuButton(
                 link='admin:dummy_plugin_dummymodel_add',
                 title='Add a new dummy model',
-                icon_class='fa fa-plus',
+                icon_class='mdi mdi-plus-thick',
             ),
             PluginMenuButton(
                 link='admin:dummy_plugin_dummymodel_add',
                 title='Add a new dummy model',
-                icon_class='fa fa-plus',
+                icon_class='mdi mdi-plus-thick',
             ),
         )
     ),

+ 3 - 3
netbox/ipam/tables.py

@@ -19,7 +19,7 @@ UTILIZATION_GRAPH = """
 
 PREFIX_LINK = """
 {% if record.children %}
-    <span class="text-nowrap" style="padding-left: {{ record.parents }}0px "><i class="fa fa-caret-right"></i></a>
+    <span class="text-nowrap" style="padding-left: {{ record.parents }}0px "><i class="mdi mdi-chevron-right"></i></a>
 {% else %}
     <span class="text-nowrap" style="padding-left: {{ record.parents }}9px">
 {% endif %}
@@ -105,9 +105,9 @@ VLANGROUP_ADD_VLAN = """
 
 VLAN_MEMBER_TAGGED = """
 {% if record.untagged_vlan_id == vlan.pk %}
-    <span class="text-danger"><i class="fa fa-close"></i></span>
+    <span class="text-danger"><i class="mdi mdi-close-thick"></i></span>
 {% else %}
-    <span class="text-success"><i class="fa fa-check"></i></span>
+    <span class="text-success"><i class="mdi mdi-check-bold"></i></span>
 {% endif %}
 """
 

+ 1 - 1
netbox/tenancy/tables.py

@@ -5,7 +5,7 @@ from .models import Tenant, TenantGroup
 
 MPTT_LINK = """
 {% if record.get_children %}
-    <span style="padding-left: {{ record.get_ancestors|length }}0px "><i class="fa fa-caret-right"></i>
+    <span style="padding-left: {{ record.get_ancestors|length }}0px "><i class="mdi mdi-chevron-right"></i>
 {% else %}
     <span style="padding-left: {{ record.get_ancestors|length }}9px">
 {% endif %}