mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[maps] replace 'refresh: true' with 'refresh: wait_for' (#158220)
Fixes https://github.com/elastic/kibana/issues/157657 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
c9658bf238
commit
47eed48cde
3 changed files with 9 additions and 2 deletions
|
@ -36,6 +36,7 @@ export function FeatureEditTools(props: Props) {
|
|||
const drawBBoxSelected = props.drawShape === DRAW_SHAPE.BOUNDS;
|
||||
const drawPointSelected = props.drawShape === DRAW_SHAPE.POINT;
|
||||
const deleteSelected = props.drawShape === DRAW_SHAPE.DELETE;
|
||||
const isWaiting = props.drawShape === DRAW_SHAPE.WAIT;
|
||||
|
||||
function toggleDrawShape(mode: DRAW_SHAPE) {
|
||||
if (mode && props.drawShape === mode) {
|
||||
|
@ -70,6 +71,7 @@ export function FeatureEditTools(props: Props) {
|
|||
aria-pressed={drawLineSelected}
|
||||
isSelected={drawLineSelected}
|
||||
display={drawLineSelected ? 'fill' : 'empty'}
|
||||
isDisabled={isWaiting}
|
||||
/>
|
||||
|
||||
<EuiButtonIcon
|
||||
|
@ -89,6 +91,7 @@ export function FeatureEditTools(props: Props) {
|
|||
aria-pressed={drawPolygonSelected}
|
||||
isSelected={drawPolygonSelected}
|
||||
display={drawPolygonSelected ? 'fill' : 'empty'}
|
||||
isDisabled={isWaiting}
|
||||
/>
|
||||
<EuiButtonIcon
|
||||
className={classNames({
|
||||
|
@ -107,6 +110,7 @@ export function FeatureEditTools(props: Props) {
|
|||
aria-pressed={drawCircleSelected}
|
||||
isSelected={drawCircleSelected}
|
||||
display={drawCircleSelected ? 'fill' : 'empty'}
|
||||
isDisabled={isWaiting}
|
||||
/>
|
||||
<EuiButtonIcon
|
||||
className={classNames({
|
||||
|
@ -125,6 +129,7 @@ export function FeatureEditTools(props: Props) {
|
|||
aria-pressed={drawBBoxSelected}
|
||||
isSelected={drawBBoxSelected}
|
||||
display={drawBBoxSelected ? 'fill' : 'empty'}
|
||||
isDisabled={isWaiting}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
@ -145,6 +150,7 @@ export function FeatureEditTools(props: Props) {
|
|||
aria-pressed={drawPointSelected}
|
||||
isSelected={drawPointSelected}
|
||||
display={drawPointSelected ? 'fill' : 'empty'}
|
||||
isDisabled={isWaiting}
|
||||
/>
|
||||
<EuiButtonIcon
|
||||
className={classNames({
|
||||
|
@ -166,6 +172,7 @@ export function FeatureEditTools(props: Props) {
|
|||
aria-pressed={deleteSelected}
|
||||
isSelected={deleteSelected}
|
||||
display={deleteSelected ? 'fill' : 'empty'}
|
||||
isDisabled={isWaiting}
|
||||
/>
|
||||
</EuiPanel>
|
||||
</TrackApplicationView>
|
||||
|
|
|
@ -26,7 +26,7 @@ export async function writeDataToIndex(
|
|||
})
|
||||
);
|
||||
}
|
||||
const settings: WriteSettings = { index, body: data, refresh: true };
|
||||
const settings: WriteSettings = { index, body: data, refresh: 'wait_for' };
|
||||
const resp = await asCurrentUser.index(settings);
|
||||
// @ts-expect-error always false
|
||||
if (resp.result === 'Error') {
|
||||
|
|
|
@ -150,7 +150,7 @@ export function initIndexingRoutes({
|
|||
const resp = await coreContext.elasticsearch.client.asCurrentUser.delete({
|
||||
index: request.body.index,
|
||||
id: request.params.featureId,
|
||||
refresh: true,
|
||||
refresh: 'wait_for',
|
||||
});
|
||||
// @ts-expect-error always false
|
||||
if (resp.result === 'Error') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue