mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 08:57:35 -02:30
removing some unnecessary files
This commit is contained in:
@@ -116,9 +116,8 @@ angular.module('Tower', [
|
|||||||
'LoadConfigHelper',
|
'LoadConfigHelper',
|
||||||
'SocketHelper',
|
'SocketHelper',
|
||||||
'AboutAnsibleHelpModal',
|
'AboutAnsibleHelpModal',
|
||||||
'SurveyMakerFormDefinition',
|
|
||||||
'SurveyQuestionFormDefinition',
|
'SurveyQuestionFormDefinition',
|
||||||
'SurveyTakerFormDefinition'
|
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
/*********************************************
|
|
||||||
* Copyright (c) 2014 AnsibleWorks, Inc.
|
|
||||||
*
|
|
||||||
* SurveyMaker.js
|
|
||||||
* Form definition for survey maker model
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* @ngdoc function
|
|
||||||
* @name forms.function:SurveyMaker
|
|
||||||
* @description This form is for adding/editing a survey
|
|
||||||
*/
|
|
||||||
angular.module('SurveyTakerFormDefinition', [])
|
|
||||||
.value('SurveyTakerForm', {
|
|
||||||
|
|
||||||
// addTitle: 'Add Survey', //Title in add mode
|
|
||||||
// editTitle: 'Edit Survey', //Title in edit mode
|
|
||||||
name: 'survey_taker', //entity or model name in singular form
|
|
||||||
// // well: true,
|
|
||||||
breadCrumbs: false,
|
|
||||||
// twoColumns: true,
|
|
||||||
// // collapse: true,
|
|
||||||
// collapseTitle: "Properties",
|
|
||||||
// collapseMode: 'edit',
|
|
||||||
// collapseOpen: true,
|
|
||||||
|
|
||||||
// actions: {
|
|
||||||
// stream: {
|
|
||||||
// 'class': "btn-primary btn-xs activity-btn",
|
|
||||||
// ngClick: "showActivity()",
|
|
||||||
// awToolTip: "View Activity Stream",
|
|
||||||
// dataPlacement: "top",
|
|
||||||
// icon: "icon-comments-alt",
|
|
||||||
// mode: 'edit',
|
|
||||||
// iconSize: 'large'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
|
|
||||||
fields: {
|
|
||||||
survey_name: {
|
|
||||||
type: 'custom',
|
|
||||||
control: '<div class="row">'+
|
|
||||||
'<div class="col-sm-12">'+//<label for="survey"><span class="label-text prepend-asterisk">Questions</span></label>'+
|
|
||||||
'<div id="survey_taker_description"></div>' +
|
|
||||||
'<div id="survey_maker_question_area"></div><div id="survey_taker_finalized_questions"></div>'+
|
|
||||||
//'<button style="display:none" type="button" class="btn btn-sm btn-primary" id="add_question_btn" ng-click="addNewQuestion()" aw-tool-tip="Create a new question" data-placement="top" data-original-title="" title="" disabled><i class="fa fa-plus fa-lg"></i> Add Question</button>'+
|
|
||||||
'<div id="new_question"></div></div></div>'
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
buttons: { //for now always generates <button> tags
|
|
||||||
// save: {
|
|
||||||
// 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
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
@@ -523,12 +523,11 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
|||||||
}])
|
}])
|
||||||
|
|
||||||
.factory('PromptForSurvey', ['$compile', 'Wait', 'Alert', 'CredentialForm', 'CreateLaunchDialog', 'SurveyControllerInit' , 'GetBasePath', 'Rest' , 'Empty',
|
.factory('PromptForSurvey', ['$compile', 'Wait', 'Alert', 'CredentialForm', 'CreateLaunchDialog', 'SurveyControllerInit' , 'GetBasePath', 'Rest' , 'Empty',
|
||||||
'SurveyTakerForm', 'GenerateForm', 'ShowSurveyModal', 'ProcessErrors', '$routeParams' ,
|
'GenerateForm', 'ShowSurveyModal', 'ProcessErrors', '$routeParams' ,
|
||||||
function($compile, Wait, Alert, CredentialForm, CreateLaunchDialog, SurveyControllerInit, GetBasePath, Rest, Empty,
|
function($compile, Wait, Alert, CredentialForm, CreateLaunchDialog, SurveyControllerInit, GetBasePath, Rest, Empty,
|
||||||
SurveyTakerForm, GenerateForm, ShowSurveyModal, ProcessErrors, $routeParams) {
|
GenerateForm, ShowSurveyModal, ProcessErrors, $routeParams) {
|
||||||
return function(params) {
|
return function(params) {
|
||||||
var html = params.html || "",
|
var html = params.html || "",
|
||||||
form = SurveyTakerForm,
|
|
||||||
id= params.id,
|
id= params.id,
|
||||||
url = params.url,
|
url = params.url,
|
||||||
scope = params.scope,
|
scope = params.scope,
|
||||||
@@ -780,7 +779,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
|||||||
|
|
||||||
})
|
})
|
||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
ProcessErrors(scope, data, status, form, { hdr: 'Error!',
|
ProcessErrors(scope, data, status, { hdr: 'Error!',
|
||||||
msg: 'Failed to retrieve organization: ' + $routeParams.id + '. GET status: ' + status });
|
msg: 'Failed to retrieve organization: ' + $routeParams.id + '. GET status: ' + status });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -85,28 +85,14 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
|
|||||||
};
|
};
|
||||||
}])
|
}])
|
||||||
|
|
||||||
.factory('EditSurvey', ['$routeParams','SchedulerInit', 'ShowSurveyModal', 'Wait', 'Rest', 'ProcessErrors', 'GetBasePath', 'GenerateForm', 'SurveyMakerForm',
|
.factory('EditSurvey', ['$routeParams','SchedulerInit', 'ShowSurveyModal', 'Wait', 'Rest', 'ProcessErrors', 'GetBasePath', 'GenerateForm',
|
||||||
'Empty', 'AddSurvey',
|
'Empty', 'AddSurvey',
|
||||||
function($routeParams, SchedulerInit, ShowSurveyModal, Wait, Rest, ProcessErrors, GetBasePath, GenerateForm,SurveyMakerForm,
|
function($routeParams, SchedulerInit, ShowSurveyModal, Wait, Rest, ProcessErrors, GetBasePath, GenerateForm,
|
||||||
Empty, AddSurvey) {
|
Empty, AddSurvey) {
|
||||||
return function(params) {
|
return function(params) {
|
||||||
var scope = params.scope,
|
var scope = params.scope,
|
||||||
id = params.id,
|
id = params.id,
|
||||||
// callback = params.callback,
|
|
||||||
tempSurv = {},
|
tempSurv = {},
|
||||||
generator = GenerateForm,
|
|
||||||
form = SurveyMakerForm,
|
|
||||||
// labels={
|
|
||||||
// "type": "Type",
|
|
||||||
// "question_name": "Question Text",
|
|
||||||
// "question_description": "Question Description",
|
|
||||||
// "variable": "Answer Varaible Name",
|
|
||||||
// "choices": "Choices",
|
|
||||||
// "min": "Min",
|
|
||||||
// "max": "Max",
|
|
||||||
// "required": "Required",
|
|
||||||
// "default": "Default Answer"
|
|
||||||
// },
|
|
||||||
url = GetBasePath('job_templates') + id + '/survey_spec/', i;
|
url = GetBasePath('job_templates') + id + '/survey_spec/', i;
|
||||||
|
|
||||||
if (scope.removeDialogReady) {
|
if (scope.removeDialogReady) {
|
||||||
@@ -121,7 +107,6 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
|
|||||||
if(scope.mode === 'add'){
|
if(scope.mode === 'add'){
|
||||||
tempSurv.survey_name = scope.survey_name;
|
tempSurv.survey_name = scope.survey_name;
|
||||||
tempSurv.survey_description = scope.survey_description;
|
tempSurv.survey_description = scope.survey_description;
|
||||||
generator.inject(form, { id: 'survey-modal-dialog' , mode: 'edit', related: false, scope: scope, breadCrumbs: false });
|
|
||||||
|
|
||||||
ShowSurveyModal({ title: "Edit Survey", scope: scope, callback: 'DialogReady' });
|
ShowSurveyModal({ title: "Edit Survey", scope: scope, callback: 'DialogReady' });
|
||||||
|
|
||||||
@@ -138,7 +123,6 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
|
|||||||
Rest.get()
|
Rest.get()
|
||||||
.success(function (data) {
|
.success(function (data) {
|
||||||
if(!Empty(data)){
|
if(!Empty(data)){
|
||||||
// generator.inject(form, { id: 'survey-modal-dialog' , mode: 'edit', related: false, scope: scope, breadCrumbs: false });
|
|
||||||
ShowSurveyModal({ title: "Edit Survey", scope: scope, callback: 'DialogReady' });
|
ShowSurveyModal({ title: "Edit Survey", scope: scope, callback: 'DialogReady' });
|
||||||
|
|
||||||
scope.survey_name = data.name;
|
scope.survey_name = data.name;
|
||||||
@@ -157,7 +141,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
|
|||||||
|
|
||||||
})
|
})
|
||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
ProcessErrors(scope, data, status, form, { hdr: 'Error!',
|
ProcessErrors(scope, data, status, { hdr: 'Error!',
|
||||||
msg: 'Failed to retrieve organization: ' + $routeParams.id + '. GET status: ' + status });
|
msg: 'Failed to retrieve organization: ' + $routeParams.id + '. GET status: ' + status });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" ng-app="Tower">
|
<html lang="en" ng-app="Tower">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Ansible Tower</title>
|
<title>Ansible Tower</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
@@ -103,8 +102,6 @@
|
|||||||
<script src="{{ STATIC_URL }}js/forms/LicenseForm.js"></script>
|
<script src="{{ STATIC_URL }}js/forms/LicenseForm.js"></script>
|
||||||
<script src="{{ STATIC_URL }}js/forms/LicenseUpdate.js"></script>
|
<script src="{{ STATIC_URL }}js/forms/LicenseUpdate.js"></script>
|
||||||
<script src="{{ STATIC_URL }}js/forms/Source.js"></script>
|
<script src="{{ STATIC_URL }}js/forms/Source.js"></script>
|
||||||
<script src="{{ STATIC_URL }}js/forms/SurveyMaker.js"></script>
|
|
||||||
<script src="{{ STATIC_URL }}js/forms/SurveyTaker.js"></script>
|
|
||||||
<script src="{{ STATIC_URL }}js/forms/SurveyQuestion.js"></script>
|
<script src="{{ STATIC_URL }}js/forms/SurveyQuestion.js"></script>
|
||||||
<script src="{{ STATIC_URL }}js/forms/LogViewerStatus.js"></script>
|
<script src="{{ STATIC_URL }}js/forms/LogViewerStatus.js"></script>
|
||||||
<script src="{{ STATIC_URL }}js/forms/LogViewerOptions.js"></script>
|
<script src="{{ STATIC_URL }}js/forms/LogViewerOptions.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user