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

Simple public source page #4930

Merged
merged 176 commits into from
Jun 1, 2024

Conversation

antoine-le-calloch
Copy link
Contributor

The purpose of this issue is to make a private source page public by generating simple html that will be added to the cache and made available to the public. And in addition to display a public page with all the souces and versions of this source currently in a public mode.

Version 1

  • Creation of a table to store whether a source page is public or private and what informations are display
  • A public source page is generated when a page is made public, and is added to the cache
  • The source page is fetched from the cache on access
  • Display a good public page with source data on it
  • Display photometry on public page
  • Allow to download photometry in csv
  • Display classification on public page
  • Search button on public sources page to filter all the sources
  • Add a dialogue on private source page to manage access information, display actual public source versions and publish a new version
  • Access information allow to include or not photometry, classification and to manage access by group and stream
  • Versions are manage by date in UTC
  • Display the time ago a source has been publish on public sources page

antoine-le-calloch and others added 30 commits March 27, 2024 16:15
…te and to store the data we will pass to the public page. #1
… information if we publish or unpublish in the payload. #1
…ce_accessibility table of a source when the private page is loaded. #1
…ish button executes a PATCH to update the source_accessibility and if it does not exist on database it sends to the POST methode to create one. Rename of the 'published' cache field to public. #1
…eThumbnails.jsx to ThumbnailsOnPage.jsx. Create files for component Thumbnail.jsx and for ThumbnailsOnPage.jsx and add them to the 'thumbnail' folder. Update all project import link to it.
…e.jsx to the function which generate the template in models/source_accessibility.py. #1
…e to create the photometry plot. Passage of photometry data from the source page to the creation of the template. Renaming of data passed from the source page and used when creating the public template from data_to_display to public_data. #1
…ation of a style.css file with the general style common to all public pages. #1
…mbnailList.jsx and in Source.jsx when get the data to send the public page template generation. #1
…lic_pages, rename the source template and update import. #1
…for the cache use by public gcn report page. #1
@Theodlz Theodlz self-requested a review May 29, 2024 17:16
Copy link
Contributor

@Theodlz Theodlz left a comment

Choose a reason for hiding this comment

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

minor comments, mostly asking some questions to make sure I understand some of the changes

skyportal/handlers/api/public_pages/public_source_page.py Outdated Show resolved Hide resolved
skyportal/utils/thumbnail.py Show resolved Hide resolved
@Theodlz
Copy link
Contributor

Theodlz commented May 29, 2024

@antoine-le-calloch migrations were fixed on main if you want to merge your branch with it.

@Theodlz Theodlz self-requested a review May 31, 2024 02:54
Copy link
Contributor

@Theodlz Theodlz left a comment

Choose a reason for hiding this comment

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

Super simple comments, otherwise I am happy with this version as a V1!

skyportal/handlers/api/public_pages/public_source_page.py Outdated Show resolved Hide resolved
static/js/components/thumbnail/Thumbnail.jsx Outdated Show resolved Hide resolved
@antoine-le-calloch
Copy link
Contributor Author

@Theodlz @mcoughlin. Last corrections have been made.

@Theodlz
Copy link
Contributor

Theodlz commented May 31, 2024

I'm about to merge your PR @antoine-le-calloch, any chance to resolve the conflicts that are on main super quick? No worries if you can't do it now, just let me know and I'll take care of it.

@antoine-le-calloch
Copy link
Contributor Author

I'm about to merge your PR @antoine-le-calloch, any chance to resolve the conflicts that are on main super quick? No worries if you can't do it now, just let me know and I'll take care of it.

I'm doing it now !

@antoine-le-calloch
Copy link
Contributor Author

I'm about to merge your PR @antoine-le-calloch, any chance to resolve the conflicts that are on main super quick? No worries if you can't do it now, just let me know and I'll take care of it.

Done!

@mcoughlin mcoughlin merged commit bb2aac8 into skyportal:main Jun 1, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config-change Pull requests that change the config file formatting-and-linting Pull requests changing the formatting/linting checks migration migrates the database needs-migration? Pull requests that may need a migration script written (labeled automatically)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants