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

Plugins Catalog: Enable install controls based on the pluginAdminEnabled flag #41686

Merged
merged 20 commits into from
Nov 19, 2021

Conversation

leventebalogh
Copy link
Contributor

@leventebalogh leventebalogh commented Nov 15, 2021

Related issue: #40503

What changed

  • stop routing to the old version of the plugin settings
  • simplify routing by removing the deprecated routes and creating a routes config specifically for plugins/admin
  • remove unreferenced old plugins config components
  • organise still used components and tests into subfolders

The clean-up is going to be done in batches (smaller separate PRs). Upcoming ones are cleaning up the plugin state handling and removing the feature flag changing how the feature-flag works for the plugins catalog.

Copy link
Contributor

@jackw jackw left a comment

Choose a reason for hiding this comment

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

Great stuff @leventebalogh 👏

Took it for a spin and works as expected.

I'm guessing we need to change the feature flag behaviour before we can merge any of these "remove deprecated code" PRs otherwise we'll break main for anyone which has the feature flag set false?

Copy link
Contributor

@mckn mckn left a comment

Choose a reason for hiding this comment

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

LGTM!

@leventebalogh
Copy link
Contributor Author

@jackw

I'm guessing we need to change the feature flag behaviour before we can merge any of these "remove deprecated code" PRs otherwise we'll break main for anyone which has the feature flag set false?

Yes, that's right, thanks for pointing it out mate. Will merge the other 2 outstanding PRs into this one before merging the whole if it is fine with you?

@leventebalogh leventebalogh force-pushed the leventebalogh/remove-deprecated-plugin-components branch from 767b16f to 95fb70d Compare November 18, 2021 12:41
@leventebalogh leventebalogh force-pushed the leventebalogh/remove-deprecated-plugin-components branch from 95fb70d to 3c9b035 Compare November 18, 2021 12:43
* refactor(plugins): use the plugins/admin reducer only

* refactor(plugins): remove tests for the deprecated plugins reducer

* refactor(plugins): remove tests for the deprecated plugins selectors

* refactor(plugins/state): add a short comment note to selectors

* feat(plugins/state): add a selector for selecting errors

* feat(plugins/state): add a hook for getting plugin errors

* refactor(plugins): udpate the PluginsErrorsInfo component to use the new state selectors

* refactor(plugins/state): remove the old (deprecated) selectors

* refactor(plugins/state): use the new actions under /admin

* refactor(plugins/state): remove old (deprecated) reducers and actions

* refactor(plugins): update component definition

* fix(plugins): remove unnecessary {children} prop for PluginsErrorsInfo
…d` flag (#41749)

* docs(plugins): update documentation for the `plugin_admin_enabled` flag

* refactor(InstallControls): move the main component to a named module

* feat(plugins): use the `pluginAdminEnable` flag to hide / show install controls in the UI

* test(plugins): add tests for enabling/disabling install controls
@leventebalogh leventebalogh requested review from pkolyvas and a team as code owners November 19, 2021 10:42
@leventebalogh leventebalogh requested review from achatterjee-grafana and osg-grafana and removed request for a team November 19, 2021 10:42
…nents

* main: (22 commits)
  Refactor drone yaml (#41937)
  Update latest.json (#41873)
  Fix loop when cannot fetch roles (#41901)
  AzureMonitor: Fix metric namespace clear (#41878)
  Access Control: use role groups in role picker (#41912)
  AccessControl: RolePicker fetch roles in org (#41927)
  add unsupported renderer message to catalog (#41898)
  Install netcat to build-container and update the version (#41825)
  Transformers: extract fields from JSON and text (alpha) (#41791)
  Candlestick: fix volume histogram height by using mapped field name (#41931)
  Geomap: Improve geojson style editor (#41926)
  Docs: Add configuration option for the image renderer (#41798)
  Chore: Move babel config to a root babel.config.json (#41615)
  Make initialize depend on clone, only on enterprise pipelines (#41909)
  Run integration tests after initialize (#41906)
  Datasource: Fix stable sort order of query responses (#41868)
  Disable lint-drone from release pipelines (#41899)
  Add basic resource trimming command (#41780)
  Update grabpl version to 2.6.1 (#41892)
  Azure Monitor: Clean up fields when editing Metrics (#41762)
  ...
@grafanabot grafanabot added the type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project label Nov 19, 2021
@leventebalogh leventebalogh added this to the 8.3.0-beta2 milestone Nov 19, 2021
@leventebalogh leventebalogh merged commit 35c2c95 into main Nov 19, 2021
@leventebalogh leventebalogh deleted the leventebalogh/remove-deprecated-plugin-components branch November 19, 2021 12:42
@leventebalogh leventebalogh added the backport v8.3.x Mark PR for automatic backport to v8.3.x label Nov 25, 2021
grafanabot pushed a commit that referenced this pull request Nov 25, 2021
* refactor(plugins): use routes specific to the new plugins/admin

* refactor(plugins): remove unused pages (PluginList, PluginItem)

* refactor(plugins): remove PluginPage

* refactor(plugins): remove UpdatePluginModal

* refactor(plugins): move AppConfigWrapper under plugins/admin

* refactor(plugins): move PluginDashboards under plugins/admin

* refactor(plugins): rename the "specs" folder to "tests"

* refactor(plugins): move test files to /tests folder

* refactor(plugins): move AppRootPage into a /components folder

* refactor(plugins): move PluginsErrorsInfo into a /plugins folder

* refactor(plugins): move PluginSettingsCache into a /components folder

* refactor(plugins): move PluginStateInfo into a /plugins folder

* refactor(plugins): move AppRootPage.test.tsx next to the tested component

* refactor(plugins): remove old snapshot tests

* fix(plugins): fix tests

* refactor(plugins/admin): move & rename PluginSettingsCache

* fix(plugins): fix a few rebase issues

* Plugins: remove deprecated code (state handling) (#41739)

* refactor(plugins): use the plugins/admin reducer only

* refactor(plugins): remove tests for the deprecated plugins reducer

* refactor(plugins): remove tests for the deprecated plugins selectors

* refactor(plugins/state): add a short comment note to selectors

* feat(plugins/state): add a selector for selecting errors

* feat(plugins/state): add a hook for getting plugin errors

* refactor(plugins): udpate the PluginsErrorsInfo component to use the new state selectors

* refactor(plugins/state): remove the old (deprecated) selectors

* refactor(plugins/state): use the new actions under /admin

* refactor(plugins/state): remove old (deprecated) reducers and actions

* refactor(plugins): update component definition

* fix(plugins): remove unnecessary {children} prop for PluginsErrorsInfo

* Plugins: show / hide install controls based on the `pluginAdminEnabled` flag (#41749)

* docs(plugins): update documentation for the `plugin_admin_enabled` flag

* refactor(InstallControls): move the main component to a named module

* feat(plugins): use the `pluginAdminEnable` flag to hide / show install controls in the UI

* test(plugins): add tests for enabling/disabling install controls

(cherry picked from commit 35c2c95)
@leventebalogh leventebalogh changed the title Plugins: remove deprecated code (components) Plugins: show / hide install controls based on the pluginAdminEnabled flag Nov 25, 2021
jackw pushed a commit that referenced this pull request Nov 25, 2021
* refactor(plugins): use routes specific to the new plugins/admin

* refactor(plugins): remove unused pages (PluginList, PluginItem)

* refactor(plugins): remove PluginPage

* refactor(plugins): remove UpdatePluginModal

* refactor(plugins): move AppConfigWrapper under plugins/admin

* refactor(plugins): move PluginDashboards under plugins/admin

* refactor(plugins): rename the "specs" folder to "tests"

* refactor(plugins): move test files to /tests folder

* refactor(plugins): move AppRootPage into a /components folder

* refactor(plugins): move PluginsErrorsInfo into a /plugins folder

* refactor(plugins): move PluginSettingsCache into a /components folder

* refactor(plugins): move PluginStateInfo into a /plugins folder

* refactor(plugins): move AppRootPage.test.tsx next to the tested component

* refactor(plugins): remove old snapshot tests

* fix(plugins): fix tests

* refactor(plugins/admin): move & rename PluginSettingsCache

* fix(plugins): fix a few rebase issues

* Plugins: remove deprecated code (state handling) (#41739)

* refactor(plugins): use the plugins/admin reducer only

* refactor(plugins): remove tests for the deprecated plugins reducer

* refactor(plugins): remove tests for the deprecated plugins selectors

* refactor(plugins/state): add a short comment note to selectors

* feat(plugins/state): add a selector for selecting errors

* feat(plugins/state): add a hook for getting plugin errors

* refactor(plugins): udpate the PluginsErrorsInfo component to use the new state selectors

* refactor(plugins/state): remove the old (deprecated) selectors

* refactor(plugins/state): use the new actions under /admin

* refactor(plugins/state): remove old (deprecated) reducers and actions

* refactor(plugins): update component definition

* fix(plugins): remove unnecessary {children} prop for PluginsErrorsInfo

* Plugins: show / hide install controls based on the `pluginAdminEnabled` flag (#41749)

* docs(plugins): update documentation for the `plugin_admin_enabled` flag

* refactor(InstallControls): move the main component to a named module

* feat(plugins): use the `pluginAdminEnable` flag to hide / show install controls in the UI

* test(plugins): add tests for enabling/disabling install controls

(cherry picked from commit 35c2c95)

Co-authored-by: Levente Balogh <[email protected]>
@jackw jackw changed the title Plugins: show / hide install controls based on the pluginAdminEnabled flag Plugins Catalog: Enable install controls based on the pluginAdminEnabled flag Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend area/plugins area/plugins-catalog backport v8.3.x Mark PR for automatic backport to v8.3.x type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project
Projects
Development

Successfully merging this pull request may close these issues.

4 participants