Huiwen 653d858fa8
Add org-level workspace class restrictions (#19191)
* Add org-level maxmium workspace class limit

* [papi] add ListOrganizationWorkspaceClasses method

* Use papi in dashboard

* Validate when updating

* Fix bug

* Make it select default

* Align figma

* Option checking

* fixup

* Use switch button

* Add feature flag

* `invaldiator2` => `invalidateWorkspaceClasses`

* Don't allow to all if selected ones are removed from installation

* Update respond error msg

* dashboard show error msg

* fixup

* update proto doc

* Apply suggestions from code review

Updated error wording.

* update order

* Fix edge case

* Hide delete scope if not owner

* Update error msg

* Not cache org ws cls

* Force update org info

* Rename query file

* Add todos

* Remove refetch

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
Co-authored-by: Laurie T. Malau <laurie@gitpod.io>
2023-12-15 08:48:22 +02:00
..
2022-12-08 13:05:19 -03:00
2022-12-08 13:05:19 -03:00
2022-12-08 13:05:19 -03:00
2020-08-25 09:25:15 +00:00
2022-12-08 13:05:19 -03:00
2022-12-08 13:05:19 -03:00

Gitpod-db

Contains all the database related functionality, implemented using typeorm.

Working on gitpod-protocol component

When you are making changes to gitpod-protocol component, make sure to run yarn build in gitpod-protocol folder to make sure your changes will be rebuild. Also consider running yarn watch so that any changes are rebuilt in realtime.

Adding a new table

  1. Create a migration - use the baseline as an exemplar
  2. Create a new entity that implements the requisite interface or extend an existing entity as required - see db-user.ts
  3. If it is a new table, create the matching injectable ORM implementation and interface (if required) - see user-db-impl.ts and user-db.ts. Otherwise extend the existing interface and implementation as required.
  4. Add the injectable implementation to the DB container module, binding the interface and implementation as appropriate, otherwise it will not be instantiated correctly e.g.
    bind(TypeORMUserDBImpl).toSelf().inSingletonScope();
    bind(UserDB).toService(TypeORMUserDBImpl);
  1. Add the new ORM as an injected component where required e.g. in user-controller.ts
    @inject(UserDB) protected readonly userDb: UserDB;