Skip to content

Commit

Permalink
Merge remote-tracking branch 'grafana/master' into reuse-query2
Browse files Browse the repository at this point in the history
* grafana/master: (70 commits)
  AppPlugin: Fix load legacy plugin app (grafana#17574)
  Typescript: A batch of implicit any fixes (grafana#17590)
  RefreshPicker: Handle empty intervals (grafana#17585)
  Docker: Switch base to ubuntu:latest (grafana#17066)
  SQLStore: extend `user.SearchUsers` method (grafana#17514)
  Explore: Tag and Values for Influx are filtered by the selected measurement (grafana#17539)
  ldap: makes mocks available for testing. (grafana#17576)
  Devenv: Add nginx proxy for mac (grafana#17572)
  Graph: Added new fill gradient option (grafana#17528)
  Typescript: Reduce implicit any errors (grafana#17550)
  SinglestatPanel: Manages when getColorForValue() function returns null value. Closes grafana#9747 (grafana#17552)
  LDAP: refactoring  (grafana#17479)
  Elasticsearch: Fix empty query request to send properly (grafana#17488)
  SinglestatPanel: fix min/max config in singlestat sparklines (grafana#17543)
  AuthProxy: Optimistic lock pattern for remote cache Set (grafana#17485)
  Explore: Includes context parameter when invoking getExploreState() from Prometheus datasource (grafana#17569)
  Tests: Replaces truth image (grafana#17570)
  Fix: Fixes merge conflict (grafana#17568)
  Build: Fix failing e2e tests and implicit any check (grafana#17567)
  Explore: Fixes implicit any error in AdHocFilterField.test.tsx (grafana#17565)
  ...
  • Loading branch information
ryantxu committed Jun 17, 2019
2 parents e0f8ac3 + aa1f9cd commit 8f6334c
Show file tree
Hide file tree
Showing 245 changed files with 13,848 additions and 3,984 deletions.
48 changes: 35 additions & 13 deletions .circleci/config.yml
Expand Up @@ -19,7 +19,7 @@ version: 2
jobs:
mysql-integration-test:
docker:
- image: circleci/golang:1.12.4
- image: circleci/golang:1.12.6
- image: circleci/mysql:5.6-ram
environment:
MYSQL_ROOT_PASSWORD: rootpass
Expand All @@ -39,7 +39,7 @@ jobs:

postgres-integration-test:
docker:
- image: circleci/golang:1.12.4
- image: circleci/golang:1.12.6
- image: circleci/postgres:9.3-ram
environment:
POSTGRES_USER: grafanatest
Expand All @@ -58,7 +58,7 @@ jobs:

cache-server-test:
docker:
- image: circleci/golang:1.12.4
- image: circleci/golang:1.12.6
- image: circleci/redis:4-alpine
- image: memcached
working_directory: /go/src/github.com/grafana/grafana
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:

backend-lint:
docker:
- image: circleci/golang:1.12.4
- image: circleci/golang:1.12.6
environment:
# we need CGO because of go-sqlite3
CGO_ENABLED: 1
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:

test-backend:
docker:
- image: circleci/golang:1.12.4
- image: circleci/golang:1.12.6
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand All @@ -158,7 +158,7 @@ jobs:

build-all:
docker:
- image: grafana/build-container:1.2.6
- image: grafana/build-container:1.2.7
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:

build:
docker:
- image: grafana/build-container:1.2.6
- image: grafana/build-container:1.2.7
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand All @@ -228,7 +228,7 @@ jobs:

build-fast-backend:
docker:
- image: grafana/build-container:1.2.6
- image: grafana/build-container:1.2.7
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand All @@ -245,7 +245,7 @@ jobs:

build-fast-frontend:
docker:
- image: grafana/build-container:1.2.6
- image: grafana/build-container:1.2.7
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand All @@ -269,7 +269,7 @@ jobs:

build-fast-package:
docker:
- image: grafana/build-container:1.2.6
- image: grafana/build-container:1.2.7
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand All @@ -296,7 +296,7 @@ jobs:

build-fast-save:
docker:
- image: grafana/build-container:1.2.6
- image: grafana/build-container:1.2.7
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand Down Expand Up @@ -382,7 +382,7 @@ jobs:

build-enterprise:
docker:
- image: grafana/build-container:1.2.6
- image: grafana/build-container:1.2.7
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand Down Expand Up @@ -414,7 +414,7 @@ jobs:

build-all-enterprise:
docker:
- image: grafana/build-container:1.2.6
- image: grafana/build-container:1.2.7
working_directory: /go/src/github.com/grafana/grafana
steps:
- checkout
Expand Down Expand Up @@ -605,6 +605,24 @@ jobs:
- store_artifacts:
path: ./dist

trigger-docs-update:
docker:
- image: circleci/python:3.6.8
steps:
- checkout
- run:
name: Trigger Docs update
command: |
if git diff --name-only HEAD^ | grep -q "^docs"; then
echo "Build URL:"
curl -s -u "$DOCS_CIRCLE_TOKEN:" \
-d build_parameters[CIRCLE_JOB]=pull-submodule-changes \
https://circleci.com/api/v1.1/project/github/grafana/docs.grafana.com/tree/staging \
| jq .build_url
else
echo "-- no changes to docs files --"
fi
workflows:
version: 2
build-master:
Expand Down Expand Up @@ -672,6 +690,10 @@ workflows:
requires:
- grafana-docker-master
filters: *filter-only-master
- trigger-docs-update:
requires:
- end-to-end-test
filters: *filter-only-master
release:
jobs:
- build-all:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,16 @@
# 6.3.0 (unreleased)

# 6.2.2 (2019-06-05)

### Features / Enhancements
* **Security**: Prevent CSV formula injection attack when exporting data. [#17363](https://github.com/grafana/grafana/pull/17363), [@DanCech](https://github.com/DanCech)

### Bug Fixes
* **CloudWatch**: Fixes error when hiding/disabling queries . [#17283](https://github.com/grafana/grafana/pull/17283), [@jpiccari](https://github.com/jpiccari)
* **Database**: Fixed slow permission query in folder/dashboard search. [#17427](https://github.com/grafana/grafana/pull/17427), [@aocenas](https://github.com/aocenas)
* **Explore**: Fixed updating time range before running queries. [#17349](https://github.com/grafana/grafana/pull/17349), [@marefr](https://github.com/marefr)
* **Plugins**: Fixed plugin config page navigation when using subpath. [#17364](https://github.com/grafana/grafana/pull/17364), [@torkelo](https://github.com/torkelo)

# 6.2.1 (2019-05-27)

### Features / Enhancements
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -33,7 +33,7 @@ ENV NODE_ENV production
RUN ./node_modules/.bin/grunt build

# Final container
FROM debian:stretch-slim
FROM ubuntu:latest

LABEL maintainer="Grafana team <hello@grafana.com>"

Expand Down
25 changes: 14 additions & 11 deletions Makefile
Expand Up @@ -57,10 +57,6 @@ test-js:

test: test-go test-js

run:
@echo "start a server"
./bin/grafana-server

clean:
@echo "cleaning"
rm -rf node_modules
Expand All @@ -78,6 +74,10 @@ scripts/go/bin/gosec: scripts/go/go.mod
@cd scripts/go; \
$(GO) build -o ./bin/gosec github.com/securego/gosec/cmd/gosec

scripts/go/bin/bra: scripts/go/go.mod
@cd scripts/go; \
$(GO) build -o ./bin/bra github.com/Unknwon/bra

revive: scripts/go/bin/revive
@scripts/go/bin/revive \
-formatter stylish \
Expand All @@ -89,6 +89,16 @@ revive-alerting: scripts/go/bin/revive
-formatter stylish \
./pkg/services/alerting/...

run: scripts/go/bin/bra
@scripts/go/bin/bra run

# TODO recheck the rules and leave only necessary exclusions
gosec: scripts/go/bin/gosec
@scripts/go/bin/gosec -quiet \
-exclude=G104,G107,G201,G202,G204,G301,G304,G401,G402,G501 \
-conf=./scripts/go/configs/gosec.json \
$(GO_FILES)

# create docker-compose file with provided sources and start them
# example: make devenv sources=postgres,openldap
ifeq ($(sources),)
Expand All @@ -111,10 +121,3 @@ devenv-down:
@cd devenv; \
test -f docker-compose.yaml && \
docker-compose down || exit 0;

# TODO recheck the rules and leave only necessary exclusions
gosec: scripts/go/bin/gosec
@scripts/go/bin/gosec -quiet \
-exclude=G104,G107,G201,G202,G204,G301,G304,G401,G402,G501 \
-conf=./scripts/go/configs/gosec.json \
$(GO_FILES)
37 changes: 18 additions & 19 deletions README.md
Expand Up @@ -27,7 +27,6 @@ the latest master builds [here](https://grafana.com/grafana/download)
### Dependencies

- Go (Latest Stable)
- bra [`go get github.com/Unknwon/bra`]
- Node.js LTS
- yarn [`npm install -g yarn`]

Expand All @@ -40,31 +39,14 @@ go get github.com/grafana/grafana
cd $GOPATH/src/github.com/grafana/grafana
```

### Building

#### The backend

```bash
go run build.go setup
go run build.go build
```

#### Frontend assets

_For this you need Node.js (LTS version)._

```bash
yarn install --pure-lockfile
```

### Run and rebuild on source change

#### Backend

To run the backend and rebuild on source change:

```bash
$GOPATH/bin/bra run
make run
```

#### Frontend
Expand Down Expand Up @@ -93,6 +75,23 @@ yarn jest

**Open grafana in your browser (default: e.g. `http://localhost:3000`) and login with admin user (default: `user/pass = admin/admin`).**

### Building

#### The backend

```bash
go run build.go setup
go run build.go build
```

#### Frontend assets

_For this you need Node.js (LTS version)._

```bash
yarn install --pure-lockfile
```

### Building a Docker image

There are two different ways to build a Grafana docker image. If your machine is setup for Grafana development and you run linux/amd64 you can build just the image. Otherwise, there is the option to build Grafana completely within Docker.
Expand Down
34 changes: 32 additions & 2 deletions conf/defaults.ini
Expand Up @@ -116,9 +116,9 @@ type = database

# cache connectionstring options
# database: will use Grafana primary database.
# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=0`. Only addr is required.
# memcache: 127.0.0.1:11211
connstr =
;connstr =

#################################### Data proxy ###########################
[dataproxy]
Expand Down Expand Up @@ -182,6 +182,31 @@ cookie_samesite = lax
# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
allow_embedding = false

# Set to true if you want to enable http strict transport security (HSTS) response header.
# This is only sent when HTTPS is enabled in this configuration.
# HSTS tells browsers that the site should only be accessed using HTTPS.
# The default will change to true in the next minor release, 6.3.
strict_transport_security = false

# Sets how long a browser should cache HSTS. Only applied if strict_transport_security is enabled.
strict_transport_security_max_age_seconds = 86400

# Set to true if to enable HSTS preloading option. Only applied if strict_transport_security is enabled.
strict_transport_security_preload = false

# Set to true if to enable the HSTS includeSubDomains option. Only applied if strict_transport_security is enabled.
strict_transport_security_subdomains = false

# Set to true to enable the X-Content-Type-Options response header.
# The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised
# in the Content-Type headers should not be changed and be followed. The default will change to true in the next minor release, 6.3.
x_content_type_options = false

# Set to true to enable the X-XSS-Protection header, which tells browsers to stop pages from loading
# when they detect reflected cross-site scripting (XSS) attacks. The default will change to true in the next minor release, 6.3.
x_xss_protection = false


#################################### Snapshots ###########################
[snapshots]
# snapshot sharing options
Expand Down Expand Up @@ -553,6 +578,11 @@ sampler_type = const
# and indicates the initial sampling rate before the actual one
# is received from the mothership
sampler_param = 1
# Whether or not to use Zipkin span propagation (x-b3- HTTP headers).
zipkin_propagation = false
# Setting this to true disables shared RPC spans.
# Not disabling is the most common setting when using Zipkin elsewhere in your infrastructure.
disable_shared_zipkin_spans = false

#################################### External Image Storage ##############
[external_image_storage]
Expand Down

0 comments on commit 8f6334c

Please sign in to comment.