Remove isEnabled for model, adapter and enforcer, improve UI

This commit is contained in:
Yang Luo
2023-08-18 19:22:47 +08:00
parent a41f6880a2
commit abfc464155
11 changed files with 40 additions and 94 deletions

View File

@ -14,7 +14,7 @@
import React from "react";
import {Link} from "react-router-dom";
import {Button, Switch, Table} from "antd";
import {Button, Table} from "antd";
import moment from "moment";
import * as Setting from "./Setting";
import * as EnforcerBackend from "./backend/EnforcerBackend";
@ -31,7 +31,6 @@ class EnforcerListPage extends BaseListPage {
name: `enforcer_${randomName}`,
createdTime: moment().format(),
displayName: `New Enforcer - ${randomName}`,
isEnabled: true,
};
}
@ -152,18 +151,6 @@ class EnforcerListPage extends BaseListPage {
);
},
},
{
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: "",