Skip to content

Commit

Permalink
webapp: rename flow-list-show-more to flow-list-show-older
Browse files Browse the repository at this point in the history
  • Loading branch information
aiooss-anssi committed Feb 12, 2024
1 parent c39b29e commit c8e25f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions webapp/static/assets/js/flowlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class FlowList {
})

// On load more button click, update URL then update flows list
document.getElementById('flow-list-show-more').addEventListener('click', async e => {
document.getElementById('flow-list-show-older').addEventListener('click', async e => {
const lastFlowTs = document.getElementById('flow-list').lastElementChild?.dataset.ts_start
const url = new URL(document.location)
url.searchParams.set('to', Math.floor(lastFlowTs))
Expand Down Expand Up @@ -334,7 +334,7 @@ class FlowList {
})

// Display a button if we are only displaying 100 flows
document.getElementById('flow-list-show-more').classList.toggle('d-none', flows.length !== 100)
document.getElementById('flow-list-show-older').classList.toggle('d-none', flows.length !== 100)
}

/**
Expand All @@ -351,7 +351,7 @@ class FlowList {
// Show loading indicator while waiting for API
document.getElementById('flow-list-loading-indicator').classList.remove('d-none')
document.getElementById('flow-list').classList.add('d-none')
document.getElementById('flow-list-show-more').classList.add('d-none')
document.getElementById('flow-list-show-older').classList.add('d-none')

const url = new URL(document.location)
const fromTs = url.searchParams.get('from')
Expand Down
2 changes: 1 addition & 1 deletion webapp/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</div>
</div>
<div id="flow-list"></div>
<div class="d-flex justify-content-center d-none mx-2 mt-2 mb-4" id="flow-list-show-more">
<div class="d-flex justify-content-center d-none mx-2 mt-2 mb-4" id="flow-list-show-older">
<a class="btn btn-secondary" href="#">See previous flows</a>
</div>
</div>
Expand Down

0 comments on commit c8e25f5

Please sign in to comment.