Skip to content

Commit

Permalink
Fixes #2565: Improved rendering of Markdown tables
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Nov 13, 2018
1 parent 0c33af2 commit 2fce7eb
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

---
Expand Down
13 changes: 13 additions & 0 deletions netbox/project-static/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/circuits/circuit.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h1>{{ circuit }}</h1>
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
<div class="panel-body rendered-markdown">
{% if circuit.comments %}
{{ circuit.comments|gfm }}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/circuits/provider.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h1>{{ provider }}</h1>
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
<div class="panel-body rendered-markdown">
{% if provider.comments %}
{{ provider.comments|gfm }}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/device.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ <h1>{{ device }}</h1>
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
<div class="panel-body rendered-markdown">
{% if device.comments %}
{{ device.comments|gfm }}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/devicetype.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ <h1>{{ devicetype.manufacturer }} {{ devicetype.model }}</h1>
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
<div class="panel-body rendered-markdown">
{% if devicetype.comments %}
{{ devicetype.comments|gfm }}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/rack.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ <h1>{% block title %}Rack {{ rack }}{% endblock %}</h1>
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
<div class="panel-body rendered-markdown">
{% if rack.comments %}
{{ rack.comments|gfm }}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/dcim/site.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ <h1>{% block title %}{{ site }}{% endblock %}</h1>
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
<div class="panel-body rendered-markdown">
{% if site.comments %}
{{ site.comments|gfm }}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/tenancy/tenant.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h1>{% block title %}{{ tenant }}{% endblock %}</h1>
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
<div class="panel-body rendered-markdown">
{% if tenant.comments %}
{{ tenant.comments|gfm }}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/virtualization/cluster.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h1>{% block title %}{{ cluster }}{% endblock %}</h1>
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
<div class="panel-body rendered-markdown">
{% if cluster.comments %}
{{ cluster.comments|gfm }}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/virtualization/virtualmachine.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h1>{% block title %}{{ virtualmachine }}{% endblock %}</h1>
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body">
<div class="panel-body rendered-markdown">
{% if virtualmachine.comments %}
{{ virtualmachine.comments|gfm }}
{% else %}
Expand Down

0 comments on commit 2fce7eb

Please sign in to comment.