diff --git a/awx/ui/static/js/controllers/Admins.js b/awx/ui/static/js/controllers/Admins.js index b550de1a56..813ddc7f87 100644 --- a/awx/ui/static/js/controllers/Admins.js +++ b/awx/ui/static/js/controllers/Admins.js @@ -1,13 +1,22 @@ /************************************ * Copyright (c) 2014 AnsibleWorks, Inc. * + */ + /** + * @ngdoc overview + * @name controllers + * @description These are all the controllers that are used throughout the application * +*/ +/** + * @ngdoc function + * @name controllers.function:Admins + * @description This controller's for administrators * Admins.js * * Controller functions for ading Admins to an Organization. * - */ - +*/ 'use strict'; function AdminsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, AdminList, GenerateList, LoadBreadCrumbs, diff --git a/awx/ui/static/js/controllers/Authentication.js b/awx/ui/static/js/controllers/Authentication.js index cb3f685a3f..29f9965048 100644 --- a/awx/ui/static/js/controllers/Authentication.js +++ b/awx/ui/static/js/controllers/Authentication.js @@ -7,7 +7,11 @@ * Controller functions for user authentication. * */ - +/** + * @ngdoc function + * @name controllers.function:Authentication + * @description This controller's for authenticating users +*/ 'use strict'; function Authenticate($log, $cookieStore, $compile, $window, $scope, $rootScope, $location, Authorization, ToggleClass, Alert, Wait, diff --git a/awx/ui/static/js/controllers/Credentials.js b/awx/ui/static/js/controllers/Credentials.js index 6fd3cf50e7..ccab6efca8 100644 --- a/awx/ui/static/js/controllers/Credentials.js +++ b/awx/ui/static/js/controllers/Credentials.js @@ -6,7 +6,11 @@ * Controller functions for the Credential model. * */ - +/** + * @ngdoc function + * @name controllers.function:Credentials + * @description This controller's for the credentials page +*/ 'use strict'; function CredentialsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, CredentialList, diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js index 2fd52b61af..76c45ca7f5 100644 --- a/awx/ui/static/js/controllers/Home.js +++ b/awx/ui/static/js/controllers/Home.js @@ -8,8 +8,23 @@ * */ + +/** + * @ngdoc function + * @name controllers.function:Home + * @description This controller's for the dashboard +*/ 'use strict'; +/** + * @ngdoc method + * @name controllers.function:Home#Home + * @methodOf controllers.function:Home + * @description this function loads all the widgets on the dashboard. + * dashboardReady (emit) - this is called when the preliminary parts of the dashboard have been loaded, and loads each of the widgets. Note that the + * Host count graph should only be loaded if the user is a super user + * +*/ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, DashboardCounts, HostGraph, JobStatusGraph, HostPieChart, DashboardJobs, ClearScope, Stream, Rest, GetBasePath, ProcessErrors, Button){ @@ -77,6 +92,8 @@ function Home($scope, $compile, $routeParams, $rootScope, $location, Wait, Dashb } }); + + if ($scope.removeDashboardReady) { $scope.removeDashboardReady(); } @@ -162,6 +179,13 @@ Home.$inject = ['$scope', '$compile', '$routeParams', '$rootScope', '$location', ]; +/** + * @ngdoc method + * @name controllers.function:Home#HomeGroups + * @methodOf controllers.function:Home + * @description This controls the 'home/groups' page that is loaded from the dashboard + * +*/ function HomeGroups($log, $scope, $filter, $compile, $location, $routeParams, LogViewer, HomeGroupList, GenerateList, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath, SearchInit, PaginateInit, FormatDate, GetHostsStatusMsg, GetSyncStatusMsg, ViewUpdateStatus, Stream, GroupsEdit, Wait, Alert, Rest, Empty, InventoryUpdate, Find, GroupsCancelUpdate, Store, Socket) { @@ -594,7 +618,13 @@ HomeGroups.$inject = ['$log', '$scope', '$filter', '$compile', '$location', '$ro 'Stream', 'GroupsEdit', 'Wait', 'Alert', 'Rest', 'Empty', 'InventoryUpdate', 'Find', 'GroupsCancelUpdate', 'Store', 'Socket' ]; - +/** + * @ngdoc method + * @name controllers.function:Home#HomeHosts + * @methodOf controllers.function:Home + * @description This loads the page for 'home/hosts' + * +*/ function HomeHosts($scope, $location, $routeParams, HomeHostList, GenerateList, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, GetBasePath, SearchInit, PaginateInit, FormatDate, SetStatus, ToggleHostEnabled, HostsEdit, Stream, Find, ShowJobSummary, ViewJob) { diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js index c2078ddeb2..d489b44678 100644 --- a/awx/ui/static/js/controllers/Inventories.js +++ b/awx/ui/static/js/controllers/Inventories.js @@ -7,7 +7,11 @@ * Controller functions for the Inventory model. * */ - +/** + * @ngdoc function + * @name controllers.function:Inventories + * @description This controller's for the Inventory page +*/ 'use strict'; function InventoriesList($scope, $rootScope, $location, $log, $routeParams, $compile, $filter, Rest, Alert, InventoryList, GenerateList, diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index 74cdc5260c..971b8be3b5 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -4,7 +4,11 @@ * JobDetail.js * */ - +/** + * @ngdoc function + * @name controllers.function:JobDetail + * @description This controller's for the Job Detail Page +*/ 'use strict'; function JobDetailController ($location, $rootScope, $scope, $compile, $routeParams, $log, ClearScope, Breadcrumbs, LoadBreadCrumbs, GetBasePath, Wait, Rest, diff --git a/awx/ui/static/js/controllers/JobEvents.js b/awx/ui/static/js/controllers/JobEvents.js index 12926c9495..3ddc44b1d1 100644 --- a/awx/ui/static/js/controllers/JobEvents.js +++ b/awx/ui/static/js/controllers/JobEvents.js @@ -7,15 +7,19 @@ * Controller functions for the Job Events model. * */ - +/** + * @ngdoc function + * @name controllers.function:JobEvent + * @description This controller's for the job event page +*/ 'use strict'; function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobEventList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, LookUpInit, ToggleChildren, FormatDate, EventView, Refresh, Wait) { - + ClearScope(); - + var list = JobEventList, defaultUrl = GetBasePath('jobs') + $routeParams.id + '/job_events/', //?parent__isnull=1'; generator = GenerateList, @@ -44,7 +48,7 @@ function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log, $rout function formatJSON(eventData) { //turn JSON event data into an html form - + var i, n, rows, fld, txt, html = '', found = false; @@ -125,9 +129,9 @@ function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log, $rout } $scope.removePostRefresh = $scope.$on('PostRefresh', function () { // Initialize the parent levels - + generator.inject(list, { mode: 'edit', scope: $scope }); - + var set = $scope[list.name], i; for (i = 0; i < set.length; i++) { set[i].event_display = set[i].event_display.replace(/^\u00a0*/g, ''); @@ -207,7 +211,7 @@ function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log, $rout }); page = ($routeParams.page) ? parseInt($routeParams.page,10) - 1 : null; - + PaginateInit({ scope: $scope, list: list, @@ -258,13 +262,13 @@ JobEventsList.$inject = ['$sce', '$filter', '$scope', '$rootScope', '$location', function JobEventsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, JobEventsForm, GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ClearScope, GetBasePath, FormatDate, EventView, Wait) { - + ClearScope(); var form = JobEventsForm, generator = GenerateForm, defaultUrl = GetBasePath('base') + 'job_events/' + $routeParams.event_id + '/'; - + generator.inject(form, { mode: 'edit', related: true, scope: $scope}); generator.reset(); diff --git a/awx/ui/static/js/controllers/JobHosts.js b/awx/ui/static/js/controllers/JobHosts.js index 3f14ce02d6..32a32c07d5 100644 --- a/awx/ui/static/js/controllers/JobHosts.js +++ b/awx/ui/static/js/controllers/JobHosts.js @@ -7,20 +7,24 @@ * Controller functions for the Job Hosts Summary model. * */ - +/** + * @ngdoc function + * @name controllers.function:JobHosts + * @description This controller's for the job hosts page +*/ 'use strict'; function JobHostSummaryList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobHostList, GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, Refresh, JobStatusToolTip) { - + ClearScope(); - + var list = JobHostList, defaultUrl = GetBasePath('jobs') + $routeParams.id + '/job_host_summaries/', view = GenerateList, inventory; - + $scope.job_id = $routeParams.id; $scope.host_id = null; @@ -56,7 +60,7 @@ function JobHostSummaryList($scope, $rootScope, $location, $log, $routeParams, R } $scope.removeJobReady = $scope.$on('JobReady', function() { view.inject(list, { mode: 'edit', scope: $scope }); - + SearchInit({ scope: $scope, set: 'jobhosts', diff --git a/awx/ui/static/js/controllers/JobStdout.js b/awx/ui/static/js/controllers/JobStdout.js index 9a191d3288..51c01a2f95 100644 --- a/awx/ui/static/js/controllers/JobStdout.js +++ b/awx/ui/static/js/controllers/JobStdout.js @@ -4,7 +4,11 @@ * JobStdout.js * */ - +/** + * @ngdoc function + * @name controllers.function:JobStdout + * @description This controller's for the standard out page that can be displayed when a job runs +*/ 'use strict'; function JobStdoutController ($log, $rootScope, $scope, $compile, $routeParams, ClearScope, GetBasePath, Wait, Rest, ProcessErrors, Socket) { diff --git a/awx/ui/static/js/controllers/JobTemplates.js b/awx/ui/static/js/controllers/JobTemplates.js index 17c074aa70..482a1b2bf4 100644 --- a/awx/ui/static/js/controllers/JobTemplates.js +++ b/awx/ui/static/js/controllers/JobTemplates.js @@ -7,7 +7,11 @@ * Controller functions for the Job Template model. * */ - +/** + * @ngdoc function + * @name controllers.function:JobTemplate + * @description This controller's for the Job Template page +*/ 'use strict'; function JobTemplatesList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobTemplateList, diff --git a/awx/ui/static/js/controllers/Jobs.js b/awx/ui/static/js/controllers/Jobs.js index 4f79be97d0..40049a8d5c 100644 --- a/awx/ui/static/js/controllers/Jobs.js +++ b/awx/ui/static/js/controllers/Jobs.js @@ -7,7 +7,11 @@ * Controller functions for the Inventory model. * */ - +/** + * @ngdoc function + * @name controllers.function:Jobs + * @description This controller's for the jobs page +*/ 'use strict'; function JobsListController ($rootScope, $log, $scope, $compile, $routeParams, ClearScope, Breadcrumbs, LoadBreadCrumbs, LoadSchedulesScope, diff --git a/awx/ui/static/js/controllers/Organizations.js b/awx/ui/static/js/controllers/Organizations.js index 4b4b8c24ed..28345ac2bb 100644 --- a/awx/ui/static/js/controllers/Organizations.js +++ b/awx/ui/static/js/controllers/Organizations.js @@ -7,7 +7,11 @@ * Controller functions for Organization model. * */ - +/** + * @ngdoc function + * @name controllers.function:Organizations + * @description This controller's for the Organizations page +*/ 'use strict'; function OrganizationsList($routeParams, $scope, $rootScope, $location, $log, Rest, Alert, LoadBreadCrumbs, Prompt, diff --git a/awx/ui/static/js/controllers/Permissions.js b/awx/ui/static/js/controllers/Permissions.js index cda7dc49ca..47a9e32b54 100644 --- a/awx/ui/static/js/controllers/Permissions.js +++ b/awx/ui/static/js/controllers/Permissions.js @@ -7,7 +7,11 @@ * Controller functions for Permissions model. * */ - +/** + * @ngdoc function + * @name controllers.function:Permissions + * @description This controller's for permissions +*/ 'use strict'; function PermissionsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, PermissionList, diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index 9d6ad8d484..8a8ac65d6b 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -7,7 +7,11 @@ * Controller functions for the Projects model. * */ - +/** + * @ngdoc function + * @name controllers.function:Projects + * @description This controller's for the projects page +*/ 'use strict'; function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, ProjectList, GenerateList, LoadBreadCrumbs, diff --git a/awx/ui/static/js/controllers/Schedules.js b/awx/ui/static/js/controllers/Schedules.js index 8d3ad71c6c..440a12b167 100644 --- a/awx/ui/static/js/controllers/Schedules.js +++ b/awx/ui/static/js/controllers/Schedules.js @@ -7,7 +7,11 @@ * Controller functions for the Schedule model. * */ - +/** + * @ngdoc function + * @name controllers.function:Schedules + * @description This controller's for schedules +*/ 'use strict'; function ScheduleEditController($scope, $compile, $location, $routeParams, SchedulesList, Rest, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope, diff --git a/awx/ui/static/js/controllers/Sockets.js b/awx/ui/static/js/controllers/Sockets.js index 0968594855..2935d52ff7 100644 --- a/awx/ui/static/js/controllers/Sockets.js +++ b/awx/ui/static/js/controllers/Sockets.js @@ -5,7 +5,12 @@ * SocketsController- simple test of socket connection * */ - +/** + * @ngdoc function + * @name controllers.function:Sockets + * @description This controller's for controlling websockets + * discuss +*/ 'use strict'; function SocketsController ($scope, $compile, ClearScope, Socket) { diff --git a/awx/ui/static/js/controllers/Teams.js b/awx/ui/static/js/controllers/Teams.js index 4faf69139d..6e2ff63418 100644 --- a/awx/ui/static/js/controllers/Teams.js +++ b/awx/ui/static/js/controllers/Teams.js @@ -7,7 +7,11 @@ * Controller functions for the Team model. * */ - +/** + * @ngdoc function + * @name controllers.function:Teams + * @description This controller's for teams +*/ 'use strict'; function TeamsList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, TeamList, GenerateList, LoadBreadCrumbs, diff --git a/awx/ui/static/js/controllers/Users.js b/awx/ui/static/js/controllers/Users.js index 4ba542b962..951bf6a591 100644 --- a/awx/ui/static/js/controllers/Users.js +++ b/awx/ui/static/js/controllers/Users.js @@ -6,7 +6,11 @@ * Controller functions for User model. * */ - +/** + * @ngdoc function + * @name controllers.function:Users + * @description This controller's the Users page +*/ 'use strict'; function UsersList($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, UserList, GenerateList, LoadBreadCrumbs, diff --git a/awx/ui/static/js/forms/ActivityDetail.js b/awx/ui/static/js/forms/ActivityDetail.js index e5b63ae77a..269b281221 100644 --- a/awx/ui/static/js/forms/ActivityDetail.js +++ b/awx/ui/static/js/forms/ActivityDetail.js @@ -3,8 +3,19 @@ * * ActivityDetail.js * Form definition for Activity Stream detail - * + * */ + /** + * @ngdoc overview + * @name forms + * @description These are all the controllers that are used throughout the application + * +*/ +/** + * @ngdoc function + * @name forms.function:ActivityDetail + * @description This form is for activity detail modal that can be shown on most pages. +*/ angular.module('ActivityDetailDefinition', []) .value('ActivityDetailForm', { @@ -33,5 +44,5 @@ angular.module('ActivityDetailDefinition', []) readonly: true } } - + }); //Form diff --git a/awx/ui/static/js/forms/Credentials.js b/awx/ui/static/js/forms/Credentials.js index a720168558..ece3d98dc2 100644 --- a/awx/ui/static/js/forms/Credentials.js +++ b/awx/ui/static/js/forms/Credentials.js @@ -5,6 +5,11 @@ * Form definition for Credential model * */ + /** + * @ngdoc function + * @name forms.function:Credentials + * @description This form is for adding/editing a Credential +*/ angular.module('CredentialFormDefinition', []) .value('CredentialForm', { diff --git a/awx/ui/static/js/forms/EventsViewer.js b/awx/ui/static/js/forms/EventsViewer.js index f68fbf9eb5..ef34e811c9 100644 --- a/awx/ui/static/js/forms/EventsViewer.js +++ b/awx/ui/static/js/forms/EventsViewer.js @@ -4,6 +4,11 @@ * JobEventsForm.js * */ + /** + * @ngdoc function + * @name forms.function:EventsViewer + * @description This form is for events on the job detail page +*/ angular.module('EventsViewerFormDefinition', []) .value('EventsViewerForm', { diff --git a/awx/ui/static/js/forms/Groups.js b/awx/ui/static/js/forms/Groups.js index ce3631b78b..5a7b5dec56 100644 --- a/awx/ui/static/js/forms/Groups.js +++ b/awx/ui/static/js/forms/Groups.js @@ -6,6 +6,11 @@ * * */ + /** + * @ngdoc function + * @name forms.function:Groups + * @description This form is for adding/editing a Group on the inventory page +*/ angular.module('GroupFormDefinition', []) .value('GroupForm', { @@ -15,7 +20,7 @@ angular.module('GroupFormDefinition', []) cancelButton: false, name: 'group', well: false, - + fields: { name: { label: 'Name', diff --git a/awx/ui/static/js/forms/HostGroups.js b/awx/ui/static/js/forms/HostGroups.js index 3b8aa490cb..8db8bd3dae 100644 --- a/awx/ui/static/js/forms/HostGroups.js +++ b/awx/ui/static/js/forms/HostGroups.js @@ -4,11 +4,16 @@ * HostGroups.js * Form definition for Host model * - * + * */ + /** + * @ngdoc function + * @name forms.function:HostGroups + * @description This form is for groups of hosts on the inventory page +*/ angular.module('HostGroupsFormDefinition', []) .value('HostGroupsForm', { - + editTitle: 'Host Groups', name: 'host', well: false, @@ -35,7 +40,7 @@ angular.module('HostGroupsFormDefinition', []) } }, - buttons: { //for now always generates