From 2fce7ebd8fee511a0fef8b3aada11037e8ef8e9f Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 13 Nov 2018 11:02:48 -0500 Subject: [PATCH] Fixes #2565: Improved rendering of Markdown tables --- CHANGELOG.md | 1 + netbox/project-static/css/base.css | 13 +++++++++++++ netbox/templates/circuits/circuit.html | 2 +- netbox/templates/circuits/provider.html | 2 +- netbox/templates/dcim/device.html | 2 +- netbox/templates/dcim/devicetype.html | 2 +- netbox/templates/dcim/rack.html | 2 +- netbox/templates/dcim/site.html | 2 +- netbox/templates/tenancy/tenant.html | 2 +- netbox/templates/virtualization/cluster.html | 2 +- netbox/templates/virtualization/virtualmachine.html | 2 +- 11 files changed, 23 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e02f1446..21d286875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ v2.4.8 (FUTURE) * [#2473](https://github.com/digitalocean/netbox/issues/2473) - Fix encoding of long (>127 character) secrets * [#2558](https://github.com/digitalocean/netbox/issues/2558) - Filter on all tags when multiple are passed +* [#2565](https://github.com/digitalocean/netbox/issues/2565) - Improved rendering of Markdown tables * [#2575](https://github.com/digitalocean/netbox/issues/2575) - Correct model specified for rack roles table --- diff --git a/netbox/project-static/css/base.css b/netbox/project-static/css/base.css index 6222a477d..56104515c 100644 --- a/netbox/project-static/css/base.css +++ b/netbox/project-static/css/base.css @@ -390,6 +390,19 @@ table.report th a { top: -51px; } +/* Rendered Markdown */ +.rendered-markdown table { + width: 100%; +} +.rendered-markdown th { + border-bottom: 2px solid #dddddd; + padding: 8px; +} +.rendered-markdown td { + border-top: 1px solid #dddddd; + padding: 8px; +} + /* AJAX loader */ .loading { position: fixed; diff --git a/netbox/templates/circuits/circuit.html b/netbox/templates/circuits/circuit.html index 5c86cb24e..5b15782c9 100644 --- a/netbox/templates/circuits/circuit.html +++ b/netbox/templates/circuits/circuit.html @@ -131,7 +131,7 @@
Comments
-
+
{% if circuit.comments %} {{ circuit.comments|gfm }} {% else %} diff --git a/netbox/templates/circuits/provider.html b/netbox/templates/circuits/provider.html index 4ec9adee1..157c66918 100644 --- a/netbox/templates/circuits/provider.html +++ b/netbox/templates/circuits/provider.html @@ -129,7 +129,7 @@
Comments
-
+
{% if provider.comments %} {{ provider.comments|gfm }} {% else %} diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index 7b56269b1..61fb649c9 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -290,7 +290,7 @@
Comments
-
+
{% if device.comments %} {{ device.comments|gfm }} {% else %} diff --git a/netbox/templates/dcim/devicetype.html b/netbox/templates/dcim/devicetype.html index 652c291e6..35931b49f 100644 --- a/netbox/templates/dcim/devicetype.html +++ b/netbox/templates/dcim/devicetype.html @@ -164,7 +164,7 @@
Comments
-
+
{% if devicetype.comments %} {{ devicetype.comments|gfm }} {% else %} diff --git a/netbox/templates/dcim/rack.html b/netbox/templates/dcim/rack.html index aaebe02da..ebe9a8870 100644 --- a/netbox/templates/dcim/rack.html +++ b/netbox/templates/dcim/rack.html @@ -164,7 +164,7 @@
Comments
-
+
{% if rack.comments %} {{ rack.comments|gfm }} {% else %} diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html index f4623b57b..f592434c4 100644 --- a/netbox/templates/dcim/site.html +++ b/netbox/templates/dcim/site.html @@ -230,7 +230,7 @@
Comments
-
+
{% if site.comments %} {{ site.comments|gfm }} {% else %} diff --git a/netbox/templates/tenancy/tenant.html b/netbox/templates/tenancy/tenant.html index 6f2131a51..6068a7102 100644 --- a/netbox/templates/tenancy/tenant.html +++ b/netbox/templates/tenancy/tenant.html @@ -87,7 +87,7 @@
Comments
-
+
{% if tenant.comments %} {{ tenant.comments|gfm }} {% else %} diff --git a/netbox/templates/virtualization/cluster.html b/netbox/templates/virtualization/cluster.html index 69ed4e212..d3606e624 100644 --- a/netbox/templates/virtualization/cluster.html +++ b/netbox/templates/virtualization/cluster.html @@ -99,7 +99,7 @@
Comments
-
+
{% if cluster.comments %} {{ cluster.comments|gfm }} {% else %} diff --git a/netbox/templates/virtualization/virtualmachine.html b/netbox/templates/virtualization/virtualmachine.html index 552aaa997..9f8ec8308 100644 --- a/netbox/templates/virtualization/virtualmachine.html +++ b/netbox/templates/virtualization/virtualmachine.html @@ -143,7 +143,7 @@
Comments
-
+
{% if virtualmachine.comments %} {{ virtualmachine.comments|gfm }} {% else %}