diff --git a/awx/ui/static/js/awx-min.js b/awx/ui/static/js/awx-min.js index b0431caef4..ddc15db11d 100644 --- a/awx/ui/static/js/awx-min.js +++ b/awx/ui/static/js/awx-min.js @@ -4,7 +4,7 @@ * * awx-min.js * - * master-18c53bb, Mon Jul 8 15:33:44 2013 -0400 + * master-09cebfc, Tue Jul 9 00:09:37 2013 -0400 * */ var urlPrefix="/static/"; @@ -215,9 +215,9 @@ m.formModalHeader="Edit Host";m.formModalCancelShow=!0;m.parseType="yaml";z(m);m b,d,c){$.isEmptyObject(a)?m.variables="---":m.variables=jsyaml.safeDump(a)}).error(function(b,d,c,e){m.variables=null;a(m,b,d,f,{hdr:"Error!",msg:"Failed to retrieve host variables. GET returned status: "+d})})):m.variables="---";s.variables=m.variables});c.setUrl(k);c.get().success(function(a,b,d,c){for(var e in f.fields)a[e]&&(m[e]=a[e],s[e]=m[e]);for(var l in f.related);m.variable_url=a.related.variable_data;m.$emit("hostLoaded")}).error(function(b,d,c,e){a(m,b,d,f,{hdr:"Error!",msg:"Failed to retrieve host: "+ id+". GET returned status: "+d})});m.$$phase||m.$digest();m.formModalAction=function(){try{if("json"==m.parseType){JSON.parse(m.variables);var b=m.variables}else b=jsyaml.load(m.variables);var e={},l;for(l in f.fields)e[l]=m[l];e.inventory=h;c.setUrl(k);c.put(e).success(function(e,l,g,h){m.variables?(c.setUrl(d("hosts")+e.id+"/variable_data/"),c.put(b).success(function(a,b,d,c){$("#form-modal").modal("hide")}).error(function(b,d,c,e){a(m,b,d,f,{hdr:"Error!",msg:"Failed to update host varaibles. PUT returned status: "+ d})})):$("#form-modal").modal("hide")}).error(function(b,d,c,e){a(m,b,d,f,{hdr:"Error!",msg:"Failed to update host: "+g+". PUT returned status: "+d})})}catch(z){p("Error","Error parsing host variables. Parser returned: "+z)}};m.formReset=function(){e.reset();for(var a in s)m[a]=s[a];m.parseType="yaml"}}}]).factory("HostsDelete",["$rootScope","$location","$log","$routeParams","Rest","Alert","Prompt","ProcessErrors","GetBasePath","HostsReload",function(h,m,k,g,c,p,f,e,l,a){return function(d){var b= -d.scope,f=d.group_id,g=d.inventory_id,h=d.host_id,k=d.host_name,m=null!==f?l("groups")+f+"/hosts/":l("inventory")+g+"/hosts/";$("#prompt-header").text("Delete Host");$("#prompt-body").text("Are you sure you want to delete host "+k+"?");$("#prompt-action-btn").addClass("btn-danger");b.promptAction=function(){b.removeHostsReload&&b.removeHostsReload();b.removeHostsReload=b.$on("hostsReload",function(){a(d)});c.setUrl(m);c.post({id:h,disassociate:1}).success(function(a,d,c,e){$("#prompt-modal").modal("hide"); -b.$emit("hostsReload")}).error(function(a,d,c,f){$("#prompt-modal").modal("hide");b.$emit("hostsReload");e(b,a,d,null,{hdr:"Error!",msg:"Call to "+m+" failed. DELETE returned status: "+d})})};$("#prompt-modal").modal({backdrop:"static",keyboard:!0,show:!0})}}]).factory("HostsReload",["RelatedSearchInit","RelatedPaginateInit","InventoryForm","GetBasePath",function(h,m,k,g){return function(c){scope=c.scope;var p={hosts:{url:null!==scope.group_id?g("groups")+scope.group_id+"/hosts/":g("inventory")+c.inventory_id+ -"/hosts/",iterator:"host"}};h({scope:c.scope,form:k,relatedSets:p});m({scope:c.scope,relatedSets:p});c.scope.search("host");c.scope.$$phase||c.scope.$digest()}}]);angular.module("InventoryHelper","RestServices Utilities OrganizationListDefinition SearchHelper PaginateHelper ListGenerator AuthService InventoryHelper RelatedSearchHelper RelatedPaginateHelper InventoryFormDefinition".split(" ")).factory("LoadTreeData",["Alert","Rest","Authorization","$http",function(h,m,k,g){return function(c){var g=c.scope,f=c.inventory,e=f.related.root_groups,l=f.related.hosts,a=f.name,d=f.url,b=f.id,k=f.description,w=0,B=[];g.HostLoadedRemove&&g.HostLoadedRemove();g.HostLoadedRemove= +d.scope,f=d.inventory_id,g=d.host_id,h=d.host_name,k=null!==b.group_id?l("groups")+b.group_id+"/hosts/":l("inventory")+f+"/hosts/";null!==b.group_id?($("#prompt-header").text("Remove Host from Group"),$("#prompt-body").text("Are you sure you want to remove host "+h+" from the group?")):($("#prompt-header").text("Delete Host"),$("#prompt-body").text("Are you sure you want to permenantly remove host "+h+"?"));$("#prompt-action-btn").addClass("btn-danger");b.promptAction=function(){b.removeHostsReload&& +b.removeHostsReload();b.removeHostsReload=b.$on("hostsReload",function(){a(d)});c.setUrl(k);c.post({id:g,disassociate:1}).success(function(a,d,c,e){$("#prompt-modal").modal("hide");b.$emit("hostsReload")}).error(function(a,d,c,f){$("#prompt-modal").modal("hide");b.$emit("hostsReload");e(b,a,d,null,{hdr:"Error!",msg:"Call to "+k+" failed. DELETE returned status: "+d})})};$("#prompt-modal").modal({backdrop:"static",keyboard:!0,show:!0})}}]).factory("HostsReload",["RelatedSearchInit","RelatedPaginateInit", +"InventoryForm","GetBasePath",function(h,m,k,g){return function(c){scope=c.scope;var p={hosts:{url:null!==scope.group_id?g("groups")+scope.group_id+"/hosts/":g("inventory")+c.inventory_id+"/hosts/",iterator:"host"}};h({scope:c.scope,form:k,relatedSets:p});m({scope:c.scope,relatedSets:p});c.scope.search("host");c.scope.$$phase||c.scope.$digest()}}]);angular.module("InventoryHelper","RestServices Utilities OrganizationListDefinition SearchHelper PaginateHelper ListGenerator AuthService InventoryHelper RelatedSearchHelper RelatedPaginateHelper InventoryFormDefinition".split(" ")).factory("LoadTreeData",["Alert","Rest","Authorization","$http",function(h,m,k,g){return function(c){var g=c.scope,f=c.inventory,e=f.related.root_groups,l=f.related.hosts,a=f.name,d=f.url,b=f.id,k=f.description,w=0,B=[];g.HostLoadedRemove&&g.HostLoadedRemove();g.HostLoadedRemove= g.$on("hostsLoaded",function(){m.setUrl(e+"?"+(g.inventoryFailureFilter?"has_active_failures__int=1&":"")+"order_by=name");m.get().success(function(a,b,d,c){for(b=0;b