Просмотр исходного кода

Fixes #7167: Ensure consistent font size when using monospace formatting

jeremystretch 4 лет назад
Родитель
Сommit
bd957612c6

+ 1 - 0
docs/release-notes/version-3.0.md

@@ -4,6 +4,7 @@
 
 ### Bug Fixes
 
+* [#7167](https://github.com/netbox-community/netbox/issues/7167) - Ensure consistent font size when using monospace formatting
 * [#7226](https://github.com/netbox-community/netbox/issues/7226) - Exempt GraphQL API requests from CSRF inspection
 
 ---

+ 2 - 2
netbox/templates/dcim/device.html

@@ -95,11 +95,11 @@
                         </tr>
                         <tr>
                             <th scope="row">Serial Number</th>
-                            <td><code>{{ object.serial|placeholder }}</code></td>
+                            <td class="font-monospace">{{ object.serial|placeholder }}</td>
                         </tr>
                         <tr>
                             <th scope="row">Asset Tag</th>
-                            <td><span>{{ object.asset_tag|placeholder }}</span></td>
+                            <td class="font-monospace">{{ object.asset_tag|placeholder }}</td>
                         </tr>
                     </table>
                 </div>

+ 2 - 2
netbox/templates/dcim/rack.html

@@ -96,11 +96,11 @@
                     </tr>
                     <tr>
                         <th scope="row">Serial Number</th>
-                        <td>{{ object.serial|placeholder }}</td>
+                        <td class="font-monospace">{{ object.serial|placeholder }}</td>
                     </tr>
                     <tr>
                         <th scope="row">Asset Tag</th>
-                        <td>{{ object.asset_tag|placeholder }}</td>
+                        <td class="font-monospace">{{ object.asset_tag|placeholder }}</td>
                     </tr>
                     <tr>
                         <th scope="row">Devices</th>

+ 1 - 1
netbox/templates/extras/report_result.html

@@ -32,7 +32,7 @@
                     <table class="table table-hover">
                         {% for method, data in result.data.items %}
                             <tr>
-                                <td><code><a href="#{{ method }}">{{ method }}</a></code></td>
+                                <td class="font-monospace"><a href="#{{ method }}">{{ method }}</a></td>
                                 <td class="text-end report-stats">
                                     <span class="badge bg-success">{{ data.success }}</span>
                                     <span class="badge bg-info">{{ data.info }}</span>

+ 1 - 1
netbox/templates/extras/webhook.html

@@ -79,7 +79,7 @@
           </tr>
           <tr>
             <th scope="row">Payload URL</th>
-            <td><code>{{ object.payload_url }}</code></td>
+            <td class="font-monospace">{{ object.payload_url }}</td>
           </tr>
           <tr>
             <th scope="row">HTTP Content Type</th>

+ 1 - 1
netbox/templates/ipam/routetarget.html

@@ -13,7 +13,7 @@
                 <table class="table table-hover attr-table">
                     <tr>
                         <th scope="row">Name</th>
-                        <td><code>{{ object.name }}</code></td>
+                        <td class="font-monospace">{{ object.name }}</td>
                     </tr>
                     <tr>
                         <th  scope="row">Tenant</th>