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