-
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.
[APM] Show prompt when service map is disabled (#152100)
Closes #151971 It is possible to disable the service map via `xpack.apm.serviceMapEnabled: false`. Previously the UI would handle this very ungracefully by showing a 404 error toast when navigating to the service map. This improves the situation by showing a more user friendly prompt: 
- Loading branch information
Showing
2 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
x-pack/plugins/apm/public/components/app/service_map/disabled_prompt.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,34 @@ | ||
/* | ||
* 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 { EuiEmptyPrompt } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import React from 'react'; | ||
|
||
export function DisabledPrompt() { | ||
return ( | ||
<EuiEmptyPrompt | ||
iconType="eyeClosed" | ||
iconColor="subdued" | ||
title={ | ||
<h2> | ||
{i18n.translate('xpack.apm.serviceMap.disabledTitle', { | ||
defaultMessage: 'Service map is disabled', | ||
})} | ||
</h2> | ||
} | ||
body={ | ||
<p> | ||
{i18n.translate('xpack.apm.serviceMap.disabledDescription', { | ||
defaultMessage: | ||
'The service map has been disabled. It can be enabled via `xpack.apm.serviceMapEnabled`', | ||
})} | ||
</p> | ||
} | ||
/> | ||
); | ||
} |
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