Add isEnabled to webhook.

This commit is contained in:
Yang Luo
2021-12-26 21:02:56 +08:00
parent 0c665edcbc
commit 9943e3c316
13 changed files with 95 additions and 25 deletions

View File

@ -14,7 +14,7 @@
import React from "react";
import {Link} from "react-router-dom";
import {Button, Popconfirm, Table} from 'antd';
import {Button, Popconfirm, Switch, Table} from 'antd';
import moment from "moment";
import * as Setting from "./Setting";
import * as WebhookBackend from "./backend/WebhookBackend";
@ -34,6 +34,7 @@ class WebhookListPage extends BaseListPage {
contentType: "application/json",
headers: [],
events: ["signup", "login", "logout", "update-user"],
isEnabled: true,
}
}
@ -156,6 +157,18 @@ class WebhookListPage extends BaseListPage {
return Setting.getTags(text);
}
},
{
title: i18next.t("general:Is enabled"),
dataIndex: 'isEnabled',
key: 'isEnabled',
width: '120px',
sorter: true,
render: (text, record, index) => {
return (
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
)
}
},
{
title: i18next.t("general:Action"),
dataIndex: '',