mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
AC-525 Fixed inventory and job navigation issues. Fixed nagging horizontal scroll in dialogs with accordions.
This commit is contained in:
@@ -19,7 +19,7 @@ angular.module('InventoryFormDefinition', [])
|
|||||||
navigationLinks: {
|
navigationLinks: {
|
||||||
inventory: {
|
inventory: {
|
||||||
href: "/#/inventories/{{ inventory_id }}",
|
href: "/#/inventories/{{ inventory_id }}",
|
||||||
label: "Inventory Properties",
|
label: "Properties",
|
||||||
icon: "icon-edit",
|
icon: "icon-edit",
|
||||||
active: true
|
active: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,17 +10,19 @@ angular.module('JobFormDefinition', [])
|
|||||||
.value(
|
.value(
|
||||||
'JobForm', {
|
'JobForm', {
|
||||||
|
|
||||||
addTitle: 'Create Job', //Legend in add mode
|
addTitle: 'Create Job',
|
||||||
editTitle: '{{ id }} - {{ name }}', //Legend in edit mode
|
editTitle: '{{ id }} - {{ name }}',
|
||||||
name: 'jobs',
|
name: 'jobs',
|
||||||
well: true,
|
well: true,
|
||||||
|
collapse: true,
|
||||||
|
collapseMode: 'edit',
|
||||||
|
collapseTitle: 'Job Template',
|
||||||
twoColumns: true,
|
twoColumns: true,
|
||||||
|
|
||||||
navigationLinks: {
|
navigationLinks: {
|
||||||
details: {
|
details: {
|
||||||
href: "/#/jobs/{{ job_id }}",
|
href: "/#/jobs/{{ job_id }}",
|
||||||
label: "\{\{ job_id + '- ' + name \}\}",
|
label: 'Status',
|
||||||
listLabel: 'Job Details',
|
|
||||||
icon: 'icon-zoom-in',
|
icon: 'icon-zoom-in',
|
||||||
active: true,
|
active: true,
|
||||||
ngShow: "job_id !== null"
|
ngShow: "job_id !== null"
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ angular.module('InventoriesListDefinition', [])
|
|||||||
icon: 'icon-edit',
|
icon: 'icon-edit',
|
||||||
'class': 'btn-default btn-xs',
|
'class': 'btn-default btn-xs',
|
||||||
options: [
|
options: [
|
||||||
{ ngClick: "editInventory(\{\{ inventory.id \}\})", label: 'Inventory Properties' },
|
{ ngClick: "editInventory(\{\{ inventory.id \}\})", label: 'Properties' },
|
||||||
{ ngClick: "editHosts(\{\{ inventory.id \}\})", label: 'Hosts' },
|
{ ngClick: "editHosts(\{\{ inventory.id \}\})", label: 'Hosts' },
|
||||||
{ ngClick: "editGroups(\{\{ inventory.id \}\})", label: 'Groups' }
|
{ ngClick: "editGroups(\{\{ inventory.id \}\})", label: 'Groups' }
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ angular.module('JobEventsListDefinition', [])
|
|||||||
navigationLinks: {
|
navigationLinks: {
|
||||||
details: {
|
details: {
|
||||||
href: "/#/jobs/{{ job_id }}",
|
href: "/#/jobs/{{ job_id }}",
|
||||||
label: 'Job Details',
|
label: 'Status',
|
||||||
icon: 'icon-zoom-in',
|
icon: 'icon-zoom-in',
|
||||||
ngShow: "job_id !== null"
|
ngShow: "job_id !== null"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ angular.module('JobHostDefinition', [])
|
|||||||
navigationLinks: {
|
navigationLinks: {
|
||||||
details: {
|
details: {
|
||||||
href: "/#/jobs/{{ job_id }}",
|
href: "/#/jobs/{{ job_id }}",
|
||||||
label: 'Job Details',
|
label: 'Status',
|
||||||
icon: 'icon-zoom-in',
|
icon: 'icon-zoom-in',
|
||||||
ngShow: "job_id !== null"
|
ngShow: "job_id !== null"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -97,11 +97,11 @@ angular.module('JobsListDefinition', [])
|
|||||||
icon: 'icon-zoom-in',
|
icon: 'icon-zoom-in',
|
||||||
'class': 'btn-default btn-xs',
|
'class': 'btn-default btn-xs',
|
||||||
options: [
|
options: [
|
||||||
{ ngClick: "viewSummary(\{{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Host Summary',
|
{ ngClick: "editJob(\{\{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Status' },
|
||||||
|
{ ngClick: "viewSummary(\{{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Hosts',
|
||||||
ngHide: "job.status == 'new'" },
|
ngHide: "job.status == 'new'" },
|
||||||
{ ngClick: "viewEvents(\{{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Job Events',
|
{ ngClick: "viewEvents(\{{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Events',
|
||||||
ngHide: "job.status == 'new'" },
|
ngHide: "job.status == 'new'" }
|
||||||
{ ngClick: "editJob(\{\{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Job Details' }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,10 @@ body {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-dialog .ui-accordion .ui-accordion-content {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.overlay {
|
.overlay {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -846,6 +846,20 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
|||||||
html += "<li ng-repeat=\"crumb in breadcrumbs\"><a href=\"{{ '#' + crumb.path }}\">{{ crumb.title | capitalize }}</a></li>\n";
|
html += "<li ng-repeat=\"crumb in breadcrumbs\"><a href=\"{{ '#' + crumb.path }}\">{{ crumb.title | capitalize }}</a></li>\n";
|
||||||
|
|
||||||
if (navigation) {
|
if (navigation) {
|
||||||
|
|
||||||
|
var paths = $location.path().replace(/^\//,'').split('/');
|
||||||
|
|
||||||
|
if (paths.length == 2) {
|
||||||
|
html += "<li class=\"active\">";
|
||||||
|
if (options.mode == 'edit') {
|
||||||
|
html += this.form.editTitle;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
html += this.form.addTitle;
|
||||||
|
}
|
||||||
|
html += "</li>\n";
|
||||||
|
}
|
||||||
|
|
||||||
html += "<li class=\"active\"> </li>\n";
|
html += "<li class=\"active\"> </li>\n";
|
||||||
html += "</ul>\n";
|
html += "</ul>\n";
|
||||||
html += "<div class=\"dropdown\">\n";
|
html += "<div class=\"dropdown\">\n";
|
||||||
@@ -857,14 +871,17 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
html += "<ul class=\"dropdown-menu\" role=\"menu\">\n";
|
html += "<ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||||
for (var itm in navigation) {
|
for (var itm in navigation) {
|
||||||
html += "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"" +
|
html += "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"" +
|
||||||
navigation[itm].href + "\" ";
|
navigation[itm].href + "\" ";
|
||||||
html += (navigation[itm].active) ? "class=\"active\" " : "";
|
// html += (navigation[itm].active) ? "class=\"active\" " : "";
|
||||||
html += ">";
|
html += ">";
|
||||||
|
html += "<i class=\"icon-ok\" style=\"visibility: ";
|
||||||
|
html += (navigation[itm].active) ? "visible" : "hidden";
|
||||||
|
html += "\"></i> ";
|
||||||
html += (navigation[itm].listLabel) ? navigation[itm].listLabel : navigation[itm].label;
|
html += (navigation[itm].listLabel) ? navigation[itm].listLabel : navigation[itm].label;
|
||||||
html += (navigation[itm].active) ? " <i class=\"icon-angle-left\"></i>" : "";
|
|
||||||
html += "</a></li>\n";
|
html += "</a></li>\n";
|
||||||
}
|
}
|
||||||
html += "</ul>\n";
|
html += "</ul>\n";
|
||||||
@@ -1123,7 +1140,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
|||||||
var navigation = {
|
var navigation = {
|
||||||
inventory: {
|
inventory: {
|
||||||
href: "/#/inventories/{{ inventory_id }}",
|
href: "/#/inventories/{{ inventory_id }}",
|
||||||
label: "Inventory Properties",
|
label: "Properties",
|
||||||
icon: "icon-edit"
|
icon: "icon-edit"
|
||||||
},
|
},
|
||||||
hosts: {
|
hosts: {
|
||||||
|
|||||||
@@ -123,10 +123,12 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
|||||||
for (var itm in navigation) {
|
for (var itm in navigation) {
|
||||||
html += "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"" +
|
html += "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"" +
|
||||||
navigation[itm].href + "\" ";
|
navigation[itm].href + "\" ";
|
||||||
html += (navigation[itm].active) ? "class=\"active\" " : "";
|
// html += (navigation[itm].active) ? "class=\"active\" " : "";
|
||||||
html += ">";
|
html += ">";
|
||||||
|
html += "<i class=\"icon-ok\" style=\"visibility: ";
|
||||||
|
html += (navigation[itm].active) ? "visible" : "hidden";
|
||||||
|
html += "\"></i> ";
|
||||||
html += navigation[itm].label;
|
html += navigation[itm].label;
|
||||||
html += (navigation[itm].active) ? " <i class=\"icon-angle-left\"></i>" : "";
|
|
||||||
html += "</a></li>\n";
|
html += "</a></li>\n";
|
||||||
}
|
}
|
||||||
html += "</ul>\n";
|
html += "</ul>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user