mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 12:40:06 -03:30
fix scm url popover generation on project edit
This commit is contained in:
@@ -647,6 +647,8 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
|||||||
url: GetBasePath('projects'),
|
url: GetBasePath('projects'),
|
||||||
id: $scope.project_obj.id
|
id: $scope.project_obj.id
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.scmChange();
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($scope.removeChoicesReady) {
|
if ($scope.removeChoicesReady) {
|
||||||
@@ -853,6 +855,34 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
|||||||
$scope.scmRequired = ($scope.scm_type.value !== 'manual') ? true : false;
|
$scope.scmRequired = ($scope.scm_type.value !== 'manual') ? true : false;
|
||||||
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch';
|
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Dynamically update popover values
|
||||||
|
if($scope.scm_type.value) {
|
||||||
|
switch ($scope.scm_type.value) {
|
||||||
|
case 'git':
|
||||||
|
$scope.urlPopover = '<p>Example URLs for GIT SCM include:</p><ul class=\"no-bullets\"><li>https://github.com/ansible/ansible.git</li>' +
|
||||||
|
'<li>git@github.com:ansible/ansible.git</li><li>git://servername.example.com/ansible.git</li></ul>' +
|
||||||
|
'<p><strong>Note:</strong> When using SSH protocol for GitHub or Bitbucket, enter an SSH key only, ' +
|
||||||
|
'do not enter a username (other than git). Additionally, GitHub and Bitbucket do not support password authentication when using ' +
|
||||||
|
'SSH. GIT read only protocol (git://) does not use username or password information.';
|
||||||
|
break;
|
||||||
|
case 'svn':
|
||||||
|
$scope.urlPopover = '<p>Example URLs for Subversion SCM include:</p>' +
|
||||||
|
'<ul class=\"no-bullets\"><li>https://github.com/ansible/ansible</li><li>svn://servername.example.com/path</li>' +
|
||||||
|
'<li>svn+ssh://servername.example.com/path</li></ul>';
|
||||||
|
break;
|
||||||
|
case 'hg':
|
||||||
|
$scope.urlPopover = '<p>Example URLs for Mercurial SCM include:</p>' +
|
||||||
|
'<ul class=\"no-bullets\"><li>https://bitbucket.org/username/project</li><li>ssh://hg@bitbucket.org/username/project</li>' +
|
||||||
|
'<li>ssh://server.example.com/path</li></ul>' +
|
||||||
|
'<p><strong>Note:</strong> Mercurial does not support password authentication for SSH. ' +
|
||||||
|
'Do not put the username and key in the URL. ' +
|
||||||
|
'If using Bitbucket and SSH, do not supply your Bitbucket username.';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$scope.urlPopover = '<p> URL popover text';
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.SCMUpdate = function () {
|
$scope.SCMUpdate = function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user