Skip to content

Commit 1681314

Browse files
committed
Enabling web hooks
1 parent 15e259b commit 1681314

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ npm-debug.log
99
// vim .swp
1010
*.swp
1111
.env
12+
.idea/

src/dashboard/DashboardView.react.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,12 @@ export default class DashboardView extends React.Component {
4747
}
4848

4949
//webhooks requires removal of heroku link code, then it should work.
50-
/*
5150
if (features.hooks && features.hooks.create && features.hooks.read && features.hooks.update && features.hooks.delete) {
5251
coreSubsections.push({
5352
name: 'Webhooks',
5453
link: '/webhooks'
5554
});
5655
}
57-
*/
5856

5957
if (features.cloudCode && features.cloudCode.jobs) {
6058
coreSubsections.push({

src/dashboard/Data/Webhooks/Webhooks.react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default class Webhooks extends TableView {
230230
}
231231

232232
renderRow(hook) {
233-
if (hook.herokuAppId) {
233+
/* if (hook.herokuAppId) {
234234
let openHerokuApp = () => {window.open('https://dashboard.heroku.com/apps/' + (hook.herokuAppName || hook.herokuAppId), '_blank')};
235235
return <tr
236236
onClick={openHerokuApp}
@@ -241,7 +241,7 @@ export default class Webhooks extends TableView {
241241
<td style={{ cursor: 'pointer' }} width={'40%'}><Icon name='heroku' fill='#343445' width={20} height={20}/> {hook.herokuAppName || hook.herokuAppId}</td>
242242
<td width={'10%'}>{hook.deleted ? <TableWarning text='Deleted' /> : null}</td>
243243
</tr>;
244-
}
244+
} */
245245
let showEdit = hook.url ? () => {
246246
this.setState({
247247
hookType: hook.functionName ? 'function' : hook.triggerName,

src/lib/stores/WebhookStore.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function WebhookStore(state, action) {
3434
{},
3535
{ useMasterKey: true }
3636
);
37-
let herokuAppsPromise = get('/apps/' + action.app.slug + '/cloud_code/heroku_link').then(({ herokuApps }) => {
37+
/* let herokuAppsPromise = get('/apps/' + action.app.slug + '/cloud_code/heroku_link').then(({ herokuApps }) => {
3838
herokuApps = herokuApps ? herokuApps : [];
3939
let appNamePromises = herokuApps.map(herokuApp => {
4040
return getHerokuAppName('https://api.heroku.com/apps/' + herokuApp.herokuAppId).then(({ name }) => {
@@ -46,13 +46,13 @@ function WebhookStore(state, action) {
4646
});
4747
})
4848
return Parse.Promise.when(appNamePromises).always(() => Parse.Promise.as(herokuApps));
49-
});
50-
return Parse.Promise.when(functionsPromise, triggersPromise, herokuAppsPromise).then((
51-
{ results: functions },
52-
{ results: triggers },
53-
herokuApps
49+
}); */
50+
return Parse.Promise.when(functionsPromise, triggersPromise/* , herokuAppsPromise */).then((
51+
functions,
52+
triggers/* ,
53+
herokuApps */
5454
) => {
55-
return Map({ lastFetch: new Date(), webhooks: List(functions.concat(triggers).concat(herokuApps))});
55+
return Map({ lastFetch: new Date(), webhooks: List(functions.concat(triggers)/* .concat(herokuApps) */)});
5656
});
5757
case ActionTypes.CREATE:
5858
let addHookToStore = hook => state.set('webhooks', state.get('webhooks').push(hook));

0 commit comments

Comments
 (0)