Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix: for cdrs page, failed request when submit visible columns #1507

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

Ivanov-Anton
Copy link
Collaborator

@Ivanov-Anton Ivanov-Anton commented Jul 17, 2024

Description

added the json download links for CDR admin index page because the ActiveAdmin has build in
condition see below:

def restrict_format_access!
  unless request.format.html?
    presenter = active_admin_config.get_page_presenter(:index)
    download_formats = (presenter || {}).fetch(:download_links, active_admin_config.namespace.download_links)
    unless build_download_formats(download_formats).include?(request.format.symbol)
      raise ActiveAdmin::AccessDenied.new(current_active_admin_user, :index)
    end
  end
end

so download_formats it is actually download_links from index page

Additional links

closes #1363

@Ivanov-Anton Ivanov-Anton self-assigned this Jul 17, 2024
@Ivanov-Anton Ivanov-Anton linked an issue Jul 17, 2024 that may be closed by this pull request
@Ivanov-Anton Ivanov-Anton marked this pull request as draft July 17, 2024 05:05
@Ivanov-Anton Ivanov-Anton force-pushed the 1363-cdrs-visible-columns-401-1 branch 2 times, most recently from 02da5eb to 29f221e Compare July 17, 2024 07:22
@Ivanov-Anton Ivanov-Anton changed the title Refactor table visible columns feature #1363, bug fix: for cdrs index page, failed ajax request when submit visible columns Jul 17, 2024
@Ivanov-Anton Ivanov-Anton changed the title #1363, bug fix: for cdrs index page, failed ajax request when submit visible columns #1363, bug fix: for cdrs page, failed request when submit visible columns Jul 17, 2024
@Ivanov-Anton Ivanov-Anton changed the title #1363, bug fix: for cdrs page, failed request when submit visible columns bug fix: for cdrs page, failed request when submit visible columns Jul 17, 2024
@Ivanov-Anton Ivanov-Anton marked this pull request as ready for review July 17, 2024 07:46
@Ivanov-Anton Ivanov-Anton added Waiting for code review It means that the owner or member of the repositor can do a code review. and removed Waiting for code review It means that the owner or member of the repositor can do a code review. labels Jul 17, 2024
@Ivanov-Anton Ivanov-Anton marked this pull request as draft July 18, 2024 16:30
@Ivanov-Anton Ivanov-Anton removed the request for review from dmitry-sinina July 18, 2024 16:31
@Ivanov-Anton Ivanov-Anton force-pushed the 1363-cdrs-visible-columns-401-1 branch 2 times, most recently from bf8ac6a to cb0e1fa Compare July 18, 2024 19:07
@Ivanov-Anton Ivanov-Anton marked this pull request as ready for review July 18, 2024 19:17
@Ivanov-Anton Ivanov-Anton added the Waiting for code review It means that the owner or member of the repositor can do a code review. label Jul 18, 2024
The $.getJSON calls in index_as_table_visible_columns.js have been shortened and simplified for better readability. The "index" function within cdrs.rb was also modified to include download_links in CSV and JSON formats.
@Ivanov-Anton Ivanov-Anton force-pushed the 1363-cdrs-visible-columns-401-1 branch from cb0e1fa to e63511f Compare July 18, 2024 20:17
@Ivanov-Anton Ivanov-Anton added Waiting for code review It means that the owner or member of the repositor can do a code review. and removed Waiting for code review It means that the owner or member of the repositor can do a code review. labels Jul 18, 2024
@dmitry-sinina dmitry-sinina merged commit 35bb80b into master Jul 19, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for code review It means that the owner or member of the repositor can do a code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CDRs visible columns 401
2 participants