Latest UI changes.

This commit is contained in:
chouseknecht
2013-09-06 00:41:22 -04:00
parent dfc687dfae
commit 8cdbaa83b2
14 changed files with 98 additions and 95 deletions

View File

@@ -75,11 +75,11 @@ function InventoriesList ($scope, $rootScope, $location, $log, $routeParams, Res
// Failed jobs link. Go to the jobs tabs, find all jobs for the inventory and sort by status
scope.viewJobs = function(id) {
$location.url('/jobs/?inventory__int=' + id + '&order_by=status');
$location.url('/jobs/?inventory__int=' + id);
}
scope.viewFailedJobs = function(id) {
$location.url('/jobs/?inventory__int=' + id + '&status=failed&order_by=status');
$location.url('/jobs/?inventory__int=' + id + '&status=failed');
}
scope.editHosts = function(id) {

View File

@@ -63,12 +63,8 @@ function JobsListCtrl ($scope, $rootScope, $location, $log, $routeParams, Rest,
scope[list.iterator + 'SearchValue'] = $routeParams['id__int'];
scope[list.iterator + 'SearchFieldLabel'] = 'Job ID';
}
scope.search(list.iterator);
// Called from Inventories page, failed jobs link. Now sort by status so faild jobs appear at top of list
//if ($routeParams.order_by) {
// scope.sort($routeParams.order_by);
//}
scope.search(list.iterator);
LoadBreadCrumbs();

View File

@@ -58,26 +58,38 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
}
scope.showSCMStatus = function(id) {
var project;
for (var i=0; i < scope.projects.length; i++) {
if (scope.projects[i].id == id) {
project = scope.projects[i];
break;
// Refresh the project list
var statusCheckRemove = scope.$on('PostRefresh', function() {
var project;
for (var i=0; i < scope.projects.length; i++) {
if (scope.projects[i].id == id) {
project = scope.projects[i];
break;
}
}
}
if (project.scm_type !== null) {
if (project.related.last_update !== undefined) {
ProjectStatus({ project_id: id, last_update: project.related.last_update });
}
else {
Alert('No Updates Available', 'There is no SCM update information available for this project. An update has not yet been ' +
' completed. If you have not already done so, start an update for this project.', 'alert-info');
}
}
else {
Alert('Missing SCM Configuration', 'The selected project is not configured for SCM. You must first edit the project, provide SCM settings, ' +
'and then start an update.', 'alert-info');
}
if (project.scm_type !== null) {
if (project.related.last_update !== undefined && project.status !== 'updating') {
ProjectStatus({ project_id: id, last_update: project.related.last_update });
}
else if (project.status == 'updating') {
Alert('Pending Status', 'An update is currently running. Status details cannot be viewed until the update process ' +
' completes. Use the refresh button to monitor progress of the update proess.', 'alert-info');
}
else {
Alert('No Updates Available', 'There is no SCM update information available for this project. An update has not yet been ' +
' completed. If you have not already done so, start an update for this project.', 'alert-info');
}
}
else {
Alert('Missing SCM Configuration', 'The selected project is not configured for SCM. You must first edit the project, provide SCM settings, ' +
'and then run an update.', 'alert-info');
}
statusCheckRemove();
});
// Refresh the project list so we're looking at the latest data
scope.search(list.iterator);
}
scope.deleteProject = function(id, name) {