Skip to content

Commit

Permalink
Dashboard modularization (#537)
Browse files Browse the repository at this point in the history
### Feature or Bugfix
Refactoring

### Detail
Refactoring of the dashboards

### Relates
#509

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.


- [x] TODO: There was a huge merge conflict. I am testing the changes
after the merge

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abdulrahman Kaitoua <abdulrahman.kaitoua@polimi.it>
Co-authored-by: akaitoua-sa <126820454+akaitoua-sa@users.noreply.github.com>
Co-authored-by: dlpzx <71252798+dlpzx@users.noreply.github.com>
Co-authored-by: Gezim Musliaj <102723839+gmuslia@users.noreply.github.com>
Co-authored-by: kukushking <kukushkin.anton@gmail.com>
Co-authored-by: Rick Bernotas <97474536+rbernotas@users.noreply.github.com>
Co-authored-by: David Mutune Kimengu <57294718+kimengu-david@users.noreply.github.com>
Co-authored-by: dbalintx <132444646+dbalintx@users.noreply.github.com>
  • Loading branch information
10 people authored Jul 4, 2023
1 parent 79cd32e commit ebebe26
Show file tree
Hide file tree
Showing 80 changed files with 1,539 additions and 1,722 deletions.
329 changes: 0 additions & 329 deletions backend/dataall/api/Objects/Dashboard/resolvers.py

This file was deleted.

2 changes: 0 additions & 2 deletions backend/dataall/api/Objects/Environment/input_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
gql.Argument('description', gql.String),
gql.Argument('AwsAccountId', gql.NonNullableType(gql.String)),
gql.Argument('region', gql.NonNullableType(gql.String)),
gql.Argument('dashboardsEnabled', type=gql.Boolean),
gql.Argument('warehousesEnabled', type=gql.Boolean),
gql.Argument('vpcId', gql.String),
gql.Argument('privateSubnetIds', gql.ArrayType(gql.String)),
Expand All @@ -50,7 +49,6 @@
gql.Argument('vpcId', gql.String),
gql.Argument('privateSubnetIds', gql.ArrayType(gql.String)),
gql.Argument('publicSubnetIds', gql.ArrayType(gql.String)),
gql.Argument('dashboardsEnabled', type=gql.Boolean),
gql.Argument('warehousesEnabled', type=gql.Boolean),
gql.Argument('resourcePrefix', gql.String),
gql.Argument('parameters', gql.ArrayType(ModifyEnvironmentParameterInput))
Expand Down
7 changes: 4 additions & 3 deletions backend/dataall/api/Objects/Environment/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from ....aws.handlers.cloudformation import CloudFormation
from ....aws.handlers.iam import IAM
from ....aws.handlers.parameter_store import ParameterStoreManager
from ....core.group.services.environment_resource_manager import EnvironmentResourceManager
from ....db import exceptions, permissions
from ....db.api import Environment, ResourcePolicy, Stack
from ....utils.naming_convention import (
Expand Down Expand Up @@ -127,10 +128,10 @@ def update_environment(
data=input,
check_perm=True,
)
if input.get('dashboardsEnabled') or (
environment.resourcePrefix != previous_resource_prefix
):

if EnvironmentResourceManager.deploy_updated_stack(session, previous_resource_prefix, environment):
stack_helper.deploy_stack(targetUri=environment.environmentUri)

return environment


Expand Down
1 change: 0 additions & 1 deletion backend/dataall/api/Objects/Environment/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
resolver=resolve_user_role,
),
gql.Field('validated', type=gql.Boolean),
gql.Field('dashboardsEnabled', type=gql.Boolean),
gql.Field('warehousesEnabled', type=gql.Boolean),
gql.Field('roleCreated', type=gql.Boolean),
gql.Field('isOrganizationDefaultEnvironment', type=gql.Boolean),
Expand Down
3 changes: 0 additions & 3 deletions backend/dataall/api/Objects/Feed/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,3 @@ def find_target(cls, obj: Resource):
@classmethod
def types(cls):
return [gql.Ref(target_type) for target_type in cls._DEFINITIONS.keys()]


FeedRegistry.register(FeedDefinition("Dashboard", models.Dashboard))
Loading

0 comments on commit ebebe26

Please sign in to comment.