forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Synthetics] Improve is allowed UX (elastic#183953)
## Summary Improve isAllowed UX !! When account is blocked, we will show the callout and disable creating monitors in cloud you can test the PR in two ways either by returning isServiceAllowed false manually from the code or by disabling account in synthetics service. ### Test cases - [ ] Account block should only impact when user is on cloud and manifest url is set - [ ] User shouldn't be able to create monitors in the UI - [ ] Call out is shown on add/edit pages as well <img width="1723" alt="image" src="https://github.com/elastic/kibana/assets/3505601/5dd4b8a6-8851-40dc-beab-6f2f0e551ca2">
- Loading branch information
Showing
39 changed files
with
247 additions
and
239 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
69 changes: 0 additions & 69 deletions
69
.../synthetics/public/apps/synthetics/components/common/wrappers/service_allowed_wrapper.tsx
This file was deleted.
Oops, something went wrong.
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
42 changes: 42 additions & 0 deletions
42
...ic/apps/synthetics/components/monitor_add_edit/steps/can_use_public_locations_callout.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,42 @@ | ||
/* | ||
* 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 { EuiCallOut, EuiSpacer } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
|
||
export const CanUsePublicLocationsCallout = ({ | ||
canUsePublicLocations, | ||
}: { | ||
canUsePublicLocations?: boolean; | ||
}) => { | ||
if (!canUsePublicLocations) { | ||
return ( | ||
<> | ||
<EuiCallOut | ||
color="warning" | ||
title={ | ||
<FormattedMessage | ||
id="xpack.synthetics.publicLocations.readOnly.callout.title" | ||
defaultMessage="You do not have permission to use Elastic managed locations" | ||
/> | ||
} | ||
iconType="alert" | ||
> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.synthetics.publicLocations.readOnly.callout.content" | ||
defaultMessage="This monitor contains a Elastic managed location. To edit this monitor, you need to have permission to use Elastic managed locations." | ||
/> | ||
</p> | ||
</EuiCallOut> | ||
<EuiSpacer size="m" /> | ||
</> | ||
); | ||
} | ||
|
||
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
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.