Skip to content

Time selection for web downloads#263

Open
klpoland wants to merge 6 commits intomasterfrom
feature-kpoland-add-drf-time-selection-api
Open

Time selection for web downloads#263
klpoland wants to merge 6 commits intomasterfrom
feature-kpoland-add-drf-time-selection-api

Conversation

@klpoland
Copy link
Collaborator

@klpoland klpoland commented Mar 1, 2026

Select times for web download:

  • Add time selection helper functions
  • Integrate slider JS package for range slider UI
  • Dynamic labels to indicate number of files and time start and end

@klpoland klpoland requested a review from lucaspar March 1, 2026 21:59
@klpoland klpoland self-assigned this Mar 1, 2026
@klpoland klpoland added feature New feature or request gateway Gateway component javascript Pull requests that update non-trivial javascript code labels Mar 1, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds temporal (time-range) selection to web downloads—primarily for DigitalRF capture downloads—by introducing temporal filtering helpers, exposing timing metadata on capture API responses, and wiring a noUiSlider-based UI into the existing web download modal flow.

Changes:

  • Add temporal filtering backend plumbing (helper + task/view parameters) to select a subset of capture RF data files by time bounds.
  • Extend capture serializers to provide duration/cadence/bounds metadata needed to drive the slider UI.
  • Integrate noUiSlider and update templates/JS to show a time-range slider and dynamic file/size labels for capture downloads.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
gateway/sds_gateway/users/views.py Accepts start_time/end_time POST params and forwards them to the Celery download task.
gateway/sds_gateway/api_methods/tasks.py Threads start_time/end_time into file collection and adds DigitalRF-only temporal filtering for capture downloads.
gateway/sds_gateway/api_methods/helpers/temporal_filtering.py New helper utilities for DigitalRF filename parsing, OpenSearch bounds lookup, cadence estimation, and time-bounded file selection.
gateway/sds_gateway/api_methods/serializers/capture_serializers.py Adds new timing/size/count fields used by the capture download slider UI.
gateway/sds_gateway/templates/base.html Loads noUiSlider CSS/JS from CDN.
gateway/sds_gateway/templates/users/partials/web_download_modal.html Adds capture-only slider UI + client-side formatting and passes time bounds in the download request.
gateway/sds_gateway/static/js/actions/DownloadActionManager.js Initializes the slider from capture button data attributes and opens the web download modal for captures.
gateway/sds_gateway/static/js/file-list.js Adds capture timing/size/count metadata into capture-row download button attributes (dynamic table).
gateway/sds_gateway/templates/users/partials/captures_page_table.html Adds capture timing/size/count metadata into capture-row download button attributes (server-rendered table).
gateway/sds_gateway/templates/users/file_list.html Includes the web download modal partial for capture downloads.
gateway/sds_gateway/templates/users/dataset_list.html Includes the web download modal partial with item_type="dataset".
gateway/sds_gateway/templates/users/published_datasets_list.html Includes the web download modal partial with item_type="dataset".

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* Use web download modal (with temporal slider) when DownloadActionManager is available.
*/
handleDownloadCapture(button) {
if (window.currentDownloadManager && document.getElementById("webDownloadModal")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This silently fails if the element is not there.

We can reverse logic, raise a pretty "danger" alert to user (or at least a console.err) if element is not present and return.

@klpoland klpoland force-pushed the feature-kpoland-add-drf-time-selection-api branch from 7a9a87b to 0aa1c3a Compare March 25, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request gateway Gateway component javascript Pull requests that update non-trivial javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants