Skip to content

Commit d0f4b1c

Browse files
committed
resolve merge conflicts
Signed-off-by: Aayush Kumar <[email protected]>
1 parent 0decf90 commit d0f4b1c

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

scanpipe/templates/scanpipe/panels/resource_table_panel.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{% load humanize %}
2-
32
<div class="mb-4">
43
<div class="has-text-weight-semibold is-flex is-align-items-center is-family-monospace">
54
{% if path_segments %}
@@ -18,11 +17,6 @@
1817
<button class="copy-to-clipboard ml-2 is-size-6 is-shadowless is-white" aria-label="Copy path" data-copy="{{ path }}" data-copy-feedback="Path copied!">
1918
<i class="fa-regular fa-copy"></i>
2019
</button>
21-
{% else %}
22-
<span id="resource-path" class="has-text-weight-medium">/</span>
23-
<button class="copy-to-clipboard ml-2 is-size-6 is-shadowless is-white" aria-label="Copy path" data-copy="/" data-copy-feedback="Path copied!">
24-
<i class="fa-regular fa-copy"></i>
25-
</button>
2620
{% endif %}
2721
</div>
2822
</div>

scanpipe/templates/scanpipe/resource_tree.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115

116116
{% block scripts %}
117117
<script>
118-
document.body.addEventListener('htmx:afterSwap', function(evt) {
118+
document.body.addEventListener('htmx:afterSettle', function(evt) {
119119
if (evt.target && evt.target.id === 'right-pane') {
120120
if (typeof enableCopyToClipboard === 'function') {
121121
enableCopyToClipboard('.copy-to-clipboard');
@@ -163,10 +163,6 @@
163163
finalNode.classList.add('is-current');
164164
finalNode.scrollIntoView({ behavior: "smooth", block: "center" });
165165
}
166-
167-
const rightPane = document.getElementById('right-pane');
168-
rightPane.setAttribute('hx-get', `/project/{{ project.slug }}/resource_table/?path=${encodeURIComponent(path)}`);
169-
htmx.trigger(rightPane, 'htmx:trigger');
170166
}
171167

172168
document.addEventListener("click", async e => {
@@ -182,7 +178,10 @@
182178
});
183179

184180
document.addEventListener("DOMContentLoaded", function() {
185-
expandToPath("{{ path }}");
181+
const currentPath = "{{ path }}";
182+
if (currentPath) {
183+
expandToPath(currentPath);
184+
}
186185

187186
const resizer = document.getElementById('resizer');
188187
const leftPane = document.getElementById('left-pane');

0 commit comments

Comments
 (0)