Skip to content

Commit

Permalink
piplines added
Browse files Browse the repository at this point in the history
  • Loading branch information
yesoreyeram committed Nov 20, 2020
1 parent d75216a commit 6aaabd5
Show file tree
Hide file tree
Showing 24 changed files with 3,453 additions and 7,301 deletions.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug report
about: Report bug/issue to improve the plugin
title: "[Bug] Title "
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**Version Details:**
- Grafana version :
- Plugin version :
- Did this work in any other version of Grafana :
- What datasource you use :

**Panel JSON**
If applicable, provide panel json. Make sure to mask any sensitive information

**Screenshots**
If applicable, add screenshots to help explain your problem.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature Request] Title"
labels: feature-request
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/help-required.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Help Required
about: Ask questions like How to ?
title: "[Help Required] Title"
labels: help wanted
assignees: ''
---

**What you are struggling with**

Describe what assistance you need

**What you tried**

Describe what you tried

**Related Issues and Links**

Related links
45 changes: 45 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build & Publish

on:
push:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install Dependencies
run: |
yarn install --frozen-lockfile;
- name: Test
run: |
yarn test;
- name: Build
run: |
yarn build;
- name: Sign plugin
run: npx @grafana/toolkit plugin:sign
env:
GRAFANA_API_KEY: ${{ secrets.GRAFANA_API_KEY }}
- name: Deploy
run: |
echo $(date) > dist/LAST_UPDATED;
git config --global user.email "[email protected]";
git config --global user.name "Github Actions";
git add --force dist/
git commit -m "Build by Github Actions"
git push
git status
86 changes: 86 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Release
on:
push:
tags:
- 'v*'

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- name: Checkout
uses: actions/checkout@v2
- name: NodeJS Setup
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Dependencies Install
run: |
echo "Grafana Boom Table plugin - Install dependencies";
yarn install --frozen-lockfile;
- name: Test
run: |
echo "Grafana Boom Table plugin - Test";
yarn test;
- name: Build
run: |
echo "Grafana Boom Table plugin - Build";
yarn build;
- name: Sign plugin
run: npx @grafana/toolkit plugin:sign
env:
GRAFANA_API_KEY: ${{ secrets.GRAFANA_API_KEY }}
- name: Get plugin information
run: |
sudo apt-get install jq
export GRAFANA_PLUGIN_ID=$(cat dist/plugin.json | jq -r .id)
export GRAFANA_PLUGIN_VERSION=$(cat dist/plugin.json | jq -r .info.version)
export GRAFANA_PLUGIN_TYPE=$(cat dist/plugin.json | jq -r .type)
export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.zip
export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.md5
echo "GRAFANA_PLUGIN_ID=${GRAFANA_PLUGIN_ID}" >> $GITHUB_ENV
echo "GRAFANA_PLUGIN_VERSION=${GRAFANA_PLUGIN_VERSION}" >> $GITHUB_ENV
echo "GRAFANA_PLUGIN_TYPE=${GRAFANA_PLUGIN_TYPE}" >> $GITHUB_ENV
echo "GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ARTIFACT}" >> $GITHUB_ENV
echo "GRAFANA_PLUGIN_ARTIFACT_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}" >> $GITHUB_ENV
- name: Package plugin
run: |
mv dist $GRAFANA_PLUGIN_ID
zip $GRAFANA_PLUGIN_ARTIFACT $GRAFANA_PLUGIN_ID -r
md5sum $GRAFANA_PLUGIN_ARTIFACT > $GRAFANA_PLUGIN_ARTIFACT_CHECKSUM
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Add plugin to release
id: upload-plugin-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.GRAFANA_PLUGIN_ARTIFACT }}
asset_name: ${{ env.GRAFANA_PLUGIN_ARTIFACT }}
asset_content_type: application/zip
- name: Add checksum to release
id: upload-checksum-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.GRAFANA_PLUGIN_ARTIFACT_CHECKSUM }}
asset_name: ${{ env.GRAFANA_PLUGIN_ARTIFACT_CHECKSUM }}
asset_content_type: text/plain
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.tscache/
*.tmp.txt
node_modules/
node_modules/
dist/
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
| Version | Changes |
| --------|------------------------------------------------------------|
| 0.2.0 | **Plugin Signed** |
| | Bug fixes |
| 0.1.0 | **First version for release** |
| 0.0.4 | Base theme option |
| | Bug fixes (#4) |
Expand Down
19 changes: 9 additions & 10 deletions GruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ module.exports = grunt => {
expand: true,
src: ["img/**/*"],
dest: "dist/src/"
},
logo_to_dist: {
cwd: "src",
expand: true,
src: ["img/logo.png"],
dest: "dist/"
}
},

Expand Down Expand Up @@ -71,25 +77,18 @@ module.exports = grunt => {
tsconfig: "./tsconfig.json"
}
},

run: {
options: {},
tests: {
exec: "npm run-script jest"
}
}
});

grunt.registerTask("test", ["run:tests", "tslint"]);
grunt.registerTask("test", ["tslint"]);

grunt.registerTask("default", [
"clean",
"run:tests",
"tslint",
"ts:default",
"sass:build",
"copy:src_to_dist",
"copy:pluginDef",
"copy:img_to_dist"
"copy:img_to_dist",
"copy:logo_to_dist"
]);
};
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

Theme switcher with custom styles / themes for grafana dashboards.

![image](https://user-images.githubusercontent.com/153843/57070256-ba874200-6cce-11e9-85f5-e0a036eb306b.png)
![image](https://user-images.githubusercontent.com/153843/99795058-0e60b280-2b23-11eb-88fb-fa673a6111ea.png)

![image](https://user-images.githubusercontent.com/153843/99795201-45cf5f00-2b23-11eb-8da7-e6dcb4383c7f.png)

![image](https://user-images.githubusercontent.com/153843/57070201-99265600-6cce-11e9-9a9c-734121df7cb8.png)

# Features

Expand All @@ -14,7 +15,7 @@ Theme switcher with custom styles / themes for grafana dashboards.
- External stylesheets support
- Add inline styles to themes to override styles
- Add many themes as possible without rebuilding / restarting grafana
- Users with view only option can also pick their favourite theme
- Users with view only option can also pick their favorite theme
- Themes applicable to current dashboard only

# Creating Theme
Expand All @@ -30,12 +31,11 @@ Themes can be created with multiple building blocks like background image, base

# Supported Grafana version

This grafana plugin is tested with the grafna versions 6.x. But other versions are also expected to work.
This grafana plugin is tested with the grafana versions 6.x. But other versions are also expected to work.

# Work in progress

* Time based automatic theme switch - Automatically switch dark themes during night hours.
* Color palette based themes - Pick your own background/foregroud colors
* Color palette based themes - Pick your own background/foreground colors
* Font size adjuster - Viewers will be able to adjust their dashboard font sizes

# Notes
Expand All @@ -49,6 +49,8 @@ This grafana plugin is tested with the grafna versions 6.x. But other versions a
- Adjust the height and width if required.
- This plugin is in very much WIP / dev stage. Expect breaking changes & bugs.

# Known issues
# Known issues / Limitations

- If any custom plugin is used, dark/light theme switch, base theme will not work for those custom plugins. Refer [this](https://github.com/yesoreyeram/yesoreyeram-boomtheme-panel/issues/3) github issue

- Theme panel should be within view port. Otherwise, Grafana won't render the theme. Refer [this](https://github.com/yesoreyeram/yesoreyeram-boomtheme-panel/issues/17)
Loading

0 comments on commit 6aaabd5

Please sign in to comment.