boakley / robotframework-hub

Web app for accessing robot framework assets
https://github.com/boakley/robotframework-hub/wiki
Apache License 2.0
170 stars 60 forks source link

Support "projects" #34

Open boakley opened 10 years ago

boakley commented 10 years ago

I would like to be able to switch the hub between "projects". For example, I have two github projects: projectA and projectB. These are rooted in ~/git (eg: ~/git/projectA, ~/git/projectB). When I am working on A I only want to see keywords related to projectA, so I start the hub with python -m rfhub ~/git/projectA.

Later, I start working on projectB. I don't want to have to stop and restart the hub. Instead, it would be nice if there were a dropdown that listed the two projects so I can switch between them from within one of the hub pages.

This would work similarly to how projects work in the brackets editor. In fact, what I ultimately want to be able to do is switch a project in brackets, and have it send a request to the hub to also switch to that project.

boakley commented 9 years ago

The first step is to implement a URL for switching from one project to another. Perhaps POST to /api/set_root or /api/set_project, or perhaps /admin/set_root (?) with the body being the absolute path? I suppose GET would work just as well, though putting an absolute file path in a URL can be tricky.

Another option might be to make "project" a first class object, so POST to /api/project to create a new project (which could be seeded from command line arguments) and maybe PUT to /api/project/current to set the current project?