Skip to content

BE changes for organization level activity page

What does this MR do and why?

As per #415300 (closed) this MR:

  • adds a new activity route for organizations,
  • adds new menu item under the manage
  • adds empty activity page

Query Plan

Query postgres.ai Screenshot
SELECT * FROM "projects" WHERE "projects"."organization_id" = 1 ORDER BY "projects"."last_activity_at" DESC LIMIT 1000; https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/26619/commands/83389 image
explain SELECT * FROM "namespaces" WHERE "namespaces"."organization_id" = 1 LIMIT 1000; https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/26619/commands/83390 image
SELECT "events".* FROM "events" INNER JOIN ( SELECT "id" FROM "projects" WHERE "organization_id" = 1 LIMIT 1000 ) AS "project" ON "project"."id" = "events"."project_id" WHERE "events"."action" = 5; https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/26619/commands/83400 image
SELECT "events".* FROM "events" INNER JOIN ( SELECT "id" FROM "projects" WHERE "organization_id" = 1 LIMIT 1000 ) AS "project" ON "project"."id" = "events"."project_id" WHERE "events"."action" = 7; https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/26619/commands/83401 image
SELECT "events".* FROM "events" INNER JOIN ( SELECT "id" FROM "projects" WHERE "organization_id" = 1 LIMIT 1000 ) AS "project" ON "project"."id" = "events"."project_id" WHERE "events"."action" = 6; https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/26619/commands/83402 image

Screenshots or screen recordings

image

How to set up and validate locally

  1. Checkout the branch.
  2. Access an organization with some projects/groups.
  3. Visit the activity page (Organization/Activity).

note: if you don't see organizations page, you might need to enable ui_for_organizations FF.

Related to #415300 (closed)

Edited by Bojan Marjanovic

Merge request reports