mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 17:07:36 -02:30
adding insights support for project add
This commit is contained in:
committed by
Matthew Jones
parent
2656e3f3fa
commit
0ff837449b
@@ -415,6 +415,7 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
|||||||
if ($scope.scm_type.value) {
|
if ($scope.scm_type.value) {
|
||||||
switch ($scope.scm_type.value) {
|
switch ($scope.scm_type.value) {
|
||||||
case 'git':
|
case 'git':
|
||||||
|
$scope.credentialLabel = "SCM Credential";
|
||||||
$scope.urlPopover = '<p>' +
|
$scope.urlPopover = '<p>' +
|
||||||
i18n._('Example URLs for GIT SCM include:') +
|
i18n._('Example URLs for GIT SCM include:') +
|
||||||
'</p><ul class=\"no-bullets\"><li>https://github.com/ansible/ansible.git</li>' +
|
'</p><ul class=\"no-bullets\"><li>https://github.com/ansible/ansible.git</li>' +
|
||||||
@@ -424,11 +425,13 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
|||||||
'SSH. GIT read only protocol (git://) does not use username or password information.'), '<strong>', '</strong>');
|
'SSH. GIT read only protocol (git://) does not use username or password information.'), '<strong>', '</strong>');
|
||||||
break;
|
break;
|
||||||
case 'svn':
|
case 'svn':
|
||||||
|
$scope.credentialLabel = "SCM Credential";
|
||||||
$scope.urlPopover = '<p>' + i18n._('Example URLs for Subversion SCM include:') + '</p>' +
|
$scope.urlPopover = '<p>' + i18n._('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>' +
|
'<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>';
|
'<li>svn+ssh://servername.example.com/path</li></ul>';
|
||||||
break;
|
break;
|
||||||
case 'hg':
|
case 'hg':
|
||||||
|
$scope.credentialLabel = "SCM Credential";
|
||||||
$scope.urlPopover = '<p>' + i18n._('Example URLs for Mercurial SCM include:') + '</p>' +
|
$scope.urlPopover = '<p>' + i18n._('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>' +
|
'<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>' +
|
'<li>ssh://server.example.com/path</li></ul>' +
|
||||||
@@ -436,7 +439,13 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
|||||||
'Do not put the username and key in the URL. ' +
|
'Do not put the username and key in the URL. ' +
|
||||||
'If using Bitbucket and SSH, do not supply your Bitbucket username.'), '<strong>', '</strong>');
|
'If using Bitbucket and SSH, do not supply your Bitbucket username.'), '<strong>', '</strong>');
|
||||||
break;
|
break;
|
||||||
|
case 'insights':
|
||||||
|
$scope.pathRequired = false;
|
||||||
|
$scope.scmRequired = false;
|
||||||
|
$scope.credentialLabel = "Red Hat Insights";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
|
$scope.credentialLabel = "SCM Credential";
|
||||||
$scope.urlPopover = '<p> ' + i18n._('URL popover text');
|
$scope.urlPopover = '<p> ' + i18n._('URL popover text');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
|||||||
scm_url: {
|
scm_url: {
|
||||||
label: 'SCM URL',
|
label: 'SCM URL',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
ngShow: "scm_type && scm_type.value !== 'manual'",
|
ngShow: "scm_type && scm_type.value !== 'manual' && scm_type.value !== 'insights' ",
|
||||||
awRequiredWhen: {
|
awRequiredWhen: {
|
||||||
reqExpression: "scmRequired",
|
reqExpression: "scmRequired",
|
||||||
init: false
|
init: false
|
||||||
@@ -122,12 +122,13 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
|||||||
scm_branch: {
|
scm_branch: {
|
||||||
labelBind: "scmBranchLabel",
|
labelBind: "scmBranchLabel",
|
||||||
type: 'text',
|
type: 'text',
|
||||||
ngShow: "scm_type && scm_type.value !== 'manual'",
|
ngShow: "scm_type && scm_type.value !== 'manual' && scm_type.value !== 'insights'",
|
||||||
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)',
|
ngDisabled: '!(project_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
subForm: 'sourceSubForm',
|
subForm: 'sourceSubForm',
|
||||||
},
|
},
|
||||||
credential: {
|
credential: {
|
||||||
label: i18n._('SCM Credential'),
|
// label: i18n._('SCM Credential'),
|
||||||
|
labelBind: 'credentialLabel',
|
||||||
type: 'lookup',
|
type: 'lookup',
|
||||||
basePath: 'credentials',
|
basePath: 'credentials',
|
||||||
list: 'CredentialList',
|
list: 'CredentialList',
|
||||||
|
|||||||
Reference in New Issue
Block a user