-
Query inspector
+
Query inspector
Query inspector allows you to view raw request and response. To collect this data Grafana needs to issue a
diff --git a/public/app/features/inspector/styles.ts b/public/app/features/inspector/styles.ts
index 888793288ba..86646950382 100644
--- a/public/app/features/inspector/styles.ts
+++ b/public/app/features/inspector/styles.ts
@@ -11,62 +11,66 @@ export const getPanelInspectorStyles = stylesFactory(() => {
export const getPanelInspectorStyles2 = (theme: GrafanaTheme2) => {
return {
- wrap: css`
- display: flex;
- flex-direction: column;
- height: 100%;
- width: 100%;
- flex: 1 1 0;
- min-height: 0;
- `,
- toolbar: css`
- display: flex;
- width: 100%;
- flex-grow: 0;
- align-items: center;
- justify-content: flex-end;
- margin-bottom: ${theme.v1.spacing.sm};
- `,
- toolbarItem: css`
- margin-left: ${theme.v1.spacing.md};
- `,
- content: css`
- flex-grow: 1;
- height: 100%;
- `,
- editor: css`
- font-family: monospace;
- height: 100%;
- flex-grow: 1;
- `,
- viewer: css`
- overflow: scroll;
- `,
- dataFrameSelect: css`
- flex-grow: 2;
- `,
- leftActions: css`
- display: flex;
- flex-grow: 1;
+ heading: css({
+ fontSize: theme.typography.body.fontSize,
+ marginBottom: theme.spacing(1),
+ }),
+ wrap: css({
+ display: 'flex',
+ flexDirection: 'column',
+ height: '100%',
+ width: '100%',
+ flex: '1 1 0',
+ minHeight: 0,
+ }),
+ toolbar: css({
+ display: 'flex',
+ width: '100%',
+ flexGrow: 0,
+ alignItems: 'center',
+ justifyContent: 'flex-end',
+ marginBottom: theme.v1.spacing.sm,
+ }),
+ toolbarItem: css({
+ marginLeft: theme.v1.spacing.md,
+ }),
+ content: css({
+ flexGrow: 1,
+ height: '100%',
+ }),
+ editor: css({
+ fontFamily: 'monospace',
+ height: '100%',
+ flexGrow: 1,
+ }),
+ viewer: css({
+ overflow: 'scroll',
+ }),
+ dataFrameSelect: css({
+ flexGrow: 2,
+ }),
+ leftActions: css({
+ display: 'flex',
+ flexGrow: 1,
- max-width: 85%;
- @media (max-width: 1345px) {
- max-width: 75%;
- }
- `,
- options: css`
- padding-top: ${theme.v1.spacing.sm};
- `,
- dataDisplayOptions: css`
- flex-grow: 1;
- min-width: 300px;
- margin-right: ${theme.v1.spacing.sm};
- `,
- selects: css`
- display: flex;
- > * {
- margin-right: ${theme.v1.spacing.sm};
- }
- `,
+ maxWidth: '85%',
+ '@media (max-width: 1345px)': {
+ maxWidth: '75%',
+ },
+ }),
+ options: css({
+ paddingTop: theme.v1.spacing.sm,
+ }),
+ dataDisplayOptions: css({
+ flexGrow: 1,
+ minWidth: '300px',
+ marginRight: theme.v1.spacing.sm,
+ }),
+ selects: css({
+ display: 'flex',
+ '> *': {
+ marginRight: theme.v1.spacing.sm,
+ },
+ }),
};
};
diff --git a/public/app/features/invites/SignupInvited.tsx b/public/app/features/invites/SignupInvited.tsx
index bea01970007..96c7cddeafb 100644
--- a/public/app/features/invites/SignupInvited.tsx
+++ b/public/app/features/invites/SignupInvited.tsx
@@ -1,8 +1,10 @@
+import { css, cx } from '@emotion/css';
import React, { useState } from 'react';
import { useAsync } from 'react-use';
+import { GrafanaTheme2 } from '@grafana/data';
import { getBackendSrv } from '@grafana/runtime';
-import { Button, Field, Input } from '@grafana/ui';
+import { Button, Field, Input, useStyles2 } from '@grafana/ui';
import { Form } from 'app/core/components/Form/Form';
import { Page } from 'app/core/components/Page/Page';
import { getConfig } from 'app/core/config';
@@ -37,6 +39,7 @@ export const SignupInvitedPage = ({ match }: Props) => {
const [initFormModel, setInitFormModel] = useState();
const [greeting, setGreeting] = useState();
const [invitedBy, setInvitedBy] = useState();
+ const styles = useStyles2(getStyles);
useAsync(async () => {
const invite = await getBackendSrv().get(`/api/user/invite/${code}`);
@@ -65,7 +68,7 @@ export const SignupInvitedPage = ({ match }: Props) => {
Hello {greeting || 'there'}.
-
+
{invitedBy || 'Someone'} has invited you to join Grafana and the organization{' '}
{contextSrv.user.orgName}
@@ -109,4 +112,10 @@ export const SignupInvitedPage = ({ match }: Props) => {
);
};
+const getStyles = (theme: GrafanaTheme2) => ({
+ tagline: css({
+ paddingBottom: theme.spacing(3),
+ }),
+});
+
export default SignupInvitedPage;
diff --git a/public/app/plugins/datasource/graphite/components/AnnotationsEditor.tsx b/public/app/plugins/datasource/graphite/components/AnnotationsEditor.tsx
index 0eddf2e3e8e..e27c5afce7a 100644
--- a/public/app/plugins/datasource/graphite/components/AnnotationsEditor.tsx
+++ b/public/app/plugins/datasource/graphite/components/AnnotationsEditor.tsx
@@ -1,7 +1,8 @@
+import { css } from '@emotion/css';
import React, { useState } from 'react';
-import { QueryEditorProps } from '@grafana/data';
-import { Box, InlineField, Input, TagsInput } from '@grafana/ui';
+import { GrafanaTheme2, QueryEditorProps } from '@grafana/data';
+import { Box, InlineField, Input, TagsInput, useStyles2 } from '@grafana/ui';
import { GraphiteDatasource } from '../datasource';
import { GraphiteQuery, GraphiteOptions } from '../types';
@@ -32,6 +33,7 @@ export const AnnotationEditor = (props: QueryEditorProps
@@ -44,7 +46,7 @@ export const AnnotationEditor = (props: QueryEditorProps
- Or
+ Or
@@ -52,3 +54,10 @@ export const AnnotationEditor = (props: QueryEditorProps
);
};
+
+const getStyles = (theme: GrafanaTheme2) => ({
+ heading: css({
+ fontSize: theme.typography.body.fontSize,
+ marginBottom: theme.spacing(1),
+ }),
+});
diff --git a/public/sass/_angular.scss b/public/sass/_angular.scss
index c63debe1113..d5b8abf0bcd 100644
--- a/public/sass/_angular.scss
+++ b/public/sass/_angular.scss
@@ -1,6 +1,8 @@
// these styles are only used by angular components/pages
// once angular is disabled, this file can be deleted
+@use 'sass:map';
+
.edit-tab-content {
flex-grow: 1;
min-width: 0;
@@ -1792,3 +1794,41 @@ $easing: cubic-bezier(0, 0, 0.265, 1);
}
}
}
+
+.section-heading {
+ font-size: $font-size-md;
+ margin-bottom: $space-sm;
+}
+
+@each $prop, $abbrev in (margin: m, padding: p) {
+ @each $size, $lengths in $spacers {
+ $length-x: map.get($lengths, x);
+ $length-y: map.get($lengths, y);
+
+ .#{$abbrev}-a-#{$size} {
+ #{$prop}: $length-y $length-x !important;
+ } // a = All sides
+ .#{$abbrev}-t-#{$size} {
+ #{$prop}-top: $length-y !important;
+ }
+ .#{$abbrev}-r-#{$size} {
+ #{$prop}-right: $length-x !important;
+ }
+ .#{$abbrev}-b-#{$size} {
+ #{$prop}-bottom: $length-y !important;
+ }
+ .#{$abbrev}-l-#{$size} {
+ #{$prop}-left: $length-x !important;
+ }
+
+ // Axes
+ .#{$abbrev}-x-#{$size} {
+ #{$prop}-right: $length-x !important;
+ #{$prop}-left: $length-x !important;
+ }
+ .#{$abbrev}-y-#{$size} {
+ #{$prop}-top: $length-y !important;
+ #{$prop}-bottom: $length-y !important;
+ }
+ }
+}
diff --git a/public/sass/_grafana.scss b/public/sass/_grafana.scss
index b59b8903c9a..f19901dc014 100644
--- a/public/sass/_grafana.scss
+++ b/public/sass/_grafana.scss
@@ -13,12 +13,10 @@
@import 'base/type';
@import 'base/forms';
@import 'base/grid';
-@import 'base/fonts';
-@import 'base/code';
+@import 'base/font_awesome';
// UTILS
@import 'utils/utils';
-@import 'utils/spacings';
@import 'utils/widths';
// COMPONENTS
@@ -33,7 +31,6 @@
@import 'components/dropdown';
@import 'components/infobox';
@import 'components/query_editor';
-@import 'components/tabbed_view';
@import 'components/query_part';
@import 'components/json_explorer';
@import 'components/dashboard_grid';
diff --git a/public/sass/base/_code.scss b/public/sass/base/_code.scss
deleted file mode 100644
index 92a34ebbede..00000000000
--- a/public/sass/base/_code.scss
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// Code (inline and blocK)
-// --------------------------------------------------
-
-// Inline and block code styles
-code,
-pre {
- @include font-family-monospace();
- font-size: $font-size-base - 2;
- background-color: $code-tag-bg;
- color: $text-color;
- border: 1px solid $code-tag-border;
- border-radius: 4px;
-}
-
-// Inline code
-code {
- color: $text-color;
- white-space: nowrap;
- padding: 2px 5px;
- margin: 0 2px;
-}
-
-code.code--small {
- font-size: $font-size-xs;
- padding: $space-xxs;
- margin: 0 2px;
-}
-
-// Blocks of code
-pre {
- display: block;
- margin: 0 0 $line-height-base;
- line-height: $line-height-base;
- word-break: break-all;
- word-wrap: break-word;
- white-space: pre;
- white-space: pre-wrap;
- background-color: $code-tag-bg;
- padding: 10px;
-
- &.pre--no-style {
- background: transparent;
- border: none;
- padding: 0px;
- }
-
- // Make prettyprint styles more spaced out for readability
- &.prettyprint {
- margin-bottom: $line-height-base;
- }
-
- // Account for some code outputs that place code tags in pre tags
- code {
- padding: 0;
- color: inherit;
- white-space: pre;
- white-space: pre-wrap;
- background-color: transparent;
- border: 0;
- }
-}
diff --git a/public/sass/base/_fonts.scss b/public/sass/base/_fonts.scss
deleted file mode 100644
index f38a1bdd829..00000000000
--- a/public/sass/base/_fonts.scss
+++ /dev/null
@@ -1,49 +0,0 @@
-@import 'font_awesome';
-
-/* latin */
-@font-face {
- font-family: 'Roboto Mono';
- font-style: normal;
- font-weight: 400;
- font-display: swap;
- src: url(#{$font-file-path}/roboto/L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSh0mQ.woff2)
- format('woff2');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
- U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
-}
-
-/* latin */
-@font-face {
- font-family: 'Roboto Mono';
- font-style: normal;
- font-weight: 500;
- font-display: swap;
- src: url(#{$font-file-path}/roboto/L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSh0mQ.woff2)
- format('woff2');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
- U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
-}
-
-/*
-To add new variations/version of Inter, download from https://rsms.me/inter/ and add the
-web font files to the public/fonts/inter folder. Do not download the fonts from Google Fonts
-or somewhere else because they don't support the features we require (like tabular numerals).
-
-If adding additional weights, consider switching to the InterVariable variable font as combined
-it may take less space than multiple static weights.
-*/
-@font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 400;
- font-display: swap;
- src: url('#{$font-file-path}/inter/Inter-Regular.woff2') format('woff2');
-}
-
-@font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 500;
- font-display: swap;
- src: url('#{$font-file-path}/inter/Inter-Medium.woff2') format('woff2');
-}
diff --git a/public/sass/components/_tabbed_view.scss b/public/sass/components/_tabbed_view.scss
deleted file mode 100644
index 48b90642ed7..00000000000
--- a/public/sass/components/_tabbed_view.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-.section-heading {
- font-size: $font-size-md;
- margin-bottom: $space-sm;
-}
diff --git a/public/sass/utils/_spacings.scss b/public/sass/utils/_spacings.scss
deleted file mode 100644
index 5648e379077..00000000000
--- a/public/sass/utils/_spacings.scss
+++ /dev/null
@@ -1,50 +0,0 @@
-@use 'sass:map';
-// Margin and Padding
-
-.m-x-auto {
- margin-right: auto !important;
- margin-left: auto !important;
-}
-
-@each $prop, $abbrev in (margin: m, padding: p) {
- @each $size, $lengths in $spacers {
- $length-x: map.get($lengths, x);
- $length-y: map.get($lengths, y);
-
- .#{$abbrev}-a-#{$size} {
- #{$prop}: $length-y $length-x !important;
- } // a = All sides
- .#{$abbrev}-t-#{$size} {
- #{$prop}-top: $length-y !important;
- }
- .#{$abbrev}-r-#{$size} {
- #{$prop}-right: $length-x !important;
- }
- .#{$abbrev}-b-#{$size} {
- #{$prop}-bottom: $length-y !important;
- }
- .#{$abbrev}-l-#{$size} {
- #{$prop}-left: $length-x !important;
- }
-
- // Axes
- .#{$abbrev}-x-#{$size} {
- #{$prop}-right: $length-x !important;
- #{$prop}-left: $length-x !important;
- }
- .#{$abbrev}-y-#{$size} {
- #{$prop}-top: $length-y !important;
- #{$prop}-bottom: $length-y !important;
- }
- }
-}
-
-// Positioning
-
-.pos-f-t {
- position: fixed;
- top: 0;
- right: 0;
- left: 0;
- z-index: $zindex-navbar-fixed;
-}