Code Monkey home page Code Monkey logo

Comments (2)

alessandro-sorint avatar alessandro-sorint commented on May 13, 2024

I are working on this feature for the backend.
The idea in general is this: the user go to the project page, click a button for move the project, that open a new page.
Here the frontend call an api that get the list of user/org projectgroups and show they with radio buttons.
The user select a radio button and confirm, the frontend call an api for modify the projectref of the progect.
The user can select a different organizazion or move the project between user and organization.

For moving the project we can user the api PUT /projects/{projectref} that already exists
es. PUT https://agoladev.sorintdev.it/api/v1alpha/projects/org%2FTest%2Fproject1
body: {"parent_ref": "user/username1/userprojectgroup"}

For getting the list of projectgroups I would like to create this api GET /user/projectgroups?grouptype
es. /user/projectgroups?grouptype=user%2Corg
The parameter grouptype is an array, we can use "user" and/or "org" value.
With user value the api return the list of user projectgroups recursively
With org value the api return the list of all organization projectgroups where the user is owner
The default value for grouptype empty is "user"

We need the pull request #280 to get the list of user organizations for the api /user/projectgroups

from agola.

sgotti avatar sgotti commented on May 13, 2024

For moving the project we can user the api PUT /projects/{projectref} that already exists es. PUT https://agoladev.sorintdev.it/api/v1alpha/projects/org%2FTest%2Fproject1 body: {"parent_ref": "user/username1/userprojectgroup"}

Since this can be a move between different with the actual datamanager and related locking implementation it'll be quite cumbersome to properly handle locking. So let's wait when datamanager will be removed.

For getting the list of projectgroups I would like to create this api GET /user/projectgroups?grouptype
es. /user/projectgroups?grouptype=user%2Corg
The parameter grouptype is an array, we can use "user" and/or "org" value.
With user value the api return the list of user projectgroups recursively
With org value the api return the list of all organization projectgroups where the user is owner
The default value for grouptype empty is "user"

The user is already able to navigate between projectgroups/projects. I don't see the need for this new api that will require e recursive fetching.

from agola.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.