From badd2b35f287ba3ac36e597f732bb19320a6cdb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Louv-Jansen?= Date: Wed, 13 Jan 2021 19:00:01 +0100 Subject: [PATCH] =?UTF-8?q?[APM]=20Hide=20=E2=80=9CCreate=20configuration?= =?UTF-8?q?=E2=80=9D=20for=20users=20without=20write=20access=20(#88149)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [APM] Hide “Create configuration” for read-only user * also hide description * disable create button * fix ts error for EuiButton --- .../AgentConfigurations/List/index.tsx | 49 +++++++++++-------- .../app/Settings/ApmIndices/index.tsx | 2 +- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx b/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx index 9f3a65583ddb..23f688e66966 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/List/index.tsx @@ -61,29 +61,38 @@ export function AgentConfigurationList({ status, data, refetch }: Props) { } body={ - <> -

- {i18n.translate( - 'xpack.apm.agentConfig.configTable.emptyPromptText', - { - defaultMessage: - "Let's change that! You can fine-tune agent configuration directly from Kibana without having to redeploy. Get started by creating your first configuration.", - } - )} -

- +

+ {i18n.translate('xpack.apm.agentConfig.configTable.emptyPromptText', { + defaultMessage: + "Let's change that! You can fine-tune agent configuration directly from Kibana without having to redeploy. Get started by creating your first configuration.", + })} +

} actions={ - - {i18n.translate( - 'xpack.apm.agentConfig.configTable.createConfigButtonLabel', - { defaultMessage: 'Create configuration' } - )} - + + {i18n.translate( + 'xpack.apm.agentConfig.configTable.createConfigButtonLabel', + { defaultMessage: 'Create configuration' } + )} + + } /> ); diff --git a/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx b/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx index ba08af32d65b..8c10b96c51ce 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/ApmIndices/index.tsx @@ -248,7 +248,7 @@ export function ApmIndices() { fill onClick={handleApplyChangesEvent} isLoading={isSaving} - disabled={!canSave} + isDisabled={!canSave} > {i18n.translate( 'xpack.apm.settings.apmIndices.applyButton',