mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Add flag for source indexing
This commit is contained in:
parent
8b2e7c84f8
commit
0e131b1c05
3 changed files with 16 additions and 1 deletions
|
@ -21,6 +21,7 @@ import {
|
|||
EuiFlyoutFooter,
|
||||
} from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { triggerIndexing } from '../../../../file_upload/public/';
|
||||
import _ from 'lodash';
|
||||
|
||||
export class AddLayerPanel extends Component {
|
||||
|
@ -67,8 +68,14 @@ export class AddLayerPanel extends Component {
|
|||
iconSide="right"
|
||||
iconType={'sortRight'}
|
||||
onClick={() => {
|
||||
const layerSource = this.state.layer.getSource();
|
||||
const boolIndexLayer = layerSource.shouldBeIndexed();
|
||||
this.setState({ layer: null });
|
||||
selectLayerAndAdd();
|
||||
if (boolIndexLayer) {
|
||||
triggerIndexing();
|
||||
} else {
|
||||
selectLayerAndAdd();
|
||||
}
|
||||
}}
|
||||
fill
|
||||
>
|
||||
|
|
|
@ -63,4 +63,8 @@ export class GeojsonFileSource extends AbstractVectorSource {
|
|||
return true;
|
||||
}
|
||||
|
||||
shouldBeIndexed() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -102,6 +102,10 @@ export class AbstractSource {
|
|||
isJoinable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
shouldBeIndexed() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue