mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 13:41:28 -03:30
Merge pull request #6339 from mabashian/inventory-bug-fixes
Various small inventory ux bug fixes
This commit is contained in:
commit
aaf039c23d
@ -1668,6 +1668,10 @@ tr td button i {
|
||||
border: 1px solid @black;
|
||||
}
|
||||
|
||||
.modal .SmartSearch-bar {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#alert-modal, #alert-modal2 {
|
||||
z-index: 2100;
|
||||
}
|
||||
|
||||
@ -45,15 +45,15 @@ export default ['templateUrl', function(templateUrl) {
|
||||
delete hostList.fields.toggleHost;
|
||||
delete hostList.fields.active_failures;
|
||||
delete hostList.fields.inventory;
|
||||
hostList.well = false;
|
||||
let html = GenerateList.build({
|
||||
list: hostList,
|
||||
input_type: 'foobar',
|
||||
mode: 'lookup'
|
||||
input_type: 'host-filter-modal-body'
|
||||
});
|
||||
|
||||
$scope.list = hostList;
|
||||
|
||||
$('#foobar').append($compile(html)($scope));
|
||||
$('#host-filter-modal-body').append($compile(html)($scope));
|
||||
|
||||
$scope.showModal();
|
||||
});
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body" id="foobar"></div>
|
||||
<div class="modal-body" id="host-filter-modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" ng-click="cancelForm()" class="Lookup-cancel btn btn-default">CANCEL</button>
|
||||
<button type="button" ng-click="saveForm()" class="Lookup-save btn btn-primary">SAVE</button>
|
||||
<button type="button" ng-click="saveForm()" ng-disabled="!searchTags || searchTags.length === 0" class="Lookup-save btn btn-primary">SAVE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
// Unbind the listener so it doesn't fire when we close the modal via navigation
|
||||
$('#HostEvent').off('hidden.bs.modal');
|
||||
$('#HostEvent').modal('hide');
|
||||
$state.go('jobDetail');
|
||||
$state.go('jobResult');
|
||||
};
|
||||
|
||||
var init = function(){
|
||||
|
||||
@ -12,6 +12,9 @@ var hostEventModal = {
|
||||
controller: 'HostEventController',
|
||||
templateUrl: templateUrl('job-results/host-event/host-event-modal'),
|
||||
'abstract': false,
|
||||
ncyBreadcrumb: {
|
||||
skip: true
|
||||
},
|
||||
resolve: {
|
||||
hostEvent: ['jobResultsService', '$stateParams', function(jobResultsService, $stateParams) {
|
||||
return jobResultsService.getRelatedJobEvents($stateParams.id, {
|
||||
@ -34,21 +37,30 @@ var hostEventJson = {
|
||||
name: 'jobResult.host-event.json',
|
||||
url: '/json',
|
||||
controller: 'HostEventController',
|
||||
templateUrl: templateUrl('job-results/host-event/host-event-codemirror')
|
||||
templateUrl: templateUrl('job-results/host-event/host-event-codemirror'),
|
||||
ncyBreadcrumb: {
|
||||
skip: true
|
||||
},
|
||||
};
|
||||
|
||||
var hostEventStdout = {
|
||||
name: 'jobResult.host-event.stdout',
|
||||
url: '/stdout',
|
||||
controller: 'HostEventController',
|
||||
templateUrl: templateUrl('job-results/host-event/host-event-stdout')
|
||||
templateUrl: templateUrl('job-results/host-event/host-event-stdout'),
|
||||
ncyBreadcrumb: {
|
||||
skip: true
|
||||
},
|
||||
};
|
||||
|
||||
var hostEventStderr = {
|
||||
name: 'jobResult.host-event.stderr',
|
||||
url: '/stderr',
|
||||
controller: 'HostEventController',
|
||||
templateUrl: templateUrl('job-results/host-event/host-event-stderr')
|
||||
templateUrl: templateUrl('job-results/host-event/host-event-stderr'),
|
||||
ncyBreadcrumb: {
|
||||
skip: true
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -1095,10 +1095,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
if(!field.multiSelect && !field.disableChooseOption){
|
||||
html += "<option value=\"\">";
|
||||
// some languages use "Playbook" as a proper noun
|
||||
var chosen_item = field.label;
|
||||
if (i18n._("playbook") !== i18n._("Playbook")) {
|
||||
chosen_item = label.toLowerCase();
|
||||
}
|
||||
var chosen_item = (i18n._("playbook") !== i18n._("Playbook")) ? field.label.toLowerCase() : field.label;
|
||||
// Add a custom default select 'value' (default text)
|
||||
html += (field.defaultText) ? field.defaultText : i18n.sprintf(i18n._("Choose a %s"), chosen_item);
|
||||
html += "</option>\n";
|
||||
|
||||
@ -318,9 +318,6 @@ export default ['$compile', 'Attr', 'Icon',
|
||||
if (options.mode === 'lookup') {
|
||||
if (options.input_type === "radio") { //added by JT so that lookup forms can be either radio inputs or check box inputs
|
||||
innerTable += `<td class="List-tableCell"> <input type="radio" ng-model="${list.iterator}.checked" ng-value="1" ng-false-value="0" name="check_${list.iterator}_{{${list.iterator}.id}}" ng-click="toggle_row(${list.iterator}.id)"></td>`;
|
||||
}
|
||||
else if (options.input_type === "foobar") {
|
||||
|
||||
}
|
||||
else { // its assumed that options.input_type = checkbox
|
||||
innerTable += "<td class=\"List-tableCell select-column List-staticColumn--smallStatus\"><input type=\"checkbox\" ng-model=\"" + list.iterator + ".checked\" name=\"check_{{" +
|
||||
@ -489,8 +486,8 @@ export default ['$compile', 'Attr', 'Icon',
|
||||
|
||||
if (list.multiSelect) {
|
||||
html += buildSelectAll().prop('outerHTML');
|
||||
} else if (options.mode === 'lookup' && options.input_type !== 'foobar') {
|
||||
html += "<th class=\"List-tableHeader select-column List-staticColumn--smallStatus\"></th>";
|
||||
} else if (options.mode === 'lookup') {
|
||||
html += "<th class=\"List-tableHeader select-column List-staticColumn--smallStatus\"></th>";
|
||||
}
|
||||
|
||||
if (options.mode !== 'lookup'){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user