Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Todo List: Separate Cloud Foundry code from the core modules. #3675

Closed
KlapTrap opened this issue Jun 20, 2019 · 17 comments · Fixed by #4314
Closed

Todo List: Separate Cloud Foundry code from the core modules. #3675

KlapTrap opened this issue Jun 20, 2019 · 17 comments · Fixed by #4314
Assignees
Labels
extension-cf-components Issues related to moving cf components and other code from core extension-phase-2 extensions on hold This PR isn't finished and isn't actively being worked on, but will be in the near future.

Comments

@KlapTrap
Copy link
Contributor

KlapTrap commented Jun 20, 2019

This ticket should act as a todo list of areas of the core frontend code that references Cloud Foundry.

We're doing this as part of the extensions work and to improve code maintainability and testability.

Note: This list is not exhaustive and should not replace a deliberate look through the codebase.

@KlapTrap
Copy link
Contributor Author

KlapTrap commented Jun 20, 2019

recursive-entity-delete.effect.ts references application.actions

@KlapTrap
Copy link
Contributor Author

KlapTrap commented Jun 21, 2019

Move any cf related effects from frontend/packages/store/src/effects into cf package.
Move any cf related components from frontend/packages/core/src/shared into cf package.
Move any cf related features from frontend/packages/core/src/features into cf package.

@KlapTrap
Copy link
Contributor Author

KlapTrap commented Jun 21, 2019

Move any cf related reducers from frontend/packages/store/src/reducers into cf package.

@KlapTrap
Copy link
Contributor Author

KlapTrap commented Jun 21, 2019

Move any cf related selectors from frontend/packages/store/src/selectors into cf package.
Move any cf related types from frontend/packages/store/src/selectors into cf package.
Move all entity relations code into cf package - some can be seen here src/frontend/packages/store/src/helpers/entity-relations.

@KlapTrap
Copy link
Contributor Author

We have two cloud-foundry.modules.ts rename one of them.

@KlapTrap
Copy link
Contributor Author

KlapTrap commented Jun 21, 2019

list-data-source-types.ts & list-data-source.ts shouldn't reference metrics actions.

@KlapTrap
Copy link
Contributor Author

Work out what to do with the metrics code, this is used across the cloudfoundry and kubernetes (in the SUSE repo) code.

Do we need a metrics plugin? How would the other plugins access the actions, components etc. of another plugin?

@KlapTrap KlapTrap changed the title Extensions: Separate Cloud Foundry code from the core modules. Todo List: Separate Cloud Foundry code from the core modules. Jul 8, 2019
@KlapTrap
Copy link
Contributor Author

KlapTrap commented Jul 8, 2019

QParam in pagintion.types.ts needs to be moved into CF module.

Check where else we use QParam.

@KlapTrap
Copy link
Contributor Author

cf-api-svc.types.ts, cf-api.types.ts and cf.helpers.ts need to be moved into cf module.

@richard-cox
Copy link
Contributor

richard-cox commented Jul 11, 2019

Now covered in #3789
Review src/frontend/packages/store/src/reducers/current-user-roles-reducer. A lot of this is cf related. Need to understand if the generic permissions model depends on any. If not move over. If so need to understand how to make permissions model work with packages.

UPDATE: The currentUserRoles part of the store contains three seconds, two are core and one is specifically cf. Need to move this out of currentUserRoles such that we don't have two reducers for the same store section. The permissions model should be expanded to allow extensions to add their own permission checks (which look in new cf current user roles part of store)

@richard-cox
Copy link
Contributor

src/frontend/packages/core/src/features/dashboard/dashboard-base/dashboard-base.component.ts

    this.endpointsService.registerHealthCheck(
      new EndpointHealthCheck('cf', (endpoint) => this.store.dispatch(new GetCFInfo(endpoint.guid)))
    );

Endpoint health checks should come from endpoint configuration. Should check all registered endpoint types for one.

@richard-cox
Copy link
Contributor

Ensure CFAppState is only referenced from cf module

@richard-cox
Copy link
Contributor

Move entity relations & validation into cf module

@richard-cox
Copy link
Contributor

Ensure nothing that can be lazy loaded is imported in CloudFoundryPackageModule (vs CloudFoundryModule)

@richard-cox
Copy link
Contributor

Move cf effects into cf module

  • see cf specific PermissionsEffects + PermissionEffects
  • currently adding with EffectsModuke.forFeature then fails to add cf based entities to store

@richard-cox
Copy link
Contributor

Ensure there's no references to CFAppState in non-cf areas (favoriteEntitiesSelector, favoriteGroupsStateSelector, internalEventStateSelector, etc)

@nwmac
Copy link
Contributor

nwmac commented Jul 25, 2019

Things to check from store folder:

grep -R "/cloud-foundry/" *
grep -R "CFAppState" *
grep -R "CF.*" *

@KlapTrap KlapTrap added the extension-cf-components Issues related to moving cf components and other code from core label Aug 21, 2019
@kreinecke kreinecke added the on hold This PR isn't finished and isn't actively being worked on, but will be in the near future. label Oct 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extension-cf-components Issues related to moving cf components and other code from core extension-phase-2 extensions on hold This PR isn't finished and isn't actively being worked on, but will be in the near future.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants