diff --git a/static/directives/repo-view/repo-panel-builds.html b/static/directives/repo-view/repo-panel-builds.html index 587f710a0..ba2cc7d4a 100644 --- a/static/directives/repo-view/repo-panel-builds.html +++ b/static/directives/repo-view/repo-panel-builds.html @@ -130,13 +130,16 @@
- {{ trigger.config.subdir || '(Root Directory)' }} - {{ trigger.config.branchtag_regex || '(All)' }} + {{ trigger.config.subdir || '/' }} + {{ trigger.config.branchtag_regex || 'All' }} + + View SSH Key + Run Trigger Now @@ -153,6 +156,11 @@ + + + +
+
+ + diff --git a/static/directives/ssh-key-dialog.html b/static/directives/ssh-key-dialog.html new file mode 100644 index 000000000..4900aada1 --- /dev/null +++ b/static/directives/ssh-key-dialog.html @@ -0,0 +1,24 @@ + + diff --git a/static/js/directives/repo-view/repo-panel-builds.js b/static/js/directives/repo-view/repo-panel-builds.js index 46ad68a13..86960e904 100644 --- a/static/js/directives/repo-view/repo-panel-builds.js +++ b/static/js/directives/repo-view/repo-panel-builds.js @@ -32,6 +32,9 @@ angular.module('quay').directive('repoPanelBuilds', function () { $scope.showTriggerStartDialogCounter = 0; $scope.showTriggerSetupCounter = 0; + $scope.sshKeyModalTrigger = null; + $scope.sshKeyModalCounter = 0; + var updateBuilds = function() { if (!$scope.allBuilds) { return; } @@ -158,6 +161,11 @@ angular.module('quay').directive('repoPanelBuilds', function () { $scope.options.predicate = predicate; }; + $scope.showSSHKeyModal = function(trigger) { + $scope.sshKeyModalTrigger = trigger; + $scope.sshKeyModalCounter++; + }; + $scope.askDeleteTrigger = function(trigger) { $scope.deleteTriggerInfo = { 'trigger': trigger diff --git a/static/js/directives/ui/ssh-key-dialog.js b/static/js/directives/ui/ssh-key-dialog.js new file mode 100644 index 000000000..816d35c62 --- /dev/null +++ b/static/js/directives/ui/ssh-key-dialog.js @@ -0,0 +1,29 @@ +/** + * An element which displays a dialog with the public SSH keycredentials for a trigger. + */ +angular.module('quay').directive('sshKeyDialog', function () { + var directiveDefinitionObject = { + priority: 0, + templateUrl: '/static/directives/ssh-key-dialog.html', + replace: false, + transclude: true, + restrict: 'C', + scope: { + 'trigger': '=trigger', + 'counter': '=counter' + }, + controller: function($scope, $element) { + var show = function() { + if (!$scope.trigger) { + $('#sshkeymodal').modal('hide'); + return; + } + $('#sshkeymodal').modal({}); + }; + + $scope.$watch('trigger', show); + $scope.$watch('counter', show); + } + }; + return directiveDefinitionObject; +});