@next-libs/cmdb-instances 7.22.1 → 7.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,7 +52,7 @@ function joinRelationFieldAndShowkey(fields, modelData, objectList) {
52
52
  }
53
53
  });
54
54
  }
55
- function getQuery(modelData, idObjectMap, q, fields, onlySearchByIp) {
55
+ function getQuery(modelData, idObjectMap, q, fields, onlySearchByIp, extraFixedFields) {
56
56
  const query = {
57
57
  $or: []
58
58
  };
@@ -60,7 +60,7 @@ function getQuery(modelData, idObjectMap, q, fields, onlySearchByIp) {
60
60
  if (onlySearchByIp) {
61
61
  var _getRuntime$getCurren;
62
62
  const searchIpFields = ((_getRuntime$getCurren = (0, _brickKit.getRuntime)().getCurrentApp().config) === null || _getRuntime$getCurren === void 0 ? void 0 : _getRuntime$getCurren.searchIpFields) || [];
63
- const queryOrs = [...new Set(["ip", ...searchIpFields])];
63
+ const queryOrs = [...new Set(["ip", ...(0, _lodash.uniq)([...searchIpFields, ...(extraFixedFields || [])])])];
64
64
  const searchValue = {
65
65
  $like: `%${q.trim()}%`
66
66
  };
@@ -580,7 +580,7 @@ function LegacyInstanceList(props) {
580
580
  }];
581
581
  }
582
582
  if (state.q) {
583
- query = getQuery(modelData, idObjectMap, state.q, state.fieldIds, props.onlySearchByIp);
583
+ query = getQuery(modelData, idObjectMap, state.q, state.fieldIds, props.onlySearchByIp, props.extraFixedFields);
584
584
  }
585
585
  if (state.q && props.useInstanceArchiveProvider) {
586
586
  archiveData.key_word = state.q;