Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce provider space #1817

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

Introduce provider space #1817

wants to merge 13 commits into from

Conversation

skelz0r
Copy link
Member

@skelz0r skelz0r commented Mar 4, 2025

https://www.loom.com/share/5471edb1ebca435585d567b7f796294b

  • Faire le dashboard metabase
  • Implémenter AbstractProvider#routes, pour passer dans le dashboard metabase
  • Ajouter dans le menu un lien direct

Closes https://linear.app/pole-api/issue/API-3875

@skelz0r skelz0r force-pushed the features/provider-space branch from 9f9904f to 381119c Compare March 4, 2025 12:58
Copy link

linear bot commented Mar 5, 2025

@skelz0r skelz0r force-pushed the features/provider-space branch from 381119c to 45891b2 Compare March 13, 2025 16:07
@skelz0r skelz0r marked this pull request as ready for review March 13, 2025 16:07
@skelz0r skelz0r requested a review from Copilot March 13, 2025 16:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a provider space with a dedicated dashboard for providers, implements new provider-related methods in AbstractProvider, and integrates provider functionality into the admin and public views.

  • Adds ProviderController and Provider::DashboardController for provider-specific routes and dashboard functionality.
  • Introduces ProviderStatsFacade and updates MetabaseEmbedService to support new resource-based embed URLs.
  • Updates user and admin views/forms to handle provider associations and adds a dedicated provider header and layout.

Reviewed Changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/controllers/provider_controller.rb Adds authentication and helper methods for provider management.
app/facade/provider_stats_facade.rb Introduces stats URLs for providers using updated embed service parameters.
app/controllers/provider/dashboard_controller.rb Implements the provider dashboard flow.
app/models/abstract_provider.rb Adds new methods for scopes, routes filtering, and provider users.
app/lib/seeds.rb Adds a seeding method for creating a provider user.
app/controllers/admin/users_controller.rb Updates user edit functionality to include provider associations.
app/models/user.rb Implements provider? and providers methods for user/provider associations.
app/controllers/api_particulier/reporters_controller.rb Adjusts embed service usage for API-particulier reporters.
app/services/metabase_embed_service.rb Reworks initializer and URL generation for a resource-based embed.
app/services/abstract_open_api_definition.rb Adds a routes method to retrieve API paths from the OpenAPI definition.
app/facade/token_stats_facade.rb Updates embed service usage for token stats.
app/views/admin/users/index.html.erb Displays provider names and links in the admin users view.
app/views/layouts/provider.html.erb Introduces a dedicated layout for provider pages.
app/views/provider/dashboard/index.html.erb Creates an index view for provider dashboards.
app/views/provider/dashboard/show.html.erb Displays provider-specific stats using the stats facade.
app/views/shared/_metabase.html.erb Refines local parameter assignments for the Metabase iframe.
app/views/shared/api_entreprise/header/_menu.html.erb Adds a provider space link to the API Entreprise menu.
app/views/shared/api_particulier/header/_menu.html.erb Adds a provider space link to the API Particulier menu.
app/views/shared/provider/_header.html.erb Adds a header specifically for the provider space.
app/views/admin/users/edit.html.erb Adds a form section for managing provider associations.
Comments suppressed due to low confidence (1)

app/services/metabase_embed_service.rb:37

  • There is a spelling mistake in the method name 'metabase_secrey_key'; it should be renamed to 'metabase_secret_key' for clarity and consistency with the credential key.
def metabase_secrey_key

@skelz0r skelz0r force-pushed the features/provider-space branch from 00cb7f9 to 3189396 Compare March 13, 2025 16:43
@skelz0r skelz0r requested a review from Un3x March 13, 2025 16:45
Copy link
Contributor

@Un3x Un3x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'aime c'est cool.

Stylé le routing comme ca, j'avais jamais vu :O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants