Merge pull request #2049 from mattermost/plt-1856

PLT-1856 Add basic server audit tab to system console for EE
Этот коммит содержится в:
Christopher Speller
2016-02-03 08:52:18 -05:00
родитель d479b08c99 d153d661db
Коммит 75f412c4be
15 изменённых файлов: 909 добавлений и 588 удалений

Просмотреть файл

@@ -312,6 +312,32 @@ export function getLogs() {
);
}
export function getServerAudits() {
if (isCallInProgress('getServerAudits')) {
return;
}
callTracker.getServerAudits = utils.getTimestamp();
client.getServerAudits(
(data, textStatus, xhr) => {
callTracker.getServerAudits = 0;
if (xhr.status === 304 || !data) {
return;
}
AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_SERVER_AUDITS,
audits: data
});
},
(err) => {
callTracker.getServerAudits = 0;
dispatchError(err, 'getServerAudits');
}
);
}
export function getConfig() {
if (isCallInProgress('getConfig')) {
return;

Просмотреть файл

@@ -407,6 +407,20 @@ export function getLogs(success, error) {
});
}
export function getServerAudits(success, error) {
$.ajax({
url: '/api/v1/admin/audits',
dataType: 'json',
contentType: 'application/json',
type: 'GET',
success,
error: function onError(xhr, status, err) {
var e = handleError('getServerAudits', xhr, status, err);
error(e);
}
});
}
export function getConfig(success, error) {
$.ajax({
url: '/api/v1/admin/config',

Просмотреть файл

@@ -45,6 +45,7 @@ export default {
RECIEVED_CONFIG: null,
RECIEVED_LOGS: null,
RECIEVED_SERVER_AUDITS: null,
RECIEVED_ALL_TEAMS: null,
SHOW_SEARCH: null,