mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 08:57:33 -02:30
cleaning up js hint
This commit is contained in:
@@ -482,15 +482,13 @@ InventoriesAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log
|
|||||||
|
|
||||||
export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $routeParams, InventoryForm, GenerateForm, Rest,
|
export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $routeParams, InventoryForm, GenerateForm, Rest,
|
||||||
Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
|
Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
|
||||||
LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON, ParseVariableString, Stream, ScanJobsList) {
|
LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON, ParseVariableString, Stream) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
// Inject dynamic view
|
// Inject dynamic view
|
||||||
var defaultUrl = GetBasePath('inventory'),
|
var defaultUrl = GetBasePath('inventory'),
|
||||||
form = InventoryForm(),
|
form = InventoryForm(),
|
||||||
list = ScanJobsList,
|
|
||||||
view = generateList,
|
|
||||||
generator = GenerateForm,
|
generator = GenerateForm,
|
||||||
inventory_id = $routeParams.inventory_id,
|
inventory_id = $routeParams.inventory_id,
|
||||||
master = {},
|
master = {},
|
||||||
@@ -501,7 +499,7 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
|
|||||||
form.formFieldSize = null;
|
form.formFieldSize = null;
|
||||||
|
|
||||||
generator.inject(form, { mode: 'edit', related: true, scope: $scope });
|
generator.inject(form, { mode: 'edit', related: true, scope: $scope });
|
||||||
// view.inject(list, { scope: $scope, id: 'scan-jobs-list' });
|
|
||||||
generator.reset();
|
generator.reset();
|
||||||
LoadBreadCrumbs();
|
LoadBreadCrumbs();
|
||||||
|
|
||||||
@@ -633,7 +631,7 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
|
|||||||
|
|
||||||
InventoriesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'InventoryForm', 'GenerateForm',
|
InventoriesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'InventoryForm', 'GenerateForm',
|
||||||
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
|
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
|
||||||
'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString', 'Stream', 'ScanJobsList'
|
'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString', 'Stream'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
94
awx/ui/static/js/lists/ScanJobs.js
Normal file
94
awx/ui/static/js/lists/ScanJobs.js
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
/*********************************************
|
||||||
|
* Copyright (c) 2014 AnsibleWorks, Inc.
|
||||||
|
*
|
||||||
|
* Jobs.js
|
||||||
|
* List view object for job data model.
|
||||||
|
*
|
||||||
|
* Used on dashboard to provide a list of all jobs, regardless of
|
||||||
|
* status.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default
|
||||||
|
angular.module('ScanJobsListDefinition', [])
|
||||||
|
.value( 'ScanJobsList', {
|
||||||
|
|
||||||
|
name: 'scan_jobs',
|
||||||
|
iterator: 'scan_job',
|
||||||
|
editTitle: 'Scan Jobs',
|
||||||
|
'class': 'table-condensed',
|
||||||
|
index: false,
|
||||||
|
hover: true,
|
||||||
|
well: false,
|
||||||
|
|
||||||
|
fields: {
|
||||||
|
name: {
|
||||||
|
key: true,
|
||||||
|
label: 'Name',
|
||||||
|
// columnClass: 'col-lg-5 col-md-5 col-sm-9 col-xs-8'
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
label: 'Description',
|
||||||
|
// columnClass: 'col-lg-4 col-md-3 hidden-sm hidden-xs'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
add: {
|
||||||
|
mode: 'all', // One of: edit, select, all
|
||||||
|
ngClick: 'addScanJobTemplate()',
|
||||||
|
basePaths: ['job_templates'],
|
||||||
|
awToolTip: 'Create a new template',
|
||||||
|
ngHide: 'portalMode===true'
|
||||||
|
},
|
||||||
|
stream: {
|
||||||
|
ngClick: "showActivity()",
|
||||||
|
awToolTip: "View Activity Stream",
|
||||||
|
icon: "icon-comments-alt",
|
||||||
|
mode: 'edit',
|
||||||
|
ngHide: 'portalMode===true'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
fieldActions: {
|
||||||
|
submit: {
|
||||||
|
label: 'Launch',
|
||||||
|
mode: 'all',
|
||||||
|
ngClick: 'submitJob(job_template.id)',
|
||||||
|
awToolTip: 'Start a job using this template',
|
||||||
|
dataPlacement: 'top'
|
||||||
|
},
|
||||||
|
schedule: {
|
||||||
|
label: 'Schedule',
|
||||||
|
mode: 'all',
|
||||||
|
ngHref: '#/job_templates/{{ job_template.id }}/schedules',
|
||||||
|
awToolTip: 'Schedule future job template runs',
|
||||||
|
dataPlacement: 'top',
|
||||||
|
},
|
||||||
|
edit: {
|
||||||
|
label: 'Edit',
|
||||||
|
ngClick: "editJobTemplate(job_template.id)",
|
||||||
|
awToolTip: 'Edit template',
|
||||||
|
"class": 'btn-default btn-xs',
|
||||||
|
dataPlacement: 'top',
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
label: 'Delete',
|
||||||
|
ngClick: "deleteJobTemplate(job_template.id, job_template.name)",
|
||||||
|
"class": 'btn-danger btn-xs',
|
||||||
|
awToolTip: 'Delete template',
|
||||||
|
dataPlacement: 'top',
|
||||||
|
},
|
||||||
|
copy: {
|
||||||
|
label: 'Copy',
|
||||||
|
ngClick: "copyJobTemplate(job_template.id, job_template.name)",
|
||||||
|
"class": 'btn-danger btn-xs',
|
||||||
|
awToolTip: 'Copy template',
|
||||||
|
dataPlacement: 'top',
|
||||||
|
ngHide: 'job_template.summary_fields.can_copy===false'
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user