@infinilabs/discover 0.0.12 → 0.0.13
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.
- package/dist/{components-giLeqrP0.js → components-Cn5JPPL6.js} +10 -10
- package/dist/{components-Cq-6KuL3.cjs → components-x-uBcniU.cjs} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/{public-BJM7-Tjd.cjs → public-7MmCLi8Y.cjs} +1 -1
- package/dist/{public-BlIKZ8cn.js → public-PTd5784r.js} +2 -2
- package/dist/{query_bar_top_row-CdpmW2Hp.cjs → query_bar_top_row-Cp3NlZO1.cjs} +1 -1
- package/dist/{query_bar_top_row-B6oqm191.js → query_bar_top_row-Cw-j7vhx.js} +2 -2
- package/dist/{query_bar_top_row-D8atQnVI.cjs → query_bar_top_row-DOQidGGK.cjs} +1 -1
- package/dist/{query_bar_top_row-CzOULMSn.js → query_bar_top_row-Dzppw1bf.js} +4 -4
- package/dist/{query_string_input-BRKpVIPS.js → query_string_input-BdCKA2Yw.js} +2 -2
- package/dist/{query_string_input-Dm8k9RcW.js → query_string_input-C72lx0zc.js} +1 -1
- package/dist/query_string_input-DdJa18EH.cjs +1 -0
- package/dist/{query_string_input-DSDmSR9e.cjs → query_string_input-yaVkkN5B.cjs} +1 -1
- package/dist/{search_bar-BjPFSaSc.cjs → search_bar-BZyhVzgH.cjs} +1 -1
- package/dist/{search_bar-B_Hts_qr.js → search_bar-CkyzOC1B.js} +4 -4
- package/package.json +1 -1
- package/dist/query_string_input-BJzU3DYd.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM, r as __export, t as __commonJSMin } from "./chunk-D-4zIDrl.js";
|
|
2
|
-
import { C as BehaviorSubject, E as Subscription, T as operate, _ as onRedirectNoIndexPattern, b as FilterManager, d as baseFormattersPublic, f as getTimezone, g as onUnsupportedTimePattern, h as IndexPatternsApiClient, l as generateFilters, m as SavedObjectsClientPublicToCommon, n as search, p as deserializeFieldFormat, u as createSearchBar, v as TimeHistory, w as createOperatorSubscriber, x as AutocompleteService, y as Timefilter } from "./public-
|
|
2
|
+
import { C as BehaviorSubject, E as Subscription, T as operate, _ as onRedirectNoIndexPattern, b as FilterManager, d as baseFormattersPublic, f as getTimezone, g as onUnsupportedTimePattern, h as IndexPatternsApiClient, l as generateFilters, m as SavedObjectsClientPublicToCommon, n as search, p as deserializeFieldFormat, u as createSearchBar, v as TimeHistory, w as createOperatorSubscriber, x as AutocompleteService, y as Timefilter } from "./public-PTd5784r.js";
|
|
3
3
|
import { a as createHashHistory, c as require_object_assign, d as FieldIcon, i as setIndexPatterns$1, l as require_url, o as _extends, t as getIndexPatterns, u as FieldButton } from "./services-C8UxrSbr.js";
|
|
4
4
|
import { t as require_classnames } from "./classnames-BCXlvRQ0.js";
|
|
5
5
|
import { t as require_lodash } from "./lodash-Gv_ptthU.js";
|
|
@@ -488,17 +488,17 @@ function DiscoverFieldBucket({ field: e, bucket: t, onAddFilter: n }) {
|
|
|
488
488
|
}
|
|
489
489
|
function DiscoverFieldDetails({ field: e, indexPattern: t, details: n, onAddFilter: i }) {
|
|
490
490
|
let { i18n: a } = useContext(GlobalConfigContext), o = a?.field || {};
|
|
491
|
-
return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */
|
|
491
|
+
return console.log("error", n.error), /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("div", {
|
|
492
492
|
className: "dscFieldDetails !p-12px",
|
|
493
|
-
children:
|
|
493
|
+
children: n.error?.root_cause ? /* @__PURE__ */ jsx(Typography.Text, {
|
|
494
494
|
className: "text-xs mb-12px",
|
|
495
495
|
type: "danger",
|
|
496
|
-
children: n.error
|
|
497
|
-
})
|
|
496
|
+
children: JSON.stringify(n.error?.root_cause)
|
|
497
|
+
}) : Number.isInteger(n.total) ? /* @__PURE__ */ jsxs(Fragment$1, { children: [n?.buckets?.map((t, n) => /* @__PURE__ */ jsx(DiscoverFieldBucket, {
|
|
498
498
|
bucket: t,
|
|
499
499
|
field: e,
|
|
500
500
|
onAddFilter: i
|
|
501
|
-
}, `bucket${n}`)), /* @__PURE__ */ jsx(Typography.Text, { children: `${o.top_result_prefix || "Calculated from"} ${n.total} ${o.top_result_suffix || "sample records"}` })] })
|
|
501
|
+
}, `bucket${n}`)), /* @__PURE__ */ jsx(Typography.Text, { children: `${o.top_result_prefix || "Calculated from"} ${n.total} ${o.top_result_suffix || "sample records"}` })] }) : /* @__PURE__ */ jsx(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE })
|
|
502
502
|
}) });
|
|
503
503
|
}
|
|
504
504
|
var DOT_PREFIX_RE = /(.).+?\./g;
|
|
@@ -589,7 +589,7 @@ function DiscoverField({ field: e, indexPattern: t, onAddField: n, onRemoveField
|
|
|
589
589
|
});
|
|
590
590
|
} else m(n, () => {
|
|
591
591
|
M(!0);
|
|
592
|
-
}, (e, i) => {
|
|
592
|
+
}, (e, i, a) => {
|
|
593
593
|
O({
|
|
594
594
|
...E,
|
|
595
595
|
buckets: (e || []).map((e) => ({
|
|
@@ -598,9 +598,9 @@ function DiscoverField({ field: e, indexPattern: t, onAddField: n, onRemoveField
|
|
|
598
598
|
count: e.doc_count,
|
|
599
599
|
percent: (e.doc_count / i * 100).toFixed(1)
|
|
600
600
|
})),
|
|
601
|
-
exists: (e || []).map((e) => e.doc_count).reduce((e, t) => e + t),
|
|
601
|
+
exists: (e || []).map((e) => e.doc_count).reduce((e, t) => e + t, 0),
|
|
602
602
|
total: i,
|
|
603
|
-
|
|
603
|
+
error: a
|
|
604
604
|
}), M(!1);
|
|
605
605
|
});
|
|
606
606
|
};
|
|
@@ -51796,7 +51796,7 @@ var SidebarMemoized = React.memo(DiscoverSidebar), { filterManager, queryStringM
|
|
|
51796
51796
|
let { index: m, body: g } = f, y = await o(m, g);
|
|
51797
51797
|
if (i) {
|
|
51798
51798
|
let e = s.sampleRecords === "all" ? y?.aggregations?.top5?.buckets : y?.aggregations?.sample?.top5?.buckets, t = s.sampleRecords === "all" ? y?.aggregations?.top5?.sum_other_doc_count : y?.aggregations?.sample?.sample_count?.value;
|
|
51799
|
-
i(e || [], t || 0);
|
|
51799
|
+
i(e || [], t || 0, y?.error);
|
|
51800
51800
|
}
|
|
51801
51801
|
}, cQ = async (e) => {
|
|
51802
51802
|
I.unsubscribe(), t.timeFieldName = e, n(t);
|