in public/pages/CreateRollup/components/RollupIndices/RollupIndices.tsx [96:164]
render() {
const {
sourceIndex,
sourceIndexError,
targetIndex,
targetIndexError,
onChangeSourceIndex,
onChangeTargetIndex,
hasAggregation,
} = this.props;
const { isLoading, indexOptions, targetIndexOptions } = this.state;
return (
<ContentPanel bodyStyles={{ padding: "initial" }} title="Indices" titleSize="m">
<div style={{ paddingLeft: "10px" }}>
<EuiSpacer size="s" />
<EuiCallOut color="warning">
<p>You can't change indices after creating a job. Double-check the source and target index names before proceeding.</p>
</EuiCallOut>
{hasAggregation && (
<Fragment>
<EuiSpacer />
<EuiCallOut color="warning">
<p>Note: changing source index will erase all existing definitions about aggregations and metrics.</p>
</EuiCallOut>
</Fragment>
)}
<EuiSpacer size="m" />
<EuiFormRow
label="Source index"
error={sourceIndexError}
isInvalid={sourceIndexError != ""}
helpText="The index pattern on which to performed the rollup job. You can use * as a wildcard."
>
<EuiComboBox
placeholder="Select source index"
options={indexOptions}
selectedOptions={sourceIndex}
onChange={onChangeSourceIndex}
singleSelection={{ asPlainText: true }}
onSearchChange={this.onIndexSearchChange}
isLoading={isLoading}
isInvalid={sourceIndexError != ""}
data-test-subj="sourceIndexCombobox"
/>
</EuiFormRow>
<EuiFormRow
label="Target index"
error={targetIndexError}
isInvalid={targetIndexError != ""}
helpText="The index stores rollup results. You can look up or an existing index to reuse or type to create a new index."
>
<EuiComboBox
placeholder="Select or create target index"
options={targetIndexOptions}
selectedOptions={targetIndex}
onChange={onChangeTargetIndex}
onCreateOption={this.onCreateOption}
singleSelection={{ asPlainText: true }}
onSearchChange={this.onIndexSearchChange}
isLoading={isLoading}
isInvalid={targetIndexError != ""}
data-test-subj="targetIndexCombobox"
/>
</EuiFormRow>
</div>
</ContentPanel>
);
}