Skip to content

Commit

Permalink
Merge branch 'master' into stricter_ci_linting
Browse files Browse the repository at this point in the history
* master:
  Linting fixes for provisoning (grafana#23600)
  Image Rendering: Remove PhantomJS support (grafana#23460)
  Storybook: Organizing (grafana#23572)
  @grafana/ui: Remove ColorPallete component (grafana#23592)
  • Loading branch information
bergquist committed Apr 16, 2020
2 parents 8a4dd63 + 5fc255b commit 8ff6f23
Show file tree
Hide file tree
Showing 88 changed files with 299 additions and 1,351 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ commands:
- run:
name: "Install Grafana build pipeline tool"
command: |
VERSION=0.2.9
VERSION=0.2.10
curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v${VERSION}/grabpl
chmod +x grabpl
mv grabpl /tmp
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 7.0.0 (unreleased)

## Breaking changes

- **Removed PhantomJS**: PhantomJS was deprecated in [Grafana v6.4](https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/#phantomjs-deprecation) and starting from Grafana v7.0.0, all PhantomJS support has been removed. This means that Grafana no longer ships with a built-in image renderer, and we advise you to install the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer).

# 6.7.2 (2020-04-02)

### Bug Fixes
Expand All @@ -6,7 +12,7 @@
- **Dashboard**: Fixed issue with saving new dashboard after changing title . [#23104](https://github.com/grafana/grafana/pull/23104), [@dprokop](https://github.com/dprokop)
- **DataLinks**: make sure we use the correct datapoint when dataset contains null value.. [#22981](https://github.com/grafana/grafana/pull/22981), [@mckn](https://github.com/mckn)
- **Plugins**: Fixed issue for plugins that imported dateMath util . [#23069](https://github.com/grafana/grafana/pull/23069), [@mckn](https://github.com/mckn)
- **Security**: Fix for dashboard snapshot original dashboard link could contain XSS vulnerability in url. [#23254](https://github.com/grafana/grafana/pull/23254), [@torkelo](https://github.com/torkelo). Big thanks to Ahmed A. Sherif for reporting this issue.
- **Security**: Fix for dashboard snapshot original dashboard link could contain XSS vulnerability in url. [#23254](https://github.com/grafana/grafana/pull/23254), [@torkelo](https://github.com/torkelo). Big thanks to Ahmed A. Sherif for reporting this issue.
- **Variables**: Fixes issue with too many queries being issued for nested template variables after value change. [#23220](https://github.com/grafana/grafana/pull/23220), [@torkelo](https://github.com/torkelo)
- **Plugins**: Expose promiseToDigest. [#23249](https://github.com/grafana/grafana/pull/23249), [@torkelo](https://github.com/torkelo)
- **Reporting (Enterprise)**: Fixes issue updating a report created by someone else
Expand Down
19 changes: 0 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ RUN go run build.go build
# Node build container
FROM node:12.13.0-alpine

# PhantomJS
RUN apk add --no-cache curl &&\
cd /tmp && curl -Ls https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz | tar xz &&\
cp -R lib lib64 / &&\
cp -R usr/lib/x86_64-linux-gnu /usr/lib &&\
cp -R usr/share /usr/share &&\
cp -R etc/fonts /etc &&\
curl -k -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar -jxf - &&\
cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs

WORKDIR /usr/src/app/

COPY package.json yarn.lock ./
Expand Down Expand Up @@ -80,18 +70,9 @@ RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
chown -R grafana:grafana "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"

# PhantomJS
COPY --from=1 /tmp/lib /lib
COPY --from=1 /tmp/lib64 /lib64
COPY --from=1 /tmp/usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu
COPY --from=1 /tmp/usr/share /usr/share
COPY --from=1 /tmp/etc/fonts /etc/fonts
COPY --from=1 /usr/local/bin/phantomjs /usr/local/bin

COPY --from=0 /go/src/github.com/grafana/grafana/bin/linux-amd64/grafana-server /go/src/github.com/grafana/grafana/bin/linux-amd64/grafana-cli ./bin/
COPY --from=1 /usr/src/app/public ./public
COPY --from=1 /usr/src/app/tools ./tools
COPY tools/phantomjs/render.js ./tools/phantomjs/render.js

EXPOSE 3000

Expand Down
12 changes: 2 additions & 10 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ RUN go run build.go build

FROM node:12.13 AS js-builder

# PhantomJS
RUN apt-get update && apt-get install -y curl &&\
curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xj &&\
cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs

WORKDIR /usr/src/app/

COPY package.json yarn.lock ./
Expand Down Expand Up @@ -54,8 +49,8 @@ WORKDIR $GF_PATHS_HOME

COPY conf conf

# We need font libs for phantomjs, and curl should be part of the image
RUN apt-get update && apt-get upgrade -y && apt-get install -y ca-certificates libfontconfig1 curl
# curl should be part of the image
RUN apt-get update && apt-get upgrade -y && apt-get install -y ca-certificates curl

RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
addgroup --system --gid $GF_GID grafana && \
Expand All @@ -71,14 +66,11 @@ RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
chown -R grafana:grafana "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"

# PhantomJS
COPY --from=js-builder /usr/local/bin/phantomjs /usr/local/bin/

COPY --from=go-builder /src/grafana/bin/linux-amd64/grafana-server /src/grafana/bin/linux-amd64/grafana-cli bin/
COPY --from=js-builder /usr/src/app/public public
COPY --from=js-builder /usr/src/app/tools tools

COPY tools/phantomjs/render.js tools/phantomjs/
COPY packaging/docker/run.sh /

USER grafana
Expand Down
1 change: 0 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ module.exports = function (grunt) {
config.libc = grunt.option('libc');
}

config.phjs = grunt.option('phjsToRelease');
config.pkg.version = grunt.option('pkgVer') || config.pkg.version;

console.log('Version', config.pkg.version);
Expand Down
5 changes: 0 additions & 5 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ var (
linuxPackageVersion string = "v1"
linuxPackageIteration string = ""
race bool
phjsToRelease string
workingDir string
includeBuildId bool = true
buildId string = "0"
Expand Down Expand Up @@ -69,7 +68,6 @@ func main() {
flag.StringVar(&libc, "libc", "", "LIBC")
flag.BoolVar(&cgo, "cgo-enabled", cgo, "Enable cgo")
flag.StringVar(&pkgArch, "pkg-arch", "", "PKG ARCH")
flag.StringVar(&phjsToRelease, "phjs", "", "PhantomJS binary")
flag.BoolVar(&race, "race", race, "Use race detector")
flag.BoolVar(&modVendor, "modVendor", modVendor, "Go modules use vendor folder")
flag.BoolVar(&includeBuildId, "includeBuildId", includeBuildId, "IncludeBuildId in package name")
Expand Down Expand Up @@ -459,9 +457,6 @@ func gruntBuildArg(task string) []string {
if libc != "" {
args = append(args, fmt.Sprintf("--libc=%s", libc))
}
if phjsToRelease != "" {
args = append(args, fmt.Sprintf("--phjsToRelease=%v", phjsToRelease))
}
if enterprise {
args = append(args, "--enterprise")
}
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/administration/image_rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The following example describes how to build and run the remote HTTP rendering s

## PhantomJS

> PhantomJS is deprecated since Grafana v6.4 and will be removed in a future release. Please migrate to the Grafana Image Renderer plugin or remote rendering service.
> Starting from Grafana v7.0.0, all PhantomJS support has been removed. Please use the Grafana Image Renderer plugin or remote rendering service.

## Troubleshoot image rendering

Expand Down
6 changes: 6 additions & 0 deletions docs/sources/installation/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,9 @@ Due to this change in Chrome, the `[security]` setting `cookie_samesite` configu

This version of Chrome also rejects insecure `SameSite=None` cookies. See https://www.chromestatus.com/feature/5633521622188032 for more information. Make sure that you
change the `[security]` setting `cookie_secure` to `true` and use HTTPS when `cookie_samesite` is configured to `none`, otherwise authentication in Grafana won't work properly.

## Upgrading to v7.0

### PhantomJS removed

PhantomJS was deprecated in [Grafana v6.4](https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/#phantomjs-deprecation) and starting from Grafana v7.0.0, all PhantomJS support has been removed. This means that Grafana no longer ships with a built-in image renderer, and we adwise you to install the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer).
Binary file not shown.
2 changes: 0 additions & 2 deletions e2e/suite1/specs/smoketests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ e2e.scenario({
.contains('Show')
.click();

e2e.pages.Components.BackButton.backArrow().click();

// e2e.pages.Dashboard.Panels.Panel.title('Panel Title').click();
// e2e.pages.Dashboard.Panels.Panel.headerItems('Inspect').click();
},
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@
"ngtemplate-loader": "2.0.1",
"node-sass": "4.13.1",
"optimize-css-assets-webpack-plugin": "5.0.3",
"phantomjs-prebuilt": "2.1.16",
"pixelmatch": "5.1.0",
"pngjs": "3.4.0",
"postcss-browser-reporter": "0.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/grafana-runtime/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class GrafanaBootConfig {
tracingIntegration: false,
};
licenseInfo: LicenseInfo = {} as LicenseInfo;
phantomJSRenderer = false;
rendererAvailable = false;

constructor(options: GrafanaBootConfig) {
this.theme = options.bootData.user.lightTheme ? getTheme(GrafanaThemeType.Light) : getTheme(GrafanaThemeType.Dark);
Expand Down
9 changes: 8 additions & 1 deletion packages/grafana-ui/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ addParameters({
showNav: true,
isFullscreen: false,
isToolshown: true,
storySort: (a: any, b: any) => a[1].id.localeCompare(b[1].id),
storySort: (a: any, b: any) => {
if (a[1].kind.split('/')[0] === 'Docs Overview') {
return -1;
} else if (b[1].kind.split('/')[0] === 'Docs Overview') {
return 1;
}
return a[1].id.localeCompare(b[1].id);
},
},
knobs: {
escapeHTML: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { ButtonCascader } from './ButtonCascader';

export default {
title: 'General/ButtonCascader',
title: 'Forms/Cascader/ButtonCascader',
component: ButtonCascader,
decorators: [withKnobs, withCenteredStory],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import mdx from './Cascader.mdx';
import React from 'react';

export default {
title: 'General/Cascader',
title: 'Forms/Cascader',
component: Cascader,
decorators: [withCenteredStory],
parameters: {
Expand Down

This file was deleted.

44 changes: 0 additions & 44 deletions packages/grafana-ui/src/components/ColorPicker/ColorPalette.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getColorPickerKnobs = () => {
};
};

const ColorPickerStories = storiesOf('General/ColorPicker/Pickers', module);
const ColorPickerStories = storiesOf('Pickers and Editors/ColorPicker/Pickers', module);

ColorPickerStories.addDecorator(withCenteredStory);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ColorPickerPopover } from './ColorPickerPopover';
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
import { SeriesColorPickerPopover } from './SeriesColorPickerPopover';
import { renderComponentWithTheme } from '../../utils/storybook/withTheme';
const ColorPickerPopoverStories = storiesOf('General/ColorPicker/Popovers', module);
const ColorPickerPopoverStories = storiesOf('Pickers and Editors/ColorPicker/Popovers', module);

ColorPickerPopoverStories.addDecorator(withCenteredStory);

Expand Down
Loading

0 comments on commit 8ff6f23

Please sign in to comment.