PLT-349 adding team mgt to admin console
Этот коммит содержится в:
@@ -371,6 +371,32 @@ export function getConfig() {
|
||||
);
|
||||
}
|
||||
|
||||
export function getAllTeams() {
|
||||
if (isCallInProgress('getAllTeams')) {
|
||||
return;
|
||||
}
|
||||
|
||||
callTracker.getAllTeams = utils.getTimestamp();
|
||||
client.getAllTeams(
|
||||
(data, textStatus, xhr) => {
|
||||
callTracker.getAllTeams = 0;
|
||||
|
||||
if (xhr.status === 304 || !data) {
|
||||
return;
|
||||
}
|
||||
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECIEVED_ALL_TEAMS,
|
||||
teams: data
|
||||
});
|
||||
},
|
||||
(err) => {
|
||||
callTracker.getAllTeams = 0;
|
||||
dispatchError(err, 'getAllTeams');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function findTeams(email) {
|
||||
if (isCallInProgress('findTeams_' + email)) {
|
||||
return;
|
||||
|
||||
@@ -347,6 +347,20 @@ export function testEmail(config, success, error) {
|
||||
});
|
||||
}
|
||||
|
||||
export function getAllTeams(success, error) {
|
||||
$.ajax({
|
||||
url: '/api/v1/teams/all',
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'GET',
|
||||
success,
|
||||
error: function onError(xhr, status, err) {
|
||||
var e = handleError('getAllTeams', xhr, status, err);
|
||||
error(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function getMeSynchronous(success, error) {
|
||||
var currentUser = null;
|
||||
$.ajax({
|
||||
@@ -890,6 +904,21 @@ export function getProfiles(success, error) {
|
||||
});
|
||||
}
|
||||
|
||||
export function getProfilesForTeam(teamId, success, error) {
|
||||
$.ajax({
|
||||
cache: false,
|
||||
url: '/api/v1/users/profiles/' + teamId,
|
||||
dataType: 'json',
|
||||
contentType: 'application/json',
|
||||
type: 'GET',
|
||||
success,
|
||||
error: function onError(xhr, status, err) {
|
||||
var e = handleError('getProfilesForTeam', xhr, status, err);
|
||||
error(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function uploadFile(formData, success, error) {
|
||||
var request = $.ajax({
|
||||
url: '/api/v1/files/upload',
|
||||
|
||||
@@ -35,8 +35,8 @@ module.exports = {
|
||||
RECIEVED_TEAM: null,
|
||||
|
||||
RECIEVED_CONFIG: null,
|
||||
|
||||
RECIEVED_LOGS: null
|
||||
RECIEVED_LOGS: null,
|
||||
RECIEVED_ALL_TEAMS: null
|
||||
}),
|
||||
|
||||
PayloadSources: keyMirror({
|
||||
|
||||
Ссылка в новой задаче
Block a user