Chore: Upgrade typescript to 4.1 (#29493)

* Chore: Upgrade typescript to 4.1
This commit is contained in:
kay delaney 2020-12-03 15:05:59 +00:00 committed by GitHub
parent 562a1c36b1
commit 56db402d0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 342 additions and 317 deletions

View File

@ -185,9 +185,9 @@
"style-loader": "1.1.3",
"terser-webpack-plugin": "2.3.5",
"ts-jest": "26.4.4",
"ts-node": "8.8.1",
"tslib": "2.0.1",
"typescript": "4.0.2",
"ts-node": "9.0.0",
"tslib": "2.0.3",
"typescript": "4.1.2",
"webpack": "4.41.5",
"webpack-bundle-analyzer": "3.6.0",
"webpack-cleanup-plugin": "0.5.1",

View File

@ -53,6 +53,6 @@
"rollup-plugin-typescript2": "0.26.0",
"rollup-plugin-visualizer": "3.3.1",
"sinon": "8.1.1",
"typescript": "4.0.2"
"typescript": "4.1.2"
}
}

View File

@ -160,7 +160,7 @@ export const getFieldDisplayValues = (options: GetFieldDisplayValuesOptions): Fi
});
values.push({
name,
name: '',
field: config,
display: displayValue,
view,

View File

@ -36,14 +36,14 @@
"rollup-plugin-typescript2": "0.26.0",
"rollup-plugin-visualizer": "3.3.1",
"ts-loader": "6.2.1",
"ts-node": "8.8.1"
"ts-node": "9.0.0"
},
"types": "src/index.ts",
"dependencies": {
"@grafana/tsconfig": "^1.0.0-rc1",
"commander": "5.0.0",
"execa": "4.0.0",
"typescript": "4.0.2",
"typescript": "4.1.2",
"yaml": "^1.8.3"
}
}

View File

@ -54,7 +54,7 @@
"execa": "4.0.0",
"resolve-as-bin": "2.1.0",
"ts-loader": "6.2.1",
"typescript": "4.0.2",
"typescript": "4.1.2",
"yaml": "^1.8.3"
}
}

View File

@ -41,7 +41,7 @@
"rollup-plugin-terser": "5.3.0",
"rollup-plugin-typescript2": "0.26.0",
"rollup-plugin-visualizer": "3.3.1",
"typescript": "4.0.2"
"typescript": "4.1.2"
},
"types": "src/index.ts"
}

View File

@ -103,9 +103,9 @@
"terser-webpack-plugin": "2.3.5",
"ts-jest": "26.4.4",
"ts-loader": "6.2.1",
"ts-node": "8.8.1",
"tslib": "2.0.1",
"typescript": "4.0.2",
"ts-node": "9.0.0",
"tslib": "2.0.3",
"typescript": "4.1.2",
"url-loader": "^2.0.1",
"webpack": "4.41.5"
},

View File

@ -22,7 +22,7 @@ const compile = () =>
const savePackage = ({ path, pkg }: { path: string; pkg: {} }) =>
useSpinner('Updating package.json', async () => {
new Promise((resolve, reject) => {
new Promise<void>((resolve, reject) => {
fs.writeFile(path, JSON.stringify(pkg, null, 2), err => {
if (err) {
reject(err);
@ -61,7 +61,7 @@ const copyFiles = () => {
return useSpinner(`Moving ${files.join(', ')} files`, async () => {
const promises = files.map(file => {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
const basedir = path.dirname(`${distDir}/${file}`);
if (!fs.existsSync(basedir)) {
fs.mkdirSync(basedir, { recursive: true });
@ -85,7 +85,7 @@ const copySassFiles = () => {
return useSpinner(`Copy scss files ${files.join(', ')} files`, async () => {
const sassDir = path.resolve(cwd, '../../public/sass/');
const promises = files.map(file => {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
const name = file.replace('.generated', '');
fs.copyFile(`${sassDir}/${file}`, `${distDir}/sass/${name}`, err => {
if (err) {

View File

@ -111,7 +111,7 @@
"rollup-plugin-visualizer": "4.2.0",
"storybook-dark-mode": "1.0.3",
"ts-loader": "8.0.11",
"typescript": "4.0.2",
"typescript": "4.1.2",
"webpack-filter-warnings-plugin": "1.2.1"
},
"types": "src/index.ts"

View File

@ -4,11 +4,11 @@ exports[`FormField should render component with custom inputEl 1`] = `
<div
className="form-field"
>
<Component
<FormLabel
width={11}
>
Test
</Component>
</FormLabel>
<span>
Input
</span>
@ -22,11 +22,11 @@ exports[`FormField should render component with default inputEl 1`] = `
<div
className="form-field"
>
<Component
<FormLabel
width={11}
>
Test
</Component>
</FormLabel>
<input
className="gf-form-input width-12"
onChange={[MockFunction]}

View File

@ -197,7 +197,7 @@ export const AsyncValidation = () => {
const validateAsync = (shouldPass: boolean) => async () => {
try {
await new Promise<ValidateResult>((resolve, reject) => {
await new Promise<ValidateResult | void>((resolve, reject) => {
setTimeout(() => {
if (shouldPass) {
resolve();

View File

@ -1,10 +1,13 @@
import { SelectableValue } from '@grafana/data';
import { SelectOptions } from './types';
import { SelectableOptGroup } from './types';
/**
* Normalize the value format to SelectableValue[] | []. Only used for single select
*/
export const cleanValue = (value: any, options: SelectOptions): SelectableValue[] | [] => {
export const cleanValue = (
value: any,
options: Array<SelectableValue | SelectableOptGroup | SelectableOptGroup[]>
): SelectableValue[] | [] => {
if (Array.isArray(value)) {
return value.filter(Boolean);
}
@ -23,7 +26,10 @@ export const cleanValue = (value: any, options: SelectOptions): SelectableValue[
/**
* Find the label for a string|number value inside array of options or optgroups
*/
export const findSelectedValue = (value: string | number, options: SelectOptions): SelectableValue | null => {
export const findSelectedValue = (
value: string | number,
options: Array<SelectableValue | SelectableOptGroup | SelectableOptGroup[]>
): SelectableValue | null => {
for (const option of options) {
if ('options' in option) {
let found = findSelectedValue(value, option.options);

View File

@ -13,7 +13,7 @@ interface DemoBoxProps {
const DemoBox: FC<DemoBoxProps> = ({ bg, border, children }) => {
const style = cx(
css`
padding: 16px 32px;
padding: 32px 32px 16px 32px;
background: ${bg};
width: 100%;
`,
@ -24,18 +24,7 @@ const DemoBox: FC<DemoBoxProps> = ({ bg, border, children }) => {
: null
);
return (
<div className={style}>
<div
className={css`
padding-bottom: 16px;
`}
>
{name}
</div>
{children}
</div>
);
return <div className={style}>{children}</div>;
};
const DemoText: FC<{ color?: string; bold?: boolean; size?: number }> = ({ color, bold, size, children }) => {

View File

@ -57,7 +57,7 @@ exports[`TimePickerContent renders correctly in full screen 1`] = `
}
visible={false}
/>
<Component
<TimeRangeList
onSelect={[Function]}
options={Array []}
timeZone="utc"
@ -76,7 +76,7 @@ exports[`TimePickerContent renders correctly in full screen 1`] = `
<div
className="css-1ogeuxc"
/>
<Component
<TimeRangeList
onSelect={[Function]}
options={Array []}
timeZone="utc"
@ -94,7 +94,7 @@ exports[`TimePickerContent renders correctly in full screen 1`] = `
/>
</CustomScrollbar>
</div>
<Component
<TimePickerFooter
onChangeTimeZone={[Function]}
timeZone="utc"
/>
@ -158,7 +158,7 @@ exports[`TimePickerContent renders correctly in narrow screen 1`] = `
}
visible={true}
/>
<Component
<TimeRangeList
onSelect={[Function]}
options={Array []}
timeZone="utc"
@ -177,7 +177,7 @@ exports[`TimePickerContent renders correctly in narrow screen 1`] = `
<div
className="css-1ogeuxc"
/>
<Component
<TimeRangeList
onSelect={[Function]}
options={Array []}
timeZone="utc"
@ -325,7 +325,7 @@ exports[`TimePickerContent renders recent absolute ranges correctly 1`] = `
}
visible={false}
/>
<Component
<TimeRangeList
onSelect={[Function]}
options={Array []}
timeZone="utc"
@ -344,7 +344,7 @@ exports[`TimePickerContent renders recent absolute ranges correctly 1`] = `
<div
className="css-1ogeuxc"
/>
<Component
<TimeRangeList
onSelect={[Function]}
options={Array []}
timeZone="utc"
@ -362,7 +362,7 @@ exports[`TimePickerContent renders recent absolute ranges correctly 1`] = `
/>
</CustomScrollbar>
</div>
<Component
<TimePickerFooter
onChangeTimeZone={[Function]}
timeZone="utc"
/>

View File

@ -11,7 +11,7 @@
"devDependencies": {
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.2.0",
"typescript": "4.0.2"
"typescript": "4.1.2"
},
"dependencies": {
"@grafana/data": "7.4.0-pre.0",

View File

@ -7,7 +7,7 @@ exports[`Render should render component 1`] = `
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input width-20"
labelClassName="gf-form--has-input-icon"
onChange={[MockFunction]}

View File

@ -57,7 +57,7 @@ describe('CustomEndpointTransport', () => {
expect(fetchSpy).toHaveBeenCalledTimes(1);
// wait out the retry-after and call again - great success
await new Promise(resolve => setTimeout(() => resolve(), 1001));
await new Promise(resolve => setTimeout(() => resolve(null), 1001));
await expect(transport.sendEvent(event)).resolves.toBeTruthy();
expect(fetchSpy).toHaveBeenCalledTimes(2);
});

View File

@ -13,7 +13,7 @@ exports[`Render should render alert rules 1`] = `
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input"
labelClassName="gf-form--has-input-icon gf-form--grow"
onChange={[Function]}
@ -145,7 +145,7 @@ exports[`Render should render component 1`] = `
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input"
labelClassName="gf-form--has-input-icon gf-form--grow"
onChange={[Function]}

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Render should render component 1`] = `
<Component
<LoadingPlaceholder
text="Evaluating rule"
/>
`;

View File

@ -43,7 +43,7 @@ exports[`Render should render CTA if there are no API keys 1`] = `
proTip="Remember you can provide view-only API access to other applications."
title="You haven't added any API Keys yet."
/>
<Component
<SlideDown
in={false}
>
<div
@ -126,11 +126,11 @@ exports[`Render should render CTA if there are no API keys 1`] = `
<div
className="gf-form max-width-21"
>
<Component
<FormLabel
tooltip="The api key life duration. For example 1d if your key is going to last for one day. All the supported units are: s,m,h,d,w,M,y"
>
Time to live
</Component>
</FormLabel>
<Input
className="gf-form-input"
onChange={[Function]}
@ -161,7 +161,7 @@ exports[`Render should render CTA if there are no API keys 1`] = `
</div>
</form>
</div>
</Component>
</SlideDown>
</PageContents>
</Page>
`;

View File

@ -15,7 +15,7 @@ exports[`Render should render component 1`] = `
onPasteCopiedPanel={[Function]}
/>
<div>
<Component
<HorizontalGroup
justify="center"
>
<Button
@ -25,7 +25,7 @@ exports[`Render should render component 1`] = `
>
Convert to row
</Button>
</Component>
</HorizontalGroup>
</div>
</div>
</div>

View File

@ -337,22 +337,22 @@ exports[`DashboardPage Dashboard is fetching slowly Should render slow init stat
<div
className="dashboard-loading__text"
>
<Component
<VerticalGroup
spacing="md"
>
<Component
<HorizontalGroup
align="center"
justify="center"
spacing="xs"
>
<Component
<Spinner
inline={true}
/>
Fetching
</Component>
</HorizontalGroup>
<Component
<HorizontalGroup
align="center"
justify="center"
>
@ -364,8 +364,8 @@ exports[`DashboardPage Dashboard is fetching slowly Should render slow init stat
>
Cancel loading dashboard
</Button>
</Component>
</Component>
</HorizontalGroup>
</VerticalGroup>
</div>
</div>
`;

View File

@ -16,11 +16,11 @@ exports[`Render should render component 1`] = `
}
}
>
<Component
<FormLabel
tooltip="The name is used when you select the data source in panels. The Default data source is preselected in new panels."
>
Name
</Component>
</FormLabel>
<Input
aria-label="Data source settings page name input field"
className="gf-form-input max-width-23"

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ErrorContainer should render component 1`] = `
<Component
<FadeIn
duration={100}
in={true}
>
@ -29,5 +29,5 @@ exports[`ErrorContainer should render component 1`] = `
</div>
</div>
</div>
</Component>
</FadeIn>
`;

View File

@ -37,7 +37,7 @@ exports[`Explore should render component 1`] = `
richHistoryButtonActive={false}
/>
</div>
<Component
<ErrorContainer
queryError={Object {}}
/>
<AutoSizer

View File

@ -9,12 +9,12 @@ export abstract class GrafanaLiveScope {
/**
* Load the real namespaces
*/
abstract async getChannelSupport(namespace: string): Promise<LiveChannelSupport | undefined>;
abstract getChannelSupport(namespace: string): Promise<LiveChannelSupport | undefined>;
/**
* List the possible values within this scope
*/
abstract async listNamespaces(): Promise<Array<SelectableValue<string>>>;
abstract listNamespaces(): Promise<Array<SelectableValue<string>>>;
}
export interface CoreGrafanaLiveFeature {

View File

@ -14,7 +14,7 @@ export const getDashboardNavModel = (state: StoreState): NavModel => {
}
// This needs to be copied to avoid mutating the store in a selector
nav.main.children = [...navModel.main.children];
nav.main.children = [...(navModel.main.children ?? [])];
for (const item of nav.main.children) {
item.active = false;

View File

@ -35,7 +35,7 @@ exports[`Render should render organization and preferences 1`] = `
<PageContents
isLoading={false}
>
<Component>
<VerticalGroup>
<OrgProfile
onSubmit={[Function]}
orgName="Cool org"
@ -43,7 +43,7 @@ exports[`Render should render organization and preferences 1`] = `
<SharedPreferences
resourceUri="org"
/>
</Component>
</VerticalGroup>
</PageContents>
</Page>
`;

View File

@ -44,7 +44,7 @@ export class PluginDashboards extends PureComponent<Props, State> {
const { dashboards } = this.state;
return this.import(dashboards[index], true).then(() => {
if (index + 1 < dashboards.length) {
return new Promise(resolve => {
return new Promise<void>(resolve => {
setTimeout(() => {
this.importNext(index + 1).then(() => {
resolve();

View File

@ -171,7 +171,6 @@ export class QueryGroupOptionsEditor extends PureComponent<Props, State> {
type="text"
className="width-6"
placeholder="60"
name={name}
spellCheck={false}
onBlur={this.onCacheTimeoutBlur}
defaultValue={options.cacheTimeout ?? ''}
@ -205,7 +204,6 @@ export class QueryGroupOptionsEditor extends PureComponent<Props, State> {
type="number"
className="width-6"
placeholder={`${realMd}`}
name={name}
spellCheck={false}
onBlur={this.onMaxDataPointsBlur}
defaultValue={value}
@ -246,7 +244,6 @@ export class QueryGroupOptionsEditor extends PureComponent<Props, State> {
type="text"
className="width-6"
placeholder={`${minIntervalOnDs}`}
name={name}
spellCheck={false}
onBlur={this.onMinIntervalBlur}
defaultValue={options.minInterval ?? ''}

View File

@ -23,7 +23,7 @@ exports[`Render should render component 1`] = `
className="page-action-bar__spacer"
/>
</div>
<Component
<SlideDown
in={false}
>
<div
@ -68,7 +68,7 @@ exports[`Render should render component 1`] = `
</div>
</form>
</div>
</Component>
</SlideDown>
<EmptyListCTA
buttonIcon="users-alt"
buttonTitle="Add Group"
@ -114,7 +114,7 @@ exports[`Render should render groups table 1`] = `
Add group
</button>
</div>
<Component
<SlideDown
in={false}
>
<div
@ -159,7 +159,7 @@ exports[`Render should render groups table 1`] = `
</div>
</form>
</div>
</Component>
</SlideDown>
<div
className="admin-list-table"
>

View File

@ -41,7 +41,7 @@ exports[`Render should render teams table 1`] = `
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input"
labelClassName="gf-form--has-input-icon gf-form--grow"
onChange={[Function]}
@ -132,7 +132,7 @@ exports[`Render should render teams table 1`] = `
<td
className="text-right"
>
<Component
<DeleteButton
disabled={false}
onConfirm={[Function]}
size="sm"
@ -184,7 +184,7 @@ exports[`Render should render teams table 1`] = `
<td
className="text-right"
>
<Component
<DeleteButton
disabled={false}
onConfirm={[Function]}
size="sm"
@ -236,7 +236,7 @@ exports[`Render should render teams table 1`] = `
<td
className="text-right"
>
<Component
<DeleteButton
disabled={false}
onConfirm={[Function]}
size="sm"
@ -288,7 +288,7 @@ exports[`Render should render teams table 1`] = `
<td
className="text-right"
>
<Component
<DeleteButton
disabled={false}
onConfirm={[Function]}
size="sm"
@ -340,7 +340,7 @@ exports[`Render should render teams table 1`] = `
<td
className="text-right"
>
<Component
<DeleteButton
disabled={false}
onConfirm={[Function]}
size="sm"
@ -376,7 +376,7 @@ exports[`Render when feature toggle editorsCanAdmin is turned on and signedin us
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input"
labelClassName="gf-form--has-input-icon gf-form--grow"
onChange={[Function]}
@ -467,7 +467,7 @@ exports[`Render when feature toggle editorsCanAdmin is turned on and signedin us
<td
className="text-right"
>
<Component
<DeleteButton
disabled={true}
onConfirm={[Function]}
size="sm"
@ -503,7 +503,7 @@ exports[`Render when feature toggle editorsCanAdmin is turned on and signedin us
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input"
labelClassName="gf-form--has-input-icon gf-form--grow"
onChange={[Function]}
@ -594,7 +594,7 @@ exports[`Render when feature toggle editorsCanAdmin is turned on and signedin us
<td
className="text-right"
>
<Component
<DeleteButton
disabled={true}
onConfirm={[Function]}
size="sm"

View File

@ -21,7 +21,7 @@ exports[`Render should render team members when sync enabled 1`] = `
<td>
testName
</td>
<Component
<WithFeatureToggle
featureToggle={false}
>
<td
@ -35,7 +35,7 @@ exports[`Render should render team members when sync enabled 1`] = `
</span>
</div>
</td>
</Component>
</WithFeatureToggle>
<td>
<TagBadge
count={0}
@ -48,7 +48,7 @@ exports[`Render should render team members when sync enabled 1`] = `
<td
className="text-right"
>
<Component
<DeleteButton
disabled={true}
onConfirm={[Function]}
size="sm"
@ -78,7 +78,7 @@ exports[`Render when feature toggle editorsCanAdmin is turned off should not ren
<td>
testName
</td>
<Component
<WithFeatureToggle
featureToggle={false}
>
<td
@ -134,11 +134,11 @@ exports[`Render when feature toggle editorsCanAdmin is turned off should not ren
/>
</div>
</td>
</Component>
</WithFeatureToggle>
<td
className="text-right"
>
<Component
<DeleteButton
disabled={false}
onConfirm={[Function]}
size="sm"
@ -168,7 +168,7 @@ exports[`Render when feature toggle editorsCanAdmin is turned on should render p
<td>
testName
</td>
<Component
<WithFeatureToggle
featureToggle={true}
>
<td
@ -224,11 +224,11 @@ exports[`Render when feature toggle editorsCanAdmin is turned on should render p
/>
</div>
</td>
</Component>
</WithFeatureToggle>
<td
className="text-right"
>
<Component
<DeleteButton
disabled={false}
onConfirm={[Function]}
size="sm"
@ -258,7 +258,7 @@ exports[`Render when feature toggle editorsCanAdmin is turned on should render s
<td>
testName
</td>
<Component
<WithFeatureToggle
featureToggle={true}
>
<td
@ -272,11 +272,11 @@ exports[`Render when feature toggle editorsCanAdmin is turned on should render s
</span>
</div>
</td>
</Component>
</WithFeatureToggle>
<td
className="text-right"
>
<Component
<DeleteButton
disabled={true}
onConfirm={[Function]}
size="sm"

View File

@ -8,7 +8,7 @@ exports[`Render should render component 1`] = `
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input"
labelClassName="gf-form--has-input-icon gf-form--grow"
onChange={[Function]}
@ -27,7 +27,7 @@ exports[`Render should render component 1`] = `
Add member
</button>
</div>
<Component
<SlideDown
in={false}
>
<div
@ -53,7 +53,7 @@ exports[`Render should render component 1`] = `
/>
</div>
</div>
</Component>
</SlideDown>
<div
className="admin-list-table"
>
@ -72,13 +72,13 @@ exports[`Render should render component 1`] = `
<th>
Name
</th>
<Component
<WithFeatureToggle
featureToggle={false}
>
<th>
Permission
</th>
</Component>
</WithFeatureToggle>
<th
style={
Object {
@ -102,7 +102,7 @@ exports[`Render should render team members 1`] = `
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input"
labelClassName="gf-form--has-input-icon gf-form--grow"
onChange={[Function]}
@ -121,7 +121,7 @@ exports[`Render should render team members 1`] = `
Add member
</button>
</div>
<Component
<SlideDown
in={false}
>
<div
@ -147,7 +147,7 @@ exports[`Render should render team members 1`] = `
/>
</div>
</div>
</Component>
</SlideDown>
<div
className="admin-list-table"
>
@ -166,13 +166,13 @@ exports[`Render should render team members 1`] = `
<th>
Name
</th>
<Component
<WithFeatureToggle
featureToggle={false}
>
<th>
Permission
</th>
</Component>
</WithFeatureToggle>
<th
style={
Object {

View File

@ -44,7 +44,7 @@ exports[`Render should render settings and preferences page 1`] = `
<PageContents
isLoading={true}
>
<Connect(Component) />
<Connect(TeamSettings) />
</PageContents>
</Page>
`;
@ -66,7 +66,7 @@ exports[`Render when feature toggle editorsCanAdmin is turned on should render s
<PageContents
isLoading={true}
>
<Connect(Component) />
<Connect(TeamSettings) />
</PageContents>
</Page>
`;

View File

@ -1,8 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Render should render component 1`] = `
<Component>
<Component
<VerticalGroup>
<FieldSet
label="Team Settings"
>
<Form
@ -20,9 +20,9 @@ exports[`Render should render component 1`] = `
>
<Component />
</Form>
</Component>
</FieldSet>
<SharedPreferences
resourceUri="teams/1"
/>
</Component>
</VerticalGroup>
`;

View File

@ -7,7 +7,7 @@ exports[`Render should render component 1`] = `
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input width-20"
labelClassName="gf-form--has-input-icon"
onChange={[MockFunction]}
@ -28,7 +28,7 @@ exports[`Render should render pending invites button 1`] = `
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input width-20"
labelClassName="gf-form--has-input-icon"
onChange={[MockFunction]}
@ -73,7 +73,7 @@ exports[`Render should show external user management button 1`] = `
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input width-20"
labelClassName="gf-form--has-input-icon"
onChange={[MockFunction]}
@ -99,7 +99,7 @@ exports[`Render should show invite button 1`] = `
<div
className="gf-form gf-form--grow"
>
<Component
<FilterInput
inputClassName="gf-form-input width-20"
labelClassName="gf-form--has-input-icon"
onChange={[MockFunction]}

View File

@ -114,7 +114,7 @@ exports[`Render should render users table 1`] = `
<td
className="width-8"
>
<Component
<OrgRolePicker
onChange={[Function]}
value="Admin"
/>
@ -126,7 +126,7 @@ exports[`Render should render users table 1`] = `
size="sm"
variant="destructive"
/>
<Component
<ConfirmModal
body="Are you sure you want to delete user user-0?"
confirmText="Delete"
isOpen={false}
@ -183,7 +183,7 @@ exports[`Render should render users table 1`] = `
<td
className="width-8"
>
<Component
<OrgRolePicker
onChange={[Function]}
value="Admin"
/>
@ -195,7 +195,7 @@ exports[`Render should render users table 1`] = `
size="sm"
variant="destructive"
/>
<Component
<ConfirmModal
body="Are you sure you want to delete user user-1?"
confirmText="Delete"
isOpen={false}
@ -252,7 +252,7 @@ exports[`Render should render users table 1`] = `
<td
className="width-8"
>
<Component
<OrgRolePicker
onChange={[Function]}
value="Admin"
/>
@ -264,7 +264,7 @@ exports[`Render should render users table 1`] = `
size="sm"
variant="destructive"
/>
<Component
<ConfirmModal
body="Are you sure you want to delete user user-2?"
confirmText="Delete"
isOpen={false}
@ -321,7 +321,7 @@ exports[`Render should render users table 1`] = `
<td
className="width-8"
>
<Component
<OrgRolePicker
onChange={[Function]}
value="Admin"
/>
@ -333,7 +333,7 @@ exports[`Render should render users table 1`] = `
size="sm"
variant="destructive"
/>
<Component
<ConfirmModal
body="Are you sure you want to delete user user-3?"
confirmText="Delete"
isOpen={false}
@ -390,7 +390,7 @@ exports[`Render should render users table 1`] = `
<td
className="width-8"
>
<Component
<OrgRolePicker
onChange={[Function]}
value="Admin"
/>
@ -402,7 +402,7 @@ exports[`Render should render users table 1`] = `
size="sm"
variant="destructive"
/>
<Component
<ConfirmModal
body="Are you sure you want to delete user user-4?"
confirmText="Delete"
isOpen={false}
@ -459,7 +459,7 @@ exports[`Render should render users table 1`] = `
<td
className="width-8"
>
<Component
<OrgRolePicker
onChange={[Function]}
value="Admin"
/>
@ -471,7 +471,7 @@ exports[`Render should render users table 1`] = `
size="sm"
variant="destructive"
/>
<Component
<ConfirmModal
body="Are you sure you want to delete user user-5?"
confirmText="Delete"
isOpen={false}

View File

@ -212,7 +212,7 @@ export const processVariableDependencies = async (variable: VariableModel, state
return;
}
await new Promise(resolve => {
await new Promise<void>(resolve => {
const unsubscribe = store.subscribe(() => {
if (!isWaitingForDependencies(dependencies, store.getState())) {
unsubscribe();

View File

@ -16,12 +16,12 @@ exports[`Render should disable access key id field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Specify which AWS credentials chain to use. AWS SDK Default is the recommended option for EKS, ECS, or if you've attached an IAM role to your EC2 instance."
>
Authentication Provider
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -78,11 +78,11 @@ exports[`Render should disable access key id field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
>
Access Key ID
</Component>
</FormLabel>
<div
className="width-30"
>
@ -100,11 +100,11 @@ exports[`Render should disable access key id field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
>
Secret Access Key
</Component>
</FormLabel>
<div
className="width-30"
>
@ -123,12 +123,12 @@ exports[`Render should disable access key id field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Optionally, specify the ARN of a role to assume. Specifying a role here will ensure that the selected authentication provider is used to assume the specified role rather than using the credentials directly. Leave blank if you don't need to assume a role at all"
>
Assume Role ARN
</Component>
</FormLabel>
<div
className="width-30"
>
@ -146,12 +146,12 @@ exports[`Render should disable access key id field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="If you are assuming a role in another account, that has been created with an external ID, specify the external ID here."
>
External ID
</Component>
</FormLabel>
<div
className="width-30"
>
@ -171,12 +171,12 @@ exports[`Render should disable access key id field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Specify the region, such as for US West (Oregon) use \` us-west-2 \` as the region."
>
Default Region
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -211,12 +211,12 @@ exports[`Render should disable access key id field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Namespaces of Custom Metrics."
>
Custom Metrics
</Component>
</FormLabel>
<Input
className="width-30"
onChange={[Function]}
@ -245,12 +245,12 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Specify which AWS credentials chain to use. AWS SDK Default is the recommended option for EKS, ECS, or if you've attached an IAM role to your EC2 instance."
>
Authentication Provider
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -307,11 +307,11 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
>
Access Key ID
</Component>
</FormLabel>
<div
className="width-30"
>
@ -329,11 +329,11 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
>
Secret Access Key
</Component>
</FormLabel>
<div
className="width-30"
>
@ -352,12 +352,12 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Optionally, specify the ARN of a role to assume. Specifying a role here will ensure that the selected authentication provider is used to assume the specified role rather than using the credentials directly. Leave blank if you don't need to assume a role at all"
>
Assume Role ARN
</Component>
</FormLabel>
<div
className="width-30"
>
@ -375,12 +375,12 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="If you are assuming a role in another account, that has been created with an external ID, specify the external ID here."
>
External ID
</Component>
</FormLabel>
<div
className="width-30"
>
@ -400,12 +400,12 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Specify the region, such as for US West (Oregon) use \` us-west-2 \` as the region."
>
Default Region
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -440,12 +440,12 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Namespaces of Custom Metrics."
>
Custom Metrics
</Component>
</FormLabel>
<Input
className="width-30"
onChange={[Function]}
@ -474,12 +474,12 @@ exports[`Render should show access key and secret access key fields 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Specify which AWS credentials chain to use. AWS SDK Default is the recommended option for EKS, ECS, or if you've attached an IAM role to your EC2 instance."
>
Authentication Provider
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -536,11 +536,11 @@ exports[`Render should show access key and secret access key fields 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
>
Access Key ID
</Component>
</FormLabel>
<div
className="width-30"
>
@ -558,11 +558,11 @@ exports[`Render should show access key and secret access key fields 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
>
Secret Access Key
</Component>
</FormLabel>
<div
className="width-30"
>
@ -581,12 +581,12 @@ exports[`Render should show access key and secret access key fields 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Optionally, specify the ARN of a role to assume. Specifying a role here will ensure that the selected authentication provider is used to assume the specified role rather than using the credentials directly. Leave blank if you don't need to assume a role at all"
>
Assume Role ARN
</Component>
</FormLabel>
<div
className="width-30"
>
@ -604,12 +604,12 @@ exports[`Render should show access key and secret access key fields 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="If you are assuming a role in another account, that has been created with an external ID, specify the external ID here."
>
External ID
</Component>
</FormLabel>
<div
className="width-30"
>
@ -629,12 +629,12 @@ exports[`Render should show access key and secret access key fields 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Specify the region, such as for US West (Oregon) use \` us-west-2 \` as the region."
>
Default Region
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -669,12 +669,12 @@ exports[`Render should show access key and secret access key fields 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Namespaces of Custom Metrics."
>
Custom Metrics
</Component>
</FormLabel>
<Input
className="width-30"
onChange={[Function]}
@ -703,12 +703,12 @@ exports[`Render should show arn role field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Specify which AWS credentials chain to use. AWS SDK Default is the recommended option for EKS, ECS, or if you've attached an IAM role to your EC2 instance."
>
Authentication Provider
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -765,11 +765,11 @@ exports[`Render should show arn role field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
>
Access Key ID
</Component>
</FormLabel>
<div
className="width-30"
>
@ -787,11 +787,11 @@ exports[`Render should show arn role field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
>
Secret Access Key
</Component>
</FormLabel>
<div
className="width-30"
>
@ -810,12 +810,12 @@ exports[`Render should show arn role field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Optionally, specify the ARN of a role to assume. Specifying a role here will ensure that the selected authentication provider is used to assume the specified role rather than using the credentials directly. Leave blank if you don't need to assume a role at all"
>
Assume Role ARN
</Component>
</FormLabel>
<div
className="width-30"
>
@ -833,12 +833,12 @@ exports[`Render should show arn role field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="If you are assuming a role in another account, that has been created with an external ID, specify the external ID here."
>
External ID
</Component>
</FormLabel>
<div
className="width-30"
>
@ -858,12 +858,12 @@ exports[`Render should show arn role field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Specify the region, such as for US West (Oregon) use \` us-west-2 \` as the region."
>
Default Region
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -898,12 +898,12 @@ exports[`Render should show arn role field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Namespaces of Custom Metrics."
>
Custom Metrics
</Component>
</FormLabel>
<Input
className="width-30"
onChange={[Function]}
@ -932,12 +932,12 @@ exports[`Render should show credentials profile name field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Specify which AWS credentials chain to use. AWS SDK Default is the recommended option for EKS, ECS, or if you've attached an IAM role to your EC2 instance."
>
Authentication Provider
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -994,11 +994,11 @@ exports[`Render should show credentials profile name field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
>
Access Key ID
</Component>
</FormLabel>
<div
className="width-30"
>
@ -1016,11 +1016,11 @@ exports[`Render should show credentials profile name field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
>
Secret Access Key
</Component>
</FormLabel>
<div
className="width-30"
>
@ -1039,12 +1039,12 @@ exports[`Render should show credentials profile name field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Optionally, specify the ARN of a role to assume. Specifying a role here will ensure that the selected authentication provider is used to assume the specified role rather than using the credentials directly. Leave blank if you don't need to assume a role at all"
>
Assume Role ARN
</Component>
</FormLabel>
<div
className="width-30"
>
@ -1062,12 +1062,12 @@ exports[`Render should show credentials profile name field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="If you are assuming a role in another account, that has been created with an external ID, specify the external ID here."
>
External ID
</Component>
</FormLabel>
<div
className="width-30"
>
@ -1087,12 +1087,12 @@ exports[`Render should show credentials profile name field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Specify the region, such as for US West (Oregon) use \` us-west-2 \` as the region."
>
Default Region
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -1127,12 +1127,12 @@ exports[`Render should show credentials profile name field 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-14"
tooltip="Namespaces of Custom Metrics."
>
Custom Metrics
</Component>
</FormLabel>
<Input
className="width-30"
onChange={[Function]}

View File

@ -33,12 +33,12 @@ exports[`Render should disable log analytics credentials form 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
tooltip="Choose the default/preferred Workspace for Azure Log Analytics queries."
>
Default Workspace
</Component>
</FormLabel>
<div
className="width-25"
>
@ -129,12 +129,12 @@ exports[`Render should enable azure log analytics load workspaces button 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
tooltip="Choose the default/preferred Workspace for Azure Log Analytics queries."
>
Default Workspace
</Component>
</FormLabel>
<div
className="width-25"
>
@ -225,12 +225,12 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
tooltip="Choose the default/preferred Workspace for Azure Log Analytics queries."
>
Default Workspace
</Component>
</FormLabel>
<div
className="width-25"
>

View File

@ -11,12 +11,12 @@ exports[`Render should disable azure monitor secret input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
tooltip="Choose an Azure Cloud."
>
Azure Cloud
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -76,11 +76,11 @@ exports[`Render should disable azure monitor secret input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Directory (tenant) ID
</Component>
</FormLabel>
<div
className="width-15"
>
@ -99,11 +99,11 @@ exports[`Render should disable azure monitor secret input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Application (client) ID
</Component>
</FormLabel>
<div
className="width-15"
>
@ -122,11 +122,11 @@ exports[`Render should disable azure monitor secret input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Client Secret
</Component>
</FormLabel>
<Input
className="width-25"
disabled={true}
@ -155,11 +155,11 @@ exports[`Render should disable azure monitor secret input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Default Subscription
</Component>
</FormLabel>
<div
className="width-25"
>
@ -228,12 +228,12 @@ exports[`Render should enable azure monitor load subscriptions button 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
tooltip="Choose an Azure Cloud."
>
Azure Cloud
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -293,11 +293,11 @@ exports[`Render should enable azure monitor load subscriptions button 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Directory (tenant) ID
</Component>
</FormLabel>
<div
className="width-15"
>
@ -316,11 +316,11 @@ exports[`Render should enable azure monitor load subscriptions button 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Application (client) ID
</Component>
</FormLabel>
<div
className="width-15"
>
@ -339,11 +339,11 @@ exports[`Render should enable azure monitor load subscriptions button 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Client Secret
</Component>
</FormLabel>
<div
className="width-15"
>
@ -362,11 +362,11 @@ exports[`Render should enable azure monitor load subscriptions button 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Default Subscription
</Component>
</FormLabel>
<div
className="width-25"
>
@ -435,12 +435,12 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
tooltip="Choose an Azure Cloud."
>
Azure Cloud
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -500,11 +500,11 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Directory (tenant) ID
</Component>
</FormLabel>
<div
className="width-15"
>
@ -523,11 +523,11 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Application (client) ID
</Component>
</FormLabel>
<div
className="width-15"
>
@ -546,11 +546,11 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Client Secret
</Component>
</FormLabel>
<div
className="width-15"
>
@ -569,11 +569,11 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Default Subscription
</Component>
</FormLabel>
<div
className="width-25"
>

View File

@ -16,11 +16,11 @@ exports[`Render should disable insights api key input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
API Key
</Component>
</FormLabel>
<Input
className="width-25"
disabled={true}
@ -49,11 +49,11 @@ exports[`Render should disable insights api key input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Application ID
</Component>
</FormLabel>
<div
className="width-15"
>
@ -84,11 +84,11 @@ exports[`Render should enable insights api key input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
API Key
</Component>
</FormLabel>
<div
className="width-15"
>
@ -106,11 +106,11 @@ exports[`Render should enable insights api key input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Application ID
</Component>
</FormLabel>
<div
className="width-15"
>
@ -141,11 +141,11 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
API Key
</Component>
</FormLabel>
<div
className="width-15"
>
@ -163,11 +163,11 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-12"
>
Application ID
</Component>
</FormLabel>
<div
className="width-15"
>

View File

@ -72,7 +72,7 @@ exports[`Render should disable basic auth password input 1`] = `
</div>
</div>
<div>
<Component
<DataSourceHttpSettings
dataSourceConfig={
Object {
"access": "proxy",
@ -117,11 +117,11 @@ exports[`Render should disable basic auth password input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
>
Database
</Component>
</FormLabel>
<div
className="width-20"
>
@ -139,11 +139,11 @@ exports[`Render should disable basic auth password input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
>
User
</Component>
</FormLabel>
<div
className="width-10"
>
@ -177,14 +177,14 @@ exports[`Render should disable basic auth password input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST
method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method
will restrict you and return an error if the query is too large."
>
HTTP Method
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -264,13 +264,13 @@ exports[`Render should disable basic auth password input 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
tooltip="A lower limit for the auto group by time interval. Recommended to be set to write frequency,
for example 1m if your data is written every minute."
>
Min time interval
</Component>
</FormLabel>
<div
className="width-10"
>
@ -360,7 +360,7 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
</div>
</div>
<div>
<Component
<DataSourceHttpSettings
dataSourceConfig={
Object {
"access": "proxy",
@ -405,11 +405,11 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
>
Database
</Component>
</FormLabel>
<div
className="width-20"
>
@ -427,11 +427,11 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
>
User
</Component>
</FormLabel>
<div
className="width-10"
>
@ -465,14 +465,14 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST
method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method
will restrict you and return an error if the query is too large."
>
HTTP Method
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -552,13 +552,13 @@ exports[`Render should hide basic auth fields when switch off 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
tooltip="A lower limit for the auto group by time interval. Recommended to be set to write frequency,
for example 1m if your data is written every minute."
>
Min time interval
</Component>
</FormLabel>
<div
className="width-10"
>
@ -648,7 +648,7 @@ exports[`Render should hide white listed cookies input when browser access chose
</div>
</div>
<div>
<Component
<DataSourceHttpSettings
dataSourceConfig={
Object {
"access": "proxy",
@ -693,11 +693,11 @@ exports[`Render should hide white listed cookies input when browser access chose
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
>
Database
</Component>
</FormLabel>
<div
className="width-20"
>
@ -715,11 +715,11 @@ exports[`Render should hide white listed cookies input when browser access chose
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
>
User
</Component>
</FormLabel>
<div
className="width-10"
>
@ -753,14 +753,14 @@ exports[`Render should hide white listed cookies input when browser access chose
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST
method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method
will restrict you and return an error if the query is too large."
>
HTTP Method
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -840,13 +840,13 @@ exports[`Render should hide white listed cookies input when browser access chose
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
tooltip="A lower limit for the auto group by time interval. Recommended to be set to write frequency,
for example 1m if your data is written every minute."
>
Min time interval
</Component>
</FormLabel>
<div
className="width-10"
>
@ -936,7 +936,7 @@ exports[`Render should render component 1`] = `
</div>
</div>
<div>
<Component
<DataSourceHttpSettings
dataSourceConfig={
Object {
"access": "proxy",
@ -981,11 +981,11 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
>
Database
</Component>
</FormLabel>
<div
className="width-20"
>
@ -1003,11 +1003,11 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
>
User
</Component>
</FormLabel>
<div
className="width-10"
>
@ -1041,14 +1041,14 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
tooltip="You can use either GET or POST HTTP method to query your InfluxDB database. The POST
method allows you to perform heavy requests (with a lots of WHERE clause) while the GET method
will restrict you and return an error if the query is too large."
>
HTTP Method
</Component>
</FormLabel>
<Select
allowCustomValue={false}
autoFocus={false}
@ -1128,13 +1128,13 @@ exports[`Render should render component 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
className="width-10"
tooltip="A lower limit for the auto group by time interval. Recommended to be set to write frequency,
for example 1m if your data is written every minute."
>
Min time interval
</Component>
</FormLabel>
<div
className="width-10"
>

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`LokiExploreQueryEditor should render component 1`] = `
<Component
<LokiQueryField
data={
Object {
"request": Object {

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Render LokiQueryEditor with legend should render 1`] = `
<Component
<LokiQueryField
ExtraFieldElement={
<div
className="gf-form-inline"
@ -9,13 +9,13 @@ exports[`Render LokiQueryEditor with legend should render 1`] = `
<div
className="gf-form"
>
<Unknown
<FormLabel
tooltip="Controls the name of the time series, using name or pattern. For example
{{hostname}} will be replaced with label value for the label hostname. The legend only applies to metric queries."
width={6}
>
Legend
</Unknown>
</FormLabel>
<input
className="gf-form-input"
onBlur={[MockFunction]}
@ -50,7 +50,7 @@ exports[`Render LokiQueryEditor with legend should render 1`] = `
`;
exports[`Render LokiQueryEditor with legend should update timerange 1`] = `
<Component
<LokiQueryField
ExtraFieldElement={
<div
className="gf-form-inline"
@ -58,13 +58,13 @@ exports[`Render LokiQueryEditor with legend should update timerange 1`] = `
<div
className="gf-form"
>
<Unknown
<FormLabel
tooltip="Controls the name of the time series, using name or pattern. For example
{{hostname}} will be replaced with label value for the label hostname. The legend only applies to metric queries."
width={6}
>
Legend
</Unknown>
</FormLabel>
<input
className="gf-form-input"
onBlur={[MockFunction]}

View File

@ -25,13 +25,13 @@ exports[`Render PromQueryEditor with basic options should render 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
tooltip="Controls the name of the time series, using name or pattern. For example
{{hostname}} will be replaced with label value for the label hostname."
width={7}
>
Legend
</Component>
</FormLabel>
<input
className="gf-form-input"
onBlur={[Function]}
@ -44,7 +44,7 @@ exports[`Render PromQueryEditor with basic options should render 1`] = `
<div
className="gf-form"
>
<Component
<FormLabel
tooltip={
<React.Fragment>
An additional lower limit for the step parameter of the Prometheus query and for the
@ -62,7 +62,7 @@ exports[`Render PromQueryEditor with basic options should render 1`] = `
width={7}
>
Min step
</Component>
</FormLabel>
<input
className="gf-form-input width-8"
onBlur={[Function]}
@ -160,7 +160,7 @@ exports[`Render PromQueryEditor with basic options should render 1`] = `
label="Instant"
onChange={[Function]}
/>
<Component
<FormLabel
tooltip="Link to Graph in Prometheus"
width={10}
>
@ -180,7 +180,7 @@ exports[`Render PromQueryEditor with basic options should render 1`] = `
}
}
/>
</Component>
</FormLabel>
</div>
</div>
</div>

View File

@ -52,7 +52,7 @@ function transformSpan(span: ZipkinSpan): TraceSpanData {
type: 'string',
value: span.kind,
},
...jaegerSpan.tags,
...(jaegerSpan.tags ?? []),
];
}

View File

@ -273,7 +273,7 @@ class GraphElement {
const hasLinksValue = hasLinks(field);
if (hasLinksValue) {
// Append the configured links to the panel datalinks
links = [...links, ...field.config.links];
links = [...links, ...field.config.links!];
}
const fieldConfig = {
decimals: yAxisConfig.decimals,

View File

@ -16797,6 +16797,17 @@ jest-util@^24.0.0, jest-util@^24.9.0:
slash "^2.0.0"
source-map "^0.6.0"
jest-util@^25.5.0:
version "25.5.0"
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.5.0.tgz#31c63b5d6e901274d264a4fec849230aa3fa35b0"
integrity sha512-KVlX+WWg1zUTB9ktvhsg2PXZVdkI1NBevOJSkTKYAyXyH4QSvh+Lay/e/v+bmaFfrkfx43xD8QTfgobzlEXdIA==
dependencies:
"@jest/types" "^25.5.0"
chalk "^3.0.0"
graceful-fs "^4.2.4"
is-ci "^2.0.0"
make-dir "^3.0.0"
jest-util@^26.1.0, jest-util@^26.6.2:
version "26.6.2"
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1"
@ -25510,6 +25521,23 @@ ts-jest@26.4.4:
semver "7.x"
yargs-parser "20.x"
ts-jest@26.4.4:
version "26.4.4"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.4.tgz#61f13fb21ab400853c532270e52cc0ed7e502c49"
integrity sha512-3lFWKbLxJm34QxyVNNCgXX1u4o/RV0myvA2y2Bxm46iGIjKlaY0own9gIckbjZJPn+WaJEnfPPJ20HHGpoq4yg==
dependencies:
"@types/jest" "26.x"
bs-logger "0.x"
buffer-from "1.x"
fast-json-stable-stringify "2.x"
jest-util "^26.1.0"
json5 "2.x"
lodash.memoize "4.x"
make-error "1.x"
mkdirp "1.x"
semver "7.x"
yargs-parser "20.x"
ts-loader@6.2.1:
version "6.2.1"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-6.2.1.tgz#67939d5772e8a8c6bdaf6277ca023a4812da02ef"
@ -25532,15 +25560,15 @@ ts-loader@8.0.11:
micromatch "^4.0.0"
semver "^6.0.0"
ts-node@8.8.1:
version "8.8.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.8.1.tgz#7c4d3e9ed33aa703b64b28d7f9d194768be5064d"
integrity sha512-10DE9ONho06QORKAaCBpPiFCdW+tZJuY/84tyypGtl6r+/C7Asq0dhqbRZURuUlLQtZxxDvT8eoj8cGW0ha6Bg==
ts-node@9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.0.0.tgz#e7699d2a110cc8c0d3b831715e417688683460b3"
integrity sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg==
dependencies:
arg "^4.1.0"
diff "^4.0.1"
make-error "^1.1.1"
source-map-support "^0.5.6"
source-map-support "^0.5.17"
yn "3.1.1"
ts-pnp@^1.1.6:
@ -25553,12 +25581,7 @@ tslib@1.10.0, tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
tslib@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e"
integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==
tslib@^2.0.0, tslib@^2.0.1:
tslib@2.0.3, tslib@^2.0.0, tslib@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c"
integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==
@ -25681,6 +25704,11 @@ typescript@4.0.2:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
typescript@4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==
typescript@~3.9.7:
version "3.9.7"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
@ -26968,6 +26996,11 @@ yargs-parser@20.x, yargs-parser@^20.2.2:
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54"
integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==
yargs-parser@20.x:
version "20.2.4"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54"
integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==
yargs-parser@^11.1.1:
version "11.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4"