-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: develop
Are you sure you want to change the base?
Introduce provider space #1817
Conversation
9f9904f
to
381119c
Compare
381119c
to
45891b2
Compare
There was a problem hiding this 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
Allow to pass resource instead of question (prepare to embed dashboards)
Will be use for stats, match on api/route within tables
00cb7f9
to
3189396
Compare
There was a problem hiding this 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
https://www.loom.com/share/5471edb1ebca435585d567b7f796294b
AbstractProvider#routes
, pour passer dans le dashboard metabaseCloses https://linear.app/pole-api/issue/API-3875