diff --git a/.gitignore b/.gitignore index 887ae57288..efa6ec46ae 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ npm-debug.log // vim .swp *.swp .env +.idea/ \ No newline at end of file diff --git a/src/dashboard/DashboardView.react.js b/src/dashboard/DashboardView.react.js index 2f19fd9f81..649c64bde9 100644 --- a/src/dashboard/DashboardView.react.js +++ b/src/dashboard/DashboardView.react.js @@ -47,14 +47,12 @@ export default class DashboardView extends React.Component { } //webhooks requires removal of heroku link code, then it should work. - /* if (features.hooks && features.hooks.create && features.hooks.read && features.hooks.update && features.hooks.delete) { coreSubsections.push({ name: 'Webhooks', link: '/webhooks' }); } - */ if (features.cloudCode && features.cloudCode.jobs) { coreSubsections.push({ diff --git a/src/dashboard/Data/Webhooks/Webhooks.react.js b/src/dashboard/Data/Webhooks/Webhooks.react.js index b7d1a2c681..dd5339b380 100644 --- a/src/dashboard/Data/Webhooks/Webhooks.react.js +++ b/src/dashboard/Data/Webhooks/Webhooks.react.js @@ -230,18 +230,6 @@ export default class Webhooks extends TableView { } renderRow(hook) { - if (hook.herokuAppId) { - let openHerokuApp = () => {window.open('https://dashboard.heroku.com/apps/' + (hook.herokuAppName || hook.herokuAppId), '_blank')}; - return - Heroku App - - - {hook.herokuAppName || hook.herokuAppId} - {hook.deleted ? : null} - ; - } let showEdit = hook.url ? () => { this.setState({ hookType: hook.functionName ? 'function' : hook.triggerName, diff --git a/src/lib/stores/WebhookStore.js b/src/lib/stores/WebhookStore.js index 7d2feccc18..8ba535bf12 100644 --- a/src/lib/stores/WebhookStore.js +++ b/src/lib/stores/WebhookStore.js @@ -34,25 +34,11 @@ function WebhookStore(state, action) { {}, { useMasterKey: true } ); - let herokuAppsPromise = get('/apps/' + action.app.slug + '/cloud_code/heroku_link').then(({ herokuApps }) => { - herokuApps = herokuApps ? herokuApps : []; - let appNamePromises = herokuApps.map(herokuApp => { - return getHerokuAppName('https://api.heroku.com/apps/' + herokuApp.herokuAppId).then(({ name }) => { - herokuApp.herokuAppName = name; - return herokuApp; - }).fail(() => { - herokuApp.deleted = true; - return herokuApp; - }); - }) - return Parse.Promise.when(appNamePromises).always(() => Parse.Promise.as(herokuApps)); - }); - return Parse.Promise.when(functionsPromise, triggersPromise, herokuAppsPromise).then(( - { results: functions }, - { results: triggers }, - herokuApps + return Parse.Promise.when(functionsPromise, triggersPromise).then(( + functions, + triggers ) => { - return Map({ lastFetch: new Date(), webhooks: List(functions.concat(triggers).concat(herokuApps))}); + return Map({ lastFetch: new Date(), webhooks: List(functions.concat(triggers))}); }); case ActionTypes.CREATE: let addHookToStore = hook => state.set('webhooks', state.get('webhooks').push(hook));