Copyright JS files and removing unlicensed files

Adding the Copyright and All Rights Reserved to the JS files, as well as removing pwdmeter and 3dDonut chart (in lieu of d3.js donut chart)

adding the legend and getting pie chart to donut

adding data labels to donut chart

working legend and tooltip

job detail donut

Ansible Copyright added to beginning of all JS files

removing pwdmeter and d3donut

fixing merge conflicts
This commit is contained in:
Jared Tabor
2015-05-29 12:08:22 -04:00
parent c2a5b21b9e
commit d7e2614760
214 changed files with 1366 additions and 4103 deletions
+6 -7
View File
@@ -1,11 +1,10 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* app.js * All Rights Reserved
* *************************************************/
* Declare the Tower app, define routes and perform initialization chores.
*
*/
var urlPrefix; var urlPrefix;
@@ -1,4 +1,9 @@
export default ['$window', function($window) { /*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
export default ['$window', function($window) {
var ua = $window.navigator.userAgent, var ua = $window.navigator.userAgent,
browserName; browserName;
+6 -1
View File
@@ -1,4 +1,9 @@
import getBrowserData from './browser-data.factory'; /*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import getBrowserData from './browser-data.factory';
import ngApp from './ng-app.directive'; import ngApp from './ng-app.directive';
export default export default
@@ -1,3 +1,9 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
/* jshint unused: vars */ /* jshint unused: vars */
export default ['browserData', function(browserData) { export default ['browserData', function(browserData) {
+8 -3
View File
@@ -1,7 +1,12 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
/********************************************************************** /**********************************************************************
*
* Copyright (c) 2014 AnsibleWorks, Inc.
*
* config.js * config.js
* *
* Gobal configuration variables for controlling application behavior. * Gobal configuration variables for controlling application behavior.
+4 -6
View File
@@ -1,11 +1,9 @@
/************************************************* /*************************************************
* Copyright (c) 2015 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Adhoc.js * All Rights Reserved
* *************************************************/
* Controller functions for the Adhoc model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Adhoc * @name controllers.function:Adhoc
+6 -4
View File
@@ -1,7 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
*/ * All Rights Reserved
*************************************************/
/** /**
* @ngdoc overview * @ngdoc overview
* @name controllers * @name controllers
@@ -43,4 +45,4 @@ export function AdminsList($scope, $rootScope, $location, $log, $routeParams, Re
AdminsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'AdminList', 'generateList', AdminsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'AdminList', 'generateList',
'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'GetBasePath', 'SelectionInit' 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'GetBasePath', 'SelectionInit'
]; ];
@@ -1,12 +1,8 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* Authentication.js *************************************************/
*
* Controller functions for user authentication.
*
*/
/** /**
* @ngdoc function * @ngdoc function
+4 -6
View File
@@ -1,11 +1,9 @@
/************************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Credentials.js * All Rights Reserved
* *************************************************/
* Controller functions for the Credential model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Credentials * @name controllers.function:Credentials
+4 -9
View File
@@ -1,13 +1,8 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* Home.js *************************************************/
*
* Controller functions for Home tab
*
*/
/** /**
* @ngdoc function * @ngdoc function
+5 -8
View File
@@ -1,12 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* Inventories.js *************************************************/
*
* Controller functions for the Inventory model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Inventories * @name controllers.function:Inventories
+5 -5
View File
@@ -1,9 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobDetail.js * All Rights Reserved
* *************************************************/
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:JobDetail * @name controllers.function:JobDetail
+5 -8
View File
@@ -1,12 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* JobEvents.js *************************************************/
*
* Controller functions for the Job Events model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:JobEvent * @name controllers.function:JobEvent
+6 -9
View File
@@ -1,12 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* JobHosts.js *************************************************/
*
* Controller functions for the Job Hosts Summary model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:JobHosts * @name controllers.function:JobHosts
@@ -127,4 +124,4 @@ export function JobHostSummaryList($scope, $rootScope, $location, $log, $routePa
JobHostSummaryList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'JobHostList', JobHostSummaryList.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'JobHostList',
'generateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'generateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors',
'GetBasePath', 'Refresh', 'JobStatusToolTip', 'Wait' 'GetBasePath', 'Refresh', 'JobStatusToolTip', 'Wait'
]; ];
+5 -5
View File
@@ -1,9 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobStdout.js * All Rights Reserved
* *************************************************/
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:JobStdout * @name controllers.function:JobStdout
+5 -8
View File
@@ -1,12 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* JobTemplates.js *************************************************/
*
* Controller functions for the Job Template model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:JobTemplate * @name controllers.function:JobTemplate
+5 -8
View File
@@ -1,12 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* Jobs.js *************************************************/
*
* Controller functions for the Inventory model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Jobs * @name controllers.function:Jobs
-429
View File
@@ -1,429 +0,0 @@
/************************************
* Copyright (c) 2014 AnsibleWorks, Inc.
*
*
* Jobs.js
*
* Controller functions for the Job model.
*
*/
'use strict';
function JobsListCtrl($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobList, GenerateList, LoadBreadCrumbs, Prompt,
SearchInit, PaginateInit, ReturnToCaller, ClearScope, ProcessErrors, GetBasePath, LookUpInit, SubmitJob, FormatDate, Refresh,
JobStatusToolTip, Empty, Wait) {
ClearScope();
var list = JobList,
defaultUrl = GetBasePath('jobs'),
generator = GenerateList,
opt;
generator.inject(list, { mode: 'edit', scope: $scope });
$rootScope.flashMessage = null;
$scope.selected = [];
if ($scope.removePostRefresh) {
$scope.removePostRefresh();
}
$scope.removePostRefresh = $scope.$on('PostRefresh', function () {
var i, cDate;
$("tr.success").each(function () {
// Make sure no rows have a green background
var ngc = $(this).attr('ng-class');
$scope[ngc] = "";
});
if ($scope.jobs && $scope.jobs.length) {
for (i = 0; i < $scope.jobs.length; i++) {
// Convert created date to local time zone
cDate = new Date($scope.jobs[i].created);
$scope.jobs[i].created = FormatDate(cDate);
// Set tooltip and link
$scope.jobs[i].statusBadgeToolTip = JobStatusToolTip($scope.jobs[i].status) +
" Click to view status details.";
$scope.jobs[i].statusLinkTo = '/#/jobs/' + $scope.jobs[i].id;
}
}
});
if ($routeParams.job_host_summaries__host) {
defaultUrl += '?job_host_summaries__host=' + $routeParams.job_host_summaries__host;
} else if ($routeParams.inventory__int && $routeParams.status) {
defaultUrl += '?inventory__int=' + $routeParams.inventory__int + '&status=' +
$routeParams.status;
}
SearchInit({
scope: $scope,
set: 'jobs',
list: list,
url: defaultUrl
});
PaginateInit({
scope: $scope,
list: list,
url: defaultUrl
});
// Called from Inventories page, failed jobs link. Find jobs for selected inventory.
if ($routeParams.inventory__int) {
$scope[list.iterator + 'SearchField'] = 'inventory';
$scope[list.iterator + 'SearchValue'] = $routeParams.inventory__int;
$scope[list.iterator + 'SearchFieldLabel'] = 'Inventory ID';
}
if ($routeParams.id__int) {
$scope[list.iterator + 'SearchField'] = 'id';
$scope[list.iterator + 'SearchValue'] = $routeParams.id__int;
$scope[list.iterator + 'SearchFieldLabel'] = 'Job ID';
}
if ($routeParams.status) {
$scope[list.iterator + 'SearchField'] = 'status';
$scope[list.iterator + 'SelectShow'] = true;
$scope[list.iterator + 'SearchSelectOpts'] = list.fields.status.searchOptions;
$scope[list.iterator + 'SearchFieldLabel'] = list.fields.status.label.replace(/<br>/g, ' ');
for (opt in list.fields.status.searchOptions) {
if (list.fields.status.searchOptions[opt].value === $routeParams.status) {
$scope[list.iterator + 'SearchSelectValue'] = list.fields.status.searchOptions[opt];
break;
}
}
}
$scope.search(list.iterator);
LoadBreadCrumbs();
$scope.refresh = function () {
Wait('start');
$scope.jobLoading = false;
Refresh({ scope: $scope, set: 'jobs', iterator: 'job', url: $scope.current_url });
};
$scope.refreshJob = $scope.refresh;
$scope.editJob = function (id, name) {
LoadBreadCrumbs({ path: '/jobs/' + id, title: id + ' - ' + name });
$location.path($location.path() + '/' + id);
};
$scope.viewEvents = function (id, name) {
LoadBreadCrumbs({ path: '/jobs/' + id, title: id + ' - ' + name });
$location.path($location.path() + '/' + id + '/job_events');
};
$scope.viewSummary = function (id, name) {
LoadBreadCrumbs({ path: '/jobs/' + id, title: id + ' - ' + name });
$location.path($location.path() + '/' + id + '/job_host_summaries');
};
$scope.deleteJob = function (id) {
Rest.setUrl(defaultUrl + id + '/');
Rest.get()
.success(function (data) {
var action, url, action_label, hdr;
if (data.status === 'pending' || data.status === 'running' || data.status === 'waiting') {
url = data.related.cancel;
action_label = 'cancel';
hdr = 'Cancel Job';
} else {
url = defaultUrl + id + '/';
action_label = 'delete';
hdr = 'Delete Job';
}
action = function () {
Rest.setUrl(url);
if (action_label === 'cancel') {
Rest.post()
.success(function () {
$('#prompt-modal').modal('hide');
$scope.search(list.iterator);
})
.error(function (data, status) {
$('#prompt-modal').modal('hide');
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Call to ' + url +
' failed. POST returned status: ' + status });
});
} else {
Rest.destroy()
.success(function () {
$('#prompt-modal').modal('hide');
$scope.search(list.iterator);
})
.error(function (data, status) {
$('#prompt-modal').modal('hide');
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Call to ' + url +
' failed. DELETE returned status: ' + status });
});
}
};
Prompt({
hdr: hdr,
body: 'Are you sure you want to ' + action_label + ' job ' + id + '?',
action: action
});
})
.error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get job details. GET returned status: ' + status });
});
};
$scope.submitJob = function (id, template) {
SubmitJob({ scope: $scope, id: id, template: template });
};
}
JobsListCtrl.$inject = ['$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'JobList',
'GenerateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'LookUpInit', 'SubmitJob', 'FormatDate', 'Refresh', 'JobStatusToolTip',
'Empty', 'Wait'
];
function JobsEdit($scope, $rootScope, $compile, $location, $log, $routeParams, JobForm, JobTemplateForm, GenerateForm, Rest,
Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList,
CredentialList, ProjectList, LookUpInit, PromptPasswords, GetBasePath, md5Setup, FormatDate, JobStatusToolTip, Wait, Empty,
ParseVariableString) {
ClearScope();
var defaultUrl = GetBasePath('jobs'),
generator = GenerateForm,
id = $routeParams.id,
loadingFinishedCount = 0,
templateForm = {};
generator.inject(JobForm, { mode: 'edit', related: true, scope: $scope });
$scope.job_id = id;
$scope.parseType = 'yaml';
$scope.statusSearchSpin = false;
$scope.disableParseSelection = true;
function getPlaybooks(project, playbook) {
if (!Empty(project)) {
var url = GetBasePath('projects') + project + '/playbooks/';
Rest.setUrl(url);
Rest.get()
.success(function (data) {
var i;
$scope.playbook_options = [];
for (i = 0; i < data.length; i++) {
$scope.playbook_options.push(data[i]);
}
for (i = 0; i < $scope.playbook_options.length; i++) {
if ($scope.playbook_options[i] === playbook) {
$scope.playbook = $scope.playbook_options[i];
}
}
$scope.$emit('jobTemplateLoadFinished');
})
.error(function () {
$scope.$emit('jobTemplateLoadFinished');
});
} else {
$scope.$emit('jobTemplateLoadFinished');
}
}
// Retrieve each related set and populate the playbook list
if ($scope.jobLoadedRemove) {
$scope.jobLoadedRemove();
}
$scope.jobLoadedRemove = $scope.$on('jobLoaded', function (e, related_cloud_credential, project, playbook) {
getPlaybooks(project, playbook);
//$scope[form.name + 'ReadOnly'] = ($scope.status === 'new') ? false : true;
//$('#forks-slider').slider("option", "value", $scope.forks);
//$('#forks-slider').slider("disable");
//$('input[type="checkbox"]').attr('disabled', 'disabled');
//$('input[type="radio"]').attr('disabled', 'disabled');
//$('#host_config_key-gen-btn').attr('disabled', 'disabled');
//$('textarea').attr('readonly', 'readonly');
// Get job template and display/hide host callback fields
/*Rest.setUrl($scope.template_url);
Rest.get()
.success(function (data) {
var dft = (data.host_config_key) ? 'true' : 'false';
$scope.host_config_key = data.host_config_key;
md5Setup({
scope: $scope,
master: master,
check_field: 'allow_callbacks',
default_val: dft
});
$scope.callback_url = (data.related) ? data.related.callback : '<< Job template not found >>';
$scope.$emit('jobTemplateLoadFinished');
})
.error(function () {
Wait('stop');
$scope.callback_url = '<< Job template not found >>';
});
*/
if (related_cloud_credential) {
//Get the name of the cloud credential
Rest.setUrl(related_cloud_credential);
Rest.get()
.success(function (data) {
$scope.cloud_credential_name = data.name;
$scope.$emit('jobTemplateLoadFinished');
})
.error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!',
msg: 'Failed to related cloud credential. GET returned status: ' + status });
});
} else {
$scope.$emit('jobTemplateLoadFinished');
}
});
// Turn off 'Wait' after both cloud credential and playbook list come back
if ($scope.removeJobTemplateLoadFinished) {
$scope.removeJobTemplateLoadFinished();
}
$scope.removeJobTemplateLoadFinished = $scope.$on('jobTemplateLoadFinished', function () {
loadingFinishedCount++;
if (loadingFinishedCount >= 2) {
// The initial template load finished. Now load related jobs, which
// will turn off the 'working' spinner.
Wait('stop');
}
});
// Our job type options
$scope.job_type_options = [{
value: 'run',
label: 'Run'
}, {
value: 'check',
label: 'Check'
}];
$scope.verbosity_options = [{
value: 0,
label: 'Default'
}, {
value: 1,
label: 'Verbose'
}, {
value: 3,
label: 'Debug'
}];
$scope.playbook_options = null;
$scope.playbook = null;
function calcRows(content) {
var n = content.match(/\n/g),
rows = (n) ? n.length : 1;
return (rows > 15) ? 15 : rows;
}
// Retrieve detail record and prepopulate the form
Wait('start');
Rest.setUrl(defaultUrl + ':id/');
Rest.get({ params: { id: id } })
.success(function (data) {
var i, fld;
LoadBreadCrumbs();
$scope.status = data.status;
$scope.created = FormatDate(data.created);
$scope.result_stdout = data.result_stdout;
$scope.result_traceback = data.result_traceback;
$scope.stdout_rows = calcRows($scope.result_stdout);
$scope.traceback_rows = calcRows($scope.result_traceback);
// Now load the job template form
templateForm.addTitle = 'Create Job Templates';
templateForm.editTitle = '{{ name }}';
templateForm.name = 'job_templates';
templateForm.twoColumns = true;
templateForm.fields = angular.copy(JobTemplateForm.fields);
for (fld in templateForm.fields) {
templateForm.fields[fld].readonly = true;
}
$('#ui-accordion-jobs-collapse-0-panel-1').find('div').attr('id','job-template-container');
generator.inject(templateForm, { mode: 'edit', id: 'job-template-container', scope: $scope, breadCrumbs: false });
for (fld in templateForm.fields) {
if (fld !== 'variables' && data[fld] !== null && data[fld] !== undefined) {
if (JobTemplateForm.fields[fld].type === 'select') {
if ($scope[fld + '_options'] && $scope[fld + '_options'].length > 0) {
for (i = 0; i < $scope[fld + '_options'].length; i++) {
if (data[fld] === $scope[fld + '_options'][i].value) {
$scope[fld] = $scope[fld + '_options'][i];
}
}
} else {
$scope[fld] = data[fld];
}
} else {
$scope[fld] = data[fld];
}
}
if (fld === 'variables') {
$scope.variables = ParseVariableString(data.extra_vars);
}
if (JobTemplateForm.fields[fld].type === 'lookup' && data.summary_fields[JobTemplateForm.fields[fld].sourceModel]) {
$scope[JobTemplateForm.fields[fld].sourceModel + '_' + JobTemplateForm.fields[fld].sourceField] =
data.summary_fields[JobTemplateForm.fields[fld].sourceModel][JobTemplateForm.fields[fld].sourceField];
}
}
$scope.id = data.id;
$scope.name = (data.summary_fields && data.summary_fields.job_template) ? data.summary_fields.job_template.name : '';
$scope.statusToolTip = JobStatusToolTip(data.status);
$scope.url = data.url;
$scope.project = data.project;
$scope.$emit('jobLoaded', data.related.cloud_credential, data.project, data.playbook);
})
.error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!',
msg: 'Failed to retrieve job: ' + $routeParams.id + '. GET status: ' + status });
});
$scope.refresh = function () {
Wait('start');
Rest.setUrl(defaultUrl + id + '/');
Rest.get()
.success(function (data) {
$scope.status = data.status;
$scope.result_stdout = data.result_stdout;
$scope.result_traceback = data.result_traceback;
$scope.stdout_rows = calcRows($scope.result_stdout);
$scope.traceback_rows = calcRows($scope.result_traceback);
Wait('stop');
})
.error(function (data, status) {
ProcessErrors($scope, data, status, null, { hdr: 'Error!',
msg: 'Attempt to load job failed. GET returned status: ' + status });
});
};
$scope.jobSummary = function () {
$location.path('/jobs/' + id + '/job_host_summaries');
};
$scope.jobEvents = function () {
$location.path('/jobs/' + id + '/job_events');
};
}
JobsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'JobForm', 'JobTemplateForm',
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'RelatedSearchInit', 'RelatedPaginateInit',
'ReturnToCaller', 'ClearScope', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit', 'PromptPasswords',
'GetBasePath', 'md5Setup', 'FormatDate', 'JobStatusToolTip', 'Wait', 'Empty', 'ParseVariableString'
];
@@ -1,12 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* Organizations.js *************************************************/
*
* Controller functions for Organization model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Organizations * @name controllers.function:Organizations
+5 -8
View File
@@ -1,12 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* Permissions.js *************************************************/
*
* Controller functions for Permissions model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Permissions * @name controllers.function:Permissions
+4 -9
View File
@@ -1,13 +1,8 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* Portal.js *************************************************/
*
* Controller functions for portal mode
*
*/
/** /**
* @ngdoc function * @ngdoc function
+5 -8
View File
@@ -1,12 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* Projects.js *************************************************/
*
* Controller functions for the Projects model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Projects * @name controllers.function:Projects
+6 -9
View File
@@ -1,12 +1,9 @@
/*************************************************
/************************************ * Copyright (c) 2015 Ansible, Inc.
* Copyright (c) 2014 AnsibleWorks, Inc.
* *
* Schedules.js * All Rights Reserved
* *************************************************/
* Controller functions for the Schedule model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Schedules * @name controllers.function:Schedules
@@ -98,4 +95,4 @@ GetBasePath, Wait, Breadcrumbs, Find, LoadDialogPartial, LoadSchedulesScope, Get
} }
ScheduleEditController.$inject = [ '$scope', '$compile', '$location', '$routeParams', 'SchedulesList', 'Rest', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', ScheduleEditController.$inject = [ '$scope', '$compile', '$location', '$routeParams', 'SchedulesList', 'Rest', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope',
'GetBasePath', 'Wait', 'Breadcrumbs', 'Find', 'LoadDialogPartial', 'LoadSchedulesScope', 'GetChoices', 'Stream' ]; 'GetBasePath', 'Wait', 'Breadcrumbs', 'Find', 'LoadDialogPartial', 'LoadSchedulesScope', 'GetChoices', 'Stream' ];
+6 -7
View File
@@ -1,10 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Sockets.js * All Rights Reserved
* SocketsController- simple test of socket connection *************************************************/
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Sockets * @name controllers.function:Sockets
File diff suppressed because it is too large Load Diff
+5 -8
View File
@@ -1,12 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* * All Rights Reserved
* Teams.js *************************************************/
*
* Controller functions for the Team model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Teams * @name controllers.function:Teams
+5 -7
View File
@@ -1,11 +1,9 @@
/******************************************** /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Users.js * All Rights Reserved
* *************************************************/
* Controller functions for User model.
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name controllers.function:Users * @name controllers.function:Users
@@ -1,3 +1,10 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
export default function() { export default function() {
@@ -1,4 +1,10 @@
export default /*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
export default
[ '$window', [ '$window',
AutoSizeModule AutoSizeModule
]; ];
@@ -1,4 +1,10 @@
export default /*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
export default
[ '$compile', [ '$compile',
'$window', '$window',
'adjustGraphSize', 'adjustGraphSize',
@@ -1,4 +1,10 @@
export default /*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
export default
[ '$rootScope', [ '$rootScope',
'$compile', '$compile',
'$location' , '$location' ,
@@ -1,3 +1,9 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
export default export default
["Rest", ["Rest",
"GetBasePath", "GetBasePath",
+6
View File
@@ -1,3 +1,9 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
/********************************************* /*********************************************
* @ngdoc function * @ngdoc function
* @name __deferLoadIfEnabled * @name __deferLoadIfEnabled
+6
View File
@@ -1,2 +1,8 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import 'tower/shared/multi-select-list/main.js'; import 'tower/shared/multi-select-list/main.js';
import 'tower/shared/route-extensions/main.js'; import 'tower/shared/route-extensions/main.js';
+6
View File
@@ -1,3 +1,9 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import sanitizeFilter from 'tower/shared/xss-sanitizer.filter'; import sanitizeFilter from 'tower/shared/xss-sanitizer.filter';
import capitalizeFilter from 'tower/shared/capitalize.filter'; import capitalizeFilter from 'tower/shared/capitalize.filter';
import longDateFilter from 'tower/shared/long-date.filter'; import longDateFilter from 'tower/shared/long-date.filter';
+6
View File
@@ -1,3 +1,9 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import ActivityDetail from "tower/forms/ActivityDetail"; import ActivityDetail from "tower/forms/ActivityDetail";
import Credentials from "tower/forms/Credentials"; import Credentials from "tower/forms/Credentials";
import Adhoc from "tower/forms/Adhoc"; import Adhoc from "tower/forms/Adhoc";
+5 -6
View File
@@ -1,10 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* ActivityDetail.js * All Rights Reserved
* Form definition for Activity Stream detail *************************************************/
*
*/
/** /**
* @ngdoc overview * @ngdoc overview
* @name forms * @name forms
+5 -6
View File
@@ -1,10 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2015 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Adhoc.js * All Rights Reserved
* Form definition for the Adhoc model. *************************************************/
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Adhoc * @name forms.function:Adhoc
+5 -6
View File
@@ -1,10 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2015 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Credentials.js * All Rights Reserved
* Form definition for Credential model *************************************************/
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Credentials * @name forms.function:Credentials
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Organization.js * All Rights Reserved
* Form definition for Organization model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:CustomInventory * @name forms.function:CustomInventory
+5 -5
View File
@@ -1,9 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobEventsForm.js * All Rights Reserved
* *************************************************/
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:EventsViewer * @name forms.function:EventsViewer
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Groups.js * All Rights Reserved
* Form definition for Group model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Groups * @name forms.function:Groups
+5 -8
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* HostGroups.js * All Rights Reserved
* Form definition for Host model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:HostGroups * @name forms.function:HostGroups
@@ -56,4 +54,3 @@ export default
related: { } related: { }
}); //UserForm }); //UserForm
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Hosts.js * All Rights Reserved
* Form definition for Host model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Hosts * @name forms.function:Hosts
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Inventories.js * All Rights Reserved
* Form definition for User model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Inventories * @name forms.function:Inventories
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* InventoryStatus.js * All Rights Reserved
* *************************************************/
* Use to show inventory sync status
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:InventoryStatus * @name forms.function:InventoryStatus
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobEventData.js * All Rights Reserved
* Form definition for Job Events -JSON view *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:JobEventData * @name forms.function:JobEventData
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobSummary.js * All Rights Reserved
* *************************************************/
* Display job status info in a dialog
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:JobSummary * @name forms.function:JobSummary
+5 -8
View File
@@ -1,12 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobTemplates.js * All Rights Reserved
* Form definition for Job Template model *************************************************/
*
* To get the JobTemplateForm object: JobTemplateForm();
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:JobTemplate * @name forms.function:JobTemplate
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobVarsPrompt.js * All Rights Reserved
* *************************************************/
* Form definition used during job submission to prompt for extra vars
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:JobVarsPrompt * @name forms.function:JobVarsPrompt
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Jobs.js * All Rights Reserved
* Form definition for Jobs model *************************************************/
*
* @dict
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Jobs * @name forms.function:Jobs
+5 -6
View File
@@ -1,10 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* LicenseForm.js * All Rights Reserved
* *************************************************/
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:LicenseForm * @name forms.function:LicenseForm
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* License.js * All Rights Reserved
* Form definition for Organization model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:LicenseUpdate * @name forms.function:LicenseUpdate
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* LogViewerOptions.js * All Rights Reserved
* *************************************************/
* Form definition for LogViewer.js helper
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:LogViewerOptions * @name forms.function:LogViewerOptions
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* LogViewerStatus.js * All Rights Reserved
* *************************************************/
* Form definition for LogViewer.js helper
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:LogViewerStatus * @name forms.function:LogViewerStatus
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Organization.js * All Rights Reserved
* Form definition for Organization model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Organizations * @name forms.function:Organizations
+5 -8
View File
@@ -1,12 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Permissions.js * All Rights Reserved
* *************************************************/
* Form definition for Projects model
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Permissions * @name forms.function:Permissions
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* ProjectStatus.js * All Rights Reserved
* Form definition for Project Status -JSON view *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:ProjectStatus * @name forms.function:ProjectStatus
+5 -8
View File
@@ -1,12 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Projects.js * All Rights Reserved
* *************************************************/
* Form definition for Projects model
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Projects * @name forms.function:Projects
+6 -8
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Groups.js * All Rights Reserved
* Form definition for Group model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Source * @name forms.function:Source
@@ -117,7 +115,7 @@ export default
ngShow: "source && source.value === 'custom'", ngShow: "source && source.value === 'custom'",
sourceModel: 'source_script', sourceModel: 'source_script',
sourceField: 'name', sourceField: 'name',
ngClick: 'lookUpSource_script()' , ngClick: 'lookUpSource_script()' ,
addRequired: false, addRequired: false,
editRequired: false, editRequired: false,
ngRequired: "source && source.value === 'custom'", ngRequired: "source && source.value === 'custom'",
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* SurveyMaker.js * All Rights Reserved
* Form definition for survey maker model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:SurveyMaker * @name forms.function:SurveyMaker
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Inventories.js * All Rights Reserved
* Form definition for question model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Questions * @name forms.function:Questions
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Teams.js * All Rights Reserved
* *************************************************/
* Form definition for Team model
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Teams * @name forms.function:Teams
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Users.js * All Rights Reserved
* Form definition for User model *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name forms.function:Users * @name forms.function:Users
+6
View File
@@ -1,3 +1,9 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import "tower/help/ChromeSocketHelp"; import "tower/help/ChromeSocketHelp";
import "tower/help/FirefoxSocketHelp"; import "tower/help/FirefoxSocketHelp";
import "tower/help/InventoryGroups"; import "tower/help/InventoryGroups";
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* ChromeSocketHelp.js * All Rights Reserved
* *************************************************/
* Help object for socket connection troubleshooting
*
*/
/** /**
* @ngdoc overview * @ngdoc overview
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* FirefoxSocketHelp.js * All Rights Reserved
* *************************************************/
* Help object for socket connection troubleshooting
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name help.function:FirefoxSocketHelp * @name help.function:FirefoxSocketHelp
+5 -8
View File
@@ -1,12 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* InventoryGroups.js * All Rights Reserved
* *************************************************/
* Help object for inventory groups/hosts page.
*
* @dict
*/
/** /**
* @ngdoc function * @ngdoc function
* @name help.function:InventoryGroups * @name help.function:InventoryGroups
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* SafairSocketHelp.js * All Rights Reserved
* *************************************************/
* Help object for socket connection troubleshooting
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name help.function:SafariSocketHelp * @name help.function:SafariSocketHelp
+6
View File
@@ -1,3 +1,9 @@
/*************************************************
* Copyright (c) 2015 Ansible, Inc.
*
* All Rights Reserved
*************************************************/
import 'tower/forms'; import 'tower/forms';
import 'tower/lists'; import 'tower/lists';
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* aboutansible.js * All Rights Reserved
* *************************************************/
* The new about menu
*
*/
/** /**
* @ngdoc overview * @ngdoc overview
* @name helpers * @name helpers
+5 -7
View File
@@ -1,11 +1,9 @@
/****************************************************** /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* helpers/Access.js * All Rights Reserved
* *************************************************/
* Routines for checking user access
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Access * @name helpers.function:Access
+5 -6
View File
@@ -1,10 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2015 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* AdhocHelper * All Rights Reserved
* *************************************************/
* Routines shared by adhoc related controllers:
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Adhoc * @name helpers.function:Adhoc
+5 -5
View File
@@ -1,9 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* ChildrenHelper * All Rights Reserved
* *************************************************/
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Children * @name helpers.function:Children
+7 -4
View File
@@ -1,7 +1,10 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
*/ *
/** * All Rights Reserved
*************************************************/
/**
* @ngdoc function * @ngdoc function
* @name helpers.function:ConfigureTower * @name helpers.function:ConfigureTower
* @description * @description
+5 -6
View File
@@ -1,10 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2015 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Credentials.js * All Rights Reserved
* *************************************************/
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Credentials * @name helpers.function:Credentials
+7 -4
View File
@@ -1,7 +1,10 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
*/ *
/** * All Rights Reserved
*************************************************/
/**
* @ngdoc function * @ngdoc function
* @name helpers.function:CustomInventory * @name helpers.function:CustomInventory
* @description * @description
+5 -5
View File
@@ -1,9 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* EventsViewer.js * All Rights Reserved
* *************************************************/
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:EventViewer * @name helpers.function:EventViewer
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* EventsHelper * All Rights Reserved
* *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Events * @name helpers.function:Events
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2015 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* GroupsHelper * All Rights Reserved
* *************************************************/
* Routines that handle group add/edit/delete on the Inventory tree widget.
*
*/
'use strict'; 'use strict';
/** /**
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* HostEventsViewer.js * All Rights Reserved
* *************************************************/
* View a list of events for a given job and host
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:HostEventsViewer * @name helpers.function:HostEventsViewer
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* HostsHelper * All Rights Reserved
* *************************************************/
* Routines that handle host add/edit/delete on the Inventory detail page.
*
*/
/* jshint loopfunc: true */ /* jshint loopfunc: true */
/** /**
+137 -14
View File
@@ -1,11 +1,9 @@
/************************************ /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobDetail.js * All Rights Reserved
* *************************************************/
* Helper moduler for JobDetails controller
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:JobDetail * @name helpers.function:JobDetail
@@ -1135,11 +1133,12 @@ export default
}; };
}]) }])
.factory('DrawGraph', [ function() {
.factory('DrawGraph', ['DonutChart', function(DonutChart) {
return function(params) { return function(params) {
var scope = params.scope, var scope = params.scope,
resize = params.resize, resize = params.resize,
width, height, svg_height, svg_width, svg_radius, svg, graph_data = []; width, height, svg_height, svg_width, svg_radius, graph_data = [];
// Ready the data // Ready the data
if (scope.host_summary.ok) { if (scope.host_summary.ok) {
@@ -1178,27 +1177,151 @@ export default
scope.total_count_for_graph = total_count; scope.total_count_for_graph = total_count;
// Adjust the size // Adjust the size
width = $('#job-summary-container .job_well').width(); width = $('#job-summary-container .job_well').width();
height = $('#job-summary-container .job_well').height() - $('#summary-well-top-section').height() - $('#graph-section .header').outerHeight() - 15; height = $('#job-summary-container .job_well').height() - $('#summary-well-top-section').height() - $('#graph-section .header').outerHeight() - 80;
svg_radius = Math.min(width, height); svg_radius = Math.min(width, height);
svg_width = width; svg_width = width;
svg_height = height; svg_height = height;
if (svg_height > 0 && svg_width > 0) { if (svg_height > 0 && svg_width > 0) {
if (!resize && $('#graph-section svg').length > 0) { if (!resize && $('#graph-section svg').length > 0) {
Donut3D.transition("completedHostsDonut", graph_data, Math.floor(svg_radius * 0.50), Math.floor(svg_radius * 0.25), 18, 0.4); // Donut3D.transition("completedHostsDonut", graph_data, Math.floor(svg_radius * 0.50), Math.floor(svg_radius * 0.25), 18, 0.4);
DonutChart({
target: '#graph-section',
height: height,
width: width,
data: graph_data,
radius: svg_radius
});
} }
else { else {
if ($('#graph-section svg').length > 0) { if ($('#graph-section svg').length > 0) {
$('#graph-section svg').remove(); $('#graph-section svg').remove();
} }
svg = d3.select("#graph-section").append("svg").attr("width", svg_width).attr("height", svg_height); // svg = d3.select("#graph-section").append("svg").attr("width", svg_width).attr("height", svg_height);
svg.append("g").attr("id","completedHostsDonut"); // svg.append("g").attr("id","completedHostsDonut");
Donut3D.draw("completedHostsDonut", graph_data, Math.floor(svg_width / 2), Math.floor(svg_height / 2) - 35, Math.floor(svg_radius * 0.50), Math.floor(svg_radius * 0.25), 18, 0.4); // Donut3D.draw("completedHostsDonut", graph_data, Math.floor(svg_width / 2), Math.floor(svg_height / 2) - 35, Math.floor(svg_radius * 0.50), Math.floor(svg_radius * 0.25), 18, 0.4);
DonutChart({
target: '#graph-section',
height: height,
width: width,
data: graph_data,
radius: svg_radius
});
$('#graph-section .header .legend').show(); $('#graph-section .header .legend').show();
} }
} }
}; };
}]) }])
.factory('DonutChart', [function() {
return function(params) {
var target = params.target,
height = params.height,
width = params.width,
dataset = params.data,
outerRadius = Math.min(width, height) / 2,
innerRadius = (outerRadius/3),
svg, arc, pie, legend, color,
tooltip, path,
legendRectSize = 18,
legendSpacing = 4;
color = d3.scale.ordinal()
.range(['#60D66F', '#FF9900', '#FF0000', '#ff5850']);
svg = d3.select(target)
.append('svg')
.data([dataset])
.attr('width', width)
.attr('height', height)
.append('g')
.attr('transform', 'translate(' + (width / 2) +
',' + (height / 2) + ')');
arc = d3.svg.arc()
.innerRadius(outerRadius - innerRadius)
.outerRadius(outerRadius);
pie = d3.layout.pie()
.value(function(d) { return d.value; })
.sort(function() {return null; });
// arcs = svg.selectAll("g.slice")
// .data(pie)
// .enter()
// .append("g")
// .attr("class", "slice");
tooltip = d3.select(target)
.append('div')
.attr('class', 'tooltip');
tooltip.append('div')
.attr('class', 'label');
tooltip.append('div')
.attr('class', 'count');
tooltip.append('div')
.attr('class', 'percent');
path = svg.selectAll('path')
.data(pie(dataset))
.enter()
.append('path')
.attr('d', arc)
.attr('fill', function(d) {
return color(d.data.label);
});
path.on('mouseenter', function(d) {
var total = d3.sum(dataset.map(function(d) {
return d.value;
}));
var percent = Math.round(1000 * d.data.value / total) / 10;
tooltip.select('.label').html(d.data.label)
.attr('style', 'color:black');
tooltip.select('.count').html(d.data.value);
tooltip.select('.percent').html(percent + '%');
tooltip.style('display', 'block');
});
path.on('mouseleave', function() {
tooltip.style('display', 'none');
});
// path.on('mousemove', function(d) {
// tooltip.style('top', (d3.event.pageY + 10) + 'px')
// .style('left', (d3.event.pageX + 10) + 'px');
// });
legend = svg.selectAll('.legend')
.data(color.domain())
.enter()
.append('g')
.attr('class', 'legend')
.attr('transform', function(d, i) {
var height = legendRectSize + legendSpacing;
var offset = height * color.domain().length / 2;
var horz = -2 * legendRectSize;
var vert = i * height - offset;
return 'translate(' + horz + ',' + vert + ')';
});
legend.append('rect')
.attr('width', legendRectSize)
.attr('height', legendRectSize)
.style('fill', color)
.style('stroke', color);
legend.append('text')
.attr('x', legendRectSize + legendSpacing)
.attr('y', legendRectSize - legendSpacing)
.text(function(d) {
return d;
});
};
}])
.factory('DrawPlays', [function() { .factory('DrawPlays', [function() {
return function(params) { return function(params) {
var scope = params.scope, var scope = params.scope,
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -1,9 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobSubmission.js * All Rights Reserved
* *************************************************/
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:JobSubmission * @name helpers.function:JobSubmission
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobTemplatesHelper * All Rights Reserved
* *************************************************/
* Routines shared by job related controllers
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:JobTemplatesHelper * @name helpers.function:JobTemplatesHelper
+5 -7
View File
@@ -1,11 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* JobsHelper * All Rights Reserved
* *************************************************/
* Routines shared by job related controllers
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Jobs * @name helpers.function:Jobs
+5 -7
View File
@@ -1,11 +1,9 @@
/****************************************************** /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* helpers/License.js * All Rights Reserved
* *************************************************/
*
*
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:License * @name helpers.function:License
+6 -3
View File
@@ -1,6 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
*/ *
* All Rights Reserved
*************************************************/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:LoadConfig * @name helpers.function:LoadConfig
+5 -5
View File
@@ -1,9 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* LogViewer.js * All Rights Reserved
* *************************************************/
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:LogViewer * @name helpers.function:LogViewer
+5 -5
View File
@@ -1,9 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* LookupHelper * All Rights Reserved
* Build a lookup dialog *************************************************/
*/
/** /**
* @ngdoc function * @ngdoc function
@@ -1,9 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* PaginationHelpers.js * All Rights Reserved
* *************************************************/
*/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:PaginationHelpers * @name helpers.function:PaginationHelpers
+5 -4
View File
@@ -1,8 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* ParseHelper * All Rights Reserved
*/ *************************************************/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Parse * @name helpers.function:Parse
+5 -4
View File
@@ -1,8 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* Permissions.js * All Rights Reserved
*/ *************************************************/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Permissions * @name helpers.function:Permissions
+5 -4
View File
@@ -1,8 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* ProjectPathHelper * All Rights Reserved
*/ *************************************************/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:ProjectPath * @name helpers.function:ProjectPath
+5 -4
View File
@@ -1,8 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
* *
* ProjectsHelper * All Rights Reserved
*/ *************************************************/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Projects * @name helpers.function:Projects
+6 -3
View File
@@ -1,6 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
*/ *
* All Rights Reserved
*************************************************/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Schedules * @name helpers.function:Schedules
+6 -3
View File
@@ -1,6 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
*/ *
* All Rights Reserved
*************************************************/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Selection * @name helpers.function:Selection
+6 -3
View File
@@ -1,6 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
*/ *
* All Rights Reserved
*************************************************/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:SocketHelper * @name helpers.function:SocketHelper
+7 -4
View File
@@ -1,6 +1,9 @@
/********************************************* /*************************************************
* Copyright (c) 2014 AnsibleWorks, Inc. * Copyright (c) 2015 Ansible, Inc.
*/ *
* All Rights Reserved
*************************************************/
/** /**
* @ngdoc function * @ngdoc function
* @name helpers.function:Survey * @name helpers.function:Survey
@@ -492,7 +495,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
scope.removeGenerateForm = scope.$on('GenerateForm', function() { scope.removeGenerateForm = scope.$on('GenerateForm', function() {
tmpVar = scope.mode; tmpVar = scope.mode;
GenerateForm.inject(form, { id: 'question_'+index, mode: 'edit' , related: false, scope:scope, breadCrumbs: false}); GenerateForm.inject(form, { id: 'question_'+index, mode: 'edit' , related: false, scope:scope, breadCrumbs: false});
scope.mode = tmpVar; scope.mode = tmpVar;
scope.$emit('FillQuestionForm'); scope.$emit('FillQuestionForm');
}); });

Some files were not shown because too many files have changed in this diff Show More