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.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
25a2013890
Коммит
00e8b6621a
@@ -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});
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
34
webapp/actions/job_actions.jsx
Обычный файл
34
webapp/actions/job_actions.jsx
Обычный файл
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
import * as JobsActions from 'mattermost-redux/actions/jobs';
|
||||
|
||||
import store from 'stores/redux_store.jsx';
|
||||
const dispatch = store.dispatch;
|
||||
const getState = store.getState;
|
||||
|
||||
export function createJob(job, success, error) {
|
||||
JobsActions.createJob(job)(dispatch, getState).then(
|
||||
(data) => {
|
||||
if (data && success) {
|
||||
success(data);
|
||||
} else if (data == null && error) {
|
||||
const serverError = getState().requests.jobs.createJob.error;
|
||||
error({id: serverError.server_error_id, ...serverError});
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function cancelJob(jobId, success, error) {
|
||||
JobsActions.cancelJob(jobId)(dispatch, getState).then(
|
||||
(data) => {
|
||||
if (data && success) {
|
||||
success(data);
|
||||
} else if (data == null && error) {
|
||||
const serverError = getState().requests.jobs.cancelJob.error;
|
||||
error({id: serverError.server_error_id, ...serverError});
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
Ссылка в новой задаче
Block a user