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

Create functionality to import single API backend configuration #324

Closed
3 of 5 tasks
bajiat opened this issue Aug 7, 2015 · 8 comments
Closed
3 of 5 tasks

Create functionality to import single API backend configuration #324

bajiat opened this issue Aug 7, 2015 · 8 comments
Assignees
Milestone

Comments

@bajiat
Copy link
Contributor

bajiat commented Aug 7, 2015

Based on task #323, create functionality to import single API backend configuration.

Definition of done

  • Create user interface button to upload single API backend configuration.
  • Create function to parse uploaded to configuration to JSON object.
  • Create function to insert configuration into API backends collection in the database.
  • Make sure API backend is validated against API backend schema.
  • After upload, re-direct user to the API configuration form for the uploaded API.
@frenchbread
Copy link
Contributor

Related PR - #344. Mainly the task is done. Still need to figure out how to get dynamic path value in both/collections/backendConfigurations.js file so that we are not providing hard-coded path which probably won't work on other PC's. @brylie, Any ideas?

@brylie
Copy link
Contributor

brylie commented Aug 12, 2015

@frenchbread, try using GridFS, which stores the files in a collection. We already have GridFS in our project.

@frenchbread
Copy link
Contributor

Wireframe:

img_20150820_104121

@brylie brylie modified the milestones: Sprint 10, Sprint 9 Aug 20, 2015
@frenchbread
Copy link
Contributor

PR #344 created. Please review.

Followed wire-frame that is provided above, kind of rewrote api config file import approach.
Changes:

  • most of the checks and parsing is done on client-side (so it is much faster)
  • 2-panel view (file upload drop box and file preview (with syntax highlights))
  • only YAML and JSON config files are allowed for now
  • once submit button is clicked - form contents are sent to server where final schema verification takes place
  • error handling provided almost everywhere where possible - so pretty secure
  • added custom parsing of required fields
  • couple of tips on "How to import configs" are provided.

@brylie
Copy link
Contributor

brylie commented Aug 24, 2015

Looks good. Also keep in mind the redirect after success, as this will help orient the user to the result of their action.

@frenchbread
Copy link
Contributor

@brylie Ok. Once api backend view page is ready & merged, I will add functionality to redirect after import.

@brylie
Copy link
Contributor

brylie commented Aug 25, 2015

@frenchbread cool. The pull request has been submitted and updated.

@frenchbread
Copy link
Contributor

@brylie Updated PR #344 with redirect to view page. It shows 404 for now because #390 is not in develop yet.

I've made a small suggestion in #390 to use simpler path for api backend view in url. If it will be accepted I will need to change the redirect path in this PR as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants