diff --git a/components/inspectit-ocelot-configurationserver-ui/src/components/views/mappings/AgentMappingsView.js b/components/inspectit-ocelot-configurationserver-ui/src/components/views/mappings/AgentMappingsView.js index 0992df5c6a..70b3600418 100644 --- a/components/inspectit-ocelot-configurationserver-ui/src/components/views/mappings/AgentMappingsView.js +++ b/components/inspectit-ocelot-configurationserver-ui/src/components/views/mappings/AgentMappingsView.js @@ -12,7 +12,8 @@ import { mappingsActions, mappingsSelectors } from '../../../redux/ducks/mapping /** View to display and change mappings */ const AgentMappingView = () => { const dispatch = useDispatch(); - let readOnly = useSelector((state) => !state.authentication.permissions.write); + let isAdmin = useSelector((state) => state.authentication.permissions.admin); + let readOnly = useSelector((state) => !state.authentication.permissions.write && !isAdmin); const [mappingsFilter, setMappingsFilter] = useState(''); const [mappingToEdit, setMappingToEdit] = useState(null); @@ -76,6 +77,7 @@ const AgentMappingView = () => { onAddNewMapping={showEditMappingDialog} onDownload={() => setDownloadDialogShown(true)} readOnly={readOnly} + isAdmin={isAdmin} /> {!isLatest && ( diff --git a/components/inspectit-ocelot-configurationserver-ui/src/components/views/mappings/MappingToolbar.js b/components/inspectit-ocelot-configurationserver-ui/src/components/views/mappings/MappingToolbar.js index d583e0d269..f06bb389aa 100644 --- a/components/inspectit-ocelot-configurationserver-ui/src/components/views/mappings/MappingToolbar.js +++ b/components/inspectit-ocelot-configurationserver-ui/src/components/views/mappings/MappingToolbar.js @@ -6,6 +6,7 @@ import { InputText } from 'primereact/inputtext'; import { Dropdown } from 'primereact/dropdown'; import { Button } from 'primereact/button'; import PropTypes from 'prop-types'; +import ReactTooltip from 'react-tooltip'; const searchFieldTooltipText = 'Enter a mapping name, a source or an attribute key/value pair to filter matching mappings. The filter is not case sensitive.'; @@ -22,7 +23,7 @@ class MappingToolbar extends React.Component { } }; render() { - const { filterValue, onChangeFilter, onAddNewMapping, onDownload, fetchMappings, readOnly, sourceBranch } = this.props; + const { filterValue, onChangeFilter, onAddNewMapping, onDownload, fetchMappings, readOnly, isAdmin, sourceBranch } = this.props; return (

Source Branch

- this.onChange(e)} options={['WORKSPACE', 'LIVE']} /> + this.onChange(e)} options={['WORKSPACE', 'LIVE']} />
+ + ? + +
}