dispatch(alertingActions.changeRuleGroupingOptions({ groupByTemplates, groupByTopics: !groupByTopics })),
+ command: () =>
+ dispatch(
+ alertingActions.changeRuleGroupingOptions({
+ groupByTemplates,
+ groupByTopics: !groupByTopics,
+ })
+ ),
},
{
label: 'Group by Templates',
icon: 'pi pi-fw ' + (groupByTemplates ? 'pi-check' : ''),
- command: () => dispatch(alertingActions.changeRuleGroupingOptions({ groupByTemplates: !groupByTemplates, groupByTopics })),
+ command: () =>
+ dispatch(
+ alertingActions.changeRuleGroupingOptions({
+ groupByTemplates: !groupByTemplates,
+ groupByTopics,
+ })
+ ),
},
];
@@ -69,6 +81,11 @@ const AlertingRulesTree = ({ rules, templates, unsavedRules, onSelectionChanged,
onSelectionChanged(newSelection);
};
+ const showContextMenu = (event) => {
+ event.originalEvent.persist();
+ contextMenuRef.current.show(event.originalEvent);
+ };
+
return (
<>
- setContextMenu(el)} />
+
contextMenu.show(event.originalEvent)}
+ onContextMenu={showContextMenu}
filter={true}
filterBy="label"
value={treeData}
@@ -124,7 +146,7 @@ const AlertingRulesTree = ({ rules, templates, unsavedRules, onSelectionChanged,
*/
const nodeTemplate = (node) => {
if (node.type === 'rule') {
- var classNames = 'pi ';
+ let classNames = 'pi ';
if (node.data.status === 'enabled' && !node.data.error) {
classNames = classNames + 'pi-circle-on green';
} else if (node.data.status === 'enabled' && node.data.error) {
diff --git a/components/inspectit-ocelot-configurationserver-ui/src/components/views/configuration/FileTree.js b/components/inspectit-ocelot-configurationserver-ui/src/components/views/configuration/FileTree.js
index c288405c25..6269f609e5 100644
--- a/components/inspectit-ocelot-configurationserver-ui/src/components/views/configuration/FileTree.js
+++ b/components/inspectit-ocelot-configurationserver-ui/src/components/views/configuration/FileTree.js
@@ -88,7 +88,7 @@ class FileTree extends React.Component {
event.originalEvent.stopPropagation();
return;
}
-
+ event.originalEvent.persist();
this.setState({ contextMenuModel: this.getContextMenuModel(newSelection) });
this.contextMenuRef.current.show(event.originalEvent || event);
};