mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Various small inventory ux bug fixes
This commit is contained in:
@@ -1668,6 +1668,10 @@ tr td button i {
|
|||||||
border: 1px solid @black;
|
border: 1px solid @black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal .SmartSearch-bar {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
#alert-modal, #alert-modal2 {
|
#alert-modal, #alert-modal2 {
|
||||||
z-index: 2100;
|
z-index: 2100;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,15 +45,16 @@ export default ['templateUrl', function(templateUrl) {
|
|||||||
delete hostList.fields.toggleHost;
|
delete hostList.fields.toggleHost;
|
||||||
delete hostList.fields.active_failures;
|
delete hostList.fields.active_failures;
|
||||||
delete hostList.fields.inventory;
|
delete hostList.fields.inventory;
|
||||||
|
hostList.well = false;
|
||||||
let html = GenerateList.build({
|
let html = GenerateList.build({
|
||||||
list: hostList,
|
list: hostList,
|
||||||
input_type: 'foobar',
|
input_type: 'host-filter-modal-body',
|
||||||
mode: 'lookup'
|
//mode: 'lookup'
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.list = hostList;
|
$scope.list = hostList;
|
||||||
|
|
||||||
$('#foobar').append($compile(html)($scope));
|
$('#host-filter-modal-body').append($compile(html)($scope));
|
||||||
|
|
||||||
$scope.showModal();
|
$scope.showModal();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="foobar"></div>
|
<div class="modal-body" id="host-filter-modal-body"></div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" ng-click="cancelForm()" class="Lookup-cancel btn btn-default">CANCEL</button>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
// Unbind the listener so it doesn't fire when we close the modal via navigation
|
// Unbind the listener so it doesn't fire when we close the modal via navigation
|
||||||
$('#HostEvent').off('hidden.bs.modal');
|
$('#HostEvent').off('hidden.bs.modal');
|
||||||
$('#HostEvent').modal('hide');
|
$('#HostEvent').modal('hide');
|
||||||
$state.go('jobDetail');
|
$state.go('jobResult');
|
||||||
};
|
};
|
||||||
|
|
||||||
var init = function(){
|
var init = function(){
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ var hostEventModal = {
|
|||||||
controller: 'HostEventController',
|
controller: 'HostEventController',
|
||||||
templateUrl: templateUrl('job-results/host-event/host-event-modal'),
|
templateUrl: templateUrl('job-results/host-event/host-event-modal'),
|
||||||
'abstract': false,
|
'abstract': false,
|
||||||
|
ncyBreadcrumb: {
|
||||||
|
skip: true
|
||||||
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
hostEvent: ['jobResultsService', '$stateParams', function(jobResultsService, $stateParams) {
|
hostEvent: ['jobResultsService', '$stateParams', function(jobResultsService, $stateParams) {
|
||||||
return jobResultsService.getRelatedJobEvents($stateParams.id, {
|
return jobResultsService.getRelatedJobEvents($stateParams.id, {
|
||||||
@@ -34,21 +37,30 @@ var hostEventJson = {
|
|||||||
name: 'jobResult.host-event.json',
|
name: 'jobResult.host-event.json',
|
||||||
url: '/json',
|
url: '/json',
|
||||||
controller: 'HostEventController',
|
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 = {
|
var hostEventStdout = {
|
||||||
name: 'jobResult.host-event.stdout',
|
name: 'jobResult.host-event.stdout',
|
||||||
url: '/stdout',
|
url: '/stdout',
|
||||||
controller: 'HostEventController',
|
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 = {
|
var hostEventStderr = {
|
||||||
name: 'jobResult.host-event.stderr',
|
name: 'jobResult.host-event.stderr',
|
||||||
url: '/stderr',
|
url: '/stderr',
|
||||||
controller: 'HostEventController',
|
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){
|
if(!field.multiSelect && !field.disableChooseOption){
|
||||||
html += "<option value=\"\">";
|
html += "<option value=\"\">";
|
||||||
// some languages use "Playbook" as a proper noun
|
// some languages use "Playbook" as a proper noun
|
||||||
var chosen_item = field.label;
|
var chosen_item = (i18n._("playbook") !== i18n._("Playbook")) ? field.label.toLowerCase() : field.label;
|
||||||
if (i18n._("playbook") !== i18n._("Playbook")) {
|
|
||||||
chosen_item = label.toLowerCase();
|
|
||||||
}
|
|
||||||
// Add a custom default select 'value' (default text)
|
// Add a custom default select 'value' (default text)
|
||||||
html += (field.defaultText) ? field.defaultText : i18n.sprintf(i18n._("Choose a %s"), chosen_item);
|
html += (field.defaultText) ? field.defaultText : i18n.sprintf(i18n._("Choose a %s"), chosen_item);
|
||||||
html += "</option>\n";
|
html += "</option>\n";
|
||||||
|
|||||||
@@ -318,9 +318,6 @@ export default ['$compile', 'Attr', 'Icon',
|
|||||||
if (options.mode === 'lookup') {
|
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
|
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>`;
|
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
|
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_{{" +
|
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) {
|
if (list.multiSelect) {
|
||||||
html += buildSelectAll().prop('outerHTML');
|
html += buildSelectAll().prop('outerHTML');
|
||||||
} else if (options.mode === 'lookup' && options.input_type !== 'foobar') {
|
} else if (options.mode === 'lookup') {
|
||||||
html += "<th class=\"List-tableHeader select-column List-staticColumn--smallStatus\"></th>";
|
html += "<th class=\"List-tableHeader select-column List-staticColumn--smallStatus\"></th>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.mode !== 'lookup'){
|
if (options.mode !== 'lookup'){
|
||||||
|
|||||||
Reference in New Issue
Block a user