mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-26 16:15:50 +03:00
[GH-ISSUE #533] too much duplicate code in template/instances.html #398
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bsavelev on GitHub (Mar 27, 2015).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/533
Hello!
https://github.com/retspen/webvirtmgr/blob/master/templates/instances.html#L149
I see code for
<tr id="{{ inst.name }}">4 timesMay be replace JS html generation with django generation? I can prepare PR...
@retspen commented on GitHub (Mar 27, 2015):
I can change this section to http://github.hubspot.com/sortable/
@bsavelev commented on GitHub (Mar 27, 2015):
Sorry, I didn't understand, I'll try to explain
I talk about code that repeat many times:
1 https://github.com/retspen/webvirtmgr/blob/master/templates/instances.html#L34
2 https://github.com/retspen/webvirtmgr/blob/master/templates/instances.html#L163
3 https://github.com/retspen/webvirtmgr/blob/master/templates/instances.html#L189
4 https://github.com/retspen/webvirtmgr/blob/master/templates/instances.html#L218
As I can see all of that can be replaced with one additinal view with template from [1] and
$(elem).loads("{{ url 'new_view' host_id }}")