Also reduce admin remote fetch

This commit is contained in:
djmaze 2021-12-03 00:11:19 +01:00
parent c1228d09f0
commit 35bce8cf62
11 changed files with 148 additions and 260 deletions

View file

@ -116,29 +116,31 @@ export class ContactsAdminSettings /*extends AbstractViewSettings*/ {
this.testContactsErrorMessage('');
this.testing(true);
Remote.testContacts((iError, data) => {
this.testContactsSuccess(false);
this.testContactsError(false);
this.testContactsErrorMessage('');
Remote.request('AdminContactsTest',
(iError, data) => {
this.testContactsSuccess(false);
this.testContactsError(false);
this.testContactsErrorMessage('');
if (!iError && data.Result.Result) {
this.testContactsSuccess(true);
} else {
this.testContactsError(true);
if (data && data.Result) {
this.testContactsErrorMessage(data.Result.Message || '');
if (!iError && data.Result.Result) {
this.testContactsSuccess(true);
} else {
this.testContactsErrorMessage('');
this.testContactsError(true);
if (data && data.Result) {
this.testContactsErrorMessage(data.Result.Message || '');
} else {
this.testContactsErrorMessage('');
}
}
}
this.testing(false);
}, {
ContactsPdoType: this.contactsType(),
ContactsPdoDsn: this.pdoDsn(),
ContactsPdoUser: this.pdoUser(),
ContactsPdoPassword: this.pdoPassword()
});
this.testing(false);
}, {
ContactsPdoType: this.contactsType(),
ContactsPdoDsn: this.pdoDsn(),
ContactsPdoUser: this.pdoUser(),
ContactsPdoPassword: this.pdoPassword()
}
);
}
onShow() {