search template update
This commit is contained in:
parent
e6be0c7534
commit
338d0bd4d9
|
@ -19,7 +19,10 @@ export default {
|
|||
console.log("fetchList response:",res);
|
||||
if (res.hits) {
|
||||
let newList = [];
|
||||
let hits = res.hits.hits;
|
||||
let hits = res.hits.hits || [];
|
||||
if (!hits.length) {
|
||||
return;
|
||||
}
|
||||
for (let item of hits) {
|
||||
item._source.id = item._id;
|
||||
newList.push(item._source);
|
||||
|
|
|
@ -76,6 +76,12 @@ const UpdateForm = Form.create()(props => {
|
|||
onOk={okHandle}
|
||||
onCancel={() => handleUpdateModalVisible()}
|
||||
>
|
||||
<FormItem>
|
||||
{form.getFieldDecorator('id', {
|
||||
initialValue: values.id,
|
||||
})(<Input type="hidden" />)}
|
||||
</FormItem>
|
||||
|
||||
<FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="模板名称">
|
||||
{form.getFieldDecorator('name', {
|
||||
initialValue: values.name,
|
||||
|
@ -278,6 +284,7 @@ class SearchTemplate extends PureComponent {
|
|||
type: 'searchTemplate/update',
|
||||
payload: {
|
||||
cluster_id: clusterID,
|
||||
id: fields.id,
|
||||
name: fields.name,
|
||||
source: fields.source,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue