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

Upload of libraries(.lib and .dcm) from the django admin panel and the frontend #247

Merged
merged 23 commits into from
May 25, 2021

Conversation

kumanik
Copy link
Contributor

@kumanik kumanik commented May 24, 2021

TASK 5

Upload of libraries(.lib and .dcm files)

Feature for admin to upload default libraries and authenticated users to upload libraries files for use in their workspaces.

Approach and features added

  • Created a new model called library-sets at the esim-cloud-backend to store a collection of libraries. So from the django admin panel admin users can upload libraries for other users to use in their circuits.

  • In the frontend a modal has been added to show a list of libraries along with it the option to add or remove libraries from the workspace.

  • There are 3 sections as to default(by admin set to activate on editor load), additional(extra libraries uploaded by admin that can be activated if user wants) and user-uploaded.

  • Users can also upload their libraries if they want and will have the option to use it in their workspace or delete them if not required.

  • The editor will save which libraries were in use when a circuit is saved and will load them when they are opened using the open saved circuits on cloud dialog box.

New Packages Used

esim-cloud-backend (Python)

  • django-inline-actions==2.4.0

Files that changed extensively

esim-cloud-backend

  • esim-cloud-backend/libAPI/views.py
  • esim-cloud-backend/libAPI/models.py
  • esim-cloud-backend/libAPI/admin.py

eda-frontend

  • eda-frontend/src/redux/reducers/schematicEditorReducer.js
  • eda-frontend/src/redux/actions/schematicEditorActions.js
  • eda-frontend/src/components/SchematicEditor/ToolbarExtension.js
  • eda-frontend/src/components/SchematicEditor/ComponentSidebar.js

Changes on Models

  • LibrarySet (new) in libAPI
  • Library (modified) in libAPI to add field Foreign Key LibraryKey
  • SaveState (modified) in saveAPI to add field Many2Many esim_libraries

Merged latest commits from frg-fossee/eSim-Cloud:develop

@kumanik kumanik changed the title Dynamic libraries Upload of libraries(.lib and .dcm) from the django admin panel and the frontend May 25, 2021
@firuza firuza merged commit 6d4676c into frg-fossee:develop May 25, 2021
firuza added a commit that referenced this pull request May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants