From 00e8b6621a7ddf13222144d4acf80421204a23cc Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Tue, 1 Aug 2017 13:11:29 +0100 Subject: PLT-6595 (Client): Elasticsearch indexing system console UI (#6991) * PLT-6595: System Console for Elasticsearch Job Management. * Fixing UI issues * Fixing colors * ESLint Fixes. * Update test snapshots. * Fixing cancel button * Fix review comments. * Config capitalisation. * Review fixes. --- webapp/actions/admin_actions.jsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'webapp/actions/admin_actions.jsx') diff --git a/webapp/actions/admin_actions.jsx b/webapp/actions/admin_actions.jsx index ac02ac058..85184a23a 100644 --- a/webapp/actions/admin_actions.jsx +++ b/webapp/actions/admin_actions.jsx @@ -396,3 +396,16 @@ export function elasticsearchTest(config, success, error) { } ); } + +export function elasticsearchPurgeIndexes(success, error) { + AdminActions.purgeElasticsearchIndexes()(dispatch, getState).then( + (data) => { + if (data && success) { + success(data); + } else if (data == null && error) { + const serverError = getState().requests.admin.purgeElasticsearchIndexes.error; + error({id: serverError.server_error_id, ...serverError}); + } + } + ); +} -- cgit v1.2.3-1-g7c22