Skip to content

Commit

Permalink
Merge pull request #53 from ACE-IoT-Solutions/nic/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nicfv authored Apr 13, 2024
2 parents 1ef69f0 + 30086b3 commit 034049a
Show file tree
Hide file tree
Showing 21 changed files with 8,165 additions and 12,614 deletions.
2 changes: 1 addition & 1 deletion .config/.cprc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "4.4.4"
"version": "4.6.1"
}
11 changes: 8 additions & 3 deletions .config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ ARG grafana_image=grafana-enterprise

FROM grafana/${grafana_image}:${grafana_version}

ARG development=true


ENV DEV "${development}"

# Make it as simple as possible to access the grafana instance for development purposes
# Do NOT enable these settings in a public facing / production grafana instance
Expand All @@ -20,17 +24,18 @@ WORKDIR $GF_PATHS_HOME

USER root


# Installing supervisor and inotify-tools
RUN if grep -i -q alpine /etc/issue; then \
apk add supervisor inotify-tools git; \
RUN if [ "${development}" = "true" ]; then \
if grep -i -q alpine /etc/issue; then \
apk add supervisor inotify-tools git; \
elif grep -i -q ubuntu /etc/issue; then \
DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y supervisor inotify-tools git && \
rm -rf /var/lib/apt/lists/*; \
else \
echo 'ERROR: Unsupported base image' && /bin/false; \
fi \
fi

COPY supervisord/supervisord.conf /etc/supervisor.d/supervisord.ini
Expand Down
8 changes: 8 additions & 0 deletions .config/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/sh

if [ "${DEV}" = "false" ]; then
echo "Starting test mode"
exec /run.sh
fi

echo "Starting development mode"

if grep -i -q alpine /etc/issue; then
exec /usr/bin/supervisord -c /etc/supervisord.conf
elif grep -i -q ubuntu /etc/issue; then
Expand All @@ -8,3 +15,4 @@ else
echo 'ERROR: Unsupported base image'
exit 1
fi

16 changes: 0 additions & 16 deletions .editorconfig

This file was deleted.

20 changes: 17 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,30 @@ jobs:
- name: Check for E2E
id: check-for-e2e
run: |
if [ -d "cypress" ]
if [ -f "playwright.config.ts" ]
then
echo "has-e2e=true" >> $GITHUB_OUTPUT
fi
- name: Install Playwright Browsers
if: steps.check-for-e2e.outputs.has-e2e == 'true'
run: npm exec playwright install --with-deps

- name: Start grafana docker
if: steps.check-for-e2e.outputs.has-e2e == 'true'
run: docker-compose up -d

- name: Wait for Grafana to start
if: steps.check-for-e2e.outputs.has-e2e == 'true'
uses: nev7n/wait_for_response@v1
with:
url: 'http://localhost:3000/'
responseCode: 200
timeout: 60000
interval: 500

- name: Run e2e tests
id: run-e2e-tests
if: steps.check-for-e2e.outputs.has-e2e == 'true'
run: npm run e2e

Expand All @@ -89,8 +103,8 @@ jobs:
uses: actions/upload-artifact@v4
if: steps.check-for-e2e.outputs.has-e2e == 'true' && steps.run-e2e-tests.outcome != 'success'
with:
name: cypress-videos
path: cypress/videos
name: playwright-report
path: playwright-report/
retention-days: 5

- name: Sign plugin
Expand Down
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ dist/
artifacts/
work/
ci/
e2e-results/
**/cypress/videos
**/cypress/report.json

# e2e test directories
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/

# Editor
.idea

.eslintcache
.eslintcache
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file.

## 0.1.2

- Update dependency versions
- Update commands in reamde from `yarn` to `npm`
- Remove provisioning folder
- Remove devDependency on `emotion`

## 0.1.1

- Fix bad link in readme
Expand Down
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

![Screenshot of plugin](https://media.giphy.com/media/YRE4DxPYqy3XCR6rL4/giphy.gif)

This is an SVG panel plugin for Grafana 7.x+
This is an SVG panel plugin for Grafana 10.x+

## Why yet another SVG panel plugin?
Yes, I definitely considered naming it YASPP...
Expand Down Expand Up @@ -54,25 +54,18 @@ be present. This _may_ be useful for some initial rendering purposes, but cauti
query may be updated (for example while the user is updating the query) so anything done here should
likely be done in the update function as well.




## Getting started (development)
1. Install dependencies
```BASH
yarn install
npm i
```
2. Build plugin in development mode or run in watch mode
```BASH
yarn dev
```
or
```BASH
yarn watch
npm run dev
```
3. Build plugin in production mode
```BASH
yarn build
npm run build
```

## Learn more
Expand Down
3 changes: 0 additions & 3 deletions cypress.json

This file was deleted.

10 changes: 0 additions & 10 deletions cypress/integration/01-smoke.spec.ts

This file was deleted.

1 change: 0 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ services:
GF_LOG_LEVEL: debug
GF_DATAPROXY_LOGGING: 1
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: aceiot-svg-panel
GF_PLUGINS_DELVE_ENABLED: 'true'
Loading

0 comments on commit 034049a

Please sign in to comment.