adding launch button for scan jobs

on inventory properties page. I also adjusted the indentation on the job submission page so that it was completly crazy.
This commit is contained in:
Jared Tabor
2015-03-19 11:50:44 -04:00
parent 8b710c191b
commit 2883a70cba
3 changed files with 1061 additions and 1051 deletions

View File

@@ -482,7 +482,7 @@ InventoriesAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log
export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $routeParams, InventoryForm, GenerateForm, Rest,
Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON, ParseVariableString, Stream, RelatedSearchInit, RelatedPaginateInit, Prompt) {
LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON, ParseVariableString, Stream, RelatedSearchInit, RelatedPaginateInit, Prompt, PlaybookRun) {
ClearScope();
@@ -660,6 +660,10 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
$location.path($location.path()+'/job_templates/add');
};
$scope.launchScanJob = function(){
PlaybookRun({ scope: $scope, id: this.scan_job_template.id });
};
$scope.editScanJob = function(){
$location.path($location.path()+'/job_templates/'+this.scan_job_template.id);
};
@@ -694,7 +698,7 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
InventoriesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'InventoryForm', 'GenerateForm',
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString', 'Stream', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt'
'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString', 'Stream', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt', 'PlaybookRun'
];

View File

@@ -125,6 +125,12 @@ export default
},
fieldActions: {
submit: {
label: 'Launch',
ngClick: "launchScanJob()",
awToolTip: 'Launch the scan job template',
'class': 'btn btn-default'
},
edit: {
label: 'Edit',
ngClick: "editScanJob()",

File diff suppressed because it is too large Load Diff