From 657de5ea7fd9d3dec9c934ba1a80fbc7269b6168 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Dec 2024 22:20:54 +0330 Subject: [PATCH] feat: added key column for tables --- steampipe-plugin-render/render/table_render_blueprint.go | 3 ++- steampipe-plugin-render/render/table_render_deploy.go | 3 ++- steampipe-plugin-render/render/table_render_disk.go | 3 ++- steampipe-plugin-render/render/table_render_env_group.go | 3 ++- steampipe-plugin-render/render/table_render_environment.go | 3 ++- steampipe-plugin-render/render/table_render_header.go | 3 ++- steampipe-plugin-render/render/table_render_job.go | 3 ++- .../render/table_render_postgres_instance.go | 3 ++- steampipe-plugin-render/render/table_render_project.go | 3 ++- steampipe-plugin-render/render/table_render_route.go | 3 ++- steampipe-plugin-render/render/table_render_service.go | 3 ++- 11 files changed, 22 insertions(+), 11 deletions(-) diff --git a/steampipe-plugin-render/render/table_render_blueprint.go b/steampipe-plugin-render/render/table_render_blueprint.go index d3b2c608..d0340497 100644 --- a/steampipe-plugin-render/render/table_render_blueprint.go +++ b/steampipe-plugin-render/render/table_render_blueprint.go @@ -15,7 +15,8 @@ func tableRenderBlueprint(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListBlueprint, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetBlueprint, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetBlueprint, }, Columns: []*plugin.Column{ // Top columns diff --git a/steampipe-plugin-render/render/table_render_deploy.go b/steampipe-plugin-render/render/table_render_deploy.go index c76eb05a..48dc2ea9 100644 --- a/steampipe-plugin-render/render/table_render_deploy.go +++ b/steampipe-plugin-render/render/table_render_deploy.go @@ -15,7 +15,8 @@ func tableRenderDeploy(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListDeploy, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetDeploy, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetDeploy, }, Columns: []*plugin.Column{ // Top columns diff --git a/steampipe-plugin-render/render/table_render_disk.go b/steampipe-plugin-render/render/table_render_disk.go index 8051b33d..7ca84972 100644 --- a/steampipe-plugin-render/render/table_render_disk.go +++ b/steampipe-plugin-render/render/table_render_disk.go @@ -15,7 +15,8 @@ func tableRenderDisk(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListDisk, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetDisk, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetDisk, }, Columns: []*plugin.Column{ // Top columns diff --git a/steampipe-plugin-render/render/table_render_env_group.go b/steampipe-plugin-render/render/table_render_env_group.go index d9de531e..91cdcff7 100644 --- a/steampipe-plugin-render/render/table_render_env_group.go +++ b/steampipe-plugin-render/render/table_render_env_group.go @@ -15,7 +15,8 @@ func tableRenderEnvGroup(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListEnvGroup, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetEnvGroup, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetEnvGroup, }, Columns: []*plugin.Column{ // Top columns diff --git a/steampipe-plugin-render/render/table_render_environment.go b/steampipe-plugin-render/render/table_render_environment.go index d4db4bf9..1bff0eb0 100644 --- a/steampipe-plugin-render/render/table_render_environment.go +++ b/steampipe-plugin-render/render/table_render_environment.go @@ -15,7 +15,8 @@ func tableRenderEnvironment(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListEnvironment, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetEnvironment, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetEnvironment, }, Columns: []*plugin.Column{ // Top columns diff --git a/steampipe-plugin-render/render/table_render_header.go b/steampipe-plugin-render/render/table_render_header.go index f9b83cd6..f83a7306 100644 --- a/steampipe-plugin-render/render/table_render_header.go +++ b/steampipe-plugin-render/render/table_render_header.go @@ -15,7 +15,8 @@ func tableRenderHeader(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListHeader, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetHeader, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetHeader, }, Columns: []*plugin.Column{ // Top columns diff --git a/steampipe-plugin-render/render/table_render_job.go b/steampipe-plugin-render/render/table_render_job.go index 41d82a24..c0f6c8bd 100644 --- a/steampipe-plugin-render/render/table_render_job.go +++ b/steampipe-plugin-render/render/table_render_job.go @@ -15,7 +15,8 @@ func tableRenderJob(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListJob, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetJob, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetJob, }, Columns: []*plugin.Column{ // Top columns diff --git a/steampipe-plugin-render/render/table_render_postgres_instance.go b/steampipe-plugin-render/render/table_render_postgres_instance.go index a36d8968..ef5afd39 100644 --- a/steampipe-plugin-render/render/table_render_postgres_instance.go +++ b/steampipe-plugin-render/render/table_render_postgres_instance.go @@ -15,7 +15,8 @@ func tableRenderPostgres(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListPostgres, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetPostgres, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetPostgres, }, Columns: []*plugin.Column{ // Top columns diff --git a/steampipe-plugin-render/render/table_render_project.go b/steampipe-plugin-render/render/table_render_project.go index 2e13493a..5aab51bc 100644 --- a/steampipe-plugin-render/render/table_render_project.go +++ b/steampipe-plugin-render/render/table_render_project.go @@ -15,7 +15,8 @@ func tableRenderProject(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListProject, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetProject, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetProject, }, Columns: []*plugin.Column{ // Top columns diff --git a/steampipe-plugin-render/render/table_render_route.go b/steampipe-plugin-render/render/table_render_route.go index 9b968926..07724a31 100644 --- a/steampipe-plugin-render/render/table_render_route.go +++ b/steampipe-plugin-render/render/table_render_route.go @@ -15,7 +15,8 @@ func tableRenderRoute(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListRoute, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetRoute, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetRoute, }, Columns: []*plugin.Column{ // Top columns diff --git a/steampipe-plugin-render/render/table_render_service.go b/steampipe-plugin-render/render/table_render_service.go index f73a2221..c87dd6a6 100644 --- a/steampipe-plugin-render/render/table_render_service.go +++ b/steampipe-plugin-render/render/table_render_service.go @@ -15,7 +15,8 @@ func tableRenderService(ctx context.Context) *plugin.Table { Hydrate: opengovernance.ListService, }, Get: &plugin.GetConfig{ - Hydrate: opengovernance.GetService, + KeyColumns: plugin.SingleColumn("id"), + Hydrate: opengovernance.GetService, }, Columns: []*plugin.Column{ // Top columns