-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add monitor edit and add pages * remove unused imports * remove unexpected console log * remove unused values Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Dominique Clarke <[email protected]>
- Loading branch information
1 parent
f32d326
commit e995ad5
Showing
20 changed files
with
620 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
.../plugins/uptime/public/components/fleet_package/contexts/synthetics_context_providers.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { HTTPFields, TCPFields, ICMPFields, BrowserFields, ITLSFields, DataStream } from '../types'; | ||
import { | ||
PolicyConfigContextProvider, | ||
TCPContextProvider, | ||
ICMPSimpleFieldsContextProvider, | ||
HTTPContextProvider, | ||
BrowserContextProvider, | ||
TLSFieldsContextProvider, | ||
} from '.'; | ||
|
||
interface Props { | ||
children: React.ReactNode; | ||
httpDefaultValues?: HTTPFields; | ||
tcpDefaultValues?: TCPFields; | ||
icmpDefaultValues?: ICMPFields; | ||
browserDefaultValues?: BrowserFields; | ||
tlsDefaultValues?: ITLSFields; | ||
policyDefaultValues?: { | ||
defaultMonitorType: DataStream; | ||
defaultIsTLSEnabled: boolean; | ||
defaultIsZipUrlTLSEnabled: boolean; | ||
defaultName?: string; | ||
defaultLocations?: string[]; | ||
isEditable: boolean; | ||
}; | ||
} | ||
|
||
export const SyntheticsProviders = ({ | ||
children, | ||
httpDefaultValues, | ||
tcpDefaultValues, | ||
icmpDefaultValues, | ||
browserDefaultValues, | ||
tlsDefaultValues, | ||
policyDefaultValues, | ||
}: Props) => { | ||
return ( | ||
<PolicyConfigContextProvider {...(policyDefaultValues || {})}> | ||
<HTTPContextProvider defaultValues={httpDefaultValues}> | ||
<TCPContextProvider defaultValues={tcpDefaultValues}> | ||
<TLSFieldsContextProvider defaultValues={tlsDefaultValues}> | ||
<ICMPSimpleFieldsContextProvider defaultValues={icmpDefaultValues}> | ||
<BrowserContextProvider defaultValues={browserDefaultValues}> | ||
{children} | ||
</BrowserContextProvider> | ||
</ICMPSimpleFieldsContextProvider> | ||
</TLSFieldsContextProvider> | ||
</TCPContextProvider> | ||
</HTTPContextProvider> | ||
</PolicyConfigContextProvider> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
x-pack/plugins/uptime/public/components/monitor_management/formatters/browser.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { BrowserFields, ConfigKeys } from '../../fleet_package/types'; | ||
import { Formatter, commonFormatters, objectFormatter, arrayFormatter } from './common'; | ||
|
||
export type BrowserFormatMap = Record<keyof BrowserFields, Formatter>; | ||
|
||
export const browserFormatters: BrowserFormatMap = { | ||
[ConfigKeys.METADATA]: (fields) => objectFormatter(fields[ConfigKeys.METADATA]), | ||
[ConfigKeys.SOURCE_ZIP_URL]: null, | ||
[ConfigKeys.SOURCE_ZIP_USERNAME]: null, | ||
[ConfigKeys.SOURCE_ZIP_PASSWORD]: null, | ||
[ConfigKeys.SOURCE_ZIP_FOLDER]: null, | ||
[ConfigKeys.SOURCE_ZIP_PROXY_URL]: null, | ||
[ConfigKeys.SOURCE_INLINE]: null, | ||
[ConfigKeys.PARAMS]: null, | ||
[ConfigKeys.SCREENSHOTS]: null, | ||
[ConfigKeys.SYNTHETICS_ARGS]: (fields) => null, | ||
[ConfigKeys.ZIP_URL_TLS_CERTIFICATE_AUTHORITIES]: null, | ||
[ConfigKeys.ZIP_URL_TLS_CERTIFICATE]: null, | ||
[ConfigKeys.ZIP_URL_TLS_KEY]: null, | ||
[ConfigKeys.ZIP_URL_TLS_KEY_PASSPHRASE]: null, | ||
[ConfigKeys.ZIP_URL_TLS_VERIFICATION_MODE]: null, | ||
[ConfigKeys.ZIP_URL_TLS_VERSION]: (fields) => | ||
arrayFormatter(fields[ConfigKeys.ZIP_URL_TLS_VERSION]), | ||
[ConfigKeys.JOURNEY_FILTERS_MATCH]: null, | ||
[ConfigKeys.JOURNEY_FILTERS_TAGS]: null, | ||
[ConfigKeys.IGNORE_HTTPS_ERRORS]: null, | ||
...commonFormatters, | ||
}; |
Oops, something went wrong.