mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* Add feedparser as a dependency * Introduce RSSFeedWidget * Clean up widget templates
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<strong>{{ widget.title }}</strong>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-body p-2">
|
||||
<div class="card-body p-2 overflow-auto">
|
||||
{% render_widget widget %}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -4,6 +4,7 @@
|
||||
{% csrf_token %}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Add a Widget</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% block form %}
|
||||
|
13
netbox/templates/extras/dashboard/widgets/rssfeed.html
Normal file
13
netbox/templates/extras/dashboard/widgets/rssfeed.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="list-group list-group-flush">
|
||||
{% for entry in feed.entries %}
|
||||
<div class="list-group-item px-1">
|
||||
<h6><a href="{{ entry.link }}">{{ entry.title }}</a></h6>
|
||||
<div>
|
||||
{{ entry.summary|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="list-group-item text-muted">No content found</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user