Closed petey closed 6 years ago
The current designs for this is to create collections based on ~pipeline keywords~ (#571).
Collections:
Dashboard:
TODO:
Initial tests with the current API responses requires about 155 requests to fetch data for 46 pipelines. This needs to be remedied by storing more information in events (like status), or creating a separate API, maybe under collections, that aggregates the necessary data in one call.
After conducting user research/observations about dashboards, @joelseq and I have come to some conclusions.
For the first pass at a user dashboard, we think it would be good just to allow users to create and delete Collections
(groups/folders) and add and remove pipelines into their Collections
. They should be able to view their Collections
as well. The Collections
should live as a flyout on the left side of the page. Collections
should display pipeline name, last event status, and number of open PRs. The user dashboard should be a default page that a user goes to when they go to Screwdriver. Clicking the Screwdriver.cd logo should also take you to that page.
Here's an updated list of stories based on the research findings and new design:
Collections:
I'm not convinced yet that a separate collection page is necessary right now. I believe that the collections flyout should act as "tabs" for the set of pipelines to display on the dashboard. We should give the ability to remove pipelines from the collections flyout ui, not a separate page. As a stretch goal, we could add pipelines to a collection from that pipeline's page.
After some discussion, here are the endpoints we think the API should have:
POST /collections
to create a collection (with name & description & pipelineIds) PUT /collections/{id}
to update a collection; be it editing name or replacing pipelineIds PATCH /collections/{id}/pipelines
to add pipelines - payload would be a body array of pipelinesDELETE /collections/{id}/pipelines
to remove pipelines - payload would be a body array of pipelinesDELETE /collections/{id}
to delete a collection, along with all dataThat's a very restful approach to things, but there are two considerations to make:
ember-data
use PATCH or DELETE in this way without heavy customization, or do you plan on using services and write everything from scratch?After further discussion, we have decided that the following endpoints are what the API will have:
GET /collections
to get a list of user's collections (with pipelineIds for each collection)GET /collections/{id}
to get a collection (with pipelines populated)POST /collections
to create a collection (with name & description & pipelineIds)PUT /collections/{id}
to update a collection; be it editing name or description or replacing pipelineIds. NOTE: If you want to add or remove a pipeline you still have to pass in all the other pipelineIds in the payloadDELETE /collections/{id}
to delete a collectionWe have decided against going with the PATCH /collections/{id}/pipelines
and DELETE /collections/{id}/pipelines
routes as they are inconsistent with our current approach for specifying endpoints and ember-data
does not use PATCH
or DELETE
in this way out of the box.
Users should be able to add a set of pipelines to a sharable collection, and display this collection on the main landing page for screwdriver.