From 14b44b83c78cdf02d25d3a457ffeb22f96f51bc6 Mon Sep 17 00:00:00 2001 From: Carson Moore Date: Thu, 29 Jun 2023 18:59:18 -0500 Subject: [PATCH 01/21] Initial commit --- .config/.eslintrc | 13 + .config/.prettierrc.js | 16 + .config/Dockerfile | 16 + .config/README.md | 164 + .config/jest-setup.js | 25 + .config/jest.config.js | 43 + .config/jest/mocks/react-inlinesvg.tsx | 25 + .config/jest/utils.js | 29 + .config/tsconfig.json | 26 + .config/types/custom.d.ts | 37 + .config/webpack/constants.ts | 2 + .config/webpack/utils.ts | 40 + .config/webpack/webpack.config.ts | 201 + .eslintrc | 3 + .github/workflows/ci.yml | 90 + .github/workflows/is-compatible.yml | 19 + .github/workflows/release.yml | 131 + .gitignore | 35 + .nvmrc | 1 + .prettierrc.js | 4 + CHANGELOG.md | 5 + Dockerfile | 6 + LICENSE | 201 + README.md | 115 + cypress/integration/01-smoke.spec.ts | 10 + docker-compose.yaml | 17 + jest-setup.js | 2 + jest.config.js | 8 + package-lock.json | 38866 ++++++++++++++++ package.json | 73 + plopfile.js | 20 + provisioning/plugins/apps.yaml | 5 + src/README.md | 5 + src/datasources/tag/README.md | 5 + src/datasources/tag/TagDataSource.ts | 46 + .../tag/components/ConfigEditor.tsx | 16 + .../tag/components/QueryEditor.tsx | 32 + src/datasources/tag/img/logo-ni.svg | 11 + src/datasources/tag/module.ts | 8 + src/datasources/tag/plugin.json | 16 + src/datasources/tag/types.ts | 6 + src/img/logo.svg | 1 + src/plugin.json | 24 + templates/datasource/README.hbs | 5 + templates/datasource/TagDataSource.ts | 46 + .../datasource/components/ConfigEditor.tsx | 16 + .../datasource/components/QueryEditor.tsx | 32 + templates/datasource/img/logo-ni.svg | 11 + templates/datasource/module.ts | 8 + templates/datasource/plugin.json | 16 + templates/datasource/types.ts | 6 + tsconfig.json | 3 + 52 files changed, 40561 insertions(+) create mode 100644 .config/.eslintrc create mode 100644 .config/.prettierrc.js create mode 100644 .config/Dockerfile create mode 100644 .config/README.md create mode 100644 .config/jest-setup.js create mode 100644 .config/jest.config.js create mode 100644 .config/jest/mocks/react-inlinesvg.tsx create mode 100644 .config/jest/utils.js create mode 100644 .config/tsconfig.json create mode 100644 .config/types/custom.d.ts create mode 100644 .config/webpack/constants.ts create mode 100644 .config/webpack/utils.ts create mode 100644 .config/webpack/webpack.config.ts create mode 100644 .eslintrc create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/is-compatible.yml create mode 100644 .github/workflows/release.yml create mode 100644 .gitignore create mode 100644 .nvmrc create mode 100644 .prettierrc.js create mode 100644 CHANGELOG.md create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 cypress/integration/01-smoke.spec.ts create mode 100644 docker-compose.yaml create mode 100644 jest-setup.js create mode 100644 jest.config.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 plopfile.js create mode 100644 provisioning/plugins/apps.yaml create mode 100644 src/README.md create mode 100644 src/datasources/tag/README.md create mode 100644 src/datasources/tag/TagDataSource.ts create mode 100644 src/datasources/tag/components/ConfigEditor.tsx create mode 100644 src/datasources/tag/components/QueryEditor.tsx create mode 100644 src/datasources/tag/img/logo-ni.svg create mode 100644 src/datasources/tag/module.ts create mode 100644 src/datasources/tag/plugin.json create mode 100644 src/datasources/tag/types.ts create mode 100644 src/img/logo.svg create mode 100644 src/plugin.json create mode 100644 templates/datasource/README.hbs create mode 100644 templates/datasource/TagDataSource.ts create mode 100644 templates/datasource/components/ConfigEditor.tsx create mode 100644 templates/datasource/components/QueryEditor.tsx create mode 100644 templates/datasource/img/logo-ni.svg create mode 100644 templates/datasource/module.ts create mode 100644 templates/datasource/plugin.json create mode 100644 templates/datasource/types.ts create mode 100644 tsconfig.json diff --git a/.config/.eslintrc b/.config/.eslintrc new file mode 100644 index 0000000..3f8c381 --- /dev/null +++ b/.config/.eslintrc @@ -0,0 +1,13 @@ +/* + * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️ + * + * In order to extend the configuration follow the steps in + * https://grafana.github.io/plugin-tools/docs/advanced-configuration#extending-the-eslint-config + */ + { + "extends": ["@grafana/eslint-config"], + "root": true, + "rules": { + "react/prop-types": "off" + } +} diff --git a/.config/.prettierrc.js b/.config/.prettierrc.js new file mode 100644 index 0000000..66a76ec --- /dev/null +++ b/.config/.prettierrc.js @@ -0,0 +1,16 @@ +/* + * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️ + * + * In order to extend the configuration follow the steps in .config/README.md + */ + +module.exports = { + "endOfLine": "auto", + "printWidth": 120, + "trailingComma": "es5", + "semi": true, + "jsxSingleQuote": false, + "singleQuote": true, + "useTabs": false, + "tabWidth": 2 +}; \ No newline at end of file diff --git a/.config/Dockerfile b/.config/Dockerfile new file mode 100644 index 0000000..35d89bd --- /dev/null +++ b/.config/Dockerfile @@ -0,0 +1,16 @@ +ARG grafana_version=latest +ARG grafana_image=grafana-enterprise + +FROM grafana/${grafana_image}:${grafana_version} + +# 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 +ENV GF_AUTH_ANONYMOUS_ORG_ROLE "Admin" +ENV GF_AUTH_ANONYMOUS_ENABLED "true" +ENV GF_AUTH_BASIC_ENABLED "false" +# Set development mode so plugins can be loaded without the need to sign +ENV GF_DEFAULT_APP_MODE "development" + +# Inject livereload script into grafana index.html +USER root +RUN sed -i 's/<\/body><\/html>/