1
0
Fork 0
mirror of https://github.com/mmumshad/ansible-playable.git synced 2025-03-09 23:38:54 +00:00

Initial Commit

This commit is contained in:
Mumshad Mannambeth 2017-06-07 13:36:44 -04:00
commit c92f737237
273 changed files with 16964 additions and 0 deletions

View file

@ -0,0 +1,30 @@
'use strict';
const angular = require('angular');
/*@ngInject*/
export function customModulesService($http,Projects) {
// AngularJS will instantiate a singleton by calling "new" on this function
var uri = '/api/custom_modules';
this.get = function(successCallback,errorCallback){
$http.post(uri + '/query',{ansibleEngine:Projects.selectedProject.ansibleEngine}).then(successCallback,errorCallback)
};
this.show = function(customModule,successCallback,errorCallback){
$http.post(uri+ '/' + customModule+'/get',{ansibleEngine:Projects.selectedProject.ansibleEngine}).then(successCallback,errorCallback)
};
this.test = function(customModule,module_args,successCallback,errorCallback){
$http.post(uri + '/' + customModule + '/test',{ansibleEngine:Projects.selectedProject.ansibleEngine,moduleArgs:module_args}).then(successCallback,errorCallback)
};
this.save = function(customModule,customModuleCode,successCallback,errorCallback){
$http.post(uri + '/' + customModule,{ansibleEngine:Projects.selectedProject.ansibleEngine,custom_module_code:customModuleCode}).then(successCallback,errorCallback)
}
}
export default angular.module('webAppApp.custom_modules_service', [])
.service('customModules', customModulesService)
.name;