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

Refactor: consistant plugin/meta usage #16834

Merged
merged 5 commits into from
May 1, 2019

Conversation

ryantxu
Copy link
Member

@ryantxu ryantxu commented May 1, 2019

Working on #16586, I keep hitting issues/confusion with inconsistent plugin/meta definitions.

Currently there are a few ways that plugins use and reference meta, specifically:

  • Datasource plugin does not need/show directly (loads for each instance)
  • PluginPanelMeta contains PanelPlugin
  • PluginPanel exits if react, AngularPanelPlugin otherwise
  • AppPlugin contains meta

This PR changes things so that:

  • All plugins contain their typed meta
    • PanelPlugin uses PanelPluginMeta
    • DataSourcePlugin uses DataSourcePluginMeta
    • AppPlugin uses PluginMeta (nothing unique defined yet)
  • All panels define PluginPanel
    • angular panels, have angularPanelCtrl defined
  • Panel loading cache is managed by plugin_loader not PanelPluginMeta

Copy link
Member

@torkelo torkelo left a comment

Choose a reason for hiding this comment

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

Looks great! Can't express enough how much I love PRs like this that refactor to just make stuff more consistent :)

@ryantxu ryantxu merged commit 51a9856 into grafana:master May 1, 2019
@ryantxu ryantxu deleted the plugin-meta-usage branch May 1, 2019 05:36
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 1, 2019
* grafana/master:
  Refactor: consistant plugin/meta usage (grafana#16834)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 1, 2019
* grafana/master:
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
  DataProxy: Restore Set-Cookie header after proxy request (grafana#16838)
  docs: clarify page parameter version support for folder/dashboard search (grafana#16836)
  Chore: revise some of the gosec rules (grafana#16713)
  Refactor: consistant plugin/meta usage (grafana#16834)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 2, 2019
* grafana/master:
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
  DataProxy: Restore Set-Cookie header after proxy request (grafana#16838)
  docs: clarify page parameter version support for folder/dashboard search (grafana#16836)
  Chore: revise some of the gosec rules (grafana#16713)
  Refactor: consistant plugin/meta usage (grafana#16834)
  Explore: Use SeriesData format for loki/logs (grafana#16793)
  Refactor: move NavModel to @grafana/ui (grafana#16813)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 2, 2019
* grafana/master: (27 commits)
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
  DataProxy: Restore Set-Cookie header after proxy request (grafana#16838)
  docs: clarify page parameter version support for folder/dashboard search (grafana#16836)
  Chore: revise some of the gosec rules (grafana#16713)
  Refactor: consistant plugin/meta usage (grafana#16834)
  Explore: Use SeriesData format for loki/logs (grafana#16793)
  Refactor: move NavModel to @grafana/ui (grafana#16813)
  Auth: Enable retries and transaction for some db calls for auth tokens  (grafana#16785)
  Provisioning: Show file path of provisioning file in save/delete dialogs (grafana#16706)
  Add tracing headers for prometheus datasource (grafana#16724)
  Config: Fixes bug where timeouts for alerting was not parsed correctly (grafana#16784)
  build: removes gopkg files from dev docker file (grafana#16817)
  Provisioning: Trying to fix failing test (grafana#16800)
  Table: React table fix rotate support in storybook (grafana#16816)
  TestData: add log level in dummy message (grafana#16815)
  removes gopkg.lock from root folder
  Explore: Support user timezone (grafana#16469)
  Plugins: rename vizPlugin to panelPlugin (grafana#16802)
  ...
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.

None yet

2 participants