mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
feat: comma dangle
This commit is contained in:
parent
9abf1b9d73
commit
cd966116d4
@ -52,6 +52,8 @@
|
|||||||
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
|
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
|
||||||
"space-infix-ops": "error",
|
"space-infix-ops": "error",
|
||||||
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
|
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
|
||||||
|
"comma-style": ["error", "last"],
|
||||||
|
"comma-dangle": ["error", "always-multiline"],
|
||||||
|
|
||||||
|
|
||||||
"react/prop-types": "off",
|
"react/prop-types": "off",
|
||||||
|
@ -34,7 +34,7 @@ module.exports = {
|
|||||||
"/cas/validate": {
|
"/cas/validate": {
|
||||||
target: "http://localhost:8000",
|
target: "http://localhost:8000",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -116,7 +116,7 @@ class AccountTable extends React.Component {
|
|||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:visible"),
|
title: i18next.t("provider:visible"),
|
||||||
@ -129,7 +129,7 @@ class AccountTable extends React.Component {
|
|||||||
this.updateField(table, index, "visible", checked);
|
this.updateField(table, index, "visible", checked);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("organization:viewRule"),
|
title: i18next.t("organization:viewRule"),
|
||||||
@ -156,7 +156,7 @@ class AccountTable extends React.Component {
|
|||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("organization:modifyRule"),
|
title: i18next.t("organization:modifyRule"),
|
||||||
@ -191,7 +191,7 @@ class AccountTable extends React.Component {
|
|||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -211,7 +211,7 @@ class AccountTable extends React.Component {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ class App extends Component {
|
|||||||
const owner = this.state.account.owner;
|
const owner = this.state.account.owner;
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
account: null
|
account: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
Setting.showMessage("success", "Logged out successfully");
|
Setting.showMessage("success", "Logged out successfully");
|
||||||
@ -258,7 +258,7 @@ class App extends Component {
|
|||||||
|
|
||||||
onUpdateAccount(account) {
|
onUpdateAccount(account) {
|
||||||
this.setState({
|
this.setState({
|
||||||
account: account
|
account: account,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,7 +360,7 @@ class App extends Component {
|
|||||||
<Link to="/">
|
<Link to="/">
|
||||||
{i18next.t("general:Home")}
|
{i18next.t("general:Home")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Setting.isAdminUser(this.state.account)) {
|
if (Setting.isAdminUser(this.state.account)) {
|
||||||
@ -369,49 +369,49 @@ class App extends Component {
|
|||||||
<Link to="/organizations">
|
<Link to="/organizations">
|
||||||
{i18next.t("general:Organizations")}
|
{i18next.t("general:Organizations")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/users">
|
<Menu.Item key="/users">
|
||||||
<Link to="/users">
|
<Link to="/users">
|
||||||
{i18next.t("general:Users")}
|
{i18next.t("general:Users")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/roles">
|
<Menu.Item key="/roles">
|
||||||
<Link to="/roles">
|
<Link to="/roles">
|
||||||
{i18next.t("general:Roles")}
|
{i18next.t("general:Roles")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/permissions">
|
<Menu.Item key="/permissions">
|
||||||
<Link to="/permissions">
|
<Link to="/permissions">
|
||||||
{i18next.t("general:Permissions")}
|
{i18next.t("general:Permissions")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/models">
|
<Menu.Item key="/models">
|
||||||
<Link to="/models">
|
<Link to="/models">
|
||||||
{i18next.t("general:Models")}
|
{i18next.t("general:Models")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/providers">
|
<Menu.Item key="/providers">
|
||||||
<Link to="/providers">
|
<Link to="/providers">
|
||||||
{i18next.t("general:Providers")}
|
{i18next.t("general:Providers")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/applications">
|
<Menu.Item key="/applications">
|
||||||
<Link to="/applications">
|
<Link to="/applications">
|
||||||
{i18next.t("general:Applications")}
|
{i18next.t("general:Applications")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -421,42 +421,42 @@ class App extends Component {
|
|||||||
<Link to="/resources">
|
<Link to="/resources">
|
||||||
{i18next.t("general:Resources")}
|
{i18next.t("general:Resources")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/tokens">
|
<Menu.Item key="/tokens">
|
||||||
<Link to="/tokens">
|
<Link to="/tokens">
|
||||||
{i18next.t("general:Tokens")}
|
{i18next.t("general:Tokens")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/records">
|
<Menu.Item key="/records">
|
||||||
<Link to="/records">
|
<Link to="/records">
|
||||||
{i18next.t("general:Records")}
|
{i18next.t("general:Records")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/webhooks">
|
<Menu.Item key="/webhooks">
|
||||||
<Link to="/webhooks">
|
<Link to="/webhooks">
|
||||||
{i18next.t("general:Webhooks")}
|
{i18next.t("general:Webhooks")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/syncers">
|
<Menu.Item key="/syncers">
|
||||||
<Link to="/syncers">
|
<Link to="/syncers">
|
||||||
{i18next.t("general:Syncers")}
|
{i18next.t("general:Syncers")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/certs">
|
<Menu.Item key="/certs">
|
||||||
<Link to="/certs">
|
<Link to="/certs">
|
||||||
{i18next.t("general:Certs")}
|
{i18next.t("general:Certs")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Conf.EnableExtraPages) {
|
if (Conf.EnableExtraPages) {
|
||||||
@ -465,14 +465,14 @@ class App extends Component {
|
|||||||
<Link to="/products">
|
<Link to="/products">
|
||||||
{i18next.t("general:Products")}
|
{i18next.t("general:Products")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
res.push(
|
res.push(
|
||||||
<Menu.Item key="/payments">
|
<Menu.Item key="/payments">
|
||||||
<Link to="/payments">
|
<Link to="/payments">
|
||||||
{i18next.t("general:Payments")}
|
{i18next.t("general:Payments")}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -481,7 +481,7 @@ class App extends Component {
|
|||||||
<a target="_blank" rel="noreferrer" href={Setting.isLocalhost() ? `${Setting.ServerUrl}/swagger` : "/swagger"}>
|
<a target="_blank" rel="noreferrer" href={Setting.isLocalhost() ? `${Setting.ServerUrl}/swagger` : "/swagger"}>
|
||||||
{i18next.t("general:Swagger")}
|
{i18next.t("general:Swagger")}
|
||||||
</a>
|
</a>
|
||||||
</Menu.Item>
|
</Menu.Item>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class ApplicationListPage extends BaseListPage {
|
|||||||
ApplicationBackend.addApplication(newApplication)
|
ApplicationBackend.addApplication(newApplication)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/applications/${newApplication.name}`, mode: "add"});
|
this.props.history.push({pathname: `/applications/${newApplication.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Application failed to add: ${error}`);
|
Setting.showMessage("error", `Application failed to add: ${error}`);
|
||||||
@ -76,7 +76,7 @@ class ApplicationListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Application failed to delete: ${error}`);
|
Setting.showMessage("error", `Application failed to delete: ${error}`);
|
||||||
@ -99,7 +99,7 @@ class ApplicationListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -109,7 +109,7 @@ class ApplicationListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Display name"),
|
title: i18next.t("general:Display name"),
|
||||||
@ -130,7 +130,7 @@ class ApplicationListPage extends BaseListPage {
|
|||||||
<img src={text} alt={text} width={150} />
|
<img src={text} alt={text} width={150} />
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Organization"),
|
title: i18next.t("general:Organization"),
|
||||||
@ -145,7 +145,7 @@ class ApplicationListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Providers"),
|
title: i18next.t("general:Providers"),
|
||||||
@ -222,7 +222,7 @@ class ApplicationListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class CertListPage extends BaseListPage {
|
|||||||
CertBackend.addCert(newCert)
|
CertBackend.addCert(newCert)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/certs/${newCert.name}`, mode: "add"});
|
this.props.history.push({pathname: `/certs/${newCert.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Cert failed to add: ${error}`);
|
Setting.showMessage("error", `Cert failed to add: ${error}`);
|
||||||
@ -59,7 +59,7 @@ class CertListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Cert failed to delete: ${error}`);
|
Setting.showMessage("error", `Cert failed to delete: ${error}`);
|
||||||
@ -82,7 +82,7 @@ class CertListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -92,7 +92,7 @@ class CertListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Display name"),
|
title: i18next.t("general:Display name"),
|
||||||
@ -169,7 +169,7 @@ class CertListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class LdapEditPage extends React.Component {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status === "ok") {
|
if (res.status === "ok") {
|
||||||
this.setState({
|
this.setState({
|
||||||
ldap: res.data
|
ldap: res.data,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Setting.showMessage("error", res.msg);
|
Setting.showMessage("error", res.msg);
|
||||||
@ -71,7 +71,7 @@ class LdapEditPage extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<span style={{
|
<span style={{
|
||||||
color: "#faad14",
|
color: "#faad14",
|
||||||
marginLeft: "20px"
|
marginLeft: "20px",
|
||||||
}}>{i18next.t("ldap:The Auto Sync option will sync all users to specify organization")}</span>
|
}}>{i18next.t("ldap:The Auto Sync option will sync all users to specify organization")}</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class LdapListPage extends React.Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
ldaps: null
|
ldaps: null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class LdapListPage extends React.Component {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Organization"),
|
title: i18next.t("general:Organization"),
|
||||||
@ -79,7 +79,7 @@ class LdapListPage extends React.Component {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("ldap:Server"),
|
title: i18next.t("ldap:Server"),
|
||||||
@ -89,7 +89,7 @@ class LdapListPage extends React.Component {
|
|||||||
sorter: (a, b) => a.host.localeCompare(b.host),
|
sorter: (a, b) => a.host.localeCompare(b.host),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return `${text}:${record.port}`;
|
return `${text}:${record.port}`;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("ldap:Base DN"),
|
title: i18next.t("ldap:Base DN"),
|
||||||
@ -114,7 +114,7 @@ class LdapListPage extends React.Component {
|
|||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return text === 0 ? (<span style={{color: "#faad14"}}>Disable</span>) : (
|
return text === 0 ? (<span style={{color: "#faad14"}}>Disable</span>) : (
|
||||||
<span style={{color: "#52c41a"}}>{text + " mins"}</span>);
|
<span style={{color: "#52c41a"}}>{text + " mins"}</span>);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("ldap:Last Sync"),
|
title: i18next.t("ldap:Last Sync"),
|
||||||
@ -124,7 +124,7 @@ class LdapListPage extends React.Component {
|
|||||||
sorter: (a, b) => a.lastSync.localeCompare(b.lastSync),
|
sorter: (a, b) => a.lastSync.localeCompare(b.lastSync),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return text;
|
return text;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -148,7 +148,7 @@ class LdapListPage extends React.Component {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class LdapTable extends React.Component {
|
|||||||
passwd: "123",
|
passwd: "123",
|
||||||
baseDn: "ou=People,dc=example,dc=com",
|
baseDn: "ou=People,dc=example,dc=com",
|
||||||
autosync: 0,
|
autosync: 0,
|
||||||
lastSync: ""
|
lastSync: "",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class LdapTable extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
Setting.showMessage("error", res.msg);
|
Setting.showMessage("error", res.msg);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Add LDAP server failed: ${error}`);
|
Setting.showMessage("error", `Add LDAP server failed: ${error}`);
|
||||||
@ -83,7 +83,7 @@ class LdapTable extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
Setting.showMessage("error", res.msg);
|
Setting.showMessage("error", res.msg);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Delete LDAP server failed: ${error}`);
|
Setting.showMessage("error", `Delete LDAP server failed: ${error}`);
|
||||||
@ -104,7 +104,7 @@ class LdapTable extends React.Component {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("ldap:Server"),
|
title: i18next.t("ldap:Server"),
|
||||||
@ -114,7 +114,7 @@ class LdapTable extends React.Component {
|
|||||||
sorter: (a, b) => a.host.localeCompare(b.host),
|
sorter: (a, b) => a.host.localeCompare(b.host),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return `${text}:${record.port}`;
|
return `${text}:${record.port}`;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("ldap:Base DN"),
|
title: i18next.t("ldap:Base DN"),
|
||||||
@ -132,7 +132,7 @@ class LdapTable extends React.Component {
|
|||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return text === 0 ? (<span style={{color: "#faad14"}}>Disable</span>) : (
|
return text === 0 ? (<span style={{color: "#faad14"}}>Disable</span>) : (
|
||||||
<span style={{color: "#52c41a"}}>{text + " mins"}</span>);
|
<span style={{color: "#52c41a"}}>{text + " mins"}</span>);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("ldap:Last Sync"),
|
title: i18next.t("ldap:Last Sync"),
|
||||||
@ -142,7 +142,7 @@ class LdapTable extends React.Component {
|
|||||||
sorter: (a, b) => a.lastSync.localeCompare(b.lastSync),
|
sorter: (a, b) => a.lastSync.localeCompare(b.lastSync),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return text;
|
return text;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -166,7 +166,7 @@ class LdapTable extends React.Component {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class ModelListPage extends BaseListPage {
|
|||||||
ModelBackend.addModel(newModel)
|
ModelBackend.addModel(newModel)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/models/${newModel.owner}/${newModel.name}`, mode: "add"});
|
this.props.history.push({pathname: `/models/${newModel.owner}/${newModel.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Model failed to add: ${error}`);
|
Setting.showMessage("error", `Model failed to add: ${error}`);
|
||||||
@ -54,7 +54,7 @@ class ModelListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Model failed to delete: ${error}`);
|
Setting.showMessage("error", `Model failed to delete: ${error}`);
|
||||||
@ -76,7 +76,7 @@ class ModelListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Name"),
|
title: i18next.t("general:Name"),
|
||||||
@ -92,7 +92,7 @@ class ModelListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -102,7 +102,7 @@ class ModelListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Display name"),
|
title: i18next.t("general:Display name"),
|
||||||
@ -122,7 +122,7 @@ class ModelListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -143,7 +143,7 @@ class ModelListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class OrganizationEditPage extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
ldaps: resdata
|
ldaps: resdata,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ class OrganizationListPage extends BaseListPage {
|
|||||||
OrganizationBackend.addOrganization(newOrganization)
|
OrganizationBackend.addOrganization(newOrganization)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/organizations/${newOrganization.name}`, mode: "add"});
|
this.props.history.push({pathname: `/organizations/${newOrganization.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Organization failed to add: ${error}`);
|
Setting.showMessage("error", `Organization failed to add: ${error}`);
|
||||||
@ -89,7 +89,7 @@ class OrganizationListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Organization failed to delete: ${error}`);
|
Setting.showMessage("error", `Organization failed to delete: ${error}`);
|
||||||
@ -112,7 +112,7 @@ class OrganizationListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -122,7 +122,7 @@ class OrganizationListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Display name"),
|
title: i18next.t("general:Display name"),
|
||||||
@ -143,7 +143,7 @@ class OrganizationListPage extends BaseListPage {
|
|||||||
<img src={text} alt={text} width={40} />
|
<img src={text} alt={text} width={40} />
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("organization:Website URL"),
|
title: i18next.t("organization:Website URL"),
|
||||||
@ -158,7 +158,7 @@ class OrganizationListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Password type"),
|
title: i18next.t("general:Password type"),
|
||||||
@ -192,7 +192,7 @@ class OrganizationListPage extends BaseListPage {
|
|||||||
<img src={text} alt={text} width={40} />
|
<img src={text} alt={text} width={40} />
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("organization:Soft deletion"),
|
title: i18next.t("organization:Soft deletion"),
|
||||||
@ -204,7 +204,7 @@ class OrganizationListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -226,7 +226,7 @@ class OrganizationListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ class PaymentListPage extends BaseListPage {
|
|||||||
PaymentBackend.addPayment(newPayment)
|
PaymentBackend.addPayment(newPayment)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/payments/${newPayment.name}`, mode: "add"});
|
this.props.history.push({pathname: `/payments/${newPayment.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Payment failed to add: ${error}`);
|
Setting.showMessage("error", `Payment failed to add: ${error}`);
|
||||||
@ -67,7 +67,7 @@ class PaymentListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Payment failed to delete: ${error}`);
|
Setting.showMessage("error", `Payment failed to delete: ${error}`);
|
||||||
@ -89,7 +89,7 @@ class PaymentListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:User"),
|
title: i18next.t("general:User"),
|
||||||
@ -104,7 +104,7 @@ class PaymentListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Name"),
|
title: i18next.t("general:Name"),
|
||||||
@ -120,7 +120,7 @@ class PaymentListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -130,7 +130,7 @@ class PaymentListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: i18next.t("general:Display name"),
|
// title: i18next.t("general:Display name"),
|
||||||
@ -154,7 +154,7 @@ class PaymentListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("payment:Type"),
|
title: i18next.t("payment:Type"),
|
||||||
@ -168,7 +168,7 @@ class PaymentListPage extends BaseListPage {
|
|||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
record.category = "Payment";
|
record.category = "Payment";
|
||||||
return Provider.getProviderLogoWidget(record);
|
return Provider.getProviderLogoWidget(record);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("payment:Product"),
|
title: i18next.t("payment:Product"),
|
||||||
@ -221,7 +221,7 @@ class PaymentListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class PaymentResultPage extends React.Component {
|
|||||||
Setting.goToLink(payment.returnUrl);
|
Setting.goToLink(payment.returnUrl);
|
||||||
}}>
|
}}>
|
||||||
{i18next.t("payment:Return to Website")}
|
{i18next.t("payment:Return to Website")}
|
||||||
</Button>
|
</Button>,
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -103,7 +103,7 @@ class PaymentResultPage extends React.Component {
|
|||||||
Setting.goToLink(payment.returnUrl);
|
Setting.goToLink(payment.returnUrl);
|
||||||
}}>
|
}}>
|
||||||
{i18next.t("payment:Return to Website")}
|
{i18next.t("payment:Return to Website")}
|
||||||
</Button>
|
</Button>,
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,7 +44,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
PermissionBackend.addPermission(newPermission)
|
PermissionBackend.addPermission(newPermission)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/permissions/${newPermission.owner}/${newPermission.name}`, mode: "add"});
|
this.props.history.push({pathname: `/permissions/${newPermission.owner}/${newPermission.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Permission failed to add: ${error}`);
|
Setting.showMessage("error", `Permission failed to add: ${error}`);
|
||||||
@ -59,7 +59,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Permission failed to delete: ${error}`);
|
Setting.showMessage("error", `Permission failed to delete: ${error}`);
|
||||||
@ -81,7 +81,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Name"),
|
title: i18next.t("general:Name"),
|
||||||
@ -97,7 +97,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -107,7 +107,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Display name"),
|
title: i18next.t("general:Display name"),
|
||||||
@ -126,7 +126,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
...this.getColumnSearchProps("users"),
|
...this.getColumnSearchProps("users"),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getTags(text);
|
return Setting.getTags(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("role:Sub roles"),
|
title: i18next.t("role:Sub roles"),
|
||||||
@ -137,7 +137,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
...this.getColumnSearchProps("roles"),
|
...this.getColumnSearchProps("roles"),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getTags(text);
|
return Setting.getTags(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("permission:Resource type"),
|
title: i18next.t("permission:Resource type"),
|
||||||
@ -159,7 +159,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
...this.getColumnSearchProps("resources"),
|
...this.getColumnSearchProps("resources"),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getTags(text);
|
return Setting.getTags(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("permission:Actions"),
|
title: i18next.t("permission:Actions"),
|
||||||
@ -170,7 +170,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
...this.getColumnSearchProps("actions"),
|
...this.getColumnSearchProps("actions"),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getTags(text);
|
return Setting.getTags(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("permission:Effect"),
|
title: i18next.t("permission:Effect"),
|
||||||
@ -194,7 +194,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -214,7 +214,7 @@ class PermissionListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ class ProductListPage extends BaseListPage {
|
|||||||
ProductBackend.addProduct(newProduct)
|
ProductBackend.addProduct(newProduct)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/products/${newProduct.name}`, mode: "add"});
|
this.props.history.push({pathname: `/products/${newProduct.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Product failed to add: ${error}`);
|
Setting.showMessage("error", `Product failed to add: ${error}`);
|
||||||
@ -61,7 +61,7 @@ class ProductListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Product failed to delete: ${error}`);
|
Setting.showMessage("error", `Product failed to delete: ${error}`);
|
||||||
@ -84,7 +84,7 @@ class ProductListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -94,7 +94,7 @@ class ProductListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Display name"),
|
title: i18next.t("general:Display name"),
|
||||||
@ -115,7 +115,7 @@ class ProductListPage extends BaseListPage {
|
|||||||
<img src={text} alt={text} width={150} />
|
<img src={text} alt={text} width={150} />
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("product:Tag"),
|
title: i18next.t("product:Tag"),
|
||||||
@ -240,7 +240,7 @@ class ProductListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class ProviderListPage extends BaseListPage {
|
|||||||
ProviderBackend.addProvider(newProvider)
|
ProviderBackend.addProvider(newProvider)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/providers/${newProvider.name}`, mode: "add"});
|
this.props.history.push({pathname: `/providers/${newProvider.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Provider failed to add: ${error}`);
|
Setting.showMessage("error", `Provider failed to add: ${error}`);
|
||||||
@ -62,7 +62,7 @@ class ProviderListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Provider failed to delete: ${error}`);
|
Setting.showMessage("error", `Provider failed to delete: ${error}`);
|
||||||
@ -85,7 +85,7 @@ class ProviderListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -95,7 +95,7 @@ class ProviderListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Display name"),
|
title: i18next.t("general:Display name"),
|
||||||
@ -138,7 +138,7 @@ class ProviderListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Provider.getProviderLogoWidget(record);
|
return Provider.getProviderLogoWidget(record);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:Client ID"),
|
title: i18next.t("provider:Client ID"),
|
||||||
@ -149,7 +149,7 @@ class ProviderListPage extends BaseListPage {
|
|||||||
...this.getColumnSearchProps("clientId"),
|
...this.getColumnSearchProps("clientId"),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getShortText(text);
|
return Setting.getShortText(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:Provider URL"),
|
title: i18next.t("provider:Provider URL"),
|
||||||
@ -166,7 +166,7 @@ class ProviderListPage extends BaseListPage {
|
|||||||
}
|
}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -186,7 +186,7 @@ class ProviderListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ class ProviderTable extends React.Component {
|
|||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:Category"),
|
title: i18next.t("provider:Category"),
|
||||||
@ -92,7 +92,7 @@ class ProviderTable extends React.Component {
|
|||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
const provider = Setting.getArrayItem(this.props.providers, "name", record.name);
|
const provider = Setting.getArrayItem(this.props.providers, "name", record.name);
|
||||||
return provider?.category;
|
return provider?.category;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:Type"),
|
title: i18next.t("provider:Type"),
|
||||||
@ -102,7 +102,7 @@ class ProviderTable extends React.Component {
|
|||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
const provider = Setting.getArrayItem(this.props.providers, "name", record.name);
|
const provider = Setting.getArrayItem(this.props.providers, "name", record.name);
|
||||||
return Provider.getProviderLogoWidget(provider);
|
return Provider.getProviderLogoWidget(provider);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:canSignUp"),
|
title: i18next.t("provider:canSignUp"),
|
||||||
@ -119,7 +119,7 @@ class ProviderTable extends React.Component {
|
|||||||
this.updateField(table, index, "canSignUp", checked);
|
this.updateField(table, index, "canSignUp", checked);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:canSignIn"),
|
title: i18next.t("provider:canSignIn"),
|
||||||
@ -136,7 +136,7 @@ class ProviderTable extends React.Component {
|
|||||||
this.updateField(table, index, "canSignIn", checked);
|
this.updateField(table, index, "canSignIn", checked);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:canUnlink"),
|
title: i18next.t("provider:canUnlink"),
|
||||||
@ -153,7 +153,7 @@ class ProviderTable extends React.Component {
|
|||||||
this.updateField(table, index, "canUnlink", checked);
|
this.updateField(table, index, "canUnlink", checked);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:prompted"),
|
title: i18next.t("provider:prompted"),
|
||||||
@ -170,7 +170,7 @@ class ProviderTable extends React.Component {
|
|||||||
this.updateField(table, index, "prompted", checked);
|
this.updateField(table, index, "prompted", checked);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: i18next.t("provider:alertType"),
|
// title: i18next.t("provider:alertType"),
|
||||||
@ -211,7 +211,7 @@ class ProviderTable extends React.Component {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ class RecordListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Timestamp"),
|
title: i18next.t("general:Timestamp"),
|
||||||
@ -84,7 +84,7 @@ class RecordListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Organization"),
|
title: i18next.t("general:Organization"),
|
||||||
@ -99,7 +99,7 @@ class RecordListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:User"),
|
title: i18next.t("general:User"),
|
||||||
@ -114,7 +114,7 @@ class RecordListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Method"),
|
title: i18next.t("general:Method"),
|
||||||
@ -153,7 +153,7 @@ class RecordListPage extends BaseListPage {
|
|||||||
fixed: (Setting.isMobile()) ? "false" : "right",
|
fixed: (Setting.isMobile()) ? "false" : "right",
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return text;
|
return text;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("record:Is Triggered"),
|
title: i18next.t("record:Is Triggered"),
|
||||||
@ -170,7 +170,7 @@ class RecordListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class ResourceListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Resource failed to delete: ${error}`);
|
Setting.showMessage("error", `Resource failed to delete: ${error}`);
|
||||||
@ -99,7 +99,7 @@ class ResourceListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("resource:Application"),
|
title: i18next.t("resource:Application"),
|
||||||
@ -114,7 +114,7 @@ class ResourceListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("resource:User"),
|
title: i18next.t("resource:User"),
|
||||||
@ -129,7 +129,7 @@ class ResourceListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("resource:Parent"),
|
title: i18next.t("resource:Parent"),
|
||||||
@ -155,7 +155,7 @@ class ResourceListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("resource:Tag"),
|
title: i18next.t("resource:Tag"),
|
||||||
@ -196,7 +196,7 @@ class ResourceListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFriendlyFileSize(text);
|
return Setting.getFriendlyFileSize(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Preview"),
|
title: i18next.t("general:Preview"),
|
||||||
@ -219,7 +219,7 @@ class ResourceListPage extends BaseListPage {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:URL"),
|
title: i18next.t("general:URL"),
|
||||||
@ -238,7 +238,7 @@ class ResourceListPage extends BaseListPage {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -260,7 +260,7 @@ class ResourceListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class RoleListPage extends BaseListPage {
|
|||||||
RoleBackend.addRole(newRole)
|
RoleBackend.addRole(newRole)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/roles/${newRole.owner}/${newRole.name}`, mode: "add"});
|
this.props.history.push({pathname: `/roles/${newRole.owner}/${newRole.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Role failed to add: ${error}`);
|
Setting.showMessage("error", `Role failed to add: ${error}`);
|
||||||
@ -55,7 +55,7 @@ class RoleListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Role failed to delete: ${error}`);
|
Setting.showMessage("error", `Role failed to delete: ${error}`);
|
||||||
@ -77,7 +77,7 @@ class RoleListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Name"),
|
title: i18next.t("general:Name"),
|
||||||
@ -93,7 +93,7 @@ class RoleListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -103,7 +103,7 @@ class RoleListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Display name"),
|
title: i18next.t("general:Display name"),
|
||||||
@ -122,7 +122,7 @@ class RoleListPage extends BaseListPage {
|
|||||||
...this.getColumnSearchProps("users"),
|
...this.getColumnSearchProps("users"),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getTags(text);
|
return Setting.getTags(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("role:Sub roles"),
|
title: i18next.t("role:Sub roles"),
|
||||||
@ -133,7 +133,7 @@ class RoleListPage extends BaseListPage {
|
|||||||
...this.getColumnSearchProps("roles"),
|
...this.getColumnSearchProps("roles"),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getTags(text);
|
return Setting.getTags(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Is enabled"),
|
title: i18next.t("general:Is enabled"),
|
||||||
@ -145,7 +145,7 @@ class RoleListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -165,7 +165,7 @@ class RoleListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -75,35 +75,35 @@ export const OtherProviderInfo = {
|
|||||||
},
|
},
|
||||||
"Azure Blob": {
|
"Azure Blob": {
|
||||||
logo: `${StaticBaseUrl}/img/social_azure.jpg`,
|
logo: `${StaticBaseUrl}/img/social_azure.jpg`,
|
||||||
url: "https://azure.microsoft.com/en-us/services/storage/blobs/"
|
url: "https://azure.microsoft.com/en-us/services/storage/blobs/",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
SAML: {
|
SAML: {
|
||||||
"Aliyun IDaaS": {
|
"Aliyun IDaaS": {
|
||||||
logo: `${StaticBaseUrl}/img/social_aliyun.png`,
|
logo: `${StaticBaseUrl}/img/social_aliyun.png`,
|
||||||
url: "https://aliyun.com/product/idaas"
|
url: "https://aliyun.com/product/idaas",
|
||||||
},
|
},
|
||||||
"Keycloak": {
|
"Keycloak": {
|
||||||
logo: `${StaticBaseUrl}/img/social_keycloak.png`,
|
logo: `${StaticBaseUrl}/img/social_keycloak.png`,
|
||||||
url: "https://www.keycloak.org/"
|
url: "https://www.keycloak.org/",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Payment: {
|
Payment: {
|
||||||
"Alipay": {
|
"Alipay": {
|
||||||
logo: `${StaticBaseUrl}/img/payment_alipay.png`,
|
logo: `${StaticBaseUrl}/img/payment_alipay.png`,
|
||||||
url: "https://www.alipay.com/"
|
url: "https://www.alipay.com/",
|
||||||
},
|
},
|
||||||
"WeChat Pay": {
|
"WeChat Pay": {
|
||||||
logo: `${StaticBaseUrl}/img/payment_wechat_pay.png`,
|
logo: `${StaticBaseUrl}/img/payment_wechat_pay.png`,
|
||||||
url: "https://pay.weixin.qq.com/"
|
url: "https://pay.weixin.qq.com/",
|
||||||
},
|
},
|
||||||
"PayPal": {
|
"PayPal": {
|
||||||
logo: `${StaticBaseUrl}/img/payment_paypal.png`,
|
logo: `${StaticBaseUrl}/img/payment_paypal.png`,
|
||||||
url: "https://www.paypal.com/"
|
url: "https://www.paypal.com/",
|
||||||
},
|
},
|
||||||
"GC": {
|
"GC": {
|
||||||
logo: `${StaticBaseUrl}/img/payment_gc.png`,
|
logo: `${StaticBaseUrl}/img/payment_gc.png`,
|
||||||
url: "https://gc.org"
|
url: "https://gc.org",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Captcha: {
|
Captcha: {
|
||||||
@ -126,8 +126,8 @@ export const OtherProviderInfo = {
|
|||||||
"GEETEST": {
|
"GEETEST": {
|
||||||
logo: `${StaticBaseUrl}/img/social_geetest.png`,
|
logo: `${StaticBaseUrl}/img/social_geetest.png`,
|
||||||
url: "https://www.geetest.com",
|
url: "https://www.geetest.com",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export function getCountryRegionData() {
|
export function getCountryRegionData() {
|
||||||
@ -598,7 +598,7 @@ export function getProviderTypeOptions(category) {
|
|||||||
{id: "AWS S3", name: "AWS S3"},
|
{id: "AWS S3", name: "AWS S3"},
|
||||||
{id: "Aliyun OSS", name: "Aliyun OSS"},
|
{id: "Aliyun OSS", name: "Aliyun OSS"},
|
||||||
{id: "Tencent Cloud COS", name: "Tencent Cloud COS"},
|
{id: "Tencent Cloud COS", name: "Tencent Cloud COS"},
|
||||||
{id: "Azure Blob", name: "Azure Blob"}
|
{id: "Azure Blob", name: "Azure Blob"},
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else if (category === "SAML") {
|
} else if (category === "SAML") {
|
||||||
@ -808,7 +808,7 @@ export function getTags(tags) {
|
|||||||
res.push(
|
res.push(
|
||||||
<Tag color={getTagColor(tag)}>
|
<Tag color={getTagColor(tag)}>
|
||||||
{tag}
|
{tag}
|
||||||
</Tag>
|
</Tag>,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
return res;
|
return res;
|
||||||
@ -858,7 +858,7 @@ export function getSyncerTableColumns(syncer) {
|
|||||||
"isHashed": true,
|
"isHashed": true,
|
||||||
"values": [
|
"values": [
|
||||||
|
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "USERNAME",
|
"name": "USERNAME",
|
||||||
@ -867,7 +867,7 @@ export function getSyncerTableColumns(syncer) {
|
|||||||
"isHashed": true,
|
"isHashed": true,
|
||||||
"values": [
|
"values": [
|
||||||
|
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LAST_NAME+FIRST_NAME",
|
"name": "LAST_NAME+FIRST_NAME",
|
||||||
@ -876,7 +876,7 @@ export function getSyncerTableColumns(syncer) {
|
|||||||
"isHashed": true,
|
"isHashed": true,
|
||||||
"values": [
|
"values": [
|
||||||
|
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EMAIL",
|
"name": "EMAIL",
|
||||||
@ -885,7 +885,7 @@ export function getSyncerTableColumns(syncer) {
|
|||||||
"isHashed": true,
|
"isHashed": true,
|
||||||
"values": [
|
"values": [
|
||||||
|
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EMAIL_VERIFIED",
|
"name": "EMAIL_VERIFIED",
|
||||||
@ -894,7 +894,7 @@ export function getSyncerTableColumns(syncer) {
|
|||||||
"isHashed": true,
|
"isHashed": true,
|
||||||
"values": [
|
"values": [
|
||||||
|
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "FIRST_NAME",
|
"name": "FIRST_NAME",
|
||||||
@ -903,7 +903,7 @@ export function getSyncerTableColumns(syncer) {
|
|||||||
"isHashed": true,
|
"isHashed": true,
|
||||||
"values": [
|
"values": [
|
||||||
|
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LAST_NAME",
|
"name": "LAST_NAME",
|
||||||
@ -912,7 +912,7 @@ export function getSyncerTableColumns(syncer) {
|
|||||||
"isHashed": true,
|
"isHashed": true,
|
||||||
"values": [
|
"values": [
|
||||||
|
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CREATED_TIMESTAMP",
|
"name": "CREATED_TIMESTAMP",
|
||||||
@ -921,7 +921,7 @@ export function getSyncerTableColumns(syncer) {
|
|||||||
"isHashed": true,
|
"isHashed": true,
|
||||||
"values": [
|
"values": [
|
||||||
|
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ENABLED",
|
"name": "ENABLED",
|
||||||
@ -930,8 +930,8 @@ export function getSyncerTableColumns(syncer) {
|
|||||||
"isHashed": true,
|
"isHashed": true,
|
||||||
"values": [
|
"values": [
|
||||||
|
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
default:
|
default:
|
||||||
return [];
|
return [];
|
||||||
|
@ -101,7 +101,7 @@ class SignupTable extends React.Component {
|
|||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:visible"),
|
title: i18next.t("provider:visible"),
|
||||||
@ -123,7 +123,7 @@ class SignupTable extends React.Component {
|
|||||||
}
|
}
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:required"),
|
title: i18next.t("provider:required"),
|
||||||
@ -140,7 +140,7 @@ class SignupTable extends React.Component {
|
|||||||
this.updateField(table, index, "required", checked);
|
this.updateField(table, index, "required", checked);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:prompted"),
|
title: i18next.t("provider:prompted"),
|
||||||
@ -161,7 +161,7 @@ class SignupTable extends React.Component {
|
|||||||
this.updateField(table, index, "prompted", checked);
|
this.updateField(table, index, "prompted", checked);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("application:rule"),
|
title: i18next.t("application:rule"),
|
||||||
@ -201,7 +201,7 @@ class SignupTable extends React.Component {
|
|||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -221,7 +221,7 @@ class SignupTable extends React.Component {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class SyncerListPage extends BaseListPage {
|
|||||||
SyncerBackend.addSyncer(newSyncer)
|
SyncerBackend.addSyncer(newSyncer)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/syncers/${newSyncer.name}`, mode: "add"});
|
this.props.history.push({pathname: `/syncers/${newSyncer.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Syncer failed to add: ${error}`);
|
Setting.showMessage("error", `Syncer failed to add: ${error}`);
|
||||||
@ -65,7 +65,7 @@ class SyncerListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Syncer failed to delete: ${error}`);
|
Setting.showMessage("error", `Syncer failed to delete: ${error}`);
|
||||||
@ -78,7 +78,7 @@ class SyncerListPage extends BaseListPage {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.setState({loading: false});
|
this.setState({loading: false});
|
||||||
Setting.showMessage("success", "Syncer sync users successfully");
|
Setting.showMessage("success", "Syncer sync users successfully");
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
this.setState({loading: false});
|
this.setState({loading: false});
|
||||||
@ -101,7 +101,7 @@ class SyncerListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Name"),
|
title: i18next.t("general:Name"),
|
||||||
@ -117,7 +117,7 @@ class SyncerListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -127,7 +127,7 @@ class SyncerListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("provider:Type"),
|
title: i18next.t("provider:Type"),
|
||||||
@ -212,7 +212,7 @@ class SyncerListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -233,7 +233,7 @@ class SyncerListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class SyncerTableColumnTable extends React.Component {
|
|||||||
this.updateField(table, index, "name", e.target.value);
|
this.updateField(table, index, "name", e.target.value);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("syncer:Column type"),
|
title: i18next.t("syncer:Column type"),
|
||||||
@ -88,7 +88,7 @@ class SyncerTableColumnTable extends React.Component {
|
|||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("syncer:Casdoor column"),
|
title: i18next.t("syncer:Casdoor column"),
|
||||||
@ -105,7 +105,7 @@ class SyncerTableColumnTable extends React.Component {
|
|||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("syncer:Is hashed"),
|
title: i18next.t("syncer:Is hashed"),
|
||||||
@ -117,7 +117,7 @@ class SyncerTableColumnTable extends React.Component {
|
|||||||
this.updateField(table, index, "isHashed", checked);
|
this.updateField(table, index, "isHashed", checked);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -137,7 +137,7 @@ class SyncerTableColumnTable extends React.Component {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -54,6 +54,6 @@ function testEmailProvider(provider, email = "") {
|
|||||||
return fetch(`${Setting.ServerUrl}/api/send-email`, {
|
return fetch(`${Setting.ServerUrl}/api/send-email`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
body: JSON.stringify(emailForm)
|
body: JSON.stringify(emailForm),
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class TokenListPage extends BaseListPage {
|
|||||||
TokenBackend.addToken(newToken)
|
TokenBackend.addToken(newToken)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/tokens/${newToken.name}`, mode: "add"});
|
this.props.history.push({pathname: `/tokens/${newToken.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Token failed to add: ${error}`);
|
Setting.showMessage("error", `Token failed to add: ${error}`);
|
||||||
@ -58,7 +58,7 @@ class TokenListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Token failed to delete: ${error}`);
|
Setting.showMessage("error", `Token failed to delete: ${error}`);
|
||||||
@ -81,7 +81,7 @@ class TokenListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -91,7 +91,7 @@ class TokenListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Application"),
|
title: i18next.t("general:Application"),
|
||||||
@ -106,7 +106,7 @@ class TokenListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Organization"),
|
title: i18next.t("general:Organization"),
|
||||||
@ -121,7 +121,7 @@ class TokenListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:User"),
|
title: i18next.t("general:User"),
|
||||||
@ -136,7 +136,7 @@ class TokenListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("token:Authorization code"),
|
title: i18next.t("token:Authorization code"),
|
||||||
@ -147,7 +147,7 @@ class TokenListPage extends BaseListPage {
|
|||||||
...this.getColumnSearchProps("code"),
|
...this.getColumnSearchProps("code"),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getClickable(text);
|
return Setting.getClickable(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("token:Access token"),
|
title: i18next.t("token:Access token"),
|
||||||
@ -159,7 +159,7 @@ class TokenListPage extends BaseListPage {
|
|||||||
...this.getColumnSearchProps("accessToken"),
|
...this.getColumnSearchProps("accessToken"),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getClickable(text);
|
return Setting.getClickable(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("token:Expires in"),
|
title: i18next.t("token:Expires in"),
|
||||||
@ -202,7 +202,7 @@ class TokenListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class UrlTable extends React.Component {
|
|||||||
this.updateField(table, index, e.target.value);
|
this.updateField(table, index, e.target.value);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -91,7 +91,7 @@ class UrlTable extends React.Component {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ class UserEditPage extends React.Component {
|
|||||||
<OAuthWidget key={providerItem.name} labelSpan={(Setting.isMobile()) ? 10 : 3} user={this.state.user} application={this.state.application} providerItem={providerItem} account={this.props.account} onUnlinked={() => {return this.unlinked();}} />
|
<OAuthWidget key={providerItem.name} labelSpan={(Setting.isMobile()) ? 10 : 3} user={this.state.user} application={this.state.application} providerItem={providerItem} account={this.props.account} onUnlinked={() => {return this.unlinked();}} />
|
||||||
) : (
|
) : (
|
||||||
<SamlWidget key={providerItem.name} labelSpan={(Setting.isMobile()) ? 10 : 3} user={this.state.user} application={this.state.application} providerItem={providerItem} onUnlinked={() => {return this.unlinked();}} />
|
<SamlWidget key={providerItem.name} labelSpan={(Setting.isMobile()) ? 10 : 3} user={this.state.user} application={this.state.application} providerItem={providerItem} onUnlinked={() => {return this.unlinked();}} />
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ class UserListPage extends BaseListPage {
|
|||||||
UserBackend.addUser(newUser)
|
UserBackend.addUser(newUser)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/users/${newUser.owner}/${newUser.name}`, mode: "add"});
|
this.props.history.push({pathname: `/users/${newUser.owner}/${newUser.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `User failed to add: ${error}`);
|
Setting.showMessage("error", `User failed to add: ${error}`);
|
||||||
@ -85,7 +85,7 @@ class UserListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `User failed to delete: ${error}`);
|
Setting.showMessage("error", `User failed to delete: ${error}`);
|
||||||
@ -152,7 +152,7 @@ class UserListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Application"),
|
title: i18next.t("general:Application"),
|
||||||
@ -168,7 +168,7 @@ class UserListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Name"),
|
title: i18next.t("general:Name"),
|
||||||
@ -184,7 +184,7 @@ class UserListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -194,7 +194,7 @@ class UserListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Display name"),
|
title: i18next.t("general:Display name"),
|
||||||
@ -215,7 +215,7 @@ class UserListPage extends BaseListPage {
|
|||||||
<img src={text} alt={text} width={50} />
|
<img src={text} alt={text} width={50} />
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Email"),
|
title: i18next.t("general:Email"),
|
||||||
@ -230,7 +230,7 @@ class UserListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Phone"),
|
title: i18next.t("general:Phone"),
|
||||||
@ -281,7 +281,7 @@ class UserListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("user:Is global admin"),
|
title: i18next.t("user:Is global admin"),
|
||||||
@ -293,7 +293,7 @@ class UserListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("user:Is forbidden"),
|
title: i18next.t("user:Is forbidden"),
|
||||||
@ -305,7 +305,7 @@ class UserListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("user:Is deleted"),
|
title: i18next.t("user:Is deleted"),
|
||||||
@ -317,7 +317,7 @@ class UserListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -337,7 +337,7 @@ class UserListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ class WebAuthnCredentialTable extends React.Component {
|
|||||||
{i18next.t("general:Delete")}
|
{i18next.t("general:Delete")}
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -84,8 +84,8 @@ const userTemplate = {
|
|||||||
"phoneVerifiedTime": "",
|
"phoneVerifiedTime": "",
|
||||||
"renameQuota": "3",
|
"renameQuota": "3",
|
||||||
"tagline": "",
|
"tagline": "",
|
||||||
"website": ""
|
"website": "",
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
class WebhookEditPage extends React.Component {
|
class WebhookEditPage extends React.Component {
|
||||||
|
@ -72,7 +72,7 @@ class WebhookHeaderTable extends React.Component {
|
|||||||
this.updateField(table, index, "name", e.target.value);
|
this.updateField(table, index, "name", e.target.value);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("webhook:Value"),
|
title: i18next.t("webhook:Value"),
|
||||||
@ -84,7 +84,7 @@ class WebhookHeaderTable extends React.Component {
|
|||||||
this.updateField(table, index, "value", e.target.value);
|
this.updateField(table, index, "value", e.target.value);
|
||||||
}} />
|
}} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -104,7 +104,7 @@ class WebhookHeaderTable extends React.Component {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
WebhookBackend.addWebhook(newWebhook)
|
WebhookBackend.addWebhook(newWebhook)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.props.history.push({pathname: `/webhooks/${newWebhook.name}`, mode: "add"});
|
this.props.history.push({pathname: `/webhooks/${newWebhook.name}`, mode: "add"});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Webhook failed to add: ${error}`);
|
Setting.showMessage("error", `Webhook failed to add: ${error}`);
|
||||||
@ -58,7 +58,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
data: Setting.deleteRow(this.state.data, i),
|
data: Setting.deleteRow(this.state.data, i),
|
||||||
pagination: {total: this.state.pagination.total - 1},
|
pagination: {total: this.state.pagination.total - 1},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
Setting.showMessage("error", `Webhook failed to delete: ${error}`);
|
Setting.showMessage("error", `Webhook failed to delete: ${error}`);
|
||||||
@ -80,7 +80,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Name"),
|
title: i18next.t("general:Name"),
|
||||||
@ -96,7 +96,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
{text}
|
{text}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Created time"),
|
title: i18next.t("general:Created time"),
|
||||||
@ -106,7 +106,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getFormattedDate(text);
|
return Setting.getFormattedDate(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("webhook:URL"),
|
title: i18next.t("webhook:URL"),
|
||||||
@ -123,7 +123,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
}
|
}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("webhook:Method"),
|
title: i18next.t("webhook:Method"),
|
||||||
@ -143,7 +143,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
filters: [
|
filters: [
|
||||||
{text: "application/json", value: "application/json"},
|
{text: "application/json", value: "application/json"},
|
||||||
{text: "application/x-www-form-urlencoded", value: "application/x-www-form-urlencoded"},
|
{text: "application/x-www-form-urlencoded", value: "application/x-www-form-urlencoded"},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("webhook:Events"),
|
title: i18next.t("webhook:Events"),
|
||||||
@ -154,7 +154,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
...this.getColumnSearchProps("events"),
|
...this.getColumnSearchProps("events"),
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return Setting.getTags(text);
|
return Setting.getTags(text);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("webhook:Is user extended"),
|
title: i18next.t("webhook:Is user extended"),
|
||||||
@ -166,7 +166,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Is enabled"),
|
title: i18next.t("general:Is enabled"),
|
||||||
@ -178,7 +178,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
return (
|
return (
|
||||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
@ -198,7 +198,7 @@ class WebhookListPage extends BaseListPage {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import {authConfig} from "./Auth";
|
|||||||
export function getAccount(query) {
|
export function getAccount(query) {
|
||||||
return fetch(`${authConfig.serverUrl}/api/get-account${query}`, {
|
return fetch(`${authConfig.serverUrl}/api/get-account${query}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ class ForgetPage extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
Util.showMessage(
|
Util.showMessage(
|
||||||
"error",
|
"error",
|
||||||
i18next.t("forget:Unknown forget type: ") + this.state.type
|
i18next.t("forget:Unknown forget type: ") + this.state.type,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ class ForgetPage extends React.Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
application: application,
|
application: application,
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ class ForgetPage extends React.Component {
|
|||||||
AuthBackend.getEmailAndPhone({
|
AuthBackend.getEmailAndPhone({
|
||||||
application: forms.step1.getFieldValue("application"),
|
application: forms.step1.getFieldValue("application"),
|
||||||
organization: forms.step1.getFieldValue("organization"),
|
organization: forms.step1.getFieldValue("organization"),
|
||||||
username: username
|
username: username,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.status === "ok") {
|
if (res.status === "ok") {
|
||||||
const phone = res.data.phone;
|
const phone = res.data.phone;
|
||||||
@ -147,7 +147,7 @@ class ForgetPage extends React.Component {
|
|||||||
name: this.state.name,
|
name: this.state.name,
|
||||||
code: forms.step2.getFieldValue("emailCode"),
|
code: forms.step2.getFieldValue("emailCode"),
|
||||||
phonePrefix: this.state.application?.organizationObj.phonePrefix,
|
phonePrefix: this.state.application?.organizationObj.phonePrefix,
|
||||||
type: "login"
|
type: "login",
|
||||||
}, oAuthParams).then(res => {
|
}, oAuthParams).then(res => {
|
||||||
if (res.status === "ok") {
|
if (res.status === "ok") {
|
||||||
this.setState({current: 2, userId: res.data, username: res.data.split("/")[1]});
|
this.setState({current: 2, userId: res.data, username: res.data.split("/")[1]});
|
||||||
@ -182,7 +182,7 @@ class ForgetPage extends React.Component {
|
|||||||
options.push(
|
options.push(
|
||||||
<Option key={"phone"} value={"phone"}>
|
<Option key={"phone"} value={"phone"}>
|
||||||
{this.state.phone}
|
{this.state.phone}
|
||||||
</Option>
|
</Option>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ class ForgetPage extends React.Component {
|
|||||||
options.push(
|
options.push(
|
||||||
<Option key={"email"} value={"email"}>
|
<Option key={"email"} value={"email"}>
|
||||||
{this.state.email}
|
{this.state.email}
|
||||||
</Option>
|
</Option>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"forget:Please input your application!"
|
"forget:Please input your application!",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
@ -234,7 +234,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"forget:Please input your organization!"
|
"forget:Please input your organization!",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
@ -245,7 +245,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"forget:Please input your username!"
|
"forget:Please input your username!",
|
||||||
),
|
),
|
||||||
whitespace: true,
|
whitespace: true,
|
||||||
},
|
},
|
||||||
@ -278,7 +278,7 @@ class ForgetPage extends React.Component {
|
|||||||
this.onFinishFailed(
|
this.onFinishFailed(
|
||||||
errorInfo.values,
|
errorInfo.values,
|
||||||
errorInfo.errorFields,
|
errorInfo.errorFields,
|
||||||
errorInfo.outOfDate
|
errorInfo.outOfDate,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
initialValues={{
|
initialValues={{
|
||||||
@ -295,7 +295,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"forget:Please input your application!"
|
"forget:Please input your application!",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
@ -307,7 +307,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"forget:Please input your organization!"
|
"forget:Please input your organization!",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
@ -343,7 +343,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"code:Please input your verification code!"
|
"code:Please input your verification code!",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
@ -382,7 +382,7 @@ class ForgetPage extends React.Component {
|
|||||||
this.onFinishFailed(
|
this.onFinishFailed(
|
||||||
errorInfo.values,
|
errorInfo.values,
|
||||||
errorInfo.errorFields,
|
errorInfo.errorFields,
|
||||||
errorInfo.outOfDate
|
errorInfo.outOfDate,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
initialValues={{
|
initialValues={{
|
||||||
@ -399,7 +399,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"forget:Please input your application!"
|
"forget:Please input your application!",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
@ -411,7 +411,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"forget:Please input your organization!"
|
"forget:Please input your organization!",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
@ -423,7 +423,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"forget:Please input your password!"
|
"forget:Please input your password!",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
@ -443,7 +443,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"forget:Please confirm your password!"
|
"forget:Please confirm your password!",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
({getFieldValue}) => ({
|
({getFieldValue}) => ({
|
||||||
@ -453,8 +453,8 @@ class ForgetPage extends React.Component {
|
|||||||
}
|
}
|
||||||
return Promise.reject(
|
return Promise.reject(
|
||||||
i18next.t(
|
i18next.t(
|
||||||
"forget:Your confirmed password is inconsistent with the password!"
|
"forget:Your confirmed password is inconsistent with the password!",
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
@ -46,7 +46,7 @@ class LoginPage extends React.Component {
|
|||||||
validEmailOrPhone: false,
|
validEmailOrPhone: false,
|
||||||
validEmail: false,
|
validEmail: false,
|
||||||
validPhone: false,
|
validPhone: false,
|
||||||
loginMethod: "password"
|
loginMethod: "password",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.state.type === "cas" && props.match?.params.casApplicationName !== undefined) {
|
if (this.state.type === "cas" && props.match?.params.casApplicationName !== undefined) {
|
||||||
@ -107,7 +107,7 @@ class LoginPage extends React.Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
application: application,
|
application: application,
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ class LoginPage extends React.Component {
|
|||||||
<Button type="primary" key="signin">
|
<Button type="primary" key="signin">
|
||||||
Sign In
|
Sign In
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
</Result>
|
</Result>
|
||||||
@ -339,7 +339,7 @@ class LoginPage extends React.Component {
|
|||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t("login:Please input your username, Email or phone!")
|
message: i18next.t("login:Please input your username, Email or phone!"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
validator: (_, value) => {
|
validator: (_, value) => {
|
||||||
@ -359,8 +359,8 @@ class LoginPage extends React.Component {
|
|||||||
|
|
||||||
this.setState({validEmailOrPhone: true});
|
this.setState({validEmailOrPhone: true});
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
@ -557,7 +557,7 @@ class LoginPage extends React.Component {
|
|||||||
let application = this.getApplicationObj();
|
let application = this.getApplicationObj();
|
||||||
return fetch(`${Setting.ServerUrl}/api/webauthn/signin/begin?owner=${application.organization}&name=${username}`, {
|
return fetch(`${Setting.ServerUrl}/api/webauthn/signin/begin?owner=${application.organization}&name=${username}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
})
|
})
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then((credentialRequestOptions) => {
|
.then((credentialRequestOptions) => {
|
||||||
@ -572,7 +572,7 @@ class LoginPage extends React.Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return navigator.credentials.get({
|
return navigator.credentials.get({
|
||||||
publicKey: credentialRequestOptions.publicKey
|
publicKey: credentialRequestOptions.publicKey,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then((assertion) => {
|
.then((assertion) => {
|
||||||
@ -594,7 +594,7 @@ class LoginPage extends React.Component {
|
|||||||
signature: UserWebauthnBackend.webAuthnBufferEncode(sig),
|
signature: UserWebauthnBackend.webAuthnBufferEncode(sig),
|
||||||
userHandle: UserWebauthnBackend.webAuthnBufferEncode(userHandle),
|
userHandle: UserWebauthnBackend.webAuthnBufferEncode(userHandle),
|
||||||
},
|
},
|
||||||
})
|
}),
|
||||||
})
|
})
|
||||||
.then(res => res.json()).then((res) => {
|
.then(res => res.json()).then((res) => {
|
||||||
if (res.msg === "") {
|
if (res.msg === "") {
|
||||||
|
@ -202,7 +202,7 @@ class PromptPage extends React.Component {
|
|||||||
Setting.goToLogin(this, application);
|
Setting.goToLogin(this, application);
|
||||||
}}>
|
}}>
|
||||||
Sign In
|
Sign In
|
||||||
</Button>
|
</Button>,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
</Result>
|
</Result>
|
||||||
|
@ -34,7 +34,7 @@ const authInfo = {
|
|||||||
scope: "snsapi_login",
|
scope: "snsapi_login",
|
||||||
endpoint: "https://open.weixin.qq.com/connect/qrconnect",
|
endpoint: "https://open.weixin.qq.com/connect/qrconnect",
|
||||||
mpScope: "snsapi_userinfo",
|
mpScope: "snsapi_userinfo",
|
||||||
mpEndpoint: "https://open.weixin.qq.com/connect/oauth2/authorize"
|
mpEndpoint: "https://open.weixin.qq.com/connect/oauth2/authorize",
|
||||||
},
|
},
|
||||||
WeChatMiniProgram: {
|
WeChatMiniProgram: {
|
||||||
endpoint: "https://mp.weixin.qq.com/",
|
endpoint: "https://mp.weixin.qq.com/",
|
||||||
@ -119,8 +119,8 @@ const authInfo = {
|
|||||||
endpoint: "https://example.com/",
|
endpoint: "https://example.com/",
|
||||||
},
|
},
|
||||||
Bilibili: {
|
Bilibili: {
|
||||||
endpoint: "https://passport.bilibili.com/register/pc_oauth2.html"
|
endpoint: "https://passport.bilibili.com/register/pc_oauth2.html",
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export function getProviderUrl(provider) {
|
export function getProviderUrl(provider) {
|
||||||
|
@ -73,7 +73,7 @@ class ResultPage extends React.Component {
|
|||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
{i18next.t("login:Sign In")}
|
{i18next.t("login:Sign In")}
|
||||||
</Button>
|
</Button>,
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -340,8 +340,8 @@ class SignupPage extends React.Component {
|
|||||||
|
|
||||||
this.setState({validEmail: true});
|
this.setState({validEmail: true});
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input onChange={e => this.setState({email: e.target.value})} />
|
<Input onChange={e => this.setState({email: e.target.value})} />
|
||||||
@ -386,8 +386,8 @@ class SignupPage extends React.Component {
|
|||||||
|
|
||||||
this.setState({validPhone: true});
|
this.setState({validPhone: true});
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
@ -530,7 +530,7 @@ class SignupPage extends React.Component {
|
|||||||
Setting.goToLogin(this, application);
|
Setting.goToLogin(this, application);
|
||||||
}}>
|
}}>
|
||||||
Sign In
|
Sign In
|
||||||
</Button>
|
</Button>,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
</Result>
|
</Result>
|
||||||
|
@ -17,28 +17,28 @@ import * as Setting from "../Setting";
|
|||||||
export function getApplications(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getApplications(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-applications?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-applications?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getApplicationsByOrganization(owner, organization) {
|
export function getApplicationsByOrganization(owner, organization) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-applications?owner=${owner}&organization=${organization}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-applications?owner=${owner}&organization=${organization}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getApplication(owner, name) {
|
export function getApplication(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-application?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-application?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUserApplication(owner, name) {
|
export function getUserApplication(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-user-application?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-user-application?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +73,6 @@ export function deleteApplication(application) {
|
|||||||
export function getSamlMetadata(owner, name) {
|
export function getSamlMetadata(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/saml/metadata?application=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/saml/metadata?application=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.text());
|
}).then(res => res.text());
|
||||||
}
|
}
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getCerts(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getCerts(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-certs?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-certs?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCert(owner, name) {
|
export function getCert(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-cert?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-cert?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getModels(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getModels(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-models?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-models?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getModel(owner, name) {
|
export function getModel(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-model?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-model?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getOrganizations(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getOrganizations(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-organizations?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-organizations?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getOrganization(owner, name) {
|
export function getOrganization(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-organization?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-organization?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getPayments(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getPayments(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-payments?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-payments?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPayment(owner, name) {
|
export function getPayment(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-payment?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-payment?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,6 +58,6 @@ export function deletePayment(payment) {
|
|||||||
export function invoicePayment(owner, name) {
|
export function invoicePayment(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/invoice-payment?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/invoice-payment?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getPermissions(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getPermissions(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-permissions?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-permissions?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPermission(owner, name) {
|
export function getPermission(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-permission?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-permission?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getProducts(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getProducts(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-products?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-products?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getProduct(owner, name) {
|
export function getProduct(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-product?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-product?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getProviders(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getProviders(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-providers?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-providers?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getProvider(owner, name) {
|
export function getProvider(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-provider?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-provider?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,6 @@ import * as Setting from "../Setting";
|
|||||||
export function getRecords(page, pageSize, field = "", value = "", sortField = "", sortOrder = "") {
|
export function getRecords(page, pageSize, field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-records?pageSize=${pageSize}&p=${page}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-records?pageSize=${pageSize}&p=${page}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getResources(owner, user, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getResources(owner, user, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-resources?owner=${owner}&user=${user}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-resources?owner=${owner}&user=${user}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getResource(owner, name) {
|
export function getResource(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-resource?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-resource?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getRoles(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getRoles(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-roles?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-roles?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getRole(owner, name) {
|
export function getRole(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-role?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-role?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getSyncers(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getSyncers(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-syncers?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-syncers?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSyncer(owner, name) {
|
export function getSyncer(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-syncer?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-syncer?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getTokens(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getTokens(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-tokens?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-tokens?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getToken(owner, name) {
|
export function getToken(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-token?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-token?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,21 +18,21 @@ import i18next from "i18next";
|
|||||||
export function getGlobalUsers(page, pageSize, field = "", value = "", sortField = "", sortOrder = "") {
|
export function getGlobalUsers(page, pageSize, field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-global-users?p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-global-users?p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUsers(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getUsers(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-users?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-users?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUser(owner, name) {
|
export function getUser(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-user?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-user?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ export function setPassword(userOwner, userName, oldPassword, newPassword) {
|
|||||||
return fetch(`${Setting.ServerUrl}/api/set-password`, {
|
return fetch(`${Setting.ServerUrl}/api/set-password`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
body: formData
|
body: formData,
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ export function sendCode(checkType, checkId, checkKey, dest, type, applicationId
|
|||||||
return fetch(`${Setting.ServerUrl}/api/send-verification-code`, {
|
return fetch(`${Setting.ServerUrl}/api/send-verification-code`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
body: formData
|
body: formData,
|
||||||
}).then(res => res.json()).then(res => {
|
}).then(res => res.json()).then(res => {
|
||||||
if (res.status === "ok") {
|
if (res.status === "ok") {
|
||||||
Setting.showMessage("success", i18next.t("user:Code Sent"));
|
Setting.showMessage("success", i18next.t("user:Code Sent"));
|
||||||
@ -120,7 +120,7 @@ export function verifyCaptcha(captchaType, captchaToken, clientSecret) {
|
|||||||
return fetch(`${Setting.ServerUrl}/api/verify-captcha`, {
|
return fetch(`${Setting.ServerUrl}/api/verify-captcha`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
body: formData
|
body: formData,
|
||||||
}).then(res => res.json()).then(res => {
|
}).then(res => res.json()).then(res => {
|
||||||
if (res.status === "ok") {
|
if (res.status === "ok") {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
@ -144,12 +144,12 @@ export function resetEmailOrPhone(dest, type, code) {
|
|||||||
return fetch(`${Setting.ServerUrl}/api/reset-email-or-phone`, {
|
return fetch(`${Setting.ServerUrl}/api/reset-email-or-phone`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
body: formData
|
body: formData,
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCaptcha(owner, name, isCurrentProvider) {
|
export function getCaptcha(owner, name, isCurrentProvider) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-captcha?applicationId=${owner}/${encodeURIComponent(name)}&isCurrentProvider=${isCurrentProvider}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-captcha?applicationId=${owner}/${encodeURIComponent(name)}&isCurrentProvider=${isCurrentProvider}`, {
|
||||||
method: "GET"
|
method: "GET",
|
||||||
}).then(res => res.json()).then(res => res.data);
|
}).then(res => res.json()).then(res => res.data);
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ import * as Setting from "../Setting";
|
|||||||
export function registerWebauthnCredential() {
|
export function registerWebauthnCredential() {
|
||||||
return fetch(`${Setting.ServerUrl}/api/webauthn/signup/begin`, {
|
return fetch(`${Setting.ServerUrl}/api/webauthn/signup/begin`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
})
|
})
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then((credentialCreationOptions) => {
|
.then((credentialCreationOptions) => {
|
||||||
@ -29,7 +29,7 @@ export function registerWebauthnCredential() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return navigator.credentials.create({
|
return navigator.credentials.create({
|
||||||
publicKey: credentialCreationOptions.publicKey
|
publicKey: credentialCreationOptions.publicKey,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then((credential) => {
|
.then((credential) => {
|
||||||
@ -47,7 +47,7 @@ export function registerWebauthnCredential() {
|
|||||||
attestationObject: webAuthnBufferEncode(attestationObject),
|
attestationObject: webAuthnBufferEncode(attestationObject),
|
||||||
clientDataJSON: webAuthnBufferEncode(clientDataJSON),
|
clientDataJSON: webAuthnBufferEncode(clientDataJSON),
|
||||||
},
|
},
|
||||||
})
|
}),
|
||||||
})
|
})
|
||||||
.then(res => res.json());
|
.then(res => res.json());
|
||||||
});
|
});
|
||||||
@ -61,7 +61,7 @@ export function deleteUserWebAuthnCredential(credentialID) {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
body: form,
|
body: form,
|
||||||
dataType: "text"
|
dataType: "text",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
|||||||
export function getWebhooks(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
export function getWebhooks(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-webhooks?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-webhooks?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getWebhook(owner, name) {
|
export function getWebhook(owner, name) {
|
||||||
return fetch(`${Setting.ServerUrl}/api/get-webhook?id=${owner}/${encodeURIComponent(name)}`, {
|
return fetch(`${Setting.ServerUrl}/api/get-webhook?id=${owner}/${encodeURIComponent(name)}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
credentials: "include"
|
credentials: "include",
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ export const CountDownInput = (props) => {
|
|||||||
width: "200px",
|
width: "200px",
|
||||||
borderRadius: "3px",
|
borderRadius: "3px",
|
||||||
border: "1px solid #ccc",
|
border: "1px solid #ccc",
|
||||||
marginBottom: 10
|
marginBottom: 10,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Row>
|
<Row>
|
||||||
|
@ -26,7 +26,7 @@ ReactDOM.render(
|
|||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
<App />
|
<App />
|
||||||
</BrowserRouter>,
|
</BrowserRouter>,
|
||||||
document.getElementById("root")
|
document.getElementById("root"),
|
||||||
);
|
);
|
||||||
|
|
||||||
// If you want your app to work offline and load faster, you can change
|
// If you want your app to work offline and load faster, you can change
|
||||||
|
@ -30,8 +30,8 @@ const isLocalhost = Boolean(
|
|||||||
window.location.hostname === "[::1]" ||
|
window.location.hostname === "[::1]" ||
|
||||||
// 127.0.0.0/8 are considered localhost for IPv4.
|
// 127.0.0.0/8 are considered localhost for IPv4.
|
||||||
window.location.hostname.match(
|
window.location.hostname.match(
|
||||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
export function register(config) {
|
export function register(config) {
|
||||||
@ -57,7 +57,7 @@ export function register(config) {
|
|||||||
navigator.serviceWorker.ready.then(() => {
|
navigator.serviceWorker.ready.then(() => {
|
||||||
console.log(
|
console.log(
|
||||||
"This web app is being served cache-first by a service " +
|
"This web app is being served cache-first by a service " +
|
||||||
"worker. To learn more, visit https://bit.ly/CRA-PWA"
|
"worker. To learn more, visit https://bit.ly/CRA-PWA",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -85,7 +85,7 @@ function registerValidSW(swUrl, config) {
|
|||||||
// content until all client tabs are closed.
|
// content until all client tabs are closed.
|
||||||
console.log(
|
console.log(
|
||||||
"New content is available and will be used when all " +
|
"New content is available and will be used when all " +
|
||||||
"tabs for this page are closed. See https://bit.ly/CRA-PWA."
|
"tabs for this page are closed. See https://bit.ly/CRA-PWA.",
|
||||||
);
|
);
|
||||||
|
|
||||||
// Execute callback
|
// Execute callback
|
||||||
@ -137,7 +137,7 @@ function checkValidServiceWorker(swUrl, config) {
|
|||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.log(
|
console.log(
|
||||||
"No internet connection found. App is running in offline mode."
|
"No internet connection found. App is running in offline mode.",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user