mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Merge pull request #608 from jaredevantabor/sprint1-forms
Sprint1 forms
This commit is contained in:
commit
67b7c52d16
@ -36,6 +36,7 @@
|
||||
@import "breadcrumbs.less";
|
||||
@import "stdout.less";
|
||||
@import "lists.less";
|
||||
@import "forms.less";
|
||||
@import "dashboard.less";
|
||||
@import "jPushMenu.less";
|
||||
@import "survey-maker.less";
|
||||
@ -594,16 +595,6 @@ dd {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.aw-form-well {
|
||||
border: 1px solid @grey;
|
||||
padding: 9px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.form-cancel {
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
|
||||
124
awx/ui/client/legacy-styles/forms.less
Normal file
124
awx/ui/client/legacy-styles/forms.less
Normal file
@ -0,0 +1,124 @@
|
||||
/*********************************************
|
||||
* Copyright (c) 2016 Ansible, Inc.
|
||||
*
|
||||
* lists.less
|
||||
*
|
||||
* custom styles for generated lists
|
||||
*
|
||||
*/
|
||||
|
||||
@import "src/shared/branding/colors.default.less";
|
||||
|
||||
.Form{
|
||||
display:flex;
|
||||
flex-wrap:wrap;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.Form-header{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.Form-title{
|
||||
flex: 1 0 auto;
|
||||
text-transform: uppercase;
|
||||
color: @list-header-txt;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.Form-exitHolder{
|
||||
justify-content: flex-end;
|
||||
display:flex;
|
||||
}
|
||||
|
||||
.Form-exit{
|
||||
cursor:pointer;
|
||||
padding:0px;
|
||||
border: none;
|
||||
height:20px;
|
||||
font-size: 20px;
|
||||
background-color:@default-bg;
|
||||
color:@default-second-border;
|
||||
transition: color 0.2s;
|
||||
line-height:1;
|
||||
}
|
||||
|
||||
.Form-exit:hover{
|
||||
color:@default-icon;
|
||||
}
|
||||
|
||||
.Form-formGroup {
|
||||
flex: 1 0 auto;
|
||||
margin-bottom: 25px;
|
||||
width: 33%;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
.Form-inputLabel{
|
||||
text-transform: uppercase;
|
||||
color: @default-interface-txt;
|
||||
font-weight: normal;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.Form-buttons{
|
||||
height: 30px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.Form-saveButton{
|
||||
background-color: @submit-button-bg;
|
||||
margin-right: 20px;
|
||||
color: @submit-button-text;
|
||||
text-transform: uppercase;
|
||||
transition: background-color 0.2s;
|
||||
padding-left:15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.Form-saveButton:disabled{
|
||||
background-color: @submit-button-bg-dis;
|
||||
}
|
||||
|
||||
.Form-saveButton:hover{
|
||||
background-color: @submit-button-bg-hov;
|
||||
color: @submit-button-text;
|
||||
}
|
||||
|
||||
.Form-cancelButton{
|
||||
background-color: @default-bg;
|
||||
color: @btn-txt;
|
||||
text-transform: uppercase;
|
||||
border-radius: 5px;
|
||||
border: 1px solid @btn-bord;
|
||||
transition: background-color 0.2s;
|
||||
padding-left:15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.Form-cancelButton:hover{
|
||||
background-color: @btn-bg-hov;
|
||||
color: @btn-txt;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 650px) {
|
||||
.Form-formGroup {
|
||||
flex: 1 0 auto;
|
||||
margin-bottom: 25px;
|
||||
width: 100%;
|
||||
padding-right: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 651px) and (max-width: 900px) {
|
||||
.Form-formGroup {
|
||||
flex: 1 0 auto;
|
||||
margin-bottom: 25px;
|
||||
width: 50%;
|
||||
padding-right: 50px;
|
||||
}
|
||||
}
|
||||
@ -424,7 +424,7 @@ var tower = angular.module('Tower', [
|
||||
|
||||
state('projects.add', {
|
||||
url: '/add',
|
||||
templateUrl: urlPrefix + 'partials/projects.add.html',
|
||||
templateUrl: urlPrefix + 'partials/projects.html',
|
||||
controller: ProjectsAdd,
|
||||
ncyBreadcrumb: {
|
||||
parent: "projects",
|
||||
|
||||
@ -133,9 +133,11 @@ CredentialsList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
||||
];
|
||||
|
||||
|
||||
export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, CredentialForm, GenerateForm, Rest, Alert,
|
||||
ProcessErrors, ReturnToCaller, ClearScope, GenerateList, SearchInit, PaginateInit, LookUpInit, UserList, TeamList,
|
||||
GetBasePath, GetChoices, Empty, KindChange, OwnerChange, FormSave) {
|
||||
export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, CredentialForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
ReturnToCaller, ClearScope, GenerateList, SearchInit, PaginateInit,
|
||||
LookUpInit, UserList, TeamList, GetBasePath, GetChoices, Empty, KindChange,
|
||||
OwnerChange, FormSave, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -248,10 +250,8 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $s
|
||||
OwnerChange({ scope: $scope });
|
||||
};
|
||||
|
||||
// Reset defaults
|
||||
$scope.formReset = function () {
|
||||
//DebugForm({ scope: $scope, form: CredentialForm });
|
||||
generator.reset();
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('credentials');
|
||||
};
|
||||
|
||||
// Password change
|
||||
@ -296,15 +296,20 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $s
|
||||
|
||||
}
|
||||
|
||||
CredentialsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'CredentialForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList', 'SearchInit', 'PaginateInit',
|
||||
'LookUpInit', 'UserList', 'TeamList', 'GetBasePath', 'GetChoices', 'Empty', 'KindChange', 'OwnerChange', 'FormSave'
|
||||
CredentialsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||
'$log', '$stateParams', 'CredentialForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||
'SearchInit', 'PaginateInit', 'LookUpInit', 'UserList', 'TeamList',
|
||||
'GetBasePath', 'GetChoices', 'Empty', 'KindChange', 'OwnerChange',
|
||||
'FormSave', '$state'
|
||||
];
|
||||
|
||||
|
||||
export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, CredentialForm, GenerateForm, Rest, Alert,
|
||||
ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, Prompt, GetBasePath, GetChoices,
|
||||
KindChange, UserList, TeamList, LookUpInit, Empty, OwnerChange, FormSave, Stream, Wait) {
|
||||
export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, CredentialForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, Prompt,
|
||||
GetBasePath, GetChoices, KindChange, UserList, TeamList, LookUpInit, Empty,
|
||||
OwnerChange, FormSave, Stream, Wait, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -519,15 +524,8 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
KindChange({ scope: $scope, form: form, reset: true });
|
||||
};
|
||||
|
||||
// Cancel
|
||||
$scope.formReset = function () {
|
||||
generator.reset();
|
||||
for (var fld in master) {
|
||||
$scope[fld] = master[fld];
|
||||
}
|
||||
setAskCheckboxes();
|
||||
KindChange({ scope: $scope, form: form, reset: false });
|
||||
OwnerChange({ scope: $scope });
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('credentials');
|
||||
};
|
||||
|
||||
// Related set: Add button
|
||||
@ -614,8 +612,10 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
|
||||
}
|
||||
|
||||
CredentialsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'CredentialForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'ReturnToCaller', 'ClearScope', 'Prompt', 'GetBasePath', 'GetChoices', 'KindChange', 'UserList', 'TeamList', 'LookUpInit',
|
||||
'Empty', 'OwnerChange', 'FormSave', 'Stream', 'Wait'
|
||||
CredentialsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||
'$log', '$stateParams', 'CredentialForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'ReturnToCaller', 'ClearScope', 'Prompt', 'GetBasePath', 'GetChoices',
|
||||
'KindChange', 'UserList', 'TeamList', 'LookUpInit', 'Empty', 'OwnerChange',
|
||||
'FormSave', 'Stream', 'Wait', '$state'
|
||||
];
|
||||
|
||||
@ -13,8 +13,8 @@
|
||||
import '../job-templates/main';
|
||||
|
||||
export function InventoriesList($scope, $rootScope, $location, $log,
|
||||
$stateParams, $compile, $filter, sanitizeFilter, Rest, Alert, InventoryList, generateList,
|
||||
Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||
$stateParams, $compile, $filter, sanitizeFilter, Rest, Alert, InventoryList,
|
||||
generateList, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||
ClearScope, ProcessErrors, GetBasePath, Wait, Stream,
|
||||
EditInventoryProperties, Find, Empty, LogViewer, $state) {
|
||||
|
||||
@ -371,9 +371,11 @@ InventoriesList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateP
|
||||
];
|
||||
|
||||
|
||||
export function InventoriesAdd($scope, $rootScope, $compile, $location, $log, $stateParams, InventoryForm, GenerateForm, Rest,
|
||||
Alert, ProcessErrors, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
|
||||
LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON) {
|
||||
export function InventoriesAdd($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, InventoryForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit,
|
||||
PaginateInit, LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON,
|
||||
$state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -443,21 +445,24 @@ export function InventoriesAdd($scope, $rootScope, $compile, $location, $log, $s
|
||||
|
||||
};
|
||||
|
||||
// Reset
|
||||
$scope.formReset = function () {
|
||||
generator.reset();
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('inventories');
|
||||
};
|
||||
}
|
||||
|
||||
InventoriesAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'InventoryForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
|
||||
'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON'
|
||||
InventoriesAdd.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||
'$log', '$stateParams', 'InventoryForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||
'OrganizationList', 'SearchInit', 'PaginateInit', 'LookUpInit',
|
||||
'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', '$state'
|
||||
];
|
||||
|
||||
export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $stateParams, InventoryForm, GenerateForm, Rest,
|
||||
Alert, ProcessErrors, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
|
||||
LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON, ParseVariableString, Stream, RelatedSearchInit, RelatedPaginateInit,
|
||||
Prompt, PlaybookRun, CreateDialog, deleteJobTemplate) {
|
||||
export function InventoriesEdit($scope, $rootScope, $compile, $location,
|
||||
$log, $stateParams, InventoryForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit,
|
||||
PaginateInit, LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON,
|
||||
ParseVariableString, Stream, RelatedSearchInit, RelatedPaginateInit,
|
||||
Prompt, PlaybookRun, CreateDialog, deleteJobTemplate, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -588,19 +593,8 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
Stream({ scope: $scope });
|
||||
};
|
||||
|
||||
// Reset
|
||||
$scope.formReset = function () {
|
||||
generator.reset();
|
||||
for (var fld in master) {
|
||||
$scope[fld] = master[fld];
|
||||
}
|
||||
$scope.parseType = 'yaml';
|
||||
ParseTypeChange({
|
||||
scope: $scope,
|
||||
variable: 'variables',
|
||||
parse_variable: 'parseType',
|
||||
field_id: 'inventory_variables'
|
||||
});
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('inventories');
|
||||
};
|
||||
|
||||
$scope.addScanJob = function(){
|
||||
@ -775,10 +769,13 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
|
||||
|
||||
}
|
||||
|
||||
InventoriesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'InventoryForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
|
||||
'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString', 'Stream', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'Prompt', 'PlaybookRun', 'CreateDialog', 'deleteJobTemplate'
|
||||
InventoriesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||
'$log', '$stateParams', 'InventoryForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||
'OrganizationList', 'SearchInit', 'PaginateInit', 'LookUpInit',
|
||||
'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString',
|
||||
'Stream', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt',
|
||||
'PlaybookRun', 'CreateDialog', 'deleteJobTemplate', '$state'
|
||||
];
|
||||
|
||||
|
||||
|
||||
@ -245,10 +245,12 @@ JobTemplatesList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
||||
'$state'
|
||||
];
|
||||
|
||||
export function JobTemplatesAdd($filter, $scope, $rootScope, $compile, $location, $log, $stateParams, JobTemplateForm,
|
||||
GenerateForm, Rest, Alert, ProcessErrors, ReturnToCaller, ClearScope, GetBasePath,
|
||||
InventoryList, CredentialList, ProjectList, LookUpInit, md5Setup, ParseTypeChange, Wait, Empty, ToJSON,
|
||||
CallbackHelpInit, SurveyControllerInit, Prompt, GetChoices) {
|
||||
export function JobTemplatesAdd($filter, $scope, $rootScope, $compile,
|
||||
$location, $log, $stateParams, JobTemplateForm, GenerateForm, Rest, Alert,
|
||||
ProcessErrors, ReturnToCaller, ClearScope, GetBasePath, InventoryList,
|
||||
CredentialList, ProjectList, LookUpInit, md5Setup, ParseTypeChange, Wait,
|
||||
Empty, ToJSON, CallbackHelpInit, SurveyControllerInit, Prompt, GetChoices,
|
||||
$state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -649,29 +651,28 @@ export function JobTemplatesAdd($filter, $scope, $rootScope, $compile, $location
|
||||
|
||||
};
|
||||
|
||||
// Reset
|
||||
$scope.formReset = function () {
|
||||
// Defaults
|
||||
generator.reset();
|
||||
//$('#forks-slider').slider("option", "value", $scope.forks);
|
||||
for (var fld in master) {
|
||||
$scope[fld] = master[fld];
|
||||
}
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('jobTemplates');
|
||||
};
|
||||
}
|
||||
|
||||
JobTemplatesAdd.$inject = ['$filter', '$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'JobTemplateForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope',
|
||||
'GetBasePath', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit',
|
||||
'md5Setup', 'ParseTypeChange', 'Wait', 'Empty', 'ToJSON', 'CallbackHelpInit', 'initSurvey', 'Prompt', 'GetChoices'
|
||||
JobTemplatesAdd.$inject = ['$filter', '$scope', '$rootScope', '$compile',
|
||||
'$location', '$log', '$stateParams', 'JobTemplateForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope',
|
||||
'GetBasePath', 'InventoryList', 'CredentialList', 'ProjectList',
|
||||
'LookUpInit', 'md5Setup', 'ParseTypeChange', 'Wait', 'Empty', 'ToJSON',
|
||||
'CallbackHelpInit', 'initSurvey', 'Prompt', 'GetChoices', '$state'
|
||||
];
|
||||
|
||||
|
||||
export function JobTemplatesEdit($filter, $scope, $rootScope, $compile, $location, $log, $stateParams, JobTemplateForm, GenerateForm, Rest,
|
||||
Alert, ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList,
|
||||
CredentialList, ProjectList, LookUpInit, GetBasePath, md5Setup, ParseTypeChange, JobStatusToolTip, FormatDate,
|
||||
Wait, Stream, Empty, Prompt, ParseVariableString, ToJSON, SchedulesControllerInit, JobsControllerInit, JobsListUpdate,
|
||||
GetChoices, SchedulesListInit, SchedulesList, CallbackHelpInit, PlaybookRun, SurveyControllerInit){
|
||||
export function JobTemplatesEdit($filter, $scope, $rootScope, $compile,
|
||||
$location, $log, $stateParams, JobTemplateForm, GenerateForm, Rest, Alert,
|
||||
ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller,
|
||||
ClearScope, InventoryList, CredentialList, ProjectList, LookUpInit,
|
||||
GetBasePath, md5Setup, ParseTypeChange, JobStatusToolTip, FormatDate, Wait,
|
||||
Stream, Empty, Prompt, ParseVariableString, ToJSON, SchedulesControllerInit,
|
||||
JobsControllerInit, JobsListUpdate, GetChoices, SchedulesListInit,
|
||||
SchedulesList, CallbackHelpInit, PlaybookRun, SurveyControllerInit, $state){
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -1148,15 +1149,8 @@ export function JobTemplatesEdit($filter, $scope, $rootScope, $compile, $locatio
|
||||
});
|
||||
};
|
||||
|
||||
// Cancel
|
||||
$scope.formReset = function () {
|
||||
generator.reset();
|
||||
for (var fld in master) {
|
||||
$scope[fld] = master[fld];
|
||||
}
|
||||
$scope.parseType = 'yaml';
|
||||
ParseTypeChange({ scope: $scope, field_id: 'job_templates_variables', onChange: callback });
|
||||
$('#forks-slider').slider("option", "value", $scope.forks);
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('jobTemplates');
|
||||
};
|
||||
|
||||
// Related set: Add button
|
||||
@ -1232,10 +1226,14 @@ export function JobTemplatesEdit($filter, $scope, $rootScope, $compile, $locatio
|
||||
|
||||
}
|
||||
|
||||
JobTemplatesEdit.$inject = ['$filter', '$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'JobTemplateForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'ReturnToCaller', 'ClearScope', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit',
|
||||
'GetBasePath', 'md5Setup', 'ParseTypeChange', 'JobStatusToolTip', 'FormatDate', 'Wait', 'Stream', 'Empty', 'Prompt',
|
||||
'ParseVariableString', 'ToJSON', 'SchedulesControllerInit', 'JobsControllerInit', 'JobsListUpdate', 'GetChoices',
|
||||
'SchedulesListInit', 'SchedulesList', 'CallbackHelpInit', 'PlaybookRun' , 'initSurvey'
|
||||
JobTemplatesEdit.$inject = ['$filter', '$scope', '$rootScope', '$compile',
|
||||
'$location', '$log', '$stateParams', 'JobTemplateForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit',
|
||||
'RelatedPaginateInit','ReturnToCaller', 'ClearScope', 'InventoryList',
|
||||
'CredentialList', 'ProjectList', 'LookUpInit', 'GetBasePath', 'md5Setup',
|
||||
'ParseTypeChange', 'JobStatusToolTip', 'FormatDate', 'Wait', 'Stream',
|
||||
'Empty', 'Prompt', 'ParseVariableString', 'ToJSON',
|
||||
'SchedulesControllerInit', 'JobsControllerInit', 'JobsListUpdate',
|
||||
'GetChoices', 'SchedulesListInit', 'SchedulesList', 'CallbackHelpInit',
|
||||
'PlaybookRun' , 'initSurvey', '$state'
|
||||
];
|
||||
|
||||
@ -101,9 +101,9 @@ OrganizationsList.$inject = ['$stateParams', '$scope', '$rootScope',
|
||||
];
|
||||
|
||||
|
||||
export function OrganizationsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, OrganizationForm,
|
||||
GenerateForm, Rest, Alert, ProcessErrors, ClearScope, GetBasePath,
|
||||
ReturnToCaller, Wait) {
|
||||
export function OrganizationsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, OrganizationForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
ClearScope, GetBasePath, ReturnToCaller, Wait, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -138,20 +138,22 @@ export function OrganizationsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
});
|
||||
};
|
||||
|
||||
// Cancel
|
||||
$scope.formReset = function () {
|
||||
$rootScope.flashMessage = null;
|
||||
generator.reset();
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('organizations');
|
||||
};
|
||||
}
|
||||
|
||||
OrganizationsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'OrganizationForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'ReturnToCaller', 'Wait'
|
||||
OrganizationsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||
'$log', '$stateParams', 'OrganizationForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'ClearScope', 'GetBasePath', 'ReturnToCaller', 'Wait',
|
||||
'$state'
|
||||
];
|
||||
|
||||
|
||||
export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, OrganizationForm, GenerateForm, Rest,
|
||||
Alert, ProcessErrors, RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath, Wait, Stream) {
|
||||
export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, OrganizationForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath,
|
||||
Wait, Stream, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -241,13 +243,8 @@ export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
});
|
||||
};
|
||||
|
||||
// Reset the form
|
||||
$scope.formReset = function () {
|
||||
$rootScope.flashMessage = null;
|
||||
generator.reset();
|
||||
for (var fld in master) {
|
||||
$scope[fld] = master[fld];
|
||||
}
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('organizations');
|
||||
};
|
||||
|
||||
// Related set: Add button
|
||||
@ -291,7 +288,8 @@ export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
};
|
||||
}
|
||||
|
||||
OrganizationsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'OrganizationForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt', 'ClearScope', 'GetBasePath',
|
||||
'Wait', 'Stream'
|
||||
OrganizationsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||
'$log', '$stateParams', 'OrganizationForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt',
|
||||
'ClearScope', 'GetBasePath', 'Wait', 'Stream', '$state'
|
||||
];
|
||||
|
||||
@ -197,12 +197,10 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
||||
};
|
||||
|
||||
$scope.addProject = function () {
|
||||
// $location.path($location.path() + '/add');
|
||||
$state.transitionTo('projects.add');
|
||||
};
|
||||
|
||||
$scope.editProject = function (id) {
|
||||
// $location.path($location.path() + '/' + id);
|
||||
$state.transitionTo('projects.edit', {id: id});
|
||||
};
|
||||
|
||||
@ -391,16 +389,19 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
||||
};
|
||||
}
|
||||
|
||||
ProjectsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'ProjectList', 'generateList',
|
||||
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
|
||||
'SelectionInit', 'ProjectUpdate', 'Refresh', 'Wait', 'Stream', 'GetChoices', 'Empty', 'Find',
|
||||
ProjectsList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
||||
'$stateParams', 'Rest', 'Alert', 'ProjectList', 'generateList', 'Prompt',
|
||||
'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
|
||||
'ProcessErrors', 'GetBasePath', 'SelectionInit', 'ProjectUpdate',
|
||||
'Refresh', 'Wait', 'Stream', 'GetChoices', 'Empty', 'Find',
|
||||
'LogViewer', 'GetProjectIcon', 'GetProjectToolTip', '$filter', '$state'
|
||||
];
|
||||
|
||||
|
||||
export function ProjectsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, LookUpInit, OrganizationList,
|
||||
CredentialList, GetChoices, DebugForm, Wait) {
|
||||
export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, LookUpInit,
|
||||
OrganizationList, CredentialList, GetChoices, DebugForm, Wait, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -524,29 +525,25 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log, $stat
|
||||
}
|
||||
};
|
||||
|
||||
// Cancel
|
||||
$scope.formReset = function () {
|
||||
var fld;
|
||||
$rootScope.flashMessage = null;
|
||||
generator.reset();
|
||||
for (fld in master) {
|
||||
$scope[fld] = master[fld];
|
||||
}
|
||||
$scope.scmChange();
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('projects');
|
||||
};
|
||||
}
|
||||
|
||||
ProjectsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'ProjectsForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath',
|
||||
'ReturnToCaller', 'GetProjectPath', 'LookUpInit', 'OrganizationList', 'CredentialList', 'GetChoices',
|
||||
'DebugForm', 'Wait'
|
||||
ProjectsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||
'$stateParams', 'ProjectsForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'ClearScope', 'GetBasePath', 'ReturnToCaller',
|
||||
'GetProjectPath', 'LookUpInit', 'OrganizationList', 'CredentialList',
|
||||
'GetChoices', 'DebugForm', 'Wait', '$state'
|
||||
];
|
||||
|
||||
|
||||
export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, ProjectsForm,
|
||||
GenerateForm, Rest, Alert, ProcessErrors, RelatedSearchInit, RelatedPaginateInit, Prompt,
|
||||
ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, Authorization, CredentialList, LookUpInit, GetChoices,
|
||||
Empty, DebugForm, Wait, Stream, SchedulesControllerInit, SchedulesListInit, SchedulesList, ProjectUpdate) {
|
||||
export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath,
|
||||
ReturnToCaller, GetProjectPath, Authorization, CredentialList, LookUpInit,
|
||||
GetChoices, Empty, DebugForm, Wait, Stream, SchedulesControllerInit,
|
||||
SchedulesListInit, SchedulesList, ProjectUpdate, $state) {
|
||||
|
||||
ClearScope('htmlTemplate');
|
||||
|
||||
@ -829,19 +826,16 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $sta
|
||||
}
|
||||
};
|
||||
|
||||
// Reset the form
|
||||
$scope.formReset = function () {
|
||||
$rootScope.flashMessage = null;
|
||||
generator.reset();
|
||||
for (var fld in master) {
|
||||
$scope[fld] = master[fld];
|
||||
}
|
||||
$scope.scmChange();
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('projects');
|
||||
};
|
||||
}
|
||||
|
||||
ProjectsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'ProjectsForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt', 'ClearScope',
|
||||
'GetBasePath', 'ReturnToCaller', 'GetProjectPath', 'Authorization', 'CredentialList', 'LookUpInit', 'GetChoices', 'Empty',
|
||||
'DebugForm', 'Wait', 'Stream', 'SchedulesControllerInit', 'SchedulesListInit', 'SchedulesList', 'ProjectUpdate'
|
||||
ProjectsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||
'$stateParams', 'ProjectsForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt',
|
||||
'ClearScope', 'GetBasePath', 'ReturnToCaller', 'GetProjectPath',
|
||||
'Authorization', 'CredentialList', 'LookUpInit', 'GetChoices', 'Empty',
|
||||
'DebugForm', 'Wait', 'Stream', 'SchedulesControllerInit',
|
||||
'SchedulesListInit', 'SchedulesList', 'ProjectUpdate', '$state'
|
||||
];
|
||||
|
||||
@ -114,9 +114,10 @@ TeamsList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
||||
];
|
||||
|
||||
|
||||
export function TeamsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, TeamForm, GenerateForm,
|
||||
Rest, Alert, ProcessErrors, ReturnToCaller, ClearScope, GenerateList,
|
||||
OrganizationList, SearchInit, PaginateInit, GetBasePath, LookUpInit, Wait) {
|
||||
export function TeamsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
ReturnToCaller, ClearScope, GenerateList, OrganizationList, SearchInit,
|
||||
PaginateInit, GetBasePath, LookUpInit, Wait, $state) {
|
||||
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||
//$scope.
|
||||
|
||||
@ -161,22 +162,24 @@ export function TeamsAdd($scope, $rootScope, $compile, $location, $log, $statePa
|
||||
});
|
||||
};
|
||||
|
||||
// Reset
|
||||
$scope.formReset = function () {
|
||||
// Defaults
|
||||
generator.reset();
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('teams');
|
||||
};
|
||||
}
|
||||
|
||||
TeamsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'TeamForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||
'OrganizationList', 'SearchInit', 'PaginateInit', 'GetBasePath', 'LookUpInit', 'Wait'
|
||||
TeamsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||
'$stateParams', 'TeamForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||
'OrganizationList', 'SearchInit', 'PaginateInit', 'GetBasePath',
|
||||
'LookUpInit', 'Wait', '$state'
|
||||
];
|
||||
|
||||
|
||||
export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, LookUpInit, Prompt, GetBasePath, CheckAccess,
|
||||
OrganizationList, Wait, Stream, fieldChoices, fieldLabels, permissionsSearchSelect) {
|
||||
export function TeamsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope,
|
||||
LookUpInit, Prompt, GetBasePath, CheckAccess, OrganizationList, Wait,
|
||||
Stream, fieldChoices, fieldLabels, permissionsSearchSelect, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -338,13 +341,8 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $stateP
|
||||
});
|
||||
};
|
||||
|
||||
// Cancel
|
||||
$scope.formReset = function () {
|
||||
$rootScope.flashMessage = null;
|
||||
generator.reset();
|
||||
for (var fld in master) {
|
||||
$scope[fld] = master[fld];
|
||||
}
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('teams');
|
||||
};
|
||||
|
||||
// Related set: Add button
|
||||
@ -418,7 +416,10 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $stateP
|
||||
};
|
||||
}
|
||||
|
||||
TeamsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'TeamForm',
|
||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'ReturnToCaller', 'ClearScope', 'LookUpInit', 'Prompt', 'GetBasePath', 'CheckAccess', 'OrganizationList', 'Wait', 'Stream', 'fieldChoices', 'fieldLabels', 'permissionsSearchSelect'
|
||||
TeamsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||
'$stateParams', 'TeamForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'ReturnToCaller', 'ClearScope', 'LookUpInit', 'Prompt', 'GetBasePath',
|
||||
'CheckAccess', 'OrganizationList', 'Wait', 'Stream', 'fieldChoices',
|
||||
'fieldLabels', 'permissionsSearchSelect', '$state'
|
||||
];
|
||||
|
||||
@ -104,8 +104,10 @@ UsersList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
||||
];
|
||||
|
||||
|
||||
export function UsersAdd($scope, $rootScope, $compile, $location, $log, $stateParams, UserForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
ReturnToCaller, ClearScope, GetBasePath, LookUpInit, OrganizationList, ResetForm, Wait) {
|
||||
export function UsersAdd($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, UserForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
ReturnToCaller, ClearScope, GetBasePath, LookUpInit, OrganizationList,
|
||||
ResetForm, Wait, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -185,11 +187,8 @@ export function UsersAdd($scope, $rootScope, $compile, $location, $log, $statePa
|
||||
}
|
||||
};
|
||||
|
||||
// Cancel
|
||||
$scope.formReset = function () {
|
||||
// Defaults
|
||||
generator.reset();
|
||||
$scope.ldap_user = false;
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('users');
|
||||
};
|
||||
|
||||
// Password change
|
||||
@ -200,15 +199,18 @@ export function UsersAdd($scope, $rootScope, $compile, $location, $log, $statePa
|
||||
};
|
||||
}
|
||||
|
||||
UsersAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'UserForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'GetBasePath', 'LookUpInit',
|
||||
'OrganizationList', 'ResetForm', 'Wait'
|
||||
UsersAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||
'$stateParams', 'UserForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'GetBasePath',
|
||||
'LookUpInit', 'OrganizationList', 'ResetForm', 'Wait', '$state'
|
||||
];
|
||||
|
||||
|
||||
export function UsersEdit($scope, $rootScope, $compile, $location, $log, $stateParams, UserForm, GenerateForm, Rest, Alert,
|
||||
ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, GetBasePath,
|
||||
Prompt, CheckAccess, ResetForm, Wait, Stream, fieldChoices, fieldLabels, permissionsSearchSelect) {
|
||||
export function UsersEdit($scope, $rootScope, $compile, $location, $log,
|
||||
$stateParams, UserForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||
RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope,
|
||||
GetBasePath, Prompt, CheckAccess, ResetForm, Wait, Stream, fieldChoices,
|
||||
fieldLabels, permissionsSearchSelect, $state) {
|
||||
|
||||
ClearScope();
|
||||
|
||||
@ -377,14 +379,8 @@ export function UsersEdit($scope, $rootScope, $compile, $location, $log, $stateP
|
||||
Stream({ scope: $scope });
|
||||
};
|
||||
|
||||
// Cancel
|
||||
$scope.formReset = function () {
|
||||
$rootScope.flashMessage = null;
|
||||
generator.reset();
|
||||
for (var fld in master) {
|
||||
$scope[fld] = master[fld];
|
||||
}
|
||||
$scope.password_confirm = $scope.password;
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('users');
|
||||
};
|
||||
|
||||
// Password change
|
||||
@ -526,7 +522,10 @@ export function UsersEdit($scope, $rootScope, $compile, $location, $log, $stateP
|
||||
});
|
||||
}
|
||||
|
||||
UsersEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'UserForm', 'GenerateForm',
|
||||
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'ReturnToCaller', 'ClearScope',
|
||||
'GetBasePath', 'Prompt', 'CheckAccess', 'ResetForm', 'Wait', 'Stream', 'fieldChoices', 'fieldLabels', 'permissionsSearchSelect'
|
||||
UsersEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||
'$stateParams', 'UserForm', 'GenerateForm', 'Rest', 'Alert',
|
||||
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||
'ReturnToCaller', 'ClearScope', 'GetBasePath', 'Prompt', 'CheckAccess',
|
||||
'ResetForm', 'Wait', 'Stream', 'fieldChoices', 'fieldLabels',
|
||||
'permissionsSearchSelect', '$state'
|
||||
];
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name forms.function:Credentials
|
||||
@ -357,9 +357,8 @@ export default
|
||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||
ngDisabled: true //Disable when $pristine or $invalid, optional
|
||||
},
|
||||
reset: {
|
||||
ngClick: 'formReset()',
|
||||
ngDisabled: true //Disabled when $pristine
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name forms.function:Inventories
|
||||
@ -14,28 +14,14 @@ export default
|
||||
angular.module('InventoryFormDefinition', ['ScanJobsListDefinition'])
|
||||
.value('InventoryFormObject', {
|
||||
|
||||
addTitle: 'Create Inventory',
|
||||
addTitle: 'New Inventory',
|
||||
editTitle: '{{ inventory_name }}',
|
||||
name: 'inventory',
|
||||
well: true,
|
||||
collapse: true,
|
||||
collapseTitle: "Properties",
|
||||
collapseMode: 'edit',
|
||||
collapseOpen: true,
|
||||
|
||||
actions: {
|
||||
stream: {
|
||||
'class': "btn-primary btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
awFeature: 'activity_streams',
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
fields: {
|
||||
inventory_name: {
|
||||
realName: 'name',
|
||||
@ -89,9 +75,8 @@ export default
|
||||
ngClick: 'formSave()',
|
||||
ngDisabled: true
|
||||
},
|
||||
reset: {
|
||||
ngClick: 'formReset()',
|
||||
ngDisabled: true
|
||||
cancel: {
|
||||
ngClick: 'formCancel()'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -15,36 +15,15 @@ export default
|
||||
|
||||
.value ('JobTemplateFormObject', {
|
||||
|
||||
addTitle: 'Create Job Templates',
|
||||
addTitle: 'New Job Template',
|
||||
editTitle: '{{ name }}',
|
||||
name: 'job_templates',
|
||||
twoColumns: true,
|
||||
well: true,
|
||||
base: 'job_templates',
|
||||
collapse: true,
|
||||
collapseTitle: "Properties",
|
||||
collapseMode: 'edit',
|
||||
collapseOpenFirst: true, //Always open first panel
|
||||
|
||||
actions: {
|
||||
// submit: {
|
||||
// ngClick: 'launch()',
|
||||
// awToolTip: 'Start a job using this template',
|
||||
// dataPlacement: 'top',
|
||||
// mode: 'edit'
|
||||
// },
|
||||
stream: {
|
||||
'class': "btn-primary btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
awFeature: 'activity_streams',
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
@ -326,9 +305,8 @@ export default
|
||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||
ngDisabled: "job_templates_form.$invalid || can_edit!==true"//true //Disable when $pristine or $invalid, optional and when can_edit = false, for permission reasons
|
||||
},
|
||||
reset: {
|
||||
ngClick: 'formReset()',
|
||||
ngDisabled: true //Disabled when $pristine
|
||||
cancel: {
|
||||
ngClick: 'formCancel()'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name forms.function:Organizations
|
||||
@ -14,28 +14,14 @@ export default
|
||||
angular.module('OrganizationFormDefinition', [])
|
||||
.value('OrganizationForm', {
|
||||
|
||||
addTitle: 'Create Organization', //Title in add mode
|
||||
addTitle: 'New Organization', //Title in add mode
|
||||
editTitle: '{{ name }}', //Title in edit mode
|
||||
name: 'organization', //entity or model name in singular form
|
||||
well: true,
|
||||
collapse: true,
|
||||
collapseTitle: "Properties",
|
||||
collapseMode: 'edit',
|
||||
collapseOpen: true,
|
||||
|
||||
actions: {
|
||||
stream: {
|
||||
'class': "btn-primary btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
awFeature: 'activity_streams',
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
@ -57,9 +43,8 @@ export default
|
||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||
ngDisabled: true //Disable when $pristine or $invalid, optional
|
||||
},
|
||||
reset: {
|
||||
ngClick: 'formReset()',
|
||||
ngDisabled: true //Disabled when $pristine
|
||||
cancel: {
|
||||
ngClick: 'formCancel()'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -14,29 +14,15 @@ export default
|
||||
angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
.value('ProjectsFormObject', {
|
||||
|
||||
addTitle: 'Create Project',
|
||||
addTitle: 'New Project',
|
||||
editTitle: '{{ name }}',
|
||||
name: 'project',
|
||||
forceListeners: true,
|
||||
well: true,
|
||||
collapse: true,
|
||||
collapseTitle: "Properties",
|
||||
collapseMode: 'edit',
|
||||
collapseOpen: true,
|
||||
|
||||
actions: {
|
||||
stream: {
|
||||
'class': "btn-primary btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
awFeature: 'activity_streams',
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
@ -235,9 +221,8 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
ngClick: 'formSave()',
|
||||
ngDisabled: true
|
||||
},
|
||||
reset: {
|
||||
ngClick: 'formReset()',
|
||||
ngDisabled: true
|
||||
cancel: {
|
||||
ngClick: 'formCancel()'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name forms.function:Teams
|
||||
@ -14,28 +14,14 @@ export default
|
||||
angular.module('TeamFormDefinition', [])
|
||||
.value('TeamForm', {
|
||||
|
||||
addTitle: 'Create Team', //Legend in add mode
|
||||
addTitle: 'New Team', //Legend in add mode
|
||||
editTitle: '{{ name }}', //Legend in edit mode
|
||||
name: 'team',
|
||||
well: true,
|
||||
collapse: true,
|
||||
collapseTitle: "Properties",
|
||||
collapseMode: 'edit',
|
||||
collapseOpen: true,
|
||||
|
||||
actions: {
|
||||
stream: {
|
||||
'class': "btn-primary btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
awFeature: 'activity_streams',
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
@ -68,9 +54,8 @@ export default
|
||||
ngClick: 'formSave()',
|
||||
ngDisabled: true
|
||||
},
|
||||
reset: {
|
||||
ngClick: 'formReset()',
|
||||
ngDisabled: true
|
||||
cancel: {
|
||||
ngClick: 'formCancel()'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name forms.function:Users
|
||||
@ -14,29 +14,15 @@ export default
|
||||
angular.module('UserFormDefinition', [])
|
||||
.value('UserForm', {
|
||||
|
||||
addTitle: 'Create User',
|
||||
addTitle: 'New User',
|
||||
editTitle: '{{ username }}',
|
||||
name: 'user',
|
||||
well: true,
|
||||
forceListeners: true,
|
||||
collapse: true,
|
||||
collapseTitle: "Properties",
|
||||
collapseMode: 'edit',
|
||||
collapseOpen: true,
|
||||
|
||||
actions: {
|
||||
stream: {
|
||||
'class': "btn-primary btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
awFeature: 'activity_streams',
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
fields: {
|
||||
first_name: {
|
||||
label: 'First Name',
|
||||
@ -123,9 +109,8 @@ export default
|
||||
ngClick: 'formSave()',
|
||||
ngDisabled: true
|
||||
},
|
||||
reset: {
|
||||
ngClick: 'formReset()',
|
||||
ngDisabled: true
|
||||
cancel: {
|
||||
ngClick: 'formCancel()'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -58,9 +58,8 @@ export default
|
||||
});
|
||||
};
|
||||
|
||||
// Cancel
|
||||
scope.formReset = function () {
|
||||
generator.reset();
|
||||
scope.formCancel = function () {
|
||||
$state.transitionTo('inventoryScripts');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
<div class="tab-pane" id="inventory_scripts_add">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
<div ng-cloak id="htmlTemplate" class="Panel"></div>
|
||||
</div>
|
||||
|
||||
@ -89,13 +89,8 @@ export default
|
||||
});
|
||||
};
|
||||
|
||||
$scope.formReset = function () {
|
||||
generator.reset();
|
||||
for (var fld in master) {
|
||||
$scope[fld] = master[fld];
|
||||
}
|
||||
$scope.organization_name = master.organization_name;
|
||||
|
||||
$scope.formCancel = function () {
|
||||
$state.transitionTo('inventoryScripts');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
<div class="tab-pane" id="inventory_scripts_edit">
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
<div ng-cloak id="htmlTemplate" class="Panel"></div>
|
||||
</div>
|
||||
|
||||
@ -13,10 +13,9 @@
|
||||
export default function() {
|
||||
return {
|
||||
|
||||
// addTitle: 'Create Custom Inventory',
|
||||
// editTitle: '{{ name }}',
|
||||
// name: 'custom_inventory',
|
||||
well: true,
|
||||
addTitle: 'New Custom Inventory',
|
||||
editTitle: '{{ name }}',
|
||||
name: 'custom_inventory',
|
||||
showActions: true,
|
||||
|
||||
fields: {
|
||||
@ -66,9 +65,8 @@ export default function() {
|
||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||
ngDisabled: true //Disable when $pristine or $invalid, optional
|
||||
},
|
||||
reset: {
|
||||
ngClick: 'formReset()',
|
||||
ngDisabled: true //Disabled when $pristine
|
||||
cancel: {
|
||||
ngClick: 'formCancel()',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="tab-pane" id="inventory_scripts">
|
||||
<div ui-view></div>
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
<div ng-cloak id="htmlTemplate" class="Panel"></div>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="tab-pane" id="organizations">
|
||||
<div ui-view></div>
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
<div ng-cloak id="htmlTemplate" class="Panel"></div>
|
||||
</div>
|
||||
|
||||
@ -1 +0,0 @@
|
||||
<div ng-cloak id="htmlTemplate"></div>
|
||||
@ -82,6 +82,7 @@
|
||||
@submit-button-text: @default-bg;
|
||||
@submit-button-bg: @default-succ;
|
||||
@submit-button-bg-hov: @default-succ-hov;
|
||||
@submit-button-bg-dis: @default-second-border;
|
||||
|
||||
// footer
|
||||
@copyright-text: @default-interface-txt;
|
||||
|
||||
@ -730,9 +730,9 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
html += "for=\"" + fld + '">\n';
|
||||
html += (field.icon) ? Icon(field.icon) : "";
|
||||
if (field.labelBind) {
|
||||
html += "\t\t<span class=\"label-text\" ng-bind=\"" + field.labelBind + "\">\n\t\t</span>";
|
||||
html += "\t\t<span class=\"Form-inputLabel\" ng-bind=\"" + field.labelBind + "\">\n\t\t</span>";
|
||||
} else {
|
||||
html += "\t\t<span class=\"label-text\">\n\t\t\t" + field.label + "\n\t\t</span>";
|
||||
html += "\t\t<span class=\"Form-inputLabel\">\n\t\t\t" + field.label + "\n\t\t</span>";
|
||||
}
|
||||
html += (field.awPopOver && !field.awPopOverRight) ? Attr(field, 'awPopOver', fld) : "";
|
||||
html += (field.hintText) ? "\n\t\t<span class=\"label-hint-text\">\n\t\t\t<i class=\"fa fa-info-circle\">\n\t\t\t</i>\n\t\t\tHint: " + field.hintText + "\n\t\t</span>" : "";
|
||||
@ -769,7 +769,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
}
|
||||
|
||||
if ((!field.readonly) || (field.readonly && options.mode === 'edit')) {
|
||||
html += "<div class='form-group ";
|
||||
html += "<div class='form-group Form-formGroup";
|
||||
html += (field['class']) ? (field['class']) : "";
|
||||
html += "'";
|
||||
html += (field.ngShow) ? this.attr(field, 'ngShow') : "";
|
||||
@ -1241,7 +1241,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
html += ">";
|
||||
html += buildCheckbox(this.form, field, fld, undefined, false);
|
||||
html += (field.icon) ? Icon(field.icon) : "";
|
||||
html += '<span class=\"label-text\">' + field.label + "</span>";
|
||||
html += '<span class=\"Form-inputLabel\">' + field.label + "</span>";
|
||||
html += (field.awPopOver) ? this.attr(field, 'awPopOver', fld) : "";
|
||||
html += "</label>\n";
|
||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" +
|
||||
@ -1396,19 +1396,6 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
return html;
|
||||
},
|
||||
|
||||
getActions: function (options) {
|
||||
// Use to add things like Activity Stream to a detail page
|
||||
var html = "<div class=\"list-actions\">\n", action;
|
||||
for (action in this.form.actions) {
|
||||
if (this.form.actions[action].mode === 'all' || this.form.actions[action].mode === options.mode) {
|
||||
html += this.button({ btn: this.form.actions[action], iconName: action, toolbar: true });
|
||||
}
|
||||
}
|
||||
html += "</div>\n";
|
||||
return html;
|
||||
},
|
||||
|
||||
|
||||
build: function (options) {
|
||||
//
|
||||
// Generate HTML. Do NOT call this function directly. Called by inject(). Returns an HTML
|
||||
@ -1427,62 +1414,27 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
options.collapseAlreadyStarted = true;
|
||||
}
|
||||
|
||||
// Start the well
|
||||
if (!this.modal && this.form.well) {
|
||||
if ( !(this.form.collapse && this.form.collapseMode === options.mode)) {
|
||||
html += "<div class=\"aw-form-well\">\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ((options.showActions === undefined || options.showActions === true) && !this.modal && this.form.actions) {
|
||||
html += this.getActions(options);
|
||||
}
|
||||
// title and exit button
|
||||
html += "<div class=\"Form-header\">";
|
||||
html += "<div class=\"Form-title\">";
|
||||
html += (options.mode === 'edit') ? this.form.editTitle : this.form.addTitle;
|
||||
html += "</div>\n";
|
||||
|
||||
// Add a title and optionally a close button (used on Inventory->Groups)
|
||||
/*if ((!options.modal) && this.form.showTitle) {
|
||||
html += "<div class=\"form-title\">";
|
||||
html += (options.mode === 'edit') ? this.form.editTitle : this.form.addTitle;
|
||||
if (this.has('titleActions')) {
|
||||
html += "<div class=\"title-actions pull-right\">\n";
|
||||
for (btn in this.form.titleActions) {
|
||||
html += this.button({
|
||||
btn: this.form.titleActions[btn],
|
||||
action: btn,
|
||||
toolbar: true
|
||||
});
|
||||
}
|
||||
html += "</div>\n";
|
||||
}
|
||||
html += "</div>\n";
|
||||
html += "<hr class=\"form-title-hr\">\n";
|
||||
}*/
|
||||
html += "<div class=\"Form-exitHolder\">";
|
||||
html += "<button class=\"Form-exit\" ng-click=\"formCancel()\">";
|
||||
html += "<i class=\"fa fa-times-circle\"></i>";
|
||||
html += "</button></div>\n";
|
||||
|
||||
html += "<form class=\"";
|
||||
html += "</div>\n"; //end of Form-header
|
||||
|
||||
html += "<form class=\"Form";
|
||||
html += (this.form.horizontal) ? "form-horizontal" : "";
|
||||
html += (this.form['class']) ? ' ' + this.form['class'] : '';
|
||||
html += "\" name=\"" + this.form.name + "_form\" id=\"" + this.form.name + "_form\" autocomplete=\"off\" novalidate>\n";
|
||||
html += "<div ng-show=\"flashMessage != null && flashMessage != undefined\" class=\"alert alert-info\">{{ flashMessage }}</div>\n";
|
||||
|
||||
if (this.form.twoColumns) {
|
||||
html += "<div class=\"row\">\n";
|
||||
html += "<div class=\"col-lg-6\">\n";
|
||||
for (fld in this.form.fields) {
|
||||
field = this.form.fields[fld];
|
||||
if (field.column === 1) {
|
||||
html += this.buildField(fld, field, options, this.form);
|
||||
}
|
||||
}
|
||||
html += "</div><!-- column 1 -->\n";
|
||||
html += "<div class=\"col-lg-6\">\n";
|
||||
for (fld in this.form.fields) {
|
||||
field = this.form.fields[fld];
|
||||
if (field.column === 2) {
|
||||
html += this.buildField(fld, field, options, this.form);
|
||||
}
|
||||
}
|
||||
html += "</div><!-- column 2 -->\n";
|
||||
html += "</div>\n";
|
||||
} else if (this.form.tabs) {
|
||||
if (this.form.tabs) {
|
||||
html += "<ul id=\"" + this.form.name + "_tabs\" class=\"nav nav-tabs\">\n";
|
||||
for (i = 0; i < this.form.tabs.length; i++) {
|
||||
tab = this.form.tabs[i];
|
||||
@ -1548,17 +1500,13 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
}
|
||||
}
|
||||
|
||||
html += "</form>\n";
|
||||
|
||||
//buttons
|
||||
if ((options.showButtons === undefined || options.showButtons === true) && !this.modal) {
|
||||
if (this.has('buttons')) {
|
||||
|
||||
if (this.form.twoColumns) {
|
||||
html += "<div class=\"row\">\n";
|
||||
html += "<div class=\"col-lg-12\">\n";
|
||||
html += "<hr />\n";
|
||||
}
|
||||
|
||||
html += "<div class=\"buttons\" ";
|
||||
html += "<div class=\"buttons Form-buttons\" ";
|
||||
html += "id=\"" + this.form.name + "_controls\" ";
|
||||
|
||||
html += ">\n";
|
||||
@ -1579,11 +1527,11 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
// Set default color and label for Save and Reset
|
||||
if (btn === 'save') {
|
||||
button.label = 'Save';
|
||||
button['class'] = 'btn-primary';
|
||||
button['class'] = 'Form-saveButton';
|
||||
}
|
||||
if (btn === 'reset') {
|
||||
button.label = 'Reset';
|
||||
button['class'] = 'btn-default';
|
||||
if (btn === 'cancel') {
|
||||
button.label = 'Cancel';
|
||||
button['class'] = 'Form-cancelButton';
|
||||
}
|
||||
if (btn === 'launch') {
|
||||
button.label = 'Launch';
|
||||
@ -1617,9 +1565,6 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
}
|
||||
}
|
||||
html += ">";
|
||||
html += SelectIcon({
|
||||
action: btn
|
||||
});
|
||||
html += " " + button.label + "</button>\n";
|
||||
}
|
||||
}
|
||||
@ -1629,17 +1574,6 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
html += "</div>\n";
|
||||
}
|
||||
|
||||
if (this.form.twoColumns) {
|
||||
html += "</div>\n";
|
||||
html += "</div>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
html += "</form>\n";
|
||||
|
||||
if (!this.modal && this.form.well) {
|
||||
if ( !(this.form.collapse && this.form.collapseMode === options.mode)) {
|
||||
html += "</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -134,9 +134,6 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
||||
case 'scm_update':
|
||||
icon = 'fa-cloud-download';
|
||||
break;
|
||||
case 'cancel':
|
||||
icon = 'fa-minus-circle';
|
||||
break;
|
||||
case 'run':
|
||||
case 'rerun':
|
||||
case 'submit':
|
||||
@ -157,7 +154,6 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
||||
case 'close':
|
||||
icon = 'fa-arrow-left';
|
||||
break;
|
||||
case 'save':
|
||||
case 'form_submit':
|
||||
icon = 'fa-check-square-o';
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user