{
+ this.handleValueChange(newValue.join(','))
+ }}
+ />
+ >
+ )
} else {
return (
<>
@@ -325,6 +336,8 @@ class Condition extends React.Component {
} else {
operatorList.push({displayName: 'Equal', name: 'equal'})
operatorList.push({displayName: 'Not Equal', name: 'notEqual'})
+ operatorList.push({displayName: 'In', name: 'in'})
+ operatorList.push({displayName: 'Not In', name: 'notIn'})
}
} else if (this.state.selectedFact.type === 'integer') {
operatorList.push({displayName: 'Equal', name: 'equal'})
@@ -389,7 +402,7 @@ class Condition extends React.Component {
Value
-
+
diff --git a/src/views/rules/RuleViewer.jsx b/src/views/rules/RuleViewer.jsx
index 1870615c..95f3e7c1 100644
--- a/src/views/rules/RuleViewer.jsx
+++ b/src/views/rules/RuleViewer.jsx
@@ -68,13 +68,21 @@ class RuleViewer extends React.Component {
})
} catch(err){}
+ const getItemValueString = (itemValue) => {
+ if (Array.isArray(itemValue)) {
+ return itemValue.toString()
+ } else {
+ return itemValue
+ }
+ }
+
const conditionItems = conditions.map(item => {
return (
<>
{item.fact}.{item.path}
{item.operator}
- {item.value}
+ {getItemValueString(item.value)}
>
)
|