forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'grafana/master' into anno-panel
* grafana/master: Refactor: rename SeriesData to DataFrame (grafana#17854) devenv: switch OpenTSDB docker block (grafana#17849) Devenv:LDAP: couple simplifications for LDAP (grafana#17807) Login: divide login errors by pkg and service (grafana#17835) Auth Proxy: Respect auto_sign_up setting (grafana#17843) OAuth: return github teams as a part of user info (enable team sync) (grafana#17797) noImplicitAny: Sub 3000 errors (grafana#17821) TimePicker: Style and responsive fixes, restored dashboard settings (grafana#17822) Templating: Correctly display __text in multi-values variable (grafana#17840) Elasticsearch: Fix default max concurrent shard requests (grafana#17770) Explore: Fix filter by series level in logs graph (grafana#17798) Docs: Add v6.3 version notes and encryption format information (grafana#17825) Graphite: use POST for /metrics/find requests (grafana#17814) Dashboard: Force update after dashboard resize (grafana#17808) Toolkit: moved front end cli scripts to separate package and introduced very early version of plugin tools Explore: Uses new TimePicker from Grafana/UI (grafana#17793) Explore: Uses RFC3339Nano string to retrieve LogRow contexts from Loki API (grafana#17813)
- Loading branch information
Showing
197 changed files
with
2,987 additions
and
7,579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
openldap: | ||
container_name: ldap | ||
build: docker/blocks/openldap | ||
environment: | ||
SLAPD_PASSWORD: grafana | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# | ||
# LDAP Defaults | ||
# | ||
|
||
# See ldap.conf(5) for details | ||
# This file should be world readable but not world writable. | ||
|
||
BASE dc=grafana,dc=org | ||
#URI ldap://ldap.example.com ldap://ldap-master.example.com:666 | ||
|
||
SIZELIMIT 1000 | ||
#TIMELIMIT 15 | ||
#DEREF never | ||
|
||
# TLS certificates (needed for GnuTLS) | ||
TLS_CACERT /etc/ssl/certs/ca-certificates.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
opentsdb: | ||
image: opower/opentsdb:latest | ||
image: petergrace/opentsdb-docker:latest | ||
ports: | ||
- "4242:4242" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Grafana Toolkit | ||
|
||
Make sure to run `yarn install` before trying anything! Otherwise you may see unknown command grafana-toolkit and spend a while tracking that down. | ||
|
||
## Internal development | ||
For development use `yarn link`. First, navigate to `packages/grafana-toolkit` and run `yarn link`. Then, in your project use `yarn link @grafana/toolkit` to use linked version. | ||
|
||
## Grafana extensions development with grafana-toolkit overview | ||
|
||
### Typescript | ||
To configure Typescript create `tsconfig.json` file in the root dir of your app. grafana-toolkit comes with default tsconfig located in `packages/grafana-toolkit/src/config/tsconfig.plugin.ts`. In order for Typescript to be able to pickup your source files you need to extend that config as follows: | ||
|
||
```json | ||
{ | ||
"extends": "./node_modules/@grafana/toolkit/src/config/tsconfig.plugin.json", | ||
"include": ["src"], | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"typeRoots": ["./node_modules/@types"] | ||
} | ||
} | ||
``` | ||
|
||
### TSLint | ||
grafana-toolkit comes with default config for TSLint, that's located in `packages/grafana-toolkit/src/config/tslint.plugin.ts`. As for now there is now way to customise TSLint config. | ||
|
||
### Tests | ||
grafana-toolkit comes with Jest as a test runner. It runs tests according to common config locted in `packages/grafana-toolkit/src/config/jest.plugin.config.ts`. | ||
|
||
For now the config is not extendable, but our goal is to enable custom jest config via jest.config or package.json file. This might be required in the future if you want to use i.e. `enzyme-to-json` snapshots serializer. For that particular serializer we can also utilise it's API and add initialisation in the setup files (https://github.com/adriantoine/enzyme-to-json#serializer-in-unit-tests). We need to test that approach first. | ||
|
||
#### Jest setup | ||
We are not opinionated about tool used for implmenting tests. Internally at Grafana we use Enzyme. If you want to configure Enzyme as a testing utility, you need to configure enzyme-adapter-react. To do so, you need to create `[YOUR_APP]/config/jest-setup.ts` file that will provide React/Enzyme setup. Simply copy following code into that file to get Enzyme working with React: | ||
|
||
```ts | ||
import { configure } from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
|
||
configure({ adapter: new Adapter() }); | ||
``` | ||
|
||
grafana-toolkit will use that file as Jest's setup file. You can also setup Jest with shims of your needs by creating `jest-shim.ts` file in the same directory: `[YOUR_APP]/config/jest-shim.ts` | ||
|
||
Adidtionaly, you can also provide additional Jest config via package.json file. For more details please refer to [Jest docs](https://jest-bot.github.io/jest/docs/configuration.html#verbose-boolean). Currently we support following properties: | ||
- [`snapshotSerializers`](https://jest-bot.github.io/jest/docs/configuration.html#snapshotserializers-array-string) | ||
|
||
## Prettier [todo] | ||
|
||
## Development mode [todo] | ||
TODO | ||
- Enable rollup watch on extension sources | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env node | ||
|
||
// This bin is used for cli installed from npm | ||
|
||
require('../src/cli/index.js').run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env node | ||
|
||
var path = require('path') ; | ||
|
||
// This bin is used for cli executed internally | ||
|
||
var tsProjectPath = path.resolve(__dirname, '../tsconfig.json'); | ||
|
||
require('ts-node').register({ | ||
project: tsProjectPath | ||
}); | ||
|
||
require('../src/cli/index.ts').run(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"name": "@grafana/toolkit", | ||
"version": "6.3.0-alpha.2", | ||
"description": "Grafana Toolkit", | ||
"keywords": [ | ||
"typescript", | ||
"react", | ||
"react-component" | ||
], | ||
"bin": { | ||
"grafana-toolkit": "./bin/grafana-toolkit.js" | ||
}, | ||
"scripts": { | ||
"tslint": "tslint -c tslint.json --project tsconfig.json", | ||
"typecheck": "tsc --noEmit", | ||
"precommit": "npm run tslint & npm run typecheck", | ||
"clean": "rimraf ./dist ./compiled" | ||
}, | ||
"author": "Grafana Labs", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@types/execa": "^0.9.0", | ||
"@types/inquirer": "^6.0.3", | ||
"@types/jest": "24.0.13", | ||
"@types/jest-cli": "^23.6.0", | ||
"@types/node": "^12.0.4", | ||
"@types/prettier": "^1.16.4", | ||
"@types/semver": "^6.0.0", | ||
"axios": "0.19.0", | ||
"chalk": "^2.4.2", | ||
"commander": "^2.20.0", | ||
"concurrently": "4.1.0", | ||
"execa": "^1.0.0", | ||
"glob": "^7.1.4", | ||
"inquirer": "^6.3.1", | ||
"jest-cli": "^24.8.0", | ||
"lodash": "4.17.11", | ||
"ora": "^3.4.0", | ||
"prettier": "^1.17.1", | ||
"replace-in-file": "^4.1.0", | ||
"rollup": "^1.14.2", | ||
"rollup-plugin-commonjs": "^10.0.0", | ||
"rollup-plugin-copy-glob": "^0.3.0", | ||
"rollup-plugin-json": "^4.0.0", | ||
"rollup-plugin-node-builtins": "^2.1.2", | ||
"rollup-plugin-node-globals": "^1.4.0", | ||
"rollup-plugin-node-resolve": "^5.1.0", | ||
"rollup-plugin-sourcemaps": "^0.4.2", | ||
"rollup-plugin-terser": "^5.0.0", | ||
"rollup-plugin-typescript2": "^0.21.1", | ||
"rollup-plugin-visualizer": "^1.1.1", | ||
"semver": "^6.1.1", | ||
"simple-git": "^1.112.0", | ||
"ts-node": "^8.2.0", | ||
"tslint": "5.14.0" | ||
}, | ||
"peerDependencies": { | ||
"jest": "24.8.0", | ||
"ts-jest": "24.0.2", | ||
"tslib": "1.10.0", | ||
"typescript": "3.5.1" | ||
}, | ||
"resolutions": { | ||
"@types/lodash": "4.14.119", | ||
"rollup-plugin-typescript2": "0.21.1" | ||
}, | ||
"devDependencies": { | ||
"@types/glob": "^7.1.1", | ||
"rollup-watch": "^4.3.1" | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.