mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge remote-tracking branch 'grafana/master' into alpha-react-virtualized-table
* grafana/master: Fixed type issues introduced by adding angular types Typescript noAny fixes, start of a long journey Updated code stats collection Updated path to new script POC on collecting metrics in ci process renamed default variables: s -> sm, m -> md, l -> lg removed gf-form-margin variable and replaced with space- variables where it was used heatmap: able to hide buckets with zero value #12080 s -> sm, m -> md, l -> lg heatmap: fix prometheus buckets sorting, closes #15637 s -> sm, m -> md, l -> lg removed headings-margin-bottom variable remove kbn test Added scopedVars argument in datasourceSrv.get in DataPanel Refactoring of multi-value datasource PR #15812 fixed minor misstake with dashboard padding removed -margin, replaced with new general variables added new space variables to margins in AddPanelWidget, add_data_source, dashboard_settings and sidemenu added new variables for spacing, set margins in _cards with new variables Make datasource variables multiselect and dashboard repeatable
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
.form-field {
|
||||
margin-bottom: $gf-form-margin;
|
||||
margin-bottom: $space-xxs;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
@@ -30,7 +30,7 @@ const FONT_SCALE = 1;
|
||||
export class Gauge extends PureComponent<Props> {
|
||||
canvasElement: any;
|
||||
|
||||
static defaultProps = {
|
||||
static defaultProps: Partial<Props> = {
|
||||
maxValue: 100,
|
||||
valueMappings: [],
|
||||
minValue: 0,
|
||||
@@ -41,7 +41,6 @@ export class Gauge extends PureComponent<Props> {
|
||||
thresholds: [],
|
||||
unit: 'none',
|
||||
stat: 'avg',
|
||||
theme: GrafanaThemeType.Dark,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
@@ -134,7 +133,7 @@ export class Gauge extends PureComponent<Props> {
|
||||
Math.min(dimension / 5, 100) * (formattedValue !== null ? this.getFontScale(formattedValue.length) : 1);
|
||||
const thresholdLabelFontSize = fontSize / 2.5;
|
||||
|
||||
const options = {
|
||||
const options: any = {
|
||||
series: {
|
||||
gauges: {
|
||||
gauge: {
|
||||
|
||||
@@ -3,7 +3,7 @@ $select-input-bg-disabled: $input-bg-disabled;
|
||||
|
||||
@mixin select-control() {
|
||||
width: 100%;
|
||||
margin-right: $gf-form-margin;
|
||||
margin-right: $space-xs;
|
||||
@include border-radius($input-border-radius-sm);
|
||||
background-color: $input-bg;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,13 @@ $enable-hover-media-query: false !default;
|
||||
// Control the default styling of most Bootstrap elements by modifying these
|
||||
// variables. Mostly focused on spacing.
|
||||
|
||||
$spacer: ${theme.spacing.m} !default;
|
||||
$space-xxs: ${theme.spacing.xxs} !default;
|
||||
$space-xs: ${theme.spacing.xs} !default;
|
||||
$space-sm: ${theme.spacing.sm} !default;
|
||||
$space-md: ${theme.spacing.md} !default;
|
||||
$space-lg: ${theme.spacing.lg} !default;
|
||||
$space-xl: ${theme.spacing.xl} !default;
|
||||
$spacer: ${theme.spacing.d} !default;
|
||||
$spacer-x: $spacer !default;
|
||||
$spacer-y: $spacer !default;
|
||||
$spacers: (
|
||||
@@ -46,7 +52,7 @@ $spacers: (
|
||||
),
|
||||
),
|
||||
) !default;
|
||||
$border-width: ${theme.border.width.s} !default;
|
||||
$border-width: ${theme.border.width.sm} !default;
|
||||
|
||||
// Grid breakpoints
|
||||
//
|
||||
@@ -55,9 +61,9 @@ $border-width: ${theme.border.width.s} !default;
|
||||
|
||||
$grid-breakpoints: (
|
||||
xs: ${theme.breakpoints.xs},
|
||||
sm: ${theme.breakpoints.s},
|
||||
md: ${theme.breakpoints.m},
|
||||
lg: ${theme.breakpoints.l},
|
||||
sm: ${theme.breakpoints.sm},
|
||||
md: ${theme.breakpoints.md},
|
||||
lg: ${theme.breakpoints.lg},
|
||||
xl: ${theme.breakpoints.xl},
|
||||
) !default;
|
||||
|
||||
@@ -91,12 +97,12 @@ $font-family-base: $font-family-sans-serif !default;
|
||||
$font-size-root: ${theme.typography.size.root} !default;
|
||||
$font-size-base: ${theme.typography.size.base} !default;
|
||||
|
||||
$font-size-lg: ${theme.typography.size.l} !default;
|
||||
$font-size-md: ${theme.typography.size.m} !default;
|
||||
$font-size-sm: ${theme.typography.size.s} !default;
|
||||
$font-size-lg: ${theme.typography.size.lg} !default;
|
||||
$font-size-md: ${theme.typography.size.md} !default;
|
||||
$font-size-sm: ${theme.typography.size.sm} !default;
|
||||
$font-size-xs: ${theme.typography.size.xs} !default;
|
||||
|
||||
$line-height-base: ${theme.typography.lineHeight.l} !default;
|
||||
$line-height-base: ${theme.typography.lineHeight.lg} !default;
|
||||
$font-weight-semi-bold: ${theme.typography.weight.semibold};
|
||||
|
||||
$font-size-h1: ${theme.typography.heading.h1} !default;
|
||||
@@ -106,10 +112,9 @@ $font-size-h4: ${theme.typography.heading.h4} !default;
|
||||
$font-size-h5: ${theme.typography.heading.h5} !default;
|
||||
$font-size-h6: ${theme.typography.heading.h6} !default;
|
||||
|
||||
$headings-margin-bottom: ($spacer / 2) !default;
|
||||
$headings-font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
$headings-font-weight: ${theme.typography.weight.normal} !default;
|
||||
$headings-line-height: ${theme.typography.lineHeight.s} !default;
|
||||
$headings-line-height: ${theme.typography.lineHeight.sm} !default;
|
||||
|
||||
$hr-border-width: $border-width !default;
|
||||
$dt-font-weight: bold !default;
|
||||
@@ -160,7 +165,6 @@ $input-padding-y-lg: 10px !default;
|
||||
|
||||
$input-height: 35px !default;
|
||||
|
||||
$gf-form-margin: 3px;
|
||||
$gf-form-input-height: 35px;
|
||||
|
||||
$cursor-disabled: not-allowed !default;
|
||||
@@ -207,8 +211,7 @@ $btn-semi-transparent: rgba(0, 0, 0, 0.2) !default;
|
||||
$side-menu-width: 60px;
|
||||
|
||||
// dashboard
|
||||
$panel-margin: 10px;
|
||||
$dashboard-padding: $panel-margin * 2;
|
||||
$dashboard-padding: 10px * 2;
|
||||
$panel-horizontal-padding: 10;
|
||||
$panel-vertical-padding: 5;
|
||||
$panel-padding: 0px $panel-horizontal-padding + 0px $panel-vertical-padding + 0px $panel-horizontal-padding + 0px;
|
||||
|
||||
@@ -11,9 +11,9 @@ const theme: GrafanaThemeCommons = {
|
||||
root: '14px',
|
||||
base: '13px',
|
||||
xs: '10px',
|
||||
s: '12px',
|
||||
m: '14px',
|
||||
l: '18px',
|
||||
sm: '12px',
|
||||
md: '14px',
|
||||
lg: '18px',
|
||||
},
|
||||
heading: {
|
||||
h1: '28px',
|
||||
@@ -30,33 +30,36 @@ const theme: GrafanaThemeCommons = {
|
||||
},
|
||||
lineHeight: {
|
||||
xs: 1,
|
||||
s: 1.1,
|
||||
m: 4 / 3,
|
||||
l: 1.5,
|
||||
sm: 1.1,
|
||||
md: 4 / 3,
|
||||
lg: 1.5,
|
||||
},
|
||||
},
|
||||
breakpoints: {
|
||||
xs: '0',
|
||||
s: '544px',
|
||||
m: '768px',
|
||||
l: '992px',
|
||||
sm: '544px',
|
||||
md: '768px',
|
||||
lg: '992px',
|
||||
xl: '1200px',
|
||||
},
|
||||
spacing: {
|
||||
xs: '0',
|
||||
s: '3px',
|
||||
m: '14px',
|
||||
l: '21px',
|
||||
d: '14px',
|
||||
xxs: '2px',
|
||||
xs: '4px',
|
||||
sm: '8px',
|
||||
md: '16px',
|
||||
lg: '24px',
|
||||
xl: '32px',
|
||||
gutter: '30px',
|
||||
},
|
||||
border: {
|
||||
radius: {
|
||||
xs: '2px',
|
||||
s: '3px',
|
||||
m: '5px',
|
||||
sm: '3px',
|
||||
md: '5px',
|
||||
},
|
||||
width: {
|
||||
s: '1px',
|
||||
sm: '1px',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -8,9 +8,9 @@ export interface GrafanaThemeCommons {
|
||||
// TODO: not sure if should be a part of theme
|
||||
breakpoints: {
|
||||
xs: string;
|
||||
s: string;
|
||||
m: string;
|
||||
l: string;
|
||||
sm: string;
|
||||
md: string;
|
||||
lg: string;
|
||||
xl: string;
|
||||
};
|
||||
typography: {
|
||||
@@ -22,9 +22,9 @@ export interface GrafanaThemeCommons {
|
||||
root: string;
|
||||
base: string;
|
||||
xs: string;
|
||||
s: string;
|
||||
m: string;
|
||||
l: string;
|
||||
sm: string;
|
||||
md: string;
|
||||
lg: string;
|
||||
};
|
||||
weight: {
|
||||
light: number;
|
||||
@@ -33,9 +33,9 @@ export interface GrafanaThemeCommons {
|
||||
};
|
||||
lineHeight: {
|
||||
xs: number; //1
|
||||
s: number; //1.1
|
||||
m: number; // 4/3
|
||||
l: number; // 1.5
|
||||
sm: number; //1.1
|
||||
md: number; // 4/3
|
||||
lg: number; // 1.5
|
||||
};
|
||||
// TODO: Refactor to use size instead of custom defs
|
||||
heading: {
|
||||
@@ -48,20 +48,23 @@ export interface GrafanaThemeCommons {
|
||||
};
|
||||
};
|
||||
spacing: {
|
||||
d: string;
|
||||
xxs: string;
|
||||
xs: string;
|
||||
s: string;
|
||||
m: string;
|
||||
l: string;
|
||||
sm: string;
|
||||
md: string;
|
||||
lg: string;
|
||||
xl: string;
|
||||
gutter: string;
|
||||
};
|
||||
border: {
|
||||
radius: {
|
||||
xs: string;
|
||||
s: string;
|
||||
m: string;
|
||||
sm: string;
|
||||
md: string;
|
||||
};
|
||||
width: {
|
||||
s: string;
|
||||
sm: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user