New: Ability to test all Indexers, Lists, Clients

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick
2018-10-19 23:03:56 -04:00
parent 6103afcc09
commit 029a0e4e20
17 changed files with 304 additions and 48 deletions
@@ -0,0 +1,34 @@
import createAjaxRequest from 'Utilities/createAjaxRequest';
import { set } from '../baseActions';
function createTestAllProvidersHandler(section, url) {
return function(getState, payload, dispatch) {
dispatch(set({ section, isTestingAll: true }));
const ajaxOptions = {
url: `${url}/testall`,
method: 'POST',
contentType: 'application/json',
dataType: 'json'
};
const { request } = createAjaxRequest(ajaxOptions);
request.done((data) => {
dispatch(set({
section,
isTestingAll: false,
saveError: null
}));
});
request.fail((xhr) => {
dispatch(set({
section,
isTestingAll: false
}));
});
};
}
export default createTestAllProvidersHandler;