Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Add cloudspout-button-panel #658

Merged
merged 4 commits into from
Jun 30, 2020

Conversation

derjust
Copy link
Contributor

@derjust derjust commented Jun 20, 2020

Please consider adding cloudspout-button-panel to the plugin repository.

It provides a simple panel that shows only one button - to integrate with any kind of HTTP/REST API:

  • Support GET and POST HTTP verb
    • Adds no new javascript dependencies
    • Uses standard browser APIs and respects CORS
  • Support API key via header X-API-Key or query parameter ?api-key
  • Custom label text & Grafana template design

@marcusolsson marcusolsson added submission/new Submission is a new plugin type/panel Categorizes the submission as a panel react labels Jun 21, 2020
@marcusolsson
Copy link
Contributor

Thank you @derjust for contributing your plugin to Grafana! I've tested your panel and have a few comments.

Please fix

These are things that might negatively impact the user experience, and should be fixed.

  • Image and GIF in README needs to be absolute URL rather than relative.
  • Missing option names for Header/Query select, Color, and Method.
  • The colors "Danger", "Inverse", and "Transparent" seems to be the same as the Primary?
  • API Key hard-codes the query param and header that is used. I’d expect a button like this to support adding custom headers and query parameters. The user is asked to enter a (secret) API Key in clear text, which shouldn’t be encouraged. By supporting generic headers and params, the user can still add secrets, but it’s at least not actively encouraged.

Please consider fixing

These are recommendations that will improve the quality of the plugin, but aren't required for publishing the plugin.

  • Make the README heading the same as the title of the plugin, e.g. “Button panel”.
  • x-api-key is sent even if API Key is empty.

@marcusolsson marcusolsson added the milestone/needs-changes Submission needs changes before it can be approved label Jun 23, 2020
@derjust
Copy link
Contributor Author

derjust commented Jun 23, 2020

Thanks for the review

Image and GIF in README needs to be absolute URL rather than relative.

Missing option names for Header/Query select, Color, and Method.

The colors "Danger", "Inverse", and "Transparent" seems to be the same as the Primary?

Removed those - they seemed to be not styled ✅

Make the README heading the same as the title of the plugin, e.g. “Button panel”.


I’d expect a button like this to support adding custom headers and query parameters....
By supporting generic headers and params, the user can still add secrets, but it’s at least not actively encouraged.

This would make it way more flexible; I agree with that.

x-api-key is sent even if API Key is empty.

Let me check again. Couldn't reproduce this yesterday

derjust added a commit to cloudspout/cloudspout-button-panel that referenced this pull request Jun 24, 2020
Addressingg the review comments from grafana/grafana-plugin-repository#658
allowing for a unlimited number of key/value pairs for Header/Query parameters
@derjust
Copy link
Contributor Author

derjust commented Jun 24, 2020

I’d expect a button like this to support adding custom headers and query parameters....
By supporting generic headers and params, the user can still add secrets, but it’s at least not actively encouraged.

Addressed also the last point to have a dynamic list of parameters for query/parameters & release a new version of the plugin

@marcusolsson
Copy link
Contributor

Could you look at resolving these conflicts?

Please consider adding cloudspout-button-panel to the plugin repository.

It provides a simple panel that shows only one button - to integrate with any kind of HTTP/REST API:
* Support GET and POST HTTP verb
    * Adds no new javascript dependencies
    * Uses standard browser APIs and respects CORS
* Support API key via header X-API-Key or query parameter ?api-key
* Custom label text & Grafana template design
Version 7.0.2 of the plugin addresses the review comments
Version 7.0.2 of the plugin addresses the review comments and removed dead code
Version 7.0.3 of the plugin addresses the review comments and removed dead code
@derjust
Copy link
Contributor Author

derjust commented Jun 30, 2020

Could you look at resolving these conflicts?

Rebased & fixed conflict

@marcusolsson marcusolsson merged commit a2e1d18 into grafana:master Jun 30, 2020
@marcusolsson
Copy link
Contributor

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
milestone/needs-changes Submission needs changes before it can be approved submission/new Submission is a new plugin type/panel Categorizes the submission as a panel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants