Skip to content

Commit

Permalink
Add release files to the repo to register the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
derjust committed Jun 20, 2020
1 parent dca38b6 commit ae0058f
Show file tree
Hide file tree
Showing 8 changed files with 780 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lib-cov
coverage

# Compiled binary addons (https://nodejs.org/api/addons.html)
dist/
dist/*.zip
artifacts/
work/
ci/
Expand Down
674 changes: 674 additions & 0 deletions dist/LICENSE

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions dist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Simple Button Panel

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

* Support `GET` and `POST` HTTP verb
* Support API key via header `X-API-Key` or query parameter `?api-key`
* Custom label text & Grafana template design

![Screenshot](img/screenshot.png)

## Install

Use [Grafana's environment variable](https://grafana.com/docs/grafana/latest/installation/docker/#build-and-run-a-docker-image-with-pre-installed-plugins) to add this plugin to your installation:

```
GF_INSTALL_PLUGINS="https://github.com/cloudspout/cloudspout-button-panel/releases/download/1.0.3/cloudspout-button-panel.zip;cloudspout-button-panel"
```


## Build
First, install dependencies.
Node 12.x is required

```BASH
yarn install
```

To work with this plugin run:

```BASH
yarn watch
```

This will run linting tools and apply prettier fix.

Use an actual Docker container in parallel to test:

```BASH
docker run -d -p 3000:3000 -v "$(pwd)"/dist:/var/lib/grafana/plugins/cloudspout-button-panel --name=grafana grafana/grafana
```

To build the plugin run:

```BASH
npm run dist
```

## Deploy

```BASH
GITHUB_TOKEN=... npm run release
```

## License

GPL v3

Icons made by [Pixel perfect](https://www.flaticon.com/authors/pixel-perfect) from [www.flaticon.com](https://www.flaticon.com/)
1 change: 1 addition & 0 deletions dist/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions dist/module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/module.js.map

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions dist/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"type": "panel",
"name": "Button Panel",
"id": "cloudspout-button-panel",
"info": {
"description": "Panel for a single button",
"author": {
"name": "CloudSpout LLC",
"url": "https://github.com/cloudspout/cloudspout-button-panel/"
},
"keywords": [

],
"logos": {
"small": "img/logo.svg",
"large": "img/logo.svg"
},
"links": [
{
"name": "Website",
"url": "https://github.com/cloudspout/cloudspout-button-panel"
},
{
"name": "License",
"url": "https://github.com/cloudspout/cloudspout-button-panel/blob/master/LICENSE"
}
],
"screenshots": [],
"version": "7.0.0",
"updated": "2020-06-20"
},
"dependencies": {
"grafanaVersion": "6.3.x",
"plugins": []
}
}
7 changes: 7 additions & 0 deletions dist/static/button-panel.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@keyframes spin {
from { transform: scale(1) rotate(0deg); }
to { transform: scale(1) rotate(360deg); }
}
.spinning > * > *:first-child {
animation: spin 1s infinite linear;
}

0 comments on commit ae0058f

Please sign in to comment.