mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 20:05:03 -02:30
changed the values for some forms thats have select drop down input fields
This commit is contained in:
@@ -87,7 +87,7 @@ angular.module('CredentialFormDefinition', [])
|
|||||||
label: 'Type',
|
label: 'Type',
|
||||||
excludeModal: true,
|
excludeModal: true,
|
||||||
type: 'select',
|
type: 'select',
|
||||||
ngOptions: 'kind.label for kind in credential_kind_options',
|
ngOptions: 'kind.label for kind in credential_kind_options track by kind.value', // select as label for value in array 'kind.label for kind in credential_kind_options',
|
||||||
ngChange: 'kindChange()',
|
ngChange: 'kindChange()',
|
||||||
addRequired: true,
|
addRequired: true,
|
||||||
editRequired: true,
|
editRequired: true,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ angular.module('HostGroupsFormDefinition', [])
|
|||||||
label: 'Groups',
|
label: 'Groups',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
multiple: true,
|
multiple: true,
|
||||||
ngOptions: 'group.name for group in inventory_groups',
|
ngOptions: 'group.name for group in inventory_groups track by group.value',
|
||||||
addRequired: true,
|
addRequired: true,
|
||||||
editRequired: true,
|
editRequired: true,
|
||||||
awPopOver: "<p>Provide a host name, ip address, or ip address:port. Examples include:</p>" +
|
awPopOver: "<p>Provide a host name, ip address, or ip address:port. Examples include:</p>" +
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
|||||||
scm_type: {
|
scm_type: {
|
||||||
label: 'SCM Type',
|
label: 'SCM Type',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
ngOptions: 'type.label for type in scm_type_options',
|
ngOptions: 'type.label for type in scm_type_options track by type.value',
|
||||||
ngChange: 'scmChange()',
|
ngChange: 'scmChange()',
|
||||||
addRequired: true,
|
addRequired: true,
|
||||||
editRequired: true
|
editRequired: true
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ angular.module('SourceFormDefinition', [])
|
|||||||
source: {
|
source: {
|
||||||
label: 'Source',
|
label: 'Source',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
ngOptions: 'source.label for source in source_type_options',
|
ngOptions: 'source.label for source in source_type_options track by source.value',
|
||||||
ngChange: 'sourceChange()',
|
ngChange: 'sourceChange()',
|
||||||
addRequired: false,
|
addRequired: false,
|
||||||
editRequired: false
|
editRequired: false
|
||||||
|
|||||||
@@ -188,6 +188,32 @@ angular.module('RestServices', ['ngCookies', 'AuthService'])
|
|||||||
}, 401);
|
}, 401);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
patch: function (data) {
|
||||||
|
var token = Authorization.getToken(),
|
||||||
|
expired = this.checkExpired();
|
||||||
|
if (expired) {
|
||||||
|
return this.createResponse({
|
||||||
|
detail: 'Token is expired'
|
||||||
|
}, 401);
|
||||||
|
} else if (token) {
|
||||||
|
this.setHeader({
|
||||||
|
Authorization: 'Token ' + token
|
||||||
|
});
|
||||||
|
this.setHeader({
|
||||||
|
"X-Auth-Token": 'Token ' + token
|
||||||
|
});
|
||||||
|
return $http({
|
||||||
|
method: 'PATCH',
|
||||||
|
url: this.url,
|
||||||
|
headers: this.headers,
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return this.createResponse({
|
||||||
|
detail: 'Invalid token'
|
||||||
|
}, 401);
|
||||||
|
}
|
||||||
|
},
|
||||||
destroy: function (data) {
|
destroy: function (data) {
|
||||||
var token = Authorization.getToken(),
|
var token = Authorization.getToken(),
|
||||||
expired = this.checkExpired();
|
expired = this.checkExpired();
|
||||||
|
|||||||
@@ -637,6 +637,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator
|
|||||||
html += (field.falseValue !== undefined) ? Attr(field, 'falseValue') : "";
|
html += (field.falseValue !== undefined) ? Attr(field, 'falseValue') : "";
|
||||||
html += (field.checked) ? "checked " : "";
|
html += (field.checked) ? "checked " : "";
|
||||||
html += (field.readonly) ? "disabled " : "";
|
html += (field.readonly) ? "disabled " : "";
|
||||||
|
html += (field.ngChange) ? "ng-change=\"" +field.ngChange + "\" " : "";
|
||||||
html += (field.ngDisabled) ? "ng-disabled=\"" + field.ngDisabled + "\" " : "";
|
html += (field.ngDisabled) ? "ng-disabled=\"" + field.ngDisabled + "\" " : "";
|
||||||
html += " > ";
|
html += " > ";
|
||||||
|
|
||||||
|
|||||||
@@ -769,7 +769,7 @@ angular.module('GeneratorHelpers', [])
|
|||||||
|
|
||||||
html += "<select id=\"search_value_select\" ng-show=\"" + iterator + "SelectShow" + modifier + "\" " +
|
html += "<select id=\"search_value_select\" ng-show=\"" + iterator + "SelectShow" + modifier + "\" " +
|
||||||
"ng-model=\"" + iterator + "SearchSelectValue" + modifier + "\" ng-change=\"search('" + iterator + "')\" ";
|
"ng-model=\"" + iterator + "SearchSelectValue" + modifier + "\" ng-change=\"search('" + iterator + "')\" ";
|
||||||
html += "ng-options=\"c.name for c in " + iterator + "SearchSelectOpts" + modifier + "\" class=\"form-control search-select";
|
html += "ng-options=\"c.name for c in " + iterator + "SearchSelectOpts track by c.value" + modifier + "\" class=\"form-control search-select";
|
||||||
html += "\"></select>\n";
|
html += "\"></select>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user