File tree Expand file tree Collapse file tree 3 files changed +52
-25
lines changed
public/components/app/Settings Expand file tree Collapse file tree 3 files changed +52
-25
lines changed Original file line number Diff line number Diff line change 33 * or more contributor license agreements. Licensed under the Elastic License;
44 * you may not use this file except in compliance with the Elastic License.
55 */
6+ import { EuiToolTip } from '@elastic/eui' ;
67import {
78 EuiButton ,
89 EuiFlexGroup ,
@@ -78,17 +79,30 @@ function CreateConfigurationButton() {
7879 < EuiFlexItem >
7980 < EuiFlexGroup alignItems = "center" justifyContent = "flexEnd" >
8081 < EuiFlexItem grow = { false } >
81- < EuiButton
82- color = "primary"
83- fill
84- iconType = "plusInCircle"
85- href = { href }
86- isDisabled = { ! canSave }
82+ < EuiToolTip
83+ content = {
84+ ! canSave &&
85+ i18n . translate (
86+ 'xpack.apm.agentConfig.configurationsPanelTitle.noPermissionTooltipLabel' ,
87+ {
88+ defaultMessage :
89+ "Your user role doesn't have permissions to create agent configurations" ,
90+ }
91+ )
92+ }
8793 >
88- { i18n . translate ( 'xpack.apm.agentConfig.createConfigButtonLabel' , {
89- defaultMessage : 'Create configuration' ,
90- } ) }
91- </ EuiButton >
94+ < EuiButton
95+ color = "primary"
96+ fill
97+ iconType = "plusInCircle"
98+ href = { href }
99+ isDisabled = { ! canSave }
100+ >
101+ { i18n . translate ( 'xpack.apm.agentConfig.createConfigButtonLabel' , {
102+ defaultMessage : 'Create configuration' ,
103+ } ) }
104+ </ EuiButton >
105+ </ EuiToolTip >
92106 </ EuiFlexItem >
93107 </ EuiFlexGroup >
94108 </ EuiFlexItem >
Original file line number Diff line number Diff line change 33 * or more contributor license agreements. Licensed under the Elastic License;
44 * you may not use this file except in compliance with the Elastic License.
55 */
6- import React from 'react' ;
7- import { EuiButton } from '@elastic/eui' ;
6+ import { EuiButton , EuiToolTip } from '@elastic/eui' ;
87import { i18n } from '@kbn/i18n' ;
8+ import React from 'react' ;
99import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context' ;
1010
1111export function CreateCustomLinkButton ( { onClick } : { onClick : ( ) => void } ) {
1212 const { core } = useApmPluginContext ( ) ;
1313 const canSave = core . application . capabilities . apm . save ;
1414 return (
15- < EuiButton
16- color = "primary"
17- fill
18- iconType = "plusInCircle"
19- onClick = { onClick }
20- isDisabled = { ! canSave }
21- data-test-subj = "createButton"
15+ < EuiToolTip
16+ content = {
17+ ! canSave &&
18+ i18n . translate (
19+ 'xpack.apm.settings.customizeUI.customLink.noPermissionTooltipLabel' ,
20+ {
21+ defaultMessage :
22+ "Your user role doesn't have permissions to create custom links" ,
23+ }
24+ )
25+ }
2226 >
23- { i18n . translate (
24- 'xpack.apm.settings.customizeUI.customLink.createCustomLink' ,
25- { defaultMessage : 'Create custom link' }
26- ) }
27- </ EuiButton >
27+ < EuiButton
28+ color = "primary"
29+ fill
30+ iconType = "plusInCircle"
31+ onClick = { onClick }
32+ isDisabled = { ! canSave }
33+ data-test-subj = "createButton"
34+ >
35+ { i18n . translate (
36+ 'xpack.apm.settings.customizeUI.customLink.createCustomLink' ,
37+ { defaultMessage : 'Create custom link' }
38+ ) }
39+ </ EuiButton >
40+ </ EuiToolTip >
2841 ) ;
2942}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export const createCustomLinkRoute = createRoute({
6464 params : t . type ( {
6565 body : payloadRt ,
6666 } ) ,
67- options : { tags : [ 'access:apm' ] } ,
67+ options : { tags : [ 'access:apm' , 'access:apm_write' ] } ,
6868 handler : async ( { context, request } ) => {
6969 if ( ! isActiveGoldLicense ( context . licensing . license ) ) {
7070 throw Boom . forbidden ( INVALID_LICENSE ) ;
You can’t perform that action at this time.
0 commit comments