From de3fa5f42d9babfdac045ec2b236c82b6477e365 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Thu, 16 Apr 2015 14:58:25 -0400 Subject: [PATCH] directives: ssh-key-dialog -> trigger credentials --- .../repo-view/repo-panel-builds.html | 8 ++--- static/directives/setup-trigger-dialog.html | 2 +- static/directives/ssh-key-dialog.html | 24 ------------- .../trigger-credentials-dialog.html | 36 +++++++++++++++++++ .../directives/repo-view/repo-panel-builds.js | 12 ++++--- ...ialog.js => trigger-credentials-dialog.js} | 8 ++--- 6 files changed, 52 insertions(+), 38 deletions(-) delete mode 100644 static/directives/ssh-key-dialog.html create mode 100644 static/directives/trigger-credentials-dialog.html rename static/js/directives/ui/{ssh-key-dialog.js => trigger-credentials-dialog.js} (69%) diff --git a/static/directives/repo-view/repo-panel-builds.html b/static/directives/repo-view/repo-panel-builds.html index ba2cc7d4a..081690a4b 100644 --- a/static/directives/repo-view/repo-panel-builds.html +++ b/static/directives/repo-view/repo-panel-builds.html @@ -137,8 +137,8 @@ - - View SSH Key + + View Credentials Run Trigger Now @@ -158,8 +158,8 @@ - -
+ +
  • You must give the following public key read access to the git repository.
  • -
  • You must POST to the following URL as your webhook endpoint.
  • +
  • You must set your repository to POST to the following URL to trigger a build.
  • For more information, refer to the Custom Git Triggers documentation.
    diff --git a/static/directives/ssh-key-dialog.html b/static/directives/ssh-key-dialog.html deleted file mode 100644 index 4900aada1..000000000 --- a/static/directives/ssh-key-dialog.html +++ /dev/null @@ -1,24 +0,0 @@ - - diff --git a/static/directives/trigger-credentials-dialog.html b/static/directives/trigger-credentials-dialog.html new file mode 100644 index 000000000..8a00de291 --- /dev/null +++ b/static/directives/trigger-credentials-dialog.html @@ -0,0 +1,36 @@ + + diff --git a/static/js/directives/repo-view/repo-panel-builds.js b/static/js/directives/repo-view/repo-panel-builds.js index 86960e904..db5578d48 100644 --- a/static/js/directives/repo-view/repo-panel-builds.js +++ b/static/js/directives/repo-view/repo-panel-builds.js @@ -32,8 +32,8 @@ angular.module('quay').directive('repoPanelBuilds', function () { $scope.showTriggerStartDialogCounter = 0; $scope.showTriggerSetupCounter = 0; - $scope.sshKeyModalTrigger = null; - $scope.sshKeyModalCounter = 0; + $scope.triggerCredentialsModalTrigger = null; + $scope.triggerCredentialsModalCounter = 0; var updateBuilds = function() { if (!$scope.allBuilds) { return; } @@ -161,9 +161,11 @@ angular.module('quay').directive('repoPanelBuilds', function () { $scope.options.predicate = predicate; }; - $scope.showSSHKeyModal = function(trigger) { - $scope.sshKeyModalTrigger = trigger; - $scope.sshKeyModalCounter++; + $scope.showTriggerCredentialsModal = function(trigger) { + $scope.triggerCredentialsModalTrigger = trigger; + $scope.triggerCredentialsModalCounter++; + console.log($scope.triggerCredentialsModalTrigger) + console.log($scope.triggerCredentialsModalCounter) }; $scope.askDeleteTrigger = function(trigger) { diff --git a/static/js/directives/ui/ssh-key-dialog.js b/static/js/directives/ui/trigger-credentials-dialog.js similarity index 69% rename from static/js/directives/ui/ssh-key-dialog.js rename to static/js/directives/ui/trigger-credentials-dialog.js index 816d35c62..610c9bb12 100644 --- a/static/js/directives/ui/ssh-key-dialog.js +++ b/static/js/directives/ui/trigger-credentials-dialog.js @@ -1,10 +1,10 @@ /** * An element which displays a dialog with the public SSH keycredentials for a trigger. */ -angular.module('quay').directive('sshKeyDialog', function () { +angular.module('quay').directive('triggerCredentialsDialog', function () { var directiveDefinitionObject = { priority: 0, - templateUrl: '/static/directives/ssh-key-dialog.html', + templateUrl: '/static/directives/trigger-credentials-dialog.html', replace: false, transclude: true, restrict: 'C', @@ -15,10 +15,10 @@ angular.module('quay').directive('sshKeyDialog', function () { controller: function($scope, $element) { var show = function() { if (!$scope.trigger) { - $('#sshkeymodal').modal('hide'); + $('#triggercredentialsmodal').modal('hide'); return; } - $('#sshkeymodal').modal({}); + $('#triggercredentialsmodal').modal({}); }; $scope.$watch('trigger', show);