Skip to content

Commit

Permalink
Merge remote-tracking branch 'grafana/master' into react-streaming
Browse files Browse the repository at this point in the history
* grafana/master: (27 commits)
  docs: fixes and update current version
  Docs: Updated changelog for v6.1.3
  Graph: fixed png rendering with legend to the right (grafana#16463)
  Fix: Disables auto open datasource picker on focus (grafana#16398)
  add some mock/stub guidelines to testing guideline (grafana#16466)
  Feat: Suggestion list in Explore is virtualized (grafana#16342)
  Docs: Updated roadmap issue to link to the pinned roadmap issues
  Graph: Fixed auto decimals in legend values (grafana#16455)
  Styling: Aligned heading (grafana#16456)
  add PromQL keyword for adhoc filter (grafana#16426)
  Singlestat: Use decimal override when manually specified (grafana#16451)
  Graph: follow-up graph decimals fix, grafana#16414 (grafana#16450)
  Chore: use remote cache instead of session storage (grafana#16114)
  Docs: Minor changelog tweak
  Docs: Updated changelog with v6.1.2 release issues
  datasource: fix disable query when using mixed datasource (grafana#16409)
  Graph: Fixed series legend color for hidden series (grafana#16438)
  Templating: Fixed loading React variable query editor (grafana#16439)
  Styles: Fixed left menu highlight (grafana#16431)
  Fix: remove test artefact (grafana#16411)
  ...
  • Loading branch information
ryantxu committed Apr 9, 2019
2 parents 5b00bd4 + 3d82c84 commit c8fc06c
Show file tree
Hide file tree
Showing 101 changed files with 971 additions and 857 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# 6.2.0 (unreleased)

# 6.1.3 (unreleased)

### Bug Fixes
* **Graph**: Fixed auto decimals in legend values for some units like `ms` and `s`. [#16455](https://github.com/grafana/grafana/pull/16455), [@torkelo](https://github.com/torkelo)
* **Graph**: Fixed png rendering with legend to the right. [#16463](https://github.com/grafana/grafana/pull/16463), [@torkelo](https://github.com/torkelo)
* **Singlestat**: Use decimals when manually specified. [#16451](https://github.com/grafana/grafana/pull/16451), [@torkelo](https://github.com/torkelo)
* **UI Switch**: Fix broken UI switches. Fixes Default Data Source switch, Explore Logs switches, Gauge option switches. [#16303](https://github.com/grafana/grafana/pull/16303), [@dprokop](https://github.com/dprokop)

# 6.1.2 (2019-04-08)

### Bug Fixes
* **Graph**: Fixed series legend color for hidden series. [#16438](https://github.com/grafana/grafana/pull/16438), [@Ijin08](https://github.com/Ijin08)
* **Graph**: Fixed tooltip highlight on white theme. [#16429](https://github.com/grafana/grafana/pull/16429), [@torkelo](https://github.com/torkelo)
* **Styles**: Fixed menu hover highlight border. [#16431](https://github.com/grafana/grafana/pull/16431), [@torkelo](https://github.com/torkelo)
* **Singlestat Panel**: Correctly use the override decimals. [#16413](https://github.com/grafana/grafana/pull/16413), [@torkelo](https://github.com/torkelo)

# 6.1.1 (2019-04-05)

### Bug Fixes
Expand Down
30 changes: 1 addition & 29 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,4 @@
# Roadmap (2018-08-07)

This roadmap is a tentative plan for the core development team. Things change constantly as PRs come in and priorities change.
But it will give you an idea of our current vision and plan.

### Short term (1-2 months)
- PRs & Bugs
- React Panel Support
- React Query Editor Support
- Metrics & Log Explore UI
- Grafana UI library shared between grafana & plugins
- Seperate visualization from panels
- More reuse between Explore & dashboard
- Explore logging support for more data sources

### Mid term (2-4 months)
- Drilldown links
- Dashboards as code workflows
- React migration
- New panels

### Long term (4 - 8 months)
- Alerting improvements (silence, per series tracking, etc)

### In a distant future far far away
- Meta queries
- Integrated light weight TSDB
- Web socket & live data sources

### Outside contributions
We know this is being worked on right now by contributors (and we hope to merge it when it's ready).

Go to the Issues tab on GitHub. There you will find, at the top, 3 pinned roadmap issues.
2 changes: 1 addition & 1 deletion devenv/docker/blocks/openldap/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Any ldif files added to the prepopulate subdirectory will be automatically imported into the OpenLdap database.

The ldif files add three users, `ldapviewer`, `ldapeditor` and `ldapadmin`. Two groups, `admins` and `users`, are added that correspond with the group mappings in the default conf/ldap.toml. `ldapadmin` is a member of `admins` and `ldapeditor` is a member of `users`.
The ldif files add eight users, `ldap-admin`, `ldap-editor`, `ldap-viewer`, `ldap-carl`, `ldap-daniel`, `ldap-leo`, `ldap-tobias` and `ldap-torkel`. Two groups, `admins` and `users`, are added that correspond with the group mappings in the default conf/ldap.toml. `ldap-admin` is a member of `admins` and `ldap-editor` is a member of `users`.

Note that users that are added here need to specify a `memberOf` attribute manually as well as the `member` attribute for the group. The `memberOf` module usually does this automatically (if you add a group in Apache Directory Studio for example) but this does not work in the entrypoint script as it uses the `slapadd` command to add entries before the server has started and before the `memberOf` module is loaded.

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/http_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dashboards, creating users and updating data sources.
* [Snapshot API]({{< relref "http_api/snapshot.md" >}})
* [Annotations API]({{< relref "http_api/annotations.md" >}})
* [Alerting API]({{< relref "http_api/alerting.md" >}})
* [Alert Notification Channels API]({{< relref "http_api/alert_notification_channels.md" >}})
* [Alert Notification Channels API]({{< relref "http_api/alerting_notification_channels.md" >}})
* [User API]({{< relref "http_api/user.md" >}})
* [Team API]({{< relref "http_api/team.md" >}})
* [Admin API]({{< relref "http_api/admin.md" >}})
Expand Down
5 changes: 3 additions & 2 deletions docs/sources/http_api/playlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type = "docs"
[menu.docs]
name = "Playlist"
parent = "http_api"
identifier = "http_api_playlist"
+++

# Playlist API
Expand All @@ -28,7 +29,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Querystring Parameters:

These parameters are used as querystring parameters.

- **query** - Limit response to playlist having a name like this value.
- **limit** - Limit response to *X* number of playlist.

Expand Down Expand Up @@ -153,7 +154,7 @@ Content-Type: application/json
"id": 5,
"title":"my other dasboard"
"order": 2,

}
]
```
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/reference/dashboard_folders.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ The Dashboard Folder Page is similar to the Manage Dashboards page and is where

Permissions can assigned to a folder and inherited by the containing dashboards. An Access Control List (ACL) is used where
**Organization Role**, **Team** and Individual **User** can be assigned permissions. Read the
[Dashboard & Folder Permissions]({{< relref "administration/permissions.md#dashboard-folder-permissions" >}}) docs for more detail
[Dashboard & Folder Permissions]({{< relref "permissions/dashboard_folder_permissions.md" >}}) docs for more detail
on the permission system.

1 change: 1 addition & 0 deletions docs/sources/reference/playlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ keywords = ["grafana", "dashboard", "documentation", "playlist"]
type = "docs"
[menu.docs]
parent = "dashboard_features"
identifier = "feature_playlist"
weight = 4
+++

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/reference/sharing.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ http://play.grafana.org/render/dashboard-solo/db/grafana-play-home?orgId=1&panel

You can embed a panel using an iframe on another web site. This tab will show you the html that you need to use.

> *Notice* This sharing require either anonymous access or setting [cookie_samesite]({{< relref "installation/configuration/#cookie-samesite" >}}) to none
> *Notice* This sharing require either anonymous access or setting [cookie_samesite]({{< relref "installation/configuration.md#cookie-samesite" >}}) to none
Example:

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/reference/timerange.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ From Dashboard settings, click the Timepicker tab. From here you can specify the

### Defining Now

Users often ask, [when will then be now](https://www.youtube.com/watch?v=VeZ9HhHU86o)? Grafana offers the ability to override the `now` value on a per dashboard basis. Most commonly, this feature is used to accommodate known delays in data aggregation to avoid null values.
Grafana offers the ability to override the `now` value on a per dashboard basis. Most commonly, this feature is used to accommodate known delays in data aggregation to avoid null values.

## Panel time overrides & timeshift

Expand Down
3 changes: 2 additions & 1 deletion docs/versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
{ "version": "v6.0", "path": "/", "archived": false, "current": true },
{ "version": "v6.1", "path": "/", "archived": false, "current": true },
{ "version": "v6.0", "path": "/v6.0", "archived": true },
{ "version": "v5.4", "path": "/v5.4", "archived": true },
{ "version": "v5.3", "path": "/v5.3", "archived": true },
{ "version": "v5.2", "path": "/v5.2", "archived": true },
Expand Down
Empty file removed grafana.deb
Empty file.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@types/react-select": "^2.0.4",
"@types/react-transition-group": "^2.0.15",
"@types/react-virtualized": "^9.18.12",
"@types/react-window": "1.7.0",
"angular-mocks": "1.6.6",
"autoprefixer": "^9.4.10",
"axios": "^0.18.0",
Expand Down Expand Up @@ -180,6 +181,7 @@
"angular-sanitize": "1.6.6",
"baron": "^3.0.3",
"brace": "^0.10.0",
"calculate-size": "1.1.1",
"classnames": "^2.2.6",
"clipboard": "^2.0.4",
"d3": "^4.11.0",
Expand Down Expand Up @@ -208,6 +210,7 @@
"react-table": "^6.8.6",
"react-transition-group": "^2.2.1",
"react-virtualized": "^9.21.0",
"react-window": "1.7.1",
"redux": "^4.0.0",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
Expand Down
15 changes: 11 additions & 4 deletions packages/grafana-ui/src/components/BarGauge/BarGauge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ export class BarGauge extends PureComponent<Props> {
const valueRange = maxValue - minValue;
const maxSize = isVert ? maxBarHeight : maxBarWidth;
const cellSpacing = itemSpacing!;
const cellCount = maxSize / 20;
const cellSize = (maxSize - cellSpacing * cellCount) / cellCount;
const cellWidth = 12;
const cellCount = Math.floor(maxSize / cellWidth);
const cellSize = Math.floor((maxSize - cellSpacing * cellCount) / cellCount);
const valueColor = getValueColor(this.props);
const valueStyles = getValueStyles(value.text, valueColor, valueWidth, valueHeight);

Expand Down Expand Up @@ -286,7 +287,7 @@ export function getTitleStyles(props: Props): { wrapper: CSSProperties; title: C

titleStyles.width = `${titleDim.width}px`;
titleStyles.textAlign = 'right';
titleStyles.marginRight = '10px';
titleStyles.paddingRight = '10px';
}
}

Expand Down Expand Up @@ -344,6 +345,11 @@ function calculateBarAndValueDimensions(props: Props): BarAndValueDimensions {
}
}

// console.log('titleDim', titleDim);
// console.log('valueWidth', valueWidth);
// console.log('width', width);
// console.log('total', titleDim.width + maxBarWidth + valueWidth);

return {
valueWidth,
valueHeight,
Expand Down Expand Up @@ -409,7 +415,8 @@ export function getBasicAndGradientStyles(props: Props): BasicAndGradientStyles
barStyles.transition = 'width 1s';
barStyles.height = `${maxBarHeight}px`;
barStyles.width = `${barWidth}px`;
barStyles.marginRight = '10px';

valueStyles.paddingLeft = '10px';

if (isBasic) {
// Basic styles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ exports[`BarGauge Render with basic options should render 1`] = `
"display": "flex",
"fontSize": "27.27px",
"height": "300px",
"paddingLeft": "10px",
"width": "60px",
}
}
Expand All @@ -33,7 +34,6 @@ exports[`BarGauge Render with basic options should render 1`] = `
"borderRadius": "3px",
"borderRight": "2px solid #73BF69",
"height": "300px",
"marginRight": "10px",
"transition": "width 1s",
"width": "60px",
}
Expand Down
20 changes: 8 additions & 12 deletions packages/grafana-ui/src/components/Button/AbstractButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,35 +65,28 @@ const getButtonStyles = (theme: GrafanaTheme, size: ButtonSize, variant: ButtonV
background,
fontSize,
iconDistance,
height,
fontWeight = theme.typography.weight.semibold;

switch (size) {
case ButtonSize.ExtraSmall:
padding = `${theme.spacing.xs} ${theme.spacing.sm}`;
fontSize = theme.typography.size.xs;
iconDistance = theme.spacing.xs;
break;
case ButtonSize.Small:
padding = `${theme.spacing.xs} ${theme.spacing.sm}`;
fontSize = theme.typography.size.sm;
iconDistance = theme.spacing.xs;
height = theme.height.sm;
break;
case ButtonSize.Large:
padding = `${theme.spacing.md} ${theme.spacing.lg}`;
fontSize = theme.typography.size.lg;
fontWeight = theme.typography.weight.regular;
iconDistance = theme.spacing.sm;
break;
case ButtonSize.ExtraLarge:
padding = `${theme.spacing.md} ${theme.spacing.lg}`;
fontSize = theme.typography.size.lg;
fontWeight = theme.typography.weight.regular;
iconDistance = theme.spacing.sm;
height = theme.height.lg;
break;
default:
padding = `${theme.spacing.sm} ${theme.spacing.md}`;
iconDistance = theme.spacing.sm;
fontSize = theme.typography.size.base;
height = theme.height.md;
}

switch (variant) {
Expand Down Expand Up @@ -133,7 +126,8 @@ const getButtonStyles = (theme: GrafanaTheme, size: ButtonSize, variant: ButtonV
return {
button: css`
label: button;
display: inline-block;
display: flex;
align-items: center;
font-weight: ${fontWeight};
font-size: ${fontSize};
font-family: ${theme.typography.fontFamily.sansSerif};
Expand All @@ -143,6 +137,7 @@ const getButtonStyles = (theme: GrafanaTheme, size: ButtonSize, variant: ButtonV
vertical-align: middle;
cursor: pointer;
border: none;
height: ${height};
border-radius: ${borderRadius};
${background};
Expand All @@ -161,6 +156,7 @@ const getButtonStyles = (theme: GrafanaTheme, size: ButtonSize, variant: ButtonV
icon: css`
label: button-icon;
margin-right: ${iconDistance};
filter: brightness(100);
`,
};
};
Expand Down
2 changes: 1 addition & 1 deletion packages/grafana-ui/src/components/Button/Button.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ButtonStories.add('with icon', () => {
Plus: 'fa fa-plus',
User: 'fa fa-user',
Gear: 'fa fa-gear',
Annotation: 'gicon gicon-add-annotation',
Annotation: 'gicon gicon-annotation',
},
'fa fa-plus'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ exports[`Render should render with base threshold 1`] = `
"grayBlue": "#212327",
"greenBase": "#299c46",
"greenShade": "#23843b",
"headingColor": "#e3e3e3",
"headingColor": "#d8d9da",
"inputBlack": "#09090b",
"link": "#e3e3e3",
"linkDisabled": "#e3e3e3",
"link": "#d8d9da",
"linkDisabled": "#8e8e8e",
"linkExternal": "#33b5e5",
"linkHover": "#ffffff",
"online": "#299c46",
Expand All @@ -176,6 +176,11 @@ exports[`Render should render with base threshold 1`] = `
"white": "#ffffff",
"yellow": "#ecbb13",
},
"height": Object {
"lg": "48px",
"md": "32px",
"sm": "24px",
},
"name": "Grafana Dark",
"panelPadding": Object {
"horizontal": 16,
Expand Down Expand Up @@ -306,10 +311,10 @@ exports[`Render should render with base threshold 1`] = `
"grayBlue": "#212327",
"greenBase": "#299c46",
"greenShade": "#23843b",
"headingColor": "#e3e3e3",
"headingColor": "#d8d9da",
"inputBlack": "#09090b",
"link": "#e3e3e3",
"linkDisabled": "#e3e3e3",
"link": "#d8d9da",
"linkDisabled": "#8e8e8e",
"linkExternal": "#33b5e5",
"linkHover": "#ffffff",
"online": "#299c46",
Expand All @@ -334,6 +339,11 @@ exports[`Render should render with base threshold 1`] = `
"white": "#ffffff",
"yellow": "#ecbb13",
},
"height": Object {
"lg": "48px",
"md": "32px",
"sm": "24px",
},
"name": "Grafana Dark",
"panelPadding": Object {
"horizontal": 16,
Expand Down
6 changes: 6 additions & 0 deletions packages/grafana-ui/src/themes/_variables.scss.tmpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ $container-max-widths: (
$grid-columns: 12 !default;
$grid-gutter-width: ${theme.spacing.gutter} !default;
// Component heights
// -------------------------
$height-sm: ${theme.height.sm};
$height-md: ${theme.height.md};
$height-lg: ${theme.height.lg};
// Typography
// -------------------------
Expand Down
7 changes: 3 additions & 4 deletions packages/grafana-ui/src/themes/dark.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import tinycolor from 'tinycolor2';
import defaultTheme from './default';
import { GrafanaTheme, GrafanaThemeType } from '../types/theme';

Expand Down Expand Up @@ -66,11 +65,11 @@ const darkTheme: GrafanaTheme = {
textWeak: basicColors.gray2,
textEmphasis: basicColors.gray5,
textFaint: basicColors.dark5,
link: new tinycolor(basicColors.white).darken(11).toString(),
linkDisabled: new tinycolor(basicColors.white).darken(11).toString(),
link: basicColors.gray4,
linkDisabled: basicColors.gray2,
linkHover: basicColors.white,
linkExternal: basicColors.blue,
headingColor: new tinycolor(basicColors.white).darken(11).toString(),
headingColor: basicColors.gray4,
},
background: {
dropdown: basicColors.dark3,
Expand Down
5 changes: 5 additions & 0 deletions packages/grafana-ui/src/themes/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ const theme: GrafanaThemeCommons = {
sm: '1px',
},
},
height: {
sm: '24px',
md: '32px',
lg: '48px',
},
panelPadding: {
horizontal: 16,
vertical: 8,
Expand Down
Loading

0 comments on commit c8fc06c

Please sign in to comment.