mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
Return error for RunSyncer()
This commit is contained in:
@ -86,8 +86,13 @@ class SyncerListPage extends BaseListPage {
|
||||
this.setState({loading: true});
|
||||
SyncerBackend.runSyncer("admin", this.state.data[i].name)
|
||||
.then((res) => {
|
||||
this.setState({loading: false});
|
||||
Setting.showMessage("success", "Syncer sync users successfully");
|
||||
if (res.status === "ok") {
|
||||
this.setState({loading: false});
|
||||
Setting.showMessage("success", i18next.t("general:Successfully synced"));
|
||||
} else {
|
||||
this.setState({loading: false});
|
||||
Setting.showMessage("error", `${i18next.t("general:Failed to sync")}: ${res.msg}`);
|
||||
}
|
||||
}
|
||||
)
|
||||
.catch(error => {
|
||||
@ -151,6 +156,13 @@ class SyncerListPage extends BaseListPage {
|
||||
{text: "LDAP", value: "LDAP"},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: i18next.t("syncer:Database type"),
|
||||
dataIndex: "databaseType",
|
||||
key: "databaseType",
|
||||
width: "130px",
|
||||
sorter: (a, b) => a.databaseType.localeCompare(b.databaseType),
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:Host"),
|
||||
dataIndex: "host",
|
||||
@ -183,13 +195,6 @@ class SyncerListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
...this.getColumnSearchProps("password"),
|
||||
},
|
||||
{
|
||||
title: i18next.t("syncer:Database type"),
|
||||
dataIndex: "databaseType",
|
||||
key: "databaseType",
|
||||
width: "120px",
|
||||
sorter: (a, b) => a.databaseType.localeCompare(b.databaseType),
|
||||
},
|
||||
{
|
||||
title: i18next.t("syncer:Database"),
|
||||
dataIndex: "database",
|
||||
@ -208,7 +213,7 @@ class SyncerListPage extends BaseListPage {
|
||||
title: i18next.t("syncer:Sync interval"),
|
||||
dataIndex: "syncInterval",
|
||||
key: "syncInterval",
|
||||
width: "130px",
|
||||
width: "140px",
|
||||
sorter: true,
|
||||
...this.getColumnSearchProps("syncInterval"),
|
||||
},
|
||||
|
Reference in New Issue
Block a user