Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion development/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-slim-buster
FROM python:3.12-slim

ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% extends base_template %}
{% load static %}
{% load string_filters %}

{% block content %}
<div class="row mb-3">
Expand Down Expand Up @@ -73,7 +74,7 @@ <h2 class="card-header">Diff
stickyFileHeaders: false,
drawFileList: false,
};
const jsonDiff = `{{ instance.diff|escapejs|safe }}`;
const jsonDiff = `{{ instance.diff|escapejs|safe|replace:'${,\${' }}`;
var targetElement = document.getElementById('diffElement');
var diff2htmlUi = new Diff2HtmlUI(targetElement, jsonDiff, configuration);
diff2htmlUi.draw();
Expand Down
Empty file.
10 changes: 10 additions & 0 deletions netbox_config_diff/templatetags/string_filters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django import template

register = template.Library()


@register.filter
def replace(value: str, arg: str) -> str:
old, new = arg.split(",")

return value.replace(old, new)