From f00160e4fac244d6984e534e3e1660a000525456 Mon Sep 17 00:00:00 2001 From: mtlljm Date: Fri, 27 Oct 2023 08:53:34 +0100 Subject: [PATCH] (ESPSTUDIO-8121) Copy over code to github copy our code over to github form gitlab Change-Id: I655a664c1507b71e8f765cd5541a237b22448207 --- .config/.eslintrc | 13 + .config/.prettierrc.js | 21 + .config/Dockerfile | 16 + .config/README.md | 164 + .config/jest-setup.js | 30 + .config/jest.config.js | 48 + .config/jest/mocks/react-inlinesvg.tsx | 30 + .config/jest/utils.js | 34 + .config/tsconfig.json | 26 + .config/types/custom.d.ts | 42 + .config/webpack/constants.ts | 7 + .config/webpack/utils.ts | 51 + .config/webpack/webpack.config.ts | 206 ++ .eslintrc | 3 + .gitattributes | 4 + .gitignore | 28 + .prettierrc.js | 9 + CHANGELOG.md | 3 + README.md | 145 +- SUPPORT.md | 3 + go.mod | 95 + go.sum | 725 ++++ img/icon-helpmenu.png | Bin 0 -> 657 bytes img/sailing-dashboard.png | Bin 0 -> 325147 bytes internal/esp/client/espwsclient.go | 624 ++++ internal/esp/client/messagedto/error.go | 11 + internal/esp/client/messagedto/event.go | 13 + internal/esp/client/messagedto/info.go | 14 + internal/esp/client/messagedto/message.go | 16 + .../esp/client/messagedto/projectloaded.go | 10 + .../esp/client/messagedto/projectremoved.go | 10 + internal/esp/client/messagedto/schema.go | 17 + internal/esp/client/messagedto/stream.go | 19 + .../esp/client/messagedto/subscription.go | 10 + internal/esp/field/field.go | 69 + internal/esp/windowevent/windowevent.go | 57 + internal/framefactory/framefactory.go | 128 + .../channelquerystore/channelquerystore.go | 45 + .../channelquerystore_test.go | 53 + internal/plugin/query/query.go | 110 + internal/plugin/query/query_test.go | 104 + internal/plugin/querydto/querydto.go | 16 + internal/plugin/server/server.go | 63 + jest-setup.js | 7 + jest.config.js | 13 + legal.html | 2962 +++++++++++++++++ mage.go | 19 + magefile.go | 23 + package.json | 70 + pkg/main.go | 30 + pkg/plugin/plugin.go | 383 +++ pkg/plugin/plugin_test.go | 37 + src/components/ConfigEditor.tsx | 96 + src/components/QueryEditor.tsx | 435 +++ src/datasource.ts | 112 + src/img/logo.svg | 3 + src/module.ts | 14 + src/plugin.json | 43 + src/types.ts | 98 + tsconfig.json | 3 + 60 files changed, 7439 insertions(+), 1 deletion(-) 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 .gitattributes create mode 100644 .gitignore create mode 100644 .prettierrc.js create mode 100644 CHANGELOG.md create mode 100644 SUPPORT.md create mode 100644 go.mod create mode 100644 go.sum create mode 100644 img/icon-helpmenu.png create mode 100644 img/sailing-dashboard.png create mode 100644 internal/esp/client/espwsclient.go create mode 100644 internal/esp/client/messagedto/error.go create mode 100644 internal/esp/client/messagedto/event.go create mode 100644 internal/esp/client/messagedto/info.go create mode 100644 internal/esp/client/messagedto/message.go create mode 100644 internal/esp/client/messagedto/projectloaded.go create mode 100644 internal/esp/client/messagedto/projectremoved.go create mode 100644 internal/esp/client/messagedto/schema.go create mode 100644 internal/esp/client/messagedto/stream.go create mode 100644 internal/esp/client/messagedto/subscription.go create mode 100644 internal/esp/field/field.go create mode 100644 internal/esp/windowevent/windowevent.go create mode 100644 internal/framefactory/framefactory.go create mode 100644 internal/plugin/channelquerystore/channelquerystore.go create mode 100644 internal/plugin/channelquerystore/channelquerystore_test.go create mode 100644 internal/plugin/query/query.go create mode 100644 internal/plugin/query/query_test.go create mode 100644 internal/plugin/querydto/querydto.go create mode 100644 internal/plugin/server/server.go create mode 100644 jest-setup.js create mode 100644 jest.config.js create mode 100644 legal.html create mode 100644 mage.go create mode 100644 magefile.go create mode 100644 package.json create mode 100644 pkg/main.go create mode 100644 pkg/plugin/plugin.go create mode 100644 pkg/plugin/plugin_test.go create mode 100644 src/components/ConfigEditor.tsx create mode 100644 src/components/QueryEditor.tsx create mode 100644 src/datasource.ts create mode 100644 src/img/logo.svg create mode 100644 src/module.ts create mode 100644 src/plugin.json create mode 100644 src/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..b4a93b8 --- /dev/null +++ b/.config/.prettierrc.js @@ -0,0 +1,21 @@ +/* + Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. + SPDX-License-Identifier: Apache-2.0 +*/ + +/* + * ⚠️⚠️⚠️ 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 +}; 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>/