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