mirror of
https://github.com/ansible/awx.git
synced 2026-01-23 15:38:06 -03:30
Fixed zip code in footer. Changed job navigation to match inventory navigation (links at top of page rather than buttons).
This commit is contained in:
parent
ab6a20c525
commit
fd16c0827a
@ -24,7 +24,8 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
||||
var view = GenerateList;
|
||||
var base = $location.path().replace(/^\//,'').split('/')[0];
|
||||
var scope = view.inject(list, { mode: 'edit' });
|
||||
|
||||
|
||||
scope.job_id = $routeParams.id;
|
||||
$rootScope.flashMessage = null;
|
||||
scope.selected = [];
|
||||
scope.expand = true; //on load, automatically expand all nodes
|
||||
@ -168,11 +169,6 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
||||
LoadBreadCrumbs();
|
||||
|
||||
scope.viewJobEvent = function(id) {
|
||||
//var url = '/jobs/' + $routeParams.id + '/job_events/' + id;
|
||||
//if (scope['jobeventPage']) {
|
||||
// url += '?&page=' + (scope['jobeventPage'] + 1);
|
||||
//}
|
||||
//$location.url(url);
|
||||
EventView({ event_id: id });
|
||||
}
|
||||
|
||||
@ -180,15 +176,6 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
||||
scope.expand = true;
|
||||
scope.search(list.iterator);
|
||||
}
|
||||
|
||||
scope.jobDetails = function() {
|
||||
$location.path('/jobs/' + $routeParams.id);
|
||||
};
|
||||
|
||||
scope.jobSummary = function() {
|
||||
$location.path('/jobs/' + $routeParams.id + '/job_host_summaries');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
JobEventsList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'JobEventList',
|
||||
|
||||
@ -18,7 +18,7 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
|
||||
var list = JobHostList;
|
||||
var base = $location.path().replace(/^\//,'').split('/')[0];
|
||||
var defaultUrl = GetBasePath(base) + $routeParams.id + '/job_host_summaries/';
|
||||
|
||||
|
||||
// When viewing all summaries for a particular host, show job ID, otherwise row ID.
|
||||
if (base == 'hosts') {
|
||||
list.index = false;
|
||||
@ -29,6 +29,7 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
|
||||
|
||||
var view = GenerateList;
|
||||
var scope = view.inject(list, { mode: 'edit' });
|
||||
|
||||
scope.selected = [];
|
||||
|
||||
// control enable/disable/show of job specific view elements
|
||||
@ -87,14 +88,6 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
|
||||
scope.refresh = function() {
|
||||
scope.search(list.iterator);
|
||||
}
|
||||
|
||||
scope.jobDetails = function() {
|
||||
$location.path('/jobs/' + $routeParams.id);
|
||||
};
|
||||
|
||||
scope.jobEvents = function() {
|
||||
$location.path('/jobs/' + $routeParams.id + '/job_events');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -175,7 +175,8 @@ function JobsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams,
|
||||
var master = {};
|
||||
var id = $routeParams.id;
|
||||
var relatedSets = {};
|
||||
|
||||
|
||||
scope.job_id = id;
|
||||
scope.parseType = 'yaml';
|
||||
scope.statusSearchSpin = false;
|
||||
|
||||
|
||||
@ -16,6 +16,21 @@ angular.module('JobFormDefinition', [])
|
||||
well: true,
|
||||
twoColumns: true,
|
||||
|
||||
|
||||
navigationLinks: {
|
||||
hosts: {
|
||||
href: "/#/jobs/{{ job_id }}/job_host_summaries",
|
||||
label: 'Hosts',
|
||||
icon: 'icon-laptop'
|
||||
},
|
||||
events: {
|
||||
href: "/#/jobs/{{ job_id }}/job_events",
|
||||
label: 'Events',
|
||||
icon: 'icon-list-ul'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
@ -282,22 +297,6 @@ angular.module('JobFormDefinition', [])
|
||||
"class": 'btn-sm btn-primary',
|
||||
awToolTip: 'Refresh job status & output',
|
||||
mode: 'all'
|
||||
},
|
||||
summary: {
|
||||
label: 'Hosts',
|
||||
icon: 'icon-laptop',
|
||||
ngClick: "jobSummary()",
|
||||
"class": 'btn btn-default btn-sm',
|
||||
awToolTip: 'View host summary',
|
||||
mode: 'all'
|
||||
},
|
||||
events: {
|
||||
label: 'Events',
|
||||
icon: 'icon-list-ul',
|
||||
ngClick: "jobEvents()",
|
||||
"class": 'btn btn-default btn-sm',
|
||||
awToolTip: 'Edit job events',
|
||||
mode: 'all'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,6 +17,19 @@ angular.module('JobEventsListDefinition', [])
|
||||
hover: true,
|
||||
hasChildren: true,
|
||||
filterBy: '\{ show: true \}',
|
||||
|
||||
navigationLinks: {
|
||||
details: {
|
||||
href: "/#/jobs/{{ job_id }}",
|
||||
label: 'Details',
|
||||
icon: 'icon-zoom-in'
|
||||
},
|
||||
summary: {
|
||||
href: "/#/jobs/{{ job_id }}/job_host_summaries",
|
||||
label: 'Hosts',
|
||||
icon: 'icon-laptop'
|
||||
}
|
||||
},
|
||||
|
||||
fields: {
|
||||
created: {
|
||||
@ -65,22 +78,6 @@ angular.module('JobEventsListDefinition', [])
|
||||
awToolTip: 'Refresh the page',
|
||||
"class": 'btn-sm btn-primary',
|
||||
mode: 'all'
|
||||
},
|
||||
edit: {
|
||||
label: 'Details',
|
||||
ngClick: "jobDetails()",
|
||||
icon: 'icon-zoom-in',
|
||||
"class": 'btn btn-default btn-sm',
|
||||
awToolTip: 'Edit job details',
|
||||
mode: 'all'
|
||||
},
|
||||
summary: {
|
||||
label: 'Hosts',
|
||||
icon: 'icon-laptop',
|
||||
ngClick: "jobSummary()",
|
||||
"class": 'btn btn-default btn-sm',
|
||||
awToolTip: 'View host summary',
|
||||
mode: 'all'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -16,6 +16,21 @@ angular.module('JobHostDefinition', [])
|
||||
index: true,
|
||||
hover: true,
|
||||
|
||||
navigationLinks: {
|
||||
details: {
|
||||
href: "/#/jobs/{{ job_id }}",
|
||||
label: 'Details',
|
||||
icon: 'icon-zoom-in',
|
||||
ngShow: "job_id !== null"
|
||||
},
|
||||
events: {
|
||||
href: "/#/jobs/{{ job_id }}/job_events",
|
||||
label: 'Events',
|
||||
icon: 'icon-list-ul',
|
||||
ngShow: "job_id !== null"
|
||||
}
|
||||
},
|
||||
|
||||
fields: {
|
||||
id: {
|
||||
label: 'Job ID',
|
||||
@ -71,24 +86,6 @@ angular.module('JobHostDefinition', [])
|
||||
awToolTip: 'Refresh the page',
|
||||
mode: 'all'
|
||||
},
|
||||
edit: {
|
||||
label: 'Details',
|
||||
icon: 'icon-edit',
|
||||
ngClick: "jobDetails()",
|
||||
ngShow: 'job_id !== null',
|
||||
"class": 'btn btn-default btn-sm',
|
||||
awToolTip: 'Edit job details',
|
||||
mode: 'all'
|
||||
},
|
||||
events: {
|
||||
label: 'Events',
|
||||
icon: 'icon-list-ul',
|
||||
ngClick: "jobEvents()",
|
||||
ngShow: 'job_id !== null',
|
||||
"class": 'btn btn-default btn-sm',
|
||||
awToolTip: 'View job events',
|
||||
mode: 'all'
|
||||
},
|
||||
help: {
|
||||
awPopOver: "<dl>\n<dt>Success</dt><dd>Tasks successfully executed on the host.</dd>\n" +
|
||||
"<dt>Changed</dt><dd>Actions taken on the host.</dd>\n" +
|
||||
|
||||
@ -9,8 +9,9 @@
|
||||
*/
|
||||
|
||||
angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
.factory('GenerateForm', [ '$location', '$cookieStore', '$compile', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon', 'Column',
|
||||
function($location, $cookieStore, $compile, SearchWidget, PaginateWidget, Attr, Icon, Column) {
|
||||
.factory('GenerateForm', [ '$location', '$cookieStore', '$compile', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon', 'Column',
|
||||
'NavigationLink',
|
||||
function($location, $cookieStore, $compile, SearchWidget, PaginateWidget, Attr, Icon, Column, NavigationLink) {
|
||||
return {
|
||||
|
||||
setForm: function(form) {
|
||||
@ -288,9 +289,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
return html;
|
||||
},
|
||||
|
||||
navigationLink: function(link) {
|
||||
return "<a href=\"" + link.href + "\">" + this.attr(link, 'icon') + ' ' + link.label + "</a>\n";
|
||||
},
|
||||
navigationLink: NavigationLink,
|
||||
|
||||
buildField: function(fld, field, options, form) {
|
||||
|
||||
@ -770,6 +769,14 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
if (!this.modal) {
|
||||
html += this.breadCrumbs(options);
|
||||
}
|
||||
|
||||
if (!this.modal && this.form.navigationLinks) {
|
||||
html += "<div class=\"navigation-links text-right\">\n";
|
||||
for (var link in this.form.navigationLinks) {
|
||||
html += this.navigationLink(this.form.navigationLinks[link]);
|
||||
}
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
if ((!this.modal && this.form.statusFields)) {
|
||||
// Add status fields section (used in Jobs form)
|
||||
@ -811,7 +818,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
html += "</div>\n";
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
if ( this.form.collapse && this.form.collapseMode == options.mode) {
|
||||
html += "<div id=\"" + this.form.name + "-collapse-0\" ";
|
||||
html += (this.form.collapseOpen) ? "data-open=\"true\" " : "";
|
||||
@ -830,14 +837,6 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
}
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
if (this.form.navigationLinks) {
|
||||
html += "<div class=\"navigation-links text-right\">\n";
|
||||
for (var link in this.form.navigationLinks) {
|
||||
html += this.navigationLink(this.form.navigationLinks[link]);
|
||||
}
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
// Start the well
|
||||
if ( this.has('well') ) {
|
||||
|
||||
@ -90,10 +90,23 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
|
||||
.factory('Icon', function() {
|
||||
return function(icon) {
|
||||
return "<i class=\"" + icon + "\"></i> ";
|
||||
return "<i class=\"" + icon + "\"></i> ";
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
.factory('NavigationLink', ['Attr', 'Icon', function(Attr, Icon) {
|
||||
return function(link) {
|
||||
var html = "<a ";
|
||||
html += (link.href) ? Attr(link, 'href') : '';
|
||||
html += (link.ngClick) ? Attr(link, 'ngClick') : '';
|
||||
html += (link.ngShow) ? Attr(link, 'ngShow') : '';
|
||||
html += '>';
|
||||
html += (link.icon) ? Icon(link.icon) : '';
|
||||
html += (link.label) ? link.label : '';
|
||||
html += "</a>\n";
|
||||
return html;
|
||||
}
|
||||
}])
|
||||
|
||||
.factory('DropDown', ['Attr', 'Icon', function(Attr, Icon) {
|
||||
return function(params) {
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
|
||||
angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
.factory('GenerateList', [ '$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon',
|
||||
'Column', 'DropDown',
|
||||
function($location, $compile, $rootScope, SearchWidget, PaginateWidget, Attr, Icon, Column, DropDown) {
|
||||
'Column', 'DropDown', 'NavigationLink',
|
||||
function($location, $compile, $rootScope, SearchWidget, PaginateWidget, Attr, Icon, Column, DropDown, NavigationLink) {
|
||||
return {
|
||||
|
||||
setList: function(list) {
|
||||
@ -139,6 +139,14 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
if (options.mode != 'lookup' && list.navigationLinks) {
|
||||
html += "<div class=\"navigation-links text-right\">\n";
|
||||
for (var link in list.navigationLinks) {
|
||||
html += NavigationLink(list.navigationLinks[link]);
|
||||
}
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
if (options.mode != 'lookup' && (list.well == undefined || list.well == 'true')) {
|
||||
html += "<div class=\"well\">\n";
|
||||
}
|
||||
|
||||
@ -343,7 +343,7 @@
|
||||
</div>
|
||||
<div class="copyright">
|
||||
Copyright © 2013 AnsibleWorks, Inc. All rights reservied.<br />
|
||||
1482 East Valley Road, Suite 888 · Montecito, California 9308 · +1-800-825-0212<br />
|
||||
1482 East Valley Road, Suite 888 · Montecito, California 93108 · +1-800-825-0212<br />
|
||||
<a href="http://www.ansibleworks.com" target="_blank">www.ansibleworks.com</a>
|
||||
</div>
|
||||
<div class="logo pull-right">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user