-
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.
Merge branch 'main' into fleet/173048-dot-notation-secret-var-names
- Loading branch information
Showing
29 changed files
with
646 additions
and
39 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
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
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
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
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
49 changes: 49 additions & 0 deletions
49
...rvability/public/components/slo/reset_confirmation_modal/slo_reset_confirmation_modal.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,49 @@ | ||
/* | ||
* 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 { EuiConfirmModal } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { SLOResponse, SLOWithSummaryResponse } from '@kbn/slo-schema'; | ||
import React from 'react'; | ||
|
||
export interface SloResetConfirmationModalProps { | ||
slo: SLOWithSummaryResponse | SLOResponse; | ||
onCancel: () => void; | ||
onConfirm: () => void; | ||
} | ||
|
||
export function SloResetConfirmationModal({ | ||
slo, | ||
onCancel, | ||
onConfirm, | ||
}: SloResetConfirmationModalProps) { | ||
const { name } = slo; | ||
return ( | ||
<EuiConfirmModal | ||
buttonColor="danger" | ||
data-test-subj="sloResetConfirmationModal" | ||
title={i18n.translate('xpack.observability.slo.resetConfirmationModal.title', { | ||
defaultMessage: 'Reset {name}?', | ||
values: { name }, | ||
})} | ||
cancelButtonText={i18n.translate( | ||
'xpack.observability.slo.resetConfirmationModal.cancelButtonLabel', | ||
{ defaultMessage: 'Cancel' } | ||
)} | ||
confirmButtonText={i18n.translate( | ||
'xpack.observability.slo.resetConfirmationModal.resetButtonLabel', | ||
{ defaultMessage: 'Reset' } | ||
)} | ||
onCancel={onCancel} | ||
onConfirm={onConfirm} | ||
> | ||
{i18n.translate('xpack.observability.slo.resetConfirmationModal.descriptionText', { | ||
defaultMessage: 'Resetting this SLO will also regenerate the historical data.', | ||
})} | ||
</EuiConfirmModal> | ||
); | ||
} |
62 changes: 62 additions & 0 deletions
62
x-pack/plugins/observability/public/components/slo/slo_outdated_callout/index.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,62 @@ | ||
/* | ||
* 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 { EuiButton, EuiCallOut } from '@elastic/eui'; | ||
import React from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import { useFetchSloDefinitions } from '../../../hooks/slo/use_fetch_slo_definitions'; | ||
import { useKibana } from '../../../utils/kibana_react'; | ||
import { paths } from '../../../../common/locators/paths'; | ||
|
||
export function SloOutdatedCallout() { | ||
const { | ||
application: { navigateToUrl }, | ||
http: { basePath }, | ||
} = useKibana().services; | ||
|
||
const handleClick = () => { | ||
navigateToUrl(basePath.prepend(paths.observability.slosOutdatedDefinitions)); | ||
}; | ||
|
||
const { isLoading, data } = useFetchSloDefinitions({ includeOutdatedOnly: true }); | ||
if (!isLoading && data && data.total > 0) { | ||
return ( | ||
<EuiCallOut | ||
color="warning" | ||
iconType="warning" | ||
title={i18n.translate('xpack.observability.slo.outdatedSloCallout.title', { | ||
defaultMessage: '{total} Outdated SLOs Detected', | ||
values: { | ||
total: data.total, | ||
}, | ||
})} | ||
> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.observability.slo.outdatedSloCallout.message" | ||
defaultMessage="We've noticed that you have {total} outdated SLO definitions, these SLOs will not be running or alerting until you've reset them. Please click the button below to review the SLO definitions; you can choose to either reset the SLO definition or remove it." | ||
values={{ total: data.total }} | ||
/> | ||
</p> | ||
<p> | ||
<EuiButton | ||
color="warning" | ||
data-test-subj="o11ySloOutdatedCalloutViewOutdatedSloDefinitionsButton" | ||
fill | ||
onClick={handleClick} | ||
> | ||
<FormattedMessage | ||
id="xpack.observability.outdatedSloCallout.buttonLabel" | ||
defaultMessage="Review Outdated SLO Definitions" | ||
/> | ||
</EuiButton> | ||
</p> | ||
</EuiCallOut> | ||
); | ||
} | ||
return null; | ||
} |
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
Oops, something went wrong.