├── .bra.toml ├── .codespell_ignore ├── .config ├── .eslintrc ├── .prettierrc.js ├── Dockerfile ├── README.md ├── jest-setup.js ├── jest.config.js ├── jest │ ├── mocks │ │ └── react-inlinesvg.tsx │ └── utils.js ├── tsconfig.json └── webpack │ ├── constants.ts │ ├── utils.ts │ └── webpack.config.ts ├── .eslintrc ├── .gitattributes ├── .gitignore ├── .nvmrc ├── .prettierignore ├── .prettierrc.js ├── CHANGELOG.md ├── LICENSE ├── Magefile.go ├── Makefile ├── README.md ├── cspell.config.json ├── debug-backend.sh ├── devenv ├── docker-compose.yml └── grafana.ini ├── docker-compose.yaml ├── docs ├── configuration.md └── img │ ├── config_1.png │ ├── config_2.png │ └── config_3.png ├── go.mod ├── go.sum ├── jest-setup.js ├── jest.config.js ├── package.json ├── pkg ├── datasource │ ├── datasource.go │ ├── dscache.go │ ├── models.go │ ├── prefetcher.go │ └── resource_handler.go ├── grafanaclient │ └── client.go └── plugin.go ├── setup_tests.ts ├── src ├── components │ ├── AthleteLabel.tsx │ ├── ConfigEditor.tsx │ ├── QueryEditor.tsx │ └── VariableQueryEditor.tsx ├── dashboards │ ├── strava_activity_analysis.json │ ├── strava_activity_overview.json │ ├── strava_athlete_dashboard.json │ ├── strava_datasource.json │ └── strava_segment_overview.json ├── datasource.test.ts ├── datasource.ts ├── img │ ├── btn_strava_connectwith_orange.svg │ └── strava_logo.svg ├── module.tsx ├── plugin.json ├── polyline.ts ├── responseHandler.ts ├── stravaApi.ts ├── types.ts └── utils.ts ├── tsconfig.jest.json ├── tsconfig.json └── yarn.lock /.bra.toml: -------------------------------------------------------------------------------- 1 | [run] 2 | init_cmds = [ 3 | ["make", "build-backend"], 4 | ["pkill", "strava-plugin"] 5 | ] # Commands run in start 6 | watch_all = true # Watch all sub-directories 7 | watch_dirs = ["pkg"] # Directories to watch 8 | watch_exts = [".go"] # Extensions to watch 9 | ignore = [".git", "node_modules"] # Directories to exclude from watching 10 | ignore_files = [] # Regexps for ignoring specific notifies 11 | build_delay = 1500 # Minimal interval to Trigger build event 12 | interrupt_timout = 15 # Time to wait until force kill 13 | graceful_kill = false # Wait for exit and before directly kill 14 | cmds = [ 15 | ["make", "build-backend"], 16 | ["pkill", "strava-plugin"] 17 | ] # Commands to run 18 | 19 | [sync] 20 | listen_addr = ":5050" 21 | remote_addr = ":5050" 22 | -------------------------------------------------------------------------------- /.codespell_ignore: -------------------------------------------------------------------------------- 1 | ro 2 | -------------------------------------------------------------------------------- /.config/.eslintrc: -------------------------------------------------------------------------------- 1 | /* 2 | * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️ 3 | * 4 | * In order to extend the configuration follow the steps in 5 | * https://grafana.github.io/plugin-tools/docs/advanced-configuration#extending-the-eslint-config 6 | */ 7 | { 8 | "extends": ["@grafana/eslint-config"], 9 | "root": true, 10 | "rules": { 11 | "react/prop-types": "off" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.config/.prettierrc.js: -------------------------------------------------------------------------------- 1 | /* 2 | * ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️ 3 | * 4 | * In order to extend the configuration follow the steps in .config/README.md 5 | */ 6 | 7 | module.exports = { 8 | "endOfLine": "auto", 9 | "printWidth": 120, 10 | "trailingComma": "es5", 11 | "semi": true, 12 | "jsxSingleQuote": false, 13 | "singleQuote": true, 14 | "useTabs": false, 15 | "tabWidth": 2 16 | }; -------------------------------------------------------------------------------- /.config/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG grafana_version=latest 2 | ARG grafana_image=grafana-enterprise 3 | 4 | FROM grafana/${grafana_image}:${grafana_version} 5 | 6 | # Make it as simple as possible to access the grafana instance for development purposes 7 | # Do NOT enable these settings in a public facing / production grafana instance 8 | ENV GF_AUTH_ANONYMOUS_ORG_ROLE "Admin" 9 | ENV GF_AUTH_ANONYMOUS_ENABLED "true" 10 | ENV GF_AUTH_BASIC_ENABLED "false" 11 | # Set development mode so plugins can be loaded without the need to sign 12 | ENV GF_DEFAULT_APP_MODE "development" 13 | 14 | # Inject livereload script into grafana index.html 15 | USER root 16 | RUN sed -i 's/<\/body><\/html>/