mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
Pulled in angular-scheduler changes.
This commit is contained in:
parent
2e6457b887
commit
7d168e9fd1
@ -64,6 +64,13 @@ function JobsListController ($scope, $compile, ClearScope, Breadcrumbs, LoadBrea
|
||||
id: 'scheduled-jobs',
|
||||
url: GetBasePath('schedules')
|
||||
});
|
||||
|
||||
$scope.refreshJobs = function() {
|
||||
queued_scope.search('queued_job');
|
||||
running_scope.search('running_job');
|
||||
completed_scope.search('completed_job');
|
||||
scheduled_scope.search('schedule');
|
||||
};
|
||||
});
|
||||
|
||||
if ($scope.removeChoicesReady) {
|
||||
@ -94,12 +101,6 @@ function JobsListController ($scope, $compile, ClearScope, Breadcrumbs, LoadBrea
|
||||
callback: 'choicesReady'
|
||||
});
|
||||
|
||||
$scope.refreshJobs = function() {
|
||||
queued_scope.search('queued_job');
|
||||
running_scope.search('running_job');
|
||||
completed_scope.search('completed_job');
|
||||
scheduled_scope.search('schedules');
|
||||
};
|
||||
}
|
||||
|
||||
JobsListController.$inject = ['$scope', '$compile', 'ClearScope', 'Breadcrumbs', 'LoadBreadCrumbs', 'LoadSchedulesScope', 'LoadJobsScope', 'RunningJobsList', 'CompletedJobsList',
|
||||
|
||||
@ -58,6 +58,7 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
||||
$scope.projects[i].statusTip = 'No SCM updates have run for this project';
|
||||
break;
|
||||
case 'updating':
|
||||
case 'running':
|
||||
$scope.projects[i].statusIcon = 'running pulsate';
|
||||
$scope.projects[i].statusTip = 'Running! Click for details';
|
||||
break;
|
||||
|
||||
@ -74,6 +74,10 @@ GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, Get
|
||||
});
|
||||
});
|
||||
|
||||
$scope.refreshJobs = function() {
|
||||
schedules_scope.search(SchedulesList.iterator);
|
||||
};
|
||||
|
||||
Wait('start');
|
||||
|
||||
GetChoices({
|
||||
|
||||
@ -412,7 +412,7 @@ angular.module('SchedulesHelper', ['Utilities', 'RestServices', 'SchedulesHelper
|
||||
function(ToggleSchedule, DeleteSchedule, EditSchedule, AddSchedule) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
list = params.list;
|
||||
parent_scope = params.parent_scope;
|
||||
|
||||
scope.toggleSchedule = function(event, id) {
|
||||
try {
|
||||
@ -451,8 +451,12 @@ angular.module('SchedulesHelper', ['Utilities', 'RestServices', 'SchedulesHelper
|
||||
});
|
||||
};
|
||||
|
||||
scope.refreshJobs = function() {
|
||||
parent_scope.refreshJobs();
|
||||
};
|
||||
|
||||
scope.$on('SchedulesRefresh', function() {
|
||||
scope.search(list.iterator);
|
||||
parent_scope.refreshJobs();
|
||||
});
|
||||
};
|
||||
}])
|
||||
@ -504,6 +508,7 @@ angular.module('SchedulesHelper', ['Utilities', 'RestServices', 'SchedulesHelper
|
||||
|
||||
SchedulesControllerInit({
|
||||
scope: scope,
|
||||
parent_scope: parent_scope,
|
||||
list: list
|
||||
});
|
||||
|
||||
@ -531,7 +536,7 @@ angular.module('SchedulesHelper', ['Utilities', 'RestServices', 'SchedulesHelper
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Set the item type label
|
||||
if (list.fields.type) {
|
||||
parent_scope.type_choices.every(function(choice) {
|
||||
|
||||
@ -25,7 +25,7 @@ angular.module('RefreshHelper', ['RestServices', 'Utilities', 'PaginationHelpers
|
||||
set = params.set,
|
||||
iterator = params.iterator,
|
||||
url = params.url;
|
||||
|
||||
|
||||
scope.current_url = url;
|
||||
Rest.setUrl(url);
|
||||
Rest.get()
|
||||
|
||||
@ -23,8 +23,6 @@ angular.module('CompletedJobsDefinition', [])
|
||||
id: {
|
||||
label: 'Job ID',
|
||||
ngClick:"viewJobLog(completed_job.id)",
|
||||
key: true,
|
||||
desc: true,
|
||||
searchType: 'int',
|
||||
columnClass: 'col-md-1 col-sm-2 col-xs-2'
|
||||
},
|
||||
@ -57,7 +55,9 @@ angular.module('CompletedJobsDefinition', [])
|
||||
link: false,
|
||||
searchable: false,
|
||||
filter: "date:'MM/dd/yy HH:mm:ss'",
|
||||
columnClass: "col-md-2 hidden-xs"
|
||||
columnClass: "col-md-2 hidden-xs",
|
||||
key: true,
|
||||
desc: true
|
||||
},
|
||||
type: {
|
||||
label: 'Type',
|
||||
|
||||
@ -27,7 +27,8 @@ angular.module('ScheduledJobsDefinition', [])
|
||||
awTipPlacement: "top",
|
||||
icon: 'icon-job-{{ schedule.status }}',
|
||||
iconOnly: true,
|
||||
ngClick: "toggleSchedule($event, schedule.id)"
|
||||
ngClick: "toggleSchedule($event, schedule.id)",
|
||||
searchable: false
|
||||
},
|
||||
next_run: {
|
||||
label: 'Next Run',
|
||||
|
||||
@ -26,20 +26,20 @@ angular.module('SchedulesListDefinition', [])
|
||||
ngClick: "editSchedule(schedule.id)",
|
||||
columnClass: "col-md-3 col-sm-3 col-xs-3"
|
||||
},
|
||||
dtstart: {
|
||||
label: 'First Run',
|
||||
filter: "date:'MM/dd/yy HH:mm:ss'",
|
||||
searchable: false,
|
||||
columnClass: "col-md-2 col-sm-3 hidden-xs"
|
||||
},
|
||||
next_run: {
|
||||
label: 'Next Run',
|
||||
filter: "date:'MM/dd/yy HH:mm:ss'",
|
||||
searchable: false,
|
||||
columnClass: "col-md-2 col-sm-3 col-xs-3"
|
||||
},
|
||||
dtstart: {
|
||||
label: 'Start',
|
||||
filter: "date:'MM/dd/yy HH:mm:ss'",
|
||||
searchable: false,
|
||||
columnClass: "col-md-2 col-sm-3 hidden-xs"
|
||||
},
|
||||
dtend: {
|
||||
label: 'End',
|
||||
label: 'Final Run',
|
||||
filter: "date:'MM/dd/yy HH:mm:ss'",
|
||||
searchable: false,
|
||||
columnClass: "col-md-2 col-sm-3 hidden-xs"
|
||||
@ -52,6 +52,11 @@ angular.module('SchedulesListDefinition', [])
|
||||
ngClick: 'addSchedule()',
|
||||
awToolTip: 'Add a new schedule'
|
||||
},
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshJobs()"
|
||||
},
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"angular-md5": "~0.1.7",
|
||||
"angular-resource": "~1.2.12",
|
||||
"angular-sanitize": "~1.2.12",
|
||||
"angular-scheduler": "~0.0.5",
|
||||
"angular-scheduler": "~0.0.6",
|
||||
"bootstrap": "~3.1.1",
|
||||
"components-font-awesome": "~4.0.3",
|
||||
"less.js": "~1.6.3",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user