From 6dfdb2fe0378aaf0228742be5aad355b7bd85521 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 3 Nov 2014 17:12:39 -0500 Subject: [PATCH] Make sure to filter out the build-related notification events when build support is turned off --- static/js/app.js | 50 ++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 0dbc98957..a689425f9 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -1312,29 +1312,37 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading 'id': 'repo_push', 'title': 'Push to Repository', 'icon': 'fa-upload' - }, - { - 'id': 'build_queued', - 'title': 'Dockerfile Build Queued', - 'icon': 'fa-tasks' - }, - { - 'id': 'build_start', - 'title': 'Dockerfile Build Started', - 'icon': 'fa-circle-o-notch' - }, - { - 'id': 'build_success', - 'title': 'Dockerfile Build Successfully Completed', - 'icon': 'fa-check-circle-o' - }, - { - 'id': 'build_failure', - 'title': 'Dockerfile Build Failed', - 'icon': 'fa-times-circle-o' } ]; + if (Features.BUILD_SUPPORT) { + var buildEvents = [ + { + 'id': 'build_queued', + 'title': 'Dockerfile Build Queued', + 'icon': 'fa-tasks' + }, + { + 'id': 'build_start', + 'title': 'Dockerfile Build Started', + 'icon': 'fa-circle-o-notch' + }, + { + 'id': 'build_success', + 'title': 'Dockerfile Build Successfully Completed', + 'icon': 'fa-check-circle-o' + }, + { + 'id': 'build_failure', + 'title': 'Dockerfile Build Failed', + 'icon': 'fa-times-circle-o' + }]; + + for (var i = 0; i < buildEvents.length; ++i) { + events.push(buildEvents[i]); + } + } + var methods = [ { 'id': 'quay_notification', @@ -1696,7 +1704,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading keyService['googleRedirectUri'] = Config.getUrl('/oauth2/google/callback'); keyService['googleLoginUrl'] = 'https://accounts.google.com/o/oauth2/auth?response_type=code&'; - keyService['githubLoginUrl'] = 'https://github.com/login/oauth/authorize?'; + keyService['githubLoginUrl'] = Config['GITHUB_LOGIN_URL'] + '?'; keyService['googleLoginScope'] = 'openid email'; keyService['githubLoginScope'] = 'user:email';