Merge pull request #2056 from coreos-inc/js-error-fixes
Small JS error fixes
This commit is contained in:
commit
48935d7208
3 changed files with 16 additions and 0 deletions
|
@ -99,6 +99,10 @@ angular.module('quay').directive('setupTriggerDialog', function () {
|
|||
};
|
||||
|
||||
$scope.activate = function() {
|
||||
if (!$scope.trigger) {
|
||||
return;
|
||||
}
|
||||
|
||||
var params = {
|
||||
'repository': $scope.repository.namespace + '/' + $scope.repository.name,
|
||||
'trigger_uuid': $scope.trigger.id
|
||||
|
@ -123,6 +127,10 @@ angular.module('quay').directive('setupTriggerDialog', function () {
|
|||
});
|
||||
|
||||
ApiService.activateBuildTrigger(data, params).then(function(resp) {
|
||||
if (!$scope.trigger) {
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.trigger['is_active'] = true;
|
||||
$scope.trigger['config'] = resp['config'];
|
||||
$scope.trigger['pull_robot'] = resp['pull_robot'];
|
||||
|
|
|
@ -171,6 +171,10 @@ function(ApiService, CookieService, $rootScope, Config, $location) {
|
|||
|
||||
userService.deleteNamespace = function(info, callback) {
|
||||
var namespace = info.user ? info.user.username : info.organization.name;
|
||||
if (!namespace) {
|
||||
return;
|
||||
}
|
||||
|
||||
var deleteNamespaceItself = function() {
|
||||
info.progress = 1;
|
||||
info.progressMessage = 'Deleting namespace...';
|
||||
|
|
|
@ -81,6 +81,10 @@
|
|||
function initMunchkin() {
|
||||
if(didInit === false) {
|
||||
didInit = true;
|
||||
if (!Munchkin || !Munchkin.init) {
|
||||
return;
|
||||
}
|
||||
|
||||
Munchkin.init('{{ munchkin_key }}');
|
||||
window.__quay_munchkin_queue.forEach(function(queue_item) {
|
||||
Munchkin.munchkinFunction.apply(Munchkin, queue_item);
|
||||
|
|
Reference in a new issue