Răsfoiți Sursa

增加策略编辑

刘涛 5 ani în urmă
părinte
comite
a63082f780

+ 2 - 2
src/pages/fengkong/features/group/edit/$name.js

@@ -59,8 +59,8 @@ class Add extends React.PureComponent {
       return false
     }
     test({
-      name: this.state.name,
-      input: this.state.testContent
+      group: this.state.name,
+      input: JSON.parse(this.state.testContent)
     }).then(res => {
       if (res.code === 0) {
         this.setState({ testResult: JSON.stringify(res) })

+ 3 - 3
src/pages/fengkong/features/group/index.js

@@ -2,8 +2,7 @@ import React from 'react'
 import { FilterTable } from 'wptpc-design'
 import { Link } from 'dva/router'
 import { thanos } from '@/conf/config'
-import { Button } from 'antd'
-import { Divider, message, Popconfirm } from 'antd'
+import { Divider, message, Popconfirm, Button } from 'antd'
 import { delItem } from './service.js'
 
 const apiUrl = `${thanos}/thanos-admin/api/v1/group/list`
@@ -77,7 +76,7 @@ class GroupList extends React.PureComponent {
           <span>
             <Link
               to={{
-                pathname: './edit/' + record.name,
+                pathname: './group/edit/' + record.name,
                 state: record
               }}
             >编辑</Link>
@@ -94,6 +93,7 @@ class GroupList extends React.PureComponent {
       this.refresh = refresh
     }
   }
+
     // 点击删除按钮时的事件处理函数
     delItem = (record) => {
       delItem({ id: record.id, name: record.name }).then(res => {