Added initial backstage components and InstalledIntegrations page

Этот коммит содержится в:
Harrison Healey
2016-03-17 10:30:49 -04:00
родитель 9c36210edd
Коммит c417fdc152
14 изменённых файлов: 1045 добавлений и 8 удалений

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

@@ -1121,3 +1121,49 @@ export function getRecentAndNewUsersAnalytics(teamId) {
}
);
}
export function listIncomingHooks() {
if (isCallInProgress('listIncomingHooks')) {
return;
}
callTracker.listIncomingHooks = utils.getTimestamp();
client.listIncomingHooks(
(data) => {
callTracker.listIncomingHooks = 0;
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_INCOMING_WEBHOOKS,
incomingWebhooks: data
});
},
(err) => {
callTracker.listIncomingHooks = 0;
dispatchError(err, 'getIncomingHooks');
}
);
}
export function listOutgoingHooks() {
if (isCallInProgress('listOutgoingHooks')) {
return;
}
callTracker.listOutgoingHooks = utils.getTimestamp();
client.listOutgoingHooks(
(data) => {
callTracker.listOutgoingHooks = 0;
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_OUTGOING_WEBHOOKS,
outgoingWebhooks: data
});
},
(err) => {
callTracker.listOutgoingHooks = 0;
dispatchError(err, 'getOutgoingHooks');
}
);
}

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

@@ -68,6 +68,8 @@ export default {
RECEIVED_PREFERENCE: null,
RECEIVED_PREFERENCES: null,
RECEIVED_FILE_INFO: null,
RECEIVED_INCOMING_WEBHOOKS: null,
RECEIVED_OUTGOING_WEBHOOKS: null,
RECEIVED_MSG: null,

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

@@ -1398,3 +1398,13 @@ export function localizeMessage(id, defaultMessage) {
return id;
}
export function freezeArray(arr) {
for (const obj of arr) {
Object.freeze(obj);
}
Object.freeze(arr);
return arr;
}