From 2fcb5a1ae470838c43d2b6211b6a1f8aec4c969d Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Wed, 12 Feb 2014 22:19:30 +0000 Subject: [PATCH] More updates to contributing doc. Added Grunt to Makefile. Use lintjs to inspect .js files for lint and errors. Use minjs to compile and compress the .js and .less files. --- Makefile | 7 ++++++- awx/ui/static/js/awx-min.js | 18 ++++++++++++++---- awx/ui/static/js/helpers/Selection.js | 3 +-- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 7eb51358d1..50d8caa9d1 100644 --- a/Makefile +++ b/Makefile @@ -139,7 +139,12 @@ test_jenkins: # Build minified JS/CSS. minjs: - (cd tools/ui/ && ./compile.sh) + grunt + +# Check .js files for errors and lint +lintjs: + grunt jshint + # Build a pip-installable package into dist/ with a timestamped version number. dev_build: diff --git a/awx/ui/static/js/awx-min.js b/awx/ui/static/js/awx-min.js index a0861442c0..a05f59aed8 100644 --- a/awx/ui/static/js/awx-min.js +++ b/awx/ui/static/js/awx-min.js @@ -11,8 +11,11 @@ g.setUrl(r("jobs")+D.job_id),g.get().success(function(a){D.job_status=a.status,D break}}}),F.removeChoicesHere&&F.removeChoicesHere(),F.removeChoicesHere=F.$on("choicesCompleteProject",function(){var a;if(A.fields.scm_type.searchOptions=F.project_scm_type_options,A.fields.status.searchOptions=F.project_status_options,e.scm_type&&e.status&&(B+="?status="+e.status),l({scope:F,set:"projects",list:A,url:B}),m({scope:F,list:A,url:B}),e.scm_type){F[A.iterator+"SearchField"]="scm_type",F[A.iterator+"SelectShow"]=!0,F[A.iterator+"SearchSelectOpts"]=A.fields.scm_type.searchOptions,F[A.iterator+"SearchFieldLabel"]=A.fields.scm_type.label.replace(//g," ");for(a in A.fields.scm_type.searchOptions)if(A.fields.scm_type.searchOptions[a].value===e.scm_type){F[A.iterator+"SearchSelectValue"]=A.fields.scm_type.searchOptions[a];break}}else if(e.status){F[A.iterator+"SearchValue"]=e.status,F[A.iterator+"SearchField"]="status",F[A.iterator+"SelectShow"]=!0,F[A.iterator+"SearchFieldLabel"]=A.fields.status.label,F[A.iterator+"SearchSelectOpts"]=A.fields.status.searchOptions;for(a in A.fields.status.searchOptions)if(A.fields.status.searchOptions[a].value===e.status){F[A.iterator+"SearchSelectValue"]=A.fields.status.searchOptions[a];break}}F.search(A.iterator)}),F.removeChoicesReady&&F.removeChoicesReady(),F.removeChoicesReady=F.$on("choicesReadyProject",function(){H++,2===H&&F.$emit("choicesCompleteProject")}),y({scope:F,url:B,field:"status",variable:"project_status_options",callback:"choicesReadyProject"}),y({scope:F,url:B,field:"scm_type",variable:"project_scm_type_options",callback:"choicesReadyProject"}),j(),F.showActivity=function(){x({scope:F})},F.addProject=function(){c.path(c.path()+"/add")},F.editProject=function(a){c.path(c.path()+"/"+a)},F.showSCMStatus=function(a){var b,c=F.$on("PostRefresh",function(){var d;for(b=0;bRefresh button to view the latest status.","alert-info")}).error(function(a,b){p(F,a,b,null,{hdr:"Error!",msg:"Call to "+c+" failed. GET status: "+b})})}),F.cancelUpdate=function(a,b){var c,d,e=!1;for(c=0;cRefresh button to view the latet status.","alert-info")},F.refresh=function(){w("start"),F.projectLoading=!1,v({scope:F,set:"projects",iterator:"project",url:F.current_url})},F.SCMUpdate=function(a){var b;for(b=0;bb;b++){for(d[b].match(/[A-Z]/g)?(""!==R&&R+1==b&&(y++,C++),R=b,o++):d[b].match(/[a-z]/g)?(""!==S&&S+1==b&&(z++,C++),S=b,p++):d[b].match(/[0-9]/g)?(b>0&&e-1>b&&s++,""!==T&&T+1==b&&(A++,C++),T=b,q++):d[b].match(/[^a-zA-Z0-9_]/g)&&(b>0&&e-1>b&&s++,""!==U&&U+1==b&&(B++,C++),U=b,r++),f=!1,g=0;e>g;g++)d[b]==d[g]&&b!=g&&(f=!0,x+=Math.abs(e/(g-b)));f&&(w++,v=e-w,x=Math.ceil(v?x/v:x))}for(h=0;23>h;h++)i=ib.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(D++,G++);for(h=0;8>h;h++)i=jb.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(E++,G++);for(h=0;8>h;h++)i=kb.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(F++,G++);o>0&&n>o&&(nScore=parseInt(nScore+2*(n-o)),V="+ "+parseInt(2*(n-o))),p>0&&n>p&&(nScore=parseInt(nScore+2*(n-p)),W="+ "+parseInt(2*(n-p))),q>0&&n>q&&(nScore=parseInt(nScore+q*P),X="+ "+parseInt(q*P)),r>0&&(nScore=parseInt(nScore+r*Q),Y="+ "+parseInt(r*Q)),s>0&&(nScore=parseInt(nScore+s*H),Z="+ "+parseInt(s*H)),(p>0||o>0)&&0===r&&0===q&&(nScore=parseInt(nScore-n),t=n,_="- "+n),0===p&&0===o&&0===r&&q>0&&(nScore=parseInt(nScore-n),u=n,ab="- "+n),w>0&&(nScore=parseInt(nScore-x),bb="- "+x),y>0&&(nScore=parseInt(nScore-y*I),cb="- "+parseInt(y*I)),z>0&&(nScore=parseInt(nScore-z*J),db="- "+parseInt(z*J)),A>0&&(nScore=parseInt(nScore-A*K),eb="- "+parseInt(A*K)),D>0&&(nScore=parseInt(nScore-D*L),fb="- "+parseInt(D*L)),E>0&&(nScore=parseInt(nScore-E*M),gb="- "+parseInt(E*M)),F>0&&(nScore=parseInt(nScore-F*N),hb="- "+parseInt(F*N)),nScore>100?nScore=100:0>nScore&&(nScore=0),k=$("#progbar"),l=$AnsibleConfig.password_strength,m=$AnsibleConfig.password_strength-15<0?0:$AnsibleConfig.password_strength-15,k.css("width",nScore+"%"),nScore>=0&&m>=nScore?(lb="Weak",k.addClass("progress-bar-danger"),k.removeClass("progress-bar-success progress-bar-warning")):nScore>m&&l>=nScore?(lb="Good",k.addClass("progress-bar-warning"),k.removeClass("progress-bar-success progress-bar-danger")):nScore>l&&(lb="Strong",k.addClass("progress-bar-success"),k.removeClass("progress-bar-warning progress-bar-danger"))}else k=$("#progbar"),k.css("width","0%"),k.removeClass("progress-bar-success progress-bar-warning");return nScore}function AdminsList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var q=h,r=o("organizations")+e.organization_id+"/users/",s=i,t="select",u=o("organizations")+e.organization_id+"/admins/";s.inject(h,{mode:t,scope:a}),p({scope:a,list:q,url:u,returnToCaller:1}),l({scope:a,set:"admins",list:q,url:r}),m({scope:a,list:q,url:r}),a.search(q.iterator),j()}function Authenticate(a,b,c,d,e,f,g,h,i,j,k){var l,m,n,o;l=function(){$("#login-username").focus()},n=k(d.sessionExpired)?a.get("sessionExpired"):d.sessionExpired,m=function(){return k(d.lastPath)?a.get("lastPath"):d.lastPath},$AnsibleConfig.debug_mode&&console&&(console.log("User session expired: "+n),console.log("Last URL: "+m())),$(".modal[aria-hidden=false]").each(function(){"login-modal"!==$(this).attr("id")&&$(this).modal("hide")}),i("stop"),$("#login-modal").modal({show:!0,keyboard:!1,backdrop:"static"}),$("#login-modal").on("shown.bs.modal",function(){l()}),o=angular.element(document.getElementById("login-modal")).scope(),o.login_username=null,o.login_password=null,o.loginForm.login_username.$setPristine(),o.loginForm.login_password.$setPristine(),"/logout"===e.path()&&f.logout(),d.userLoggedIn=!1,a.put("userLoggedIn",!1),$("#login-password").bind("keypress",function(a){var b=a.keyCode?a.keyCode:a.which;13===b&&$("#login-button").click()}),o.reset=function(){$("#login-form input").each(function(){$(this).val("")})},o.systemLogin=function(a,b){$(".api-error").empty();var c;k(a)||k(b)?h("Error!","Please provide a username and password before attempting to login.","alert-danger",l):(i("start"),f.retrieveToken(a,b).success(function(a,b){$("#login-modal").modal("hide"),c=a.token,f.setToken(a.token,a.expires),d.sessionTimer=j.init(),f.getUser().success(function(a){f.setUserInfo(a),d.user_is_superuser=a.results[0].is_superuser,f.getLicense().success(function(a){f.setLicense(a.license_info),m()?e.path(m()):e.url("/home?login=true")}).error(function(){i("stop"),h("Error","Failed to access user information. GET returned status: "+b,"alert-danger",l)})}).error(function(a,b){i("stop"),h("Error","Failed to access license information. GET returned status: "+b,"alert-danger",l)})}).error(function(a,b){var c,d,e;if(i("stop"),a.non_field_errors&&0===a.non_field_errors.length)for(e in a)o[e+"Error"]=a[e][0];else a.non_field_errors&&a.non_field_errors.length>0?(c="Error",d=a.non_field_errors[0]):(c="Error",d="The login attempt failed with a status of: "+b),o.reset(),h(c,d,"alert-danger",l)}))}}function CredentialsList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){o(),t("start");var v,w=h,x=q("credentials"),y=i,z=c.path().replace(/^\//,"").split("/")[0],A="credentials"===z?"edit":"select";y.inject(w,{mode:A,scope:a}),a.selected=[],a.credentialLoading=!0,v=q(z)+("users"===z?e.user_id+"/credentials/":e.team_id+"/credentials/"),"select"===A&&r({scope:a,list:w,url:v,returnToCaller:1}),a.removePostRefresh&&a.removePostRefresh(),a.removePostRefresh=a.$on("PostRefresh",function(){var b,c;for(t("stop"),$("#prompt-modal").off(),w.fields.kind.searchOptions=a.credential_kind_options,b=0;b/g," ");for(x in z.fields.status.searchOptions)if(z.fields.status.searchOptions[x].value===b.status){B[z.iterator+"SearchSelectValue"]=z.fields.status.searchOptions[x];break}}if(b.source){B[z.iterator+"SearchField"]="source",B[z.iterator+"SelectShow"]=!0,B[z.iterator+"SearchSelectOpts"]=z.fields.source.searchOptions,B[z.iterator+"SearchFieldLabel"]=z.fields.source.label.replace(//g," ");for(x in z.fields.source.searchOptions)if(z.fields.source.searchOptions[x].value===b.source){B[z.iterator+"SearchSelectValue"]=z.fields.source.searchOptions[x];break}b.status&&(B[z.iterator+"ExtraParms"]="&inventory_source__status__icontains="+b.status)}b.has_external_source&&(B[z.iterator+"SearchField"]="has_external_source",B[z.iterator+"SearchValue"]=z.fields.has_external_source.searchValue,B[z.iterator+"InputDisable"]=!0,B[z.iterator+"SearchType"]="in",B[z.iterator+"SearchFieldLabel"]=z.fields.has_external_source.label),B.search(z.iterator),f(),B.showActivity=function(){p({scope:B})},B.editGroup=function(a,b){q({scope:B,group_id:a,inventory_id:b,groups_reload:!1})},B.viewUpdateStatus=function(a){B.groups=B.home_groups,o({scope:B,tree_id:a})},B.updateGroup=function(a){var b=w({list:B.home_groups,key:"id",val:a});b&&(u(b.source)||("updating"===b.status?s("Update in Progress","The inventory update process is currently running for group "+b.name+". Use the Refresh button to monitor the status.","alert-info"):(r("start"),t.setUrl(b.related.inventory_source),t.get().success(function(a){v({scope:B,url:a.related.update,group_name:a.summary_fields.group.name,group_source:a.source,tree_id:b.id,group_id:b.id})}).error(function(a,c){e(B,a,c,null,{hdr:"Error!",msg:"Failed to retrieve inventory source: "+b.related.inventory_source+" POST returned status: "+c})}))))},B.refresh=function(){B.search(z.iterator,null,!1,!0)}}function HomeHosts(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){h("htmlTemplate");var s=d,t=c,u=i("hosts"),v=s.inject(t,{mode:"edit"});v.removePostRefresh&&v.removePostRefresh(),v.removePostRefresh=v.$on("PostRefresh",function(){for(var a=0;a0?(a.inventories[b].failed_hosts_tip=a.inventories[b].hosts_with_active_failures+(1===a.inventories[b].hosts_with_active_failures?" host":" hosts")+" with job failures. Click to view details.",a.inventories[b].failed_hosts_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].failed_hosts_class="true"):0===a.inventories[b].total_hosts?(a.inventories[b].failed_hosts_tip="No hosts defined. Click to add.",a.inventories[b].failed_hosts_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].failed_hosts_class="na"):(a.inventories[b].failed_hosts_tip=a.inventories[b].total_hosts+(a.inventories[b].total_hosts>1?" hosts":" host")+" with no job failures. Click to view details.",a.inventories[b].failed_hosts_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].failed_hosts_class="false"),a.inventories[b].status=a.inventories[b].inventory_sources_with_failures+" / "+a.inventories[b].total_inventory_sources,a.inventories[b].inventory_sources_with_failures>0?(a.inventories[b].status_tip=a.inventories[b].inventory_sources_with_failures+" cloud "+(1===a.inventories[b].inventory_sources_with_failures?"source":"sources")+" with failures. Click to view details.",a.inventories[b].status_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].status_class="failed"):0===a.inventories[b].total_inventory_sources?(a.inventories[b].status_tip="Not synced with a cloud source. Click to edit.",a.inventories[b].status_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].status_class="na"):(a.inventories[b].status_tip=a.inventories[b].total_inventory_sources+" cloud "+(a.inventories[b].total_inventory_sources>1?"sources":"source")+" with no failures. Click to view details.",a.inventories[b].status_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].status_class="successful")}),a.removeRefreshInventories&&a.removeRefreshInventories(),a.removeRefreshInventories=a.$on("RefreshInventories",function(){a.search(u.iterator)}),a.showActivity=function(){s({scope:a})},a.editInventoryProperties=function(b){t({scope:a,inventory_id:b})},a.addInventory=function(){c.path(c.path()+"/add")},a.editInventory=function(a){c.path(c.path()+"/"+a)},a.deleteInventory=function(b,c){var d=function(){var c=v+b+"/";$("#prompt-modal").on("hidden.bs.modal",function(){r("start")}),$("#prompt-modal").modal("hide"),f.setUrl(c),f.destroy().success(function(){a.search(u.iterator)}).error(function(b,d){r("stop"),p(a,b,d,null,{hdr:"Error!",msg:"Call to "+c+" failed. DELETE returned status: "+d})})};k({hdr:"Delete",body:"Are you sure you want to delete "+c+"?",action:d})},a.lookupOrganization=function(a){f.setUrl(q("organizations")+a+"/"),f.get().success(function(a){return a.name})},a.viewJobs=function(a){c.url("/jobs/?inventory__int="+a)},a.viewFailedJobs=function(a){c.url("/jobs/?inventory__int="+a+"&status=failed")}}function InventoriesAdd(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){n();var w=t("inventory"),x=g,y=h;x.well=!0,x.formLabelSize=null,x.formFieldSize=null,y.inject(x,{mode:"add",related:!1,scope:a}),a.inventoryParseType="yaml",y.reset(),l(),u(a,"inventory_variables","inventoryParseType"),s({scope:a,form:x,current_item:f.organization_id?f.organization_id:null,list:p,field:"organization"}),a.formSave=function(){y.clearApiErrors(),v("start");try{var b,c,e;if(c="json"===a.inventoryParseType?JSON.parse(a.inventory_variables):jsyaml.load(a.inventory_variables),"object"!=typeof c)throw"failed to return an object!";e={};for(b in x.fields)"inventory_variables"!==b&&(x.fields[b].realName?e[x.fields[b].realName]=a[b]:e[b]=a[b]);i.setUrl(w),i.post(e).success(function(b){var e=b.id;a.inventory_variables?(i.setUrl(b.related.variable_data),i.put(c).success(function(){v("stop"),d.path("/inventories/"+e+"/")}).error(function(b,c){k(a,b,c,null,{hdr:"Error!",msg:"Failed to add inventory varaibles. PUT returned status: "+c})})):(v("stop"),d.path("/inventories/"+e+"/"))}).error(function(b,c){k(a,b,c,x,{hdr:"Error!",msg:"Failed to add new inventory. Post returned status: "+c})})}catch(f){v("stop"),j("Error","Error parsing inventory variables. Parser returned: "+f)}},a.formReset=function(){y.reset()}}function InventoriesEdit(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P){f();var Q=e,R=g;a.inventory_id=c.inventory_id,r({path:b.path(),title:"{{ inventory_name }}"}),a.removeGroupTreeLoaded&&a.removeGroupTreeLoaded(),a.removeGroupTreeLoaded=a.$on("GroupTreeLoaded",function(b,c,e){var f,g;f=angular.element(document.getElementById("breadcrumbs")),f.html(q({list:R,mode:"edit"})),d(f)(a),Q.inject(R,{mode:"edit",id:"groups-container",breadCrumbs:!1,searchSize:"col-lg-5 col-md-5 col-sm-5"}),a.groups=e,a.inventory_name=c,a.groups.length>0?(a.selected_tree_id=a.groups[0].id,a.selected_group_id=a.groups[0].group_id,a.groups[0].selected_class="selected",a.groups[0].active_class="active-row",a.selected_group_name=a.groups[0].name):(a.selected_tree_id=null,a.selected_group_id=null),a.show_failures=!1,l({scope:a,inventory_id:a.inventory_id,tree_id:a.selected_tree_id,group_id:a.selected_group_id}),setTimeout(function(){$("#groups_table .name-column").each(function(){var a,b,c,d,e;a=$(this).width(),b=$(this).find(".level").width(),c=parseInt($(this).find(".level").css("padding-left").replace(/px/,"")),d=b+c,e=100-Math.ceil(d/a*100)+"%",$(this).find(".group-name").css({width:e})}),L("#groups_table .group-name a"),L("#hosts_table .host-name a")},2500),M(),g=P("inventoryAutoHelp"),"off"!==g&&a.autoShowGroupHelp&&a.showGroupHelp({autoShow:!0})}),a.removeGroupTreeRefreshed&&a.removeGroupTreeRefreshed(),a.removeGroupTreeRefreshed=a.$on("GroupTreeRefreshed",function(){setTimeout(function(){L("#groups_table .group-name a")},2500),a.showHosts(a.selected_tree_id,a.selected_group_id,!1)}),a.removeGroupDeleteCompleted&&a.removeGroupDeleteCompleted(),a.removeGroupDeleteCompleted=a.$on("GroupDeleteCompleted",function(){a.selected_tree_id=1,a.selected_group_id=null,i({scope:a,inventory_id:a.inventory_id,refresh:!0})}),a.removeCopMoveGroup&&a.removeCopyMoveGroup(),a.removeCopyMoveGroup=a.$on("CopyMoveGroup",function(b,c,d){G({scope:a,target_tree_id:d,inbound_tree_id:c})}),a.removeCopMoveHost&&a.removeCopyMoveHost(),a.removeCopyMoveHost=a.$on("CopyMoveHost",function(b,c,d){H({scope:a,target_tree_id:c,host_id:d})}),a.showHosts=function(b,c,d){if(null!==b){j("start"),a.selected_tree_id=b,a.selected_group_id=c,a.hosts=[],a.show_failures=d;for(var e=0;e"+c.name+". Use the Refresh button to monitor the status.","alert-info"):(j("start"),t.setUrl(c.related.inventory_source),t.get().success(function(b){v({scope:a,url:b.related.update,group_name:b.summary_fields.group.name,group_source:b.source,tree_id:c.id,group_id:c.group_id})}).error(function(b,d){j("stop"),u(a,b,d,null,{hdr:"Error!",msg:"Failed to retrieve inventory source: "+c.related.inventory_source+" POST returned status: "+d})}))))},a.cancelUpdate=function(b){z({scope:a,tree_id:b})},a.toggle=function(b){x({scope:a,list:R,id:b})},a.refreshGroups=function(b,c){b&&(a.selected_tree_id=b,a.selected_group_id=c),i({scope:a,inventory_id:a.inventory_id,refresh:!0})},a.viewUpdateStatus=function(b,c){y({scope:a,tree_id:b,group_id:c})},a.deleteGroup=function(b,c){p({scope:a,tree_id:b,group_id:c,inventory_id:a.inventory_id})},a.createHost=function(){B({scope:a})},a.editInventoryProperties=function(){C({scope:a,inventory_id:a.inventory_id})},a.editHost=function(b){D({scope:a,host_id:b,inventory_id:a.inventory_id})},a.deleteHost=function(b,c){E({scope:a,host_id:b,host_name:c})},a.toggleHostEnabled=function(b,c){F({scope:a,host_id:b,external_source:c})},a.showGroupActivity=function(){var b,c,d;a.selected_group_id?(d=A({list:a.groups,key:"id",val:a.selected_tree_id}),b=J("activity_stream")+"?group__id="+a.selected_group_id,c="Showing all activities for group "+d.name):(c="Showing all activities for all "+a.inventory_name+" groups",b=J("activity_stream")+"?group__inventory__id="+a.inventory_id),I({scope:a,inventory_name:a.inventory_name,url:b,title:c})},a.showHostActivity=function(){var b,c;c="Showing all activities for all "+a.inventory_name+" hosts",b=J("activity_stream")+"?host__inventory__id="+a.inventory_id,I({scope:a,inventory_name:a.inventory_name,url:b,title:c})},a.showJobSummary=function(a){K({job_id:a})},a.showGroupHelp=function(a){var b={defn:O};a&&(b.autoShow=a.autoShow||!1),N(b)},i({scope:a,inventory_id:a.inventory_id,refresh:!1})}function JobEventsList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){function y(a){var b,c,d,e,f,g="",h=!1;if(a.res){if("string"==typeof a.res)c=a.res.match(/\n/g),d=c?c.length:1,d=d>10?10:d,h=!0,g+='
\n',g+="\n",g+='\n",g+="
\n";else for(e in a.res){if(("msg"===e||"stdout"===e||"stderr"===e)&&null!==a.res[e]&&""!==a.res[e]){switch(g+='
\n',g+="\n",c=a.res[e].match(/\n/g),d=c?c.length:1,d=d>10?10:d,g+='\n",g+="
\n",h=!0}if("results"===e&&Array.isArray(a.res[e])&&a.res[e].length>0){for(f="",b=0;b10?10:d,""!==f&&(g+='
\n',g+="\n",g+='\n",g+="
\n",h=!0)}"rc"===e&&""!==a.res[e]&&(g+='
\n',g+="\n",g+='\n',g+="
\n",h=!0)}g=h?'
\n'+g+"
\n":""}return g=a.hosts?''+a.host+"\n"+g:""===g?null:g}p();var z,A=i,B=r("jobs")+f.id+"/job_events/",C=j;C.inject(A,{mode:"edit",scope:b}),A.base=d.path(),b.job_id=f.id,c.flashMessage=null,b.selected=[],b.expand=!0,b.parentNode="parent-event",b.childNode="child-event",b.removeSetHostLinks&&b.removeSetHostLinks(),b.removeSetHostLinks=b.$on("SetHostLinks",function(a,c){for(var d=0;d15?5:g,$('textarea[name="'+d+'"]').attr("rows",g)));break;case"module_name":case"module_args":b.event_data.res&&b.event_data.res.invocation&&(a[d]=b.event_data.res.invocation.fld)}q("stop")}).error(function(b){k(a,b,status,null,{hdr:"Error!",msg:"Failed to retrieve host: "+f.event_id+". GET status: "+status})}),a.navigateBack=function(){var a="/jobs/"+f.job_id+"/job_events";f.page&&(a+="?page="+f.page),d.url(a)},a.rawView=function(){p({event_id:a.id})}}function JobHostSummaryList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){o();var u=h,v=c.path().replace(/^\//,"").split("/")[0],w=q(v)+e.id+"/job_host_summaries/",x=i,y=x.inject(u,{mode:"edit"});u.index="hosts"===v?!1:!0,a.selected=[],"hosts"===v?(a.job_id=null,a.host_id=e.id):(a.job_id=e.id,a.host_id=null),a.RemoveSetHostLink&&a.RemoveSetHostLink(),a.RemoveSetHostLink=a.$on("setHostLink",function(b,c){for(var d=0;d0?a.jobhosts[0].summary_fields.host.name:"Host"}),e.inventory&&a.$emit("setHostLink",e.inventory))}),l({scope:y,set:"jobhosts",list:u,url:w}),m({scope:y,list:u,url:w}),e.host_name&&(y[u.iterator+"SearchField"]="host",y[u.iterator+"SearchValue"]=e.host_name,y[u.iterator+"SearchFieldLabel"]=u.fields.host.label),a.search(u.iterator),a.showEvents=function(a,b){f.setUrl(b),f.get().success(function(b){j({path:"/jobs/"+b.id,title:b.name}),c.url("/jobs/"+b.id+"/job_events/?host="+encodeURI(a))}).error(function(a,c){p(y,a,c,null,{hdr:"Error!",msg:"Failed to lookup last job: "+b+". GET status: "+c})})},a.showJob=function(a){c.path("/jobs/"+a)},a.refresh=function(){null===a.host_id&&(a.jobSearchSpin=!0,a.jobLoading=!0,t("start"),r({scope:y,set:"jobhosts",iterator:"jobhost",url:a.current_url}))}}function JobTemplatesList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){o();var y=h,z=q("job_templates"),A=i,B=c.path().replace(/^\//,"").split("/")[0],C="job_templates"===B?"edit":"select";A.inject(y,{mode:C,scope:a}),b.flashMessage=null,a.removePostRefresh&&a.removePostRefresh(),a.removePostRefresh=a.$on("PostRefresh",function(){w("stop"),$("#prompt-modal").off()}),l({scope:a,set:"job_templates",list:y,url:z}),m({scope:a,list:y,url:z}),e.name&&(a[y.iterator+"SearchField"]="name",a[y.iterator+"SearchValue"]=e.name,a[y.iterator+"SearchFieldLabel"]=y.fields.name.label),a.search(y.iterator),j(),a.showActivity=function(){x({scope:a})},a.addJobTemplate=function(){c.path(c.path()+"/add")},a.editJobTemplate=function(a){c.path(c.path()+"/"+a)},a.deleteJobTemplate=function(b,c){var d=function(){$("#prompt-modal").on("hidden.bs.modal",function(){w("start")}),$("#prompt-modal").modal("hide");var c=z+b+"/";f.setUrl(c),f.destroy().success(function(){a.search(y.iterator)}).error(function(b){w("stop"),p(a,b,status,null,{hdr:"Error!",msg:"Call to "+c+" failed. DELETE returned status: "+status})})};k({hdr:"Delete",body:"Are you sure you want to delete "+c+"?",action:d})},a.submitJob=function(b){v({scope:a,id:b})}}function JobTemplatesAdd(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w){n();var x,y,z=o("job_templates"),A=g,B=h,C={},D={};B.inject(A,{mode:"add",related:!1,scope:a}),a.parseType="yaml",u(a),a.job_type_options=[{value:"run",label:"Run"},{value:"check",label:"Check"}],a.verbosity_options=[{value:"0",label:"Default"},{value:"1",label:"Verbose"},{value:"3",label:"Debug"}],a.playbook_options=[],a.allow_callbacks="false",B.reset(),l(),t({scope:a,master:C,check_field:"allow_callbacks",default_val:!1}),s({scope:a,form:A,current_item:null,list:p,field:"inventory"}),jQuery.extend(!0,D,q),D.name="cloudcredentials",D.iterator="cloudcredential",s({url:o("credentials")+"?cloud=true",scope:a,form:A,current_item:null,list:D,field:"cloud_credential",hdr:"Select Cloud Credential"}),s({url:o("credentials")+"?kind=ssh",scope:a,form:A,current_item:null,list:q,field:"credential",hdr:"Select Machine Credential"}),x=function(b,c){var d;b!==c&&a.project&&(v("start"),d=o("projects")+a.project+"/playbooks/",i.setUrl(d),i.get().success(function(b){var c,d=[];for(c=0;c=2)for(var b in N)a.search(N[b].iterator)}),a.removeRelatedJobs&&a.removeRelatedJobs(),a.removeRelatedJobs=a.$on("relatedjobs",function(){var b,c;if(a.jobs&&a.jobs.length)for(b=0;b0)for(d=0;d/g," ");for(y in z.fields.status.searchOptions)if(z.fields.status.searchOptions[y].value===e.status){a[z.iterator+"SearchSelectValue"]=z.fields.status.searchOptions[y];break}}a.search(z.iterator),j(),a.refresh=function(){x("start"),a.jobLoading=!1,u({scope:a,set:"jobs",iterator:"job",url:a.current_url})},a.refreshJob=a.refresh,a.editJob=function(a,b){j({path:"/jobs/"+a,title:a+" - "+b}),c.path(c.path()+"/"+a)},a.viewEvents=function(a,b){j({path:"/jobs/"+a,title:a+" - "+b}),c.path(c.path()+"/"+a+"/job_events")},a.viewSummary=function(a,b){j({path:"/jobs/"+a,title:a+" - "+b}),c.path(c.path()+"/"+a+"/job_host_summaries")},a.deleteJob=function(b){f.setUrl(A+b+"/"),f.get().success(function(c){var d,e,g,h;"pending"===c.status||"running"===c.status||"waiting"===c.status?(e=c.related.cancel,g="cancel",h="Cancel Job"):(e=A+b+"/",g="delete",h="Delete Job"),d=function(){f.setUrl(e),"cancel"===g?f.post().success(function(){$("#prompt-modal").modal("hide"),a.search(z.iterator)}).error(function(b,c){$("#prompt-modal").modal("hide"),p(a,b,c,null,{hdr:"Error!",msg:"Call to "+e+" failed. POST returned status: "+c})}):f.destroy().success(function(){$("#prompt-modal").modal("hide"),a.search(z.iterator)}).error(function(b,c){$("#prompt-modal").modal("hide"),p(a,b,c,null,{hdr:"Error!",msg:"Call to "+e+" failed. DELETE returned status: "+c})})},k({hdr:h,body:"Are you sure you want to "+g+" job "+b+"?",action:d})}).error(function(b,c){p(a,b,c,null,{hdr:"Error!",msg:"Failed to get job details. GET returned status: "+c})})},a.submitJob=function(b,c){s({scope:a,id:b,template:c})}}function JobsEdit(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z){function A(b){if(null!==b&&""!==b&&void 0!==b){var c=v("projects")+b+"/playbooks/";i.setUrl(c),i.get().success(function(b){a.playbook_options=[];for(var c=0;c15?15:c}p();var C=v("jobs"),D=h,E=g,F={},G=f.id,H={},I=0;D.inject(E,{mode:"edit",related:!0,scope:a}),D.reset(),a.job_id=G,a.parseType="yaml",a.statusSearchSpin=!1,a.jobLoadedRemove&&a.jobLoadedRemove(),a.jobLoadedRemove=a.$on("jobLoaded",function(b,c){A(a.project),a[E.name+"ReadOnly"]="new"===a.status?!1:!0,$("#forks-slider").slider("option","value",a.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"),i.setUrl(a.template_url),i.get().success(function(b){var c=b.host_config_key?"true":"false";a.host_config_key=b.host_config_key,w({scope:a,master:F,check_field:"allow_callbacks",default_val:c}),a.callback_url=b.related?b.related.callback:"<< Job template not found >>",a.$emit("jobTemplateLoadFinished")}).error(function(){z("stop"),a.callback_url="<< Job template not found >>"}),c?(i.setUrl(c),i.get().success(function(b){a.cloud_credential_name=b.name,a.$emit("jobTemplateLoadFinished")}).error(function(b,c){k(a,b,c,null,{hdr:"Error!",msg:"Failed to related cloud credential. GET returned status: "+c})})):a.$emit("jobTemplateLoadFinished")}),a.removeJobTemplateLoadFinished&&a.removeJobTemplateLoadFinished(),a.removeJobTemplateLoadFinished=a.$on("jobTemplateLoadFinished",function(){I++,I>=3&&z("stop")}),a.job_type_options=[{value:"run",label:"Run"},{value:"check",label:"Check"}],a.verbosity_options=[{value:"0",label:"Default"},{value:"1",label:"Verbose"},{value:"3",label:"Debug"}],a.playbook_options=null,a.playbook=null,z("start"),i.setUrl(C+":id/"),i.get({params:{id:G}}).success(function(b){var c,d,e,f,g,h;l();for(e in E.fields){if("variables"!==e&&null!==b[e]&&void 0!==b[e]){if("select"===E.fields[e].type)if(a[e+"_options"]&&a[e+"_options"].length>0)for(c=0;c/g," ");for(b in A.fields.scm_type.searchOptions)if(A.fields.scm_type.searchOptions[b].value===e.scm_type){a[A.iterator+"SearchSelectValue"]=A.fields.scm_type.searchOptions[b];break}}else if(e.status){a[A.iterator+"SearchValue"]=e.status,a[A.iterator+"SearchField"]="status",a[A.iterator+"SelectShow"]=!0,a[A.iterator+"SearchFieldLabel"]=A.fields.status.label,a[A.iterator+"SearchSelectOpts"]=A.fields.status.searchOptions;for(b in A.fields.status.searchOptions)if(A.fields.status.searchOptions[b].value===e.status){a[A.iterator+"SearchSelectValue"]=A.fields.status.searchOptions[b];break}}a.search(A.iterator)}),a.removeChoicesReady&&a.removeChoicesReady(),a.removeChoicesReady=a.$on("choicesReadyProject",function(){G++,2===G&&a.$emit("choicesCompleteProject")}),y({scope:a,url:B,field:"status",variable:"project_status_options",callback:"choicesReadyProject"}),y({scope:a,url:B,field:"scm_type",variable:"project_scm_type_options",callback:"choicesReadyProject"}),j(),a.showActivity=function(){x({scope:a})},a.addProject=function(){c.path(c.path()+"/add")},a.editProject=function(a){c.path(c.path()+"/"+a)},a.showSCMStatus=function(b){var c,d=a.$on("PostRefresh",function(){var e;for(c=0;cRefresh button to view the latest status.","alert-info")}).error(function(b,c){p(a,b,c,null,{hdr:"Error!",msg:"Call to "+d+" failed. GET status: "+c})})}),a.cancelUpdate=function(b,c){var d,e,h=!1;for(d=0;dRefresh button to view the latet status.","alert-info")},a.refresh=function(){w("start"),a.projectLoading=!1,v({scope:a,set:"projects",iterator:"project",url:a.current_url})},a.SCMUpdate=function(b){var c;for(c=0;cb;b++){for(d[b].match(/[A-Z]/g)?(""!==R&&R+1==b&&(y++,C++),R=b,o++):d[b].match(/[a-z]/g)?(""!==S&&S+1==b&&(z++,C++),S=b,p++):d[b].match(/[0-9]/g)?(b>0&&e-1>b&&s++,""!==T&&T+1==b&&(A++,C++),T=b,q++):d[b].match(/[^a-zA-Z0-9_]/g)&&(b>0&&e-1>b&&s++,""!==U&&U+1==b&&(B++,C++),U=b,r++),f=!1,g=0;e>g;g++)d[b]==d[g]&&b!=g&&(f=!0,x+=Math.abs(e/(g-b)));f&&(w++,v=e-w,x=Math.ceil(v?x/v:x))}for(h=0;23>h;h++)i=ib.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(D++,G++);for(h=0;8>h;h++)i=jb.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(E++,G++);for(h=0;8>h;h++)i=kb.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(F++,G++);o>0&&n>o&&(nScore=parseInt(nScore+2*(n-o)),V="+ "+parseInt(2*(n-o))),p>0&&n>p&&(nScore=parseInt(nScore+2*(n-p)),W="+ "+parseInt(2*(n-p))),q>0&&n>q&&(nScore=parseInt(nScore+q*P),X="+ "+parseInt(q*P)),r>0&&(nScore=parseInt(nScore+r*Q),Y="+ "+parseInt(r*Q)),s>0&&(nScore=parseInt(nScore+s*H),Z="+ "+parseInt(s*H)),(p>0||o>0)&&0===r&&0===q&&(nScore=parseInt(nScore-n),t=n,_="- "+n),0===p&&0===o&&0===r&&q>0&&(nScore=parseInt(nScore-n),u=n,ab="- "+n),w>0&&(nScore=parseInt(nScore-x),bb="- "+x),y>0&&(nScore=parseInt(nScore-y*I),cb="- "+parseInt(y*I)),z>0&&(nScore=parseInt(nScore-z*J),db="- "+parseInt(z*J)),A>0&&(nScore=parseInt(nScore-A*K),eb="- "+parseInt(A*K)),D>0&&(nScore=parseInt(nScore-D*L),fb="- "+parseInt(D*L)),E>0&&(nScore=parseInt(nScore-E*M),gb="- "+parseInt(E*M)),F>0&&(nScore=parseInt(nScore-F*N),hb="- "+parseInt(F*N)),nScore>100?nScore=100:0>nScore&&(nScore=0),k=$("#progbar"),l=$AnsibleConfig.password_strength,m=$AnsibleConfig.password_strength-15<0?0:$AnsibleConfig.password_strength-15,k.css("width",nScore+"%"),nScore>=0&&m>=nScore?(lb="Weak",k.addClass("progress-bar-danger"),k.removeClass("progress-bar-success progress-bar-warning")):nScore>m&&l>=nScore?(lb="Good",k.addClass("progress-bar-warning"),k.removeClass("progress-bar-success progress-bar-danger")):nScore>l&&(lb="Strong",k.addClass("progress-bar-success"),k.removeClass("progress-bar-warning progress-bar-danger"))}else k=$("#progbar"),k.css("width","0%"),k.removeClass("progress-bar-success progress-bar-warning");return nScore}var urlPrefix=$basePath;angular.module("ansible",["ngRoute","ngSanitize","ngCookies","RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"})}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login"));var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var urlPrefix=$basePath;angular.module("ansible",["RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"})}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login")); -var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var urlPrefix=$basePath;angular.module("ansible",["RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"})}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login"));var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var urlPrefix=$basePath;angular.module("ansible",["RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"})}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login"));var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var urlPrefix=$basePath;angular.module("ansible",["RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"})}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login"));var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var $AnsibleConfig={tooltip_delay:{show:500,hide:100},debug_mode:!0,password_strength:45,session_timeout:1800};AdminsList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","AdminList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","GetBasePath","SelectionInit"],Authenticate.$inject=["$cookieStore","$window","$scope","$rootScope","$location","Authorization","ToggleClass","Alert","Wait","Timer","Empty"],CredentialsList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","CredentialList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","SelectionInit","GetChoices","Wait","Stream"],CredentialsAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","CredentialForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GenerateList","SearchInit","PaginateInit","LookUpInit","UserList","TeamList","GetBasePath","GetChoices","Empty","KindChange","OwnerChange","FormSave"],CredentialsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","CredentialForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","ReturnToCaller","ClearScope","Prompt","GetBasePath","GetChoices","KindChange","UserList","TeamList","LookUpInit","Empty","OwnerChange","FormSave","Stream","Wait"],Home.$inject=["$scope","$compile","$routeParams","$rootScope","$location","Wait","ObjectCount","JobStatus","InventorySyncStatus","SCMSyncStatus","ClearScope","Stream","Rest","GetBasePath","ProcessErrors","Button"],HomeGroups.$inject=["$location","$routeParams","HomeGroupList","GenerateList","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GetBasePath","SearchInit","PaginateInit","FormatDate","GetHostsStatusMsg","GetSyncStatusMsg","ViewUpdateStatus","Stream","GroupsEdit","Wait","Alert","Rest","Empty","InventoryUpdate","Find"],HomeHosts.$inject=["$location","$routeParams","HomeHostList","GenerateList","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GetBasePath","SearchInit","PaginateInit","FormatDate","SetStatus","ToggleHostEnabled","HostsEdit","Stream","Find","ShowJobSummary"],InventoriesList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","InventoryList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","Wait","Stream","EditInventoryProperties"],InventoriesAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","InventoryForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GenerateList","OrganizationList","SearchInit","PaginateInit","LookUpInit","GetBasePath","ParseTypeChange","Wait"],InventoriesEdit.$inject=["$scope","$location","$routeParams","$compile","GenerateList","ClearScope","InventoryGroups","InventoryHosts","BuildTree","Wait","GetSyncStatusMsg","InjectHosts","HostsReload","GroupsAdd","GroupsEdit","GroupsDelete","Breadcrumbs","LoadBreadCrumbs","Empty","Rest","ProcessErrors","InventoryUpdate","Alert","ToggleChildren","ViewUpdateStatus","GroupsCancelUpdate","Find","HostsCreate","EditInventoryProperties","HostsEdit","HostsDelete","ToggleHostEnabled","CopyMoveGroup","CopyMoveHost","Stream","GetBasePath","ShowJobSummary","ApplyEllipsis","WatchInventoryWindowResize","HelpDialog","InventoryGroupsHelp","Store"],JobEventsList.$inject=["$filter","$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","JobEventList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","LookUpInit","ToggleChildren","FormatDate","EventView","Refresh","Wait"],JobEventsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","JobEventsForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ClearScope","GetBasePath","FormatDate","EventView","Wait"],JobHostSummaryList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","JobHostList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","Refresh","JobStatusToolTip","Wait"],JobTemplatesList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","JobTemplateList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","PromptPasswords","JobTemplateForm","CredentialList","LookUpInit","SubmitJob","Wait","Stream"],JobTemplatesAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","JobTemplateForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GetBasePath","InventoryList","CredentialList","ProjectList","LookUpInit","md5Setup","ParseTypeChange","Wait","Empty"],JobTemplatesEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","JobTemplateForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","ReturnToCaller","ClearScope","InventoryList","CredentialList","ProjectList","LookUpInit","PromptPasswords","GetBasePath","md5Setup","ParseTypeChange","JobStatusToolTip","FormatDate","Wait","Stream","Empty","Prompt"],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"],JobsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","JobForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","ReturnToCaller","ClearScope","InventoryList","CredentialList","ProjectList","LookUpInit","PromptPasswords","GetBasePath","md5Setup","FormatDate","JobStatusToolTip","Wait"],OrganizationsList.$inject=["$routeParams","$scope","$rootScope","$location","$log","Rest","Alert","LoadBreadCrumbs","Prompt","GenerateList","OrganizationList","SearchInit","PaginateInit","ClearScope","ProcessErrors","GetBasePath","SelectionInit","Wait","Stream"],OrganizationsAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","OrganizationForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ClearScope","GetBasePath","ReturnToCaller","Wait"],OrganizationsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","OrganizationForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","Prompt","ClearScope","GetBasePath","Wait","Stream"],PermissionsList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","PermissionList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","CheckAccess","Wait"],PermissionsAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","PermissionsForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ClearScope","GetBasePath","ReturnToCaller","InventoryList","ProjectList","LookUpInit","CheckAccess","Wait","PermissionCategoryChange"],PermissionsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","PermissionsForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","Prompt","GetBasePath","InventoryList","ProjectList","LookUpInit","CheckAccess","Wait","PermissionCategoryChange"],ProjectsList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","ProjectList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","SelectionInit","ProjectUpdate","ProjectStatus","FormatDate","Refresh","Wait","Stream","GetChoices","Empty"],ProjectsAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","ProjectsForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ClearScope","GetBasePath","ReturnToCaller","GetProjectPath","LookUpInit","OrganizationList","CredentialList","GetChoices","DebugForm","Wait"],ProjectsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","ProjectsForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","Prompt","ClearScope","GetBasePath","ReturnToCaller","GetProjectPath","Authorization","CredentialList","LookUpInit","GetChoices","Empty","DebugForm","Wait","Stream"],TeamsList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","TeamList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","SetTeamListeners","GetBasePath","SelectionInit","Wait","Stream"],TeamsAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","TeamForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GenerateList","OrganizationList","SearchInit","PaginateInit","GetBasePath","LookUpInit","Wait"],TeamsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","TeamForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","ReturnToCaller","ClearScope","LookUpInit","Prompt","GetBasePath","CheckAccess","OrganizationList","Wait","Stream"],UsersList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","UserList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","SelectionInit","Wait","Stream"],UsersAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","UserForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GetBasePath","LookUpInit","OrganizationList","ResetForm","Wait"],UsersEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","UserForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","ReturnToCaller","ClearScope","GetBasePath","Prompt","CheckAccess","ResetForm","Wait","Stream"],angular.module("ActivityDetailDefinition",[]).value("ActivityDetailForm",{name:"activity",editTitle:"Activity Detail",well:!1,"class":"horizontal-narrow",formFieldSize:"col-lg-10",formLabelSize:"col-lg-2",fields:{user:{label:"Initiated by",type:"text",readonly:!0},operation:{label:"Action",type:"text",readonly:!0},changes:{label:"Changes",type:"textarea",ngHide:"!changes || changes =='' || changes == 'null'",readonly:!0}}}),angular.module("CredentialFormDefinition",[]).value("CredentialForm",{addTitle:"Create Credential",editTitle:"{{ name }}",name:"credential",well:!0,forceListeners:!0,actions:{stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"edit"}},fields:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,autocomplete:!1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1},owner:{label:"Does this credential belong to a team or user?",type:"radio_group",ngChange:"ownerChange()",options:[{label:"User",value:"user",selected:!0},{label:"Team",value:"team"}],awPopOver:"

A credential must be associated with either a user or a team. Choosing a user allows only the selected user access to the credential. Choosing a team shares the credential with all team members.

",dataTitle:"Owner",dataPlacement:"right",dataContainer:"body"},user:{label:"User that owns this credential",type:"lookup",sourceModel:"user",sourceField:"username",ngClick:"lookUpUser()",ngShow:"owner == 'user'",awRequiredWhen:{variable:"user_required",init:"false"}},team:{label:"Team that owns this credential",type:"lookup",sourceModel:"team",sourceField:"name",ngClick:"lookUpTeam()",ngShow:"owner == 'team'",awRequiredWhen:{variable:"team_required",init:"false"}},kind:{label:"Type",excludeModal:!0,type:"select",ngOptions:"kind.label for kind in credential_kind_options",ngChange:"kindChange()",addRequired:!0,editRequired:!0,helpCollapse:[{hdr:"Select a Credential Type",content:"
\n
AWS
\n
Access keys for Amazon Web Services used for inventory management or deployment.
\n
Machine
\n
Authentication for remote machine access. This can include SSH keys, usernames, passwords, and sudo information. Machine credentials are used when submitting jobs to run playbooks against remote hosts.
Rackspace
\n
Access information for Rackspace Cloud used for inventory management or deployment.
\n
SCM
\n
Used to check out and synchronize playbook repositories with a remote source control management system such as Git, Subversion (svn), or Mercurial (hg). These credentials are used on the Projects tab.
\n
\n"}]},access_key:{label:"Access Key",type:"text",ngShow:"kind.value == 'aws'",awRequiredWhen:{variable:"aws_required",init:!1},autocomplete:!1,apiField:"username"},secret_key:{label:"Secret Key",type:"password",ngShow:"kind.value == 'aws'",awRequiredWhen:{variable:"aws_required",init:!1},autocomplete:!1,ask:!1,clear:!1,apiField:"passwowrd"},username:{labelBind:"usernameLabel",type:"text",ngShow:"kind.value && kind.value !== 'aws'",awRequiredWhen:{variable:"rackspace_required",init:!1},autocomplete:!1},api_key:{label:"API Key",type:"password",ngShow:"kind.value == 'rax'",awRequiredWhen:{variable:"rackspace_required",init:!1},autocomplete:!1,ask:!1,clear:!1,apiField:"passwowrd"},password:{label:"Password",type:"password",ngShow:"kind.value == 'scm'",addRequired:!1,editRequired:!1,ngChange:"clearPWConfirm('password_confirm')",ask:!1,clear:!1,associated:"password_confirm",autocomplete:!1},password_confirm:{label:"Confirm Password",type:"password",ngShow:"kind.value == 'scm'",addRequired:!1,editRequired:!1,awPassMatch:!0,associated:"password",autocomplete:!1},ssh_password:{label:"SSH Password",type:"password",ngShow:"kind.value == 'ssh'",ngChange:"clearPWConfirm('ssh_password_confirm')",addRequired:!1,editRequired:!1,ask:!0,clear:!0,associated:"ssh_password_confirm",autocomplete:!1},ssh_password_confirm:{label:"Confirm SSH Password",type:"password",ngShow:"kind.value == 'ssh'",addRequired:!1,editRequired:!1,awPassMatch:!0,associated:"ssh_password",autocomplete:!1},ssh_key_data:{labelBind:"sshKeyDataLabel",type:"textarea",ngShow:"kind.value == 'ssh' || kind.value == 'scm'",addRequired:!1,editRequired:!1,"class":"ssh-key-field",rows:10},ssh_key_unlock:{label:"Key Password",type:"password",ngShow:"kind.value == 'ssh' || kind.value == 'scm'",addRequired:!1,editRequired:!1,ngChange:"clearPWConfirm('ssh_key_unlock_confirm')",associated:"ssh_key_unlock_confirm",ask:!0,askShow:"kind.value == 'ssh'",clear:!0},ssh_key_unlock_confirm:{label:"Confirm Key Password",type:"password",ngShow:"kind.value == 'ssh' || kind.value == 'scm'",addRequired:!1,editRequired:!1,awPassMatch:!0,associated:"ssh_key_unlock"},sudo_username:{label:"Sudo Username",type:"text",ngShow:"kind.value == 'ssh'",addRequired:!1,editRequired:!1,autocomplete:!1},sudo_password:{label:"Sudo Password",type:"password",ngShow:"kind.value == 'ssh'",addRequired:!1,editRequired:!1,ngChange:"clearPWConfirm('sudo_password_confirm')",ask:!0,clear:!0,associated:"sudo_password_confirm",autocomplete:!1},sudo_password_confirm:{label:"Confirm Sudo Password",type:"password",ngShow:"kind.value == 'ssh'",addRequired:!1,editRequired:!1,awPassMatch:!0,associated:"sudo_password",autocomplete:!1}},buttons:{save:{label:"Save",ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("GroupFormDefinition",[]).value("GroupForm",{addTitle:"Create Group",editTitle:"Edit Group",showTitle:!0,cancelButton:!1,name:"group",well:!0,formLabelSize:"col-lg-3",formFieldSize:"col-lg-9",tabs:[{name:"properties",label:"Properties"},{name:"source",label:"Source"}],fields:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,tab:"properties"},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1,tab:"properties"},variables:{label:"Variables",type:"textarea",addRequired:!1,editRequird:!1,rows:6,"default":"---",dataTitle:"Group Variables",dataPlacement:"right",awPopOver:'

Variables defined here apply to all child groups and hosts.

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n

View JSON examples at www.json.org

View YAML examples at docs.ansible.com

',dataContainer:"body",tab:"properties"},source:{label:"Source",type:"select",ngOptions:"source.label for source in source_type_options",ngChange:"sourceChange()",addRequired:!1,editRequired:!1,tab:"source"},source_path:{label:"Script Path",ngShow:"source && source.value == 'file'",type:"text",awRequiredWhen:{variable:"sourcePathRequired",init:"false"},tab:"source"},credential:{label:"Cloud Credential",type:"lookup",ngShow:"source && source.value !== ''",sourceModel:"credential",sourceField:"name",ngClick:"lookUpCredential()",addRequired:!1,editRequired:!1,tab:"source"},source_regions:{label:"Regions",type:"text",ngShow:"source && (source.value == 'rax' || source.value == 'ec2')",addRequired:!1,editRequired:!1,awMultiselect:"source_region_choices",dataTitle:"Source Regions",dataPlacement:"right",awPopOver:"

Click on the regions field to see a list of regions for your cloud provider. You can select multiple regions, or choose All to include all regions. Tower will only be updated with Hosts associated with the selected regions.

",dataContainer:"body",tab:"source"},source_vars:{label:"Source Variables",ngShow:"source && (source.value == 'file' || source.value == 'ec2')",type:"textarea",addRequired:!1,editRequird:!1,rows:6,"default":"---",parseTypeName:"envParseType",dataTitle:"Source Variables",dataPlacement:"right",awPopOver:'

Override variables found in ec2.ini and used by the inventory update script. For a detailed description of these variables view ec2.ini in the Ansible github repo.

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n

View JSON examples at www.json.org

View YAML examples at docs.ansible.com

',dataContainer:"body",tab:"source"},checkbox_group:{label:"Update Options",type:"checkbox_group",ngShow:"source && (source.value !== '' && source.value !== null)",tab:"source",fields:[{name:"overwrite",label:"Overwrite",type:"checkbox",ngShow:"source.value !== '' && source.value !== null",addRequired:!1,editRequired:!1,awPopOver:"

When checked all child groups and hosts not found on the remote source will be deleted from the local inventory.

Unchecked any local child hosts and groups not found on the external source will remain untouched by the inventory update process.

",dataTitle:"Overwrite",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"},{name:"overwrite_vars",label:"Overwrite Variables",type:"checkbox",ngShow:"source.value !== '' && source.value !== null",addRequired:!1,editRequired:!1,awPopOver:"

If checked, all variables for child groups and hosts will be removed and replaced by those found on the external source.

When not checked a merge will be performed, combining local variables with those found on the external source.

",dataTitle:"Overwrite Variables",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"},{name:"update_on_launch",label:"Update on Launch",type:"checkbox",ngShow:"source.value !== '' && source.value !== null",addRequired:!1,editRequired:!1,awPopOver:"

Each time a job runs using this inventory, refresh the inventory from the selected source before executing job tasks.

",dataTitle:"Update on Launch",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"}]}},buttons:{labelClass:"col-lg-3",controlClass:"col-lg-5",save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("HostGroupsFormDefinition",[]).value("HostGroupsForm",{editTitle:"Host Groups",name:"host",well:!1,formLabelSize:"col-lg-3",formFieldSize:"col-lg-9",fields:{groups:{label:"Groups",type:"select",multiple:!0,ngOptions:"group.name for group in inventory_groups",addRequired:!0,editRequired:!0,awPopOver:"

Provide a host name, ip address, or ip address:port. Examples include:

myserver.domain.com
127.0.0.1
10.1.0.140:25
server.example.com:25
",dataTitle:"Host Name",dataPlacement:"right",dataContainer:"#form-modal .modal-content"}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("HostFormDefinition",[]).value("HostForm",{addTitle:"Create Host",editTitle:"{{ name }}",name:"host",well:!1,formLabelSize:"col-lg-3",formFieldSize:"col-lg-9",fields:{name:{label:"Host Name",type:"text",addRequired:!0,editRequired:!0,awPopOver:"

Provide a host name, ip address, or ip address:port. Examples include:

myserver.domain.com
127.0.0.1
10.1.0.140:25
server.example.com:25
",dataTitle:"Host Name",dataPlacement:"right",dataContainer:"#form-modal .modal-content"},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1},enabled:{label:"Enabled?",type:"checkbox",addRequired:!1,editRequired:!1,"default":!0,awPopOver:"

Indicates if a host is available and should be included in running jobs.

For hosts that are part of an external inventory, this flag cannot be changed. It will be set by the inventory sync process.

",dataTitle:"Host Enabled",dataPlacement:"right",dataContainer:"#form-modal .modal-content",ngDisabled:"has_inventory_sources == true"},variables:{label:"Variables",type:"textarea",addRequired:!1,editRequird:!1,rows:6,"class":"modal-input-xlarge","default":"---",awPopOver:'

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n

View JSON examples at www.json.org

View YAML examples at docs.ansible.com

',dataTitle:"Host Variables",dataPlacement:"right",dataContainer:"#form-modal .modal-content"},inventory:{type:"hidden",includeOnEdit:!0,includeOnAdd:!0}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("InventoryFormDefinition",[]).value("InventoryForm",{addTitle:"Create Inventory",editTitle:"{{ inventory_name | capitalize }}",name:"inventory",well:!0,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:{inventory_name:{realName:"name",label:"Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!1},inventory_description:{realName:"description",label:"Description",type:"text",addRequired:!1,editRequired:!1},organization:{label:"Organization",type:"lookup",sourceModel:"organization",sourceField:"name",ngClick:"lookUpOrganization()",awRequiredWhen:{variable:"organizationrequired",init:"true"}},inventory_variables:{realName:"variables",label:"Variables",type:"textarea","class":"span12",addRequired:!1,editRequird:!1,parseTypeName:"inventoryParseType",rows:6,"default":"---",awPopOver:'

Enter inventory variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n

View JSON examples at www.json.org

View YAML examples at docs.ansible.com

',dataTitle:"Inventory Variables",dataPlacement:"right",dataContainer:"body"}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("JobEventDataDefinition",[]).value("JobEventDataForm",{editTitle:"{{ id }} - {{ event_display }}",name:"job_events",well:!1,"class":"horizontal-narrow",fields:{event_data:{label:!1,type:"textarea",readonly:!0,rows:18,"class":"modal-input-xxlarge"}}}),angular.module("JobEventsFormDefinition",[]).value("JobEventsForm",{name:"job_events",well:!1,forceListeners:!0,fields:{status:{labelClass:"job-{{ status }}",type:"custom",section:"Event",control:'
{{ status }}
'},id:{label:"ID",type:"text",readonly:!0,section:"Event","class":"span1"},created:{label:"Created On",type:"text",section:"Event",readonly:!0},host:{label:"Host",type:"text",readonly:!0,section:"Event",ngShow:"host !== ''"},play:{label:"Play",type:"text",readonly:!0,section:"Event",ngShow:"play !== ''"},task:{label:"Task",type:"text",readonly:!0,section:"Event",ngShow:"task !== ''"},rc:{label:"Return Code",type:"text",readonly:!0,section:"Results","class":"span1",ngShow:"rc !== ''"},msg:{label:"Msg",type:"textarea",readonly:!0,section:"Results","class":"nowrap",ngShow:"msg !== ''",rows:10},stdout:{label:"Std Out",type:"textarea",readonly:!0,section:"Results","class":"nowrap",ngShow:"stdout !== ''",rows:10},stderr:{label:"Std Err",type:"textarea",readonly:!0,section:"Results","class":"nowrap",ngShow:"stderr !== ''",rows:10},results:{label:"Results",type:"textarea",section:"Results",readonly:!0,"class":"nowrap",ngShow:"results !== ''",rows:10},start:{label:"Start",type:"text",readonly:!0,section:"Timing",ngShow:"start !== ''"},traceback:{label:!1,type:"textarea",readonly:!0,section:"Traceback","class":"nowrap",ngShow:"traceback !== ''",rows:10},end:{label:"End",type:"text",readonly:!0,section:"Timing",ngShow:"end !== ''"},delta:{label:"Elapsed",type:"text",readonly:!0,section:"Timing",ngShow:"delta !== ''"},module_name:{label:"Name",type:"text",readonly:!0,section:"Module",ngShow:"module_name !== ''"},module_args:{label:"Args",type:"text",readonly:!0,section:"Module",ngShow:"module_args !== ''"}}}),angular.module("JobSummaryDefinition",[]).value("JobSummary",{editTitle:"{{ id }} - {{ name }}",name:"jobs",well:!1,fields:{status:{type:"custom",control:'
Status {{ status }}
',readonly:!0},created:{label:"Created On",type:"text",readonly:!0},result_stdout:{label:"Standard Out",type:"textarea",readonly:!0,xtraWide:!0,rows:"{{ stdout_rows }}","class":"nowrap mono-space resizable",ngShow:'result_stdout != ""'},result_traceback:{label:"Traceback",type:"textarea",xtraWide:!0,readonly:!0,rows:"{{ traceback_rows }}","class":"nowrap mono-space resizable",ngShow:'result_traceback != ""'}}}),angular.module("JobTemplateFormDefinition",[]).value("JobTemplateForm",{addTitle:"Create Job Templates",editTitle:"{{ name }}",name:"job_templates",twoColumns:!0,well:!0,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:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,column:1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1,column:1},job_type:{label:"Job Type",type:"select",ngOptions:"type.label for type in job_type_options","default":0,addRequired:!0,editRequired:!0,column:1,awPopOver:"

When this template is submitted as a job, setting the type to run will execute the playbook, running tasks on the selected hosts.

Setting the type to check will not execute the playbook. Instead, ansible will check playbook syntax, test environment setup and report problems.

",dataTitle:"Job Type",dataPlacement:"right",dataContainer:"body"},inventory:{label:"Inventory",type:"lookup",sourceModel:"inventory",sourceField:"name",ngClick:"lookUpInventory()",awRequiredWhen:{variable:"inventoryrequired",init:"true"},column:1,awPopOver:"

Select the inventory containing the hosts you want this job to manage.

",dataTitle:"Inventory",dataPlacement:"right",dataContainer:"body"},project:{label:"Project",type:"lookup",sourceModel:"project",sourceField:"name",ngClick:"lookUpProject()",awRequiredWhen:{variable:"projectrequired",init:"true"},column:1,awPopOver:"

Select the project containing the playbook you want this job to execute.

",dataTitle:"Project",dataPlacement:"right",dataContainer:"body"},playbook:{label:"Playbook",type:"select",ngOptions:"book for book in playbook_options",id:"playbook-select",awRequiredWhen:{variable:"playbookrequired",init:"true"},column:1,awPopOver:"

Select the playbook to be executed by this job.

",dataTitle:"Playbook",dataPlacement:"right",dataContainer:"body"},credential:{label:"Machine Credential",type:"lookup",sourceModel:"credential",sourceField:"name",ngClick:"lookUpCredential()",addRequired:!1,editRequired:!1,column:1,awPopOver:"

Select the credential you want the job to use when accessing the remote hosts. Choose the credential containing the username and SSH key or password that Ansbile will need to log into the remote hosts.

",dataTitle:"Credential",dataPlacement:"right",dataContainer:"body"},cloud_credential:{label:"Cloud Credential",type:"lookup",sourceModel:"cloud_credential",sourceField:"name",ngClick:"lookUpCloudcredential()",addRequired:!1,editRequired:!1,column:1,awPopOver:"

Selecting an optional cloud credential in the job template will pass along the access credentials to the running playbook, allowing provisioning into the cloud without manually passing parameters to the included modules.

",dataTitle:"Cloud Credential",dataPlacement:"right",dataContainer:"body"},forks:{label:"Forks",id:"forks-number",type:"number",integer:!0,min:0,spinner:!0,"default":"0",addRequired:!1,editRequired:!1,"class":"input-small",column:1,awPopOver:'

The number of parallel or simultaneous processes to use while executing the playbook. 0 signifies the default value from the ansible configuration file.

',dataTitle:"Forks",dataPlacement:"right",dataContainer:"body"},limit:{label:"Limit",type:"text",addRequired:!1,editRequired:!1,column:1,awPopOver:'

Provide a host pattern to further constrain the list of hosts that will be managed or affected by the playbook. Multiple patterns can be separated by ; : or ,

For more information and examples see the Patters top at docs.ansible.com.

',dataTitle:"Limit",dataPlacement:"right",dataContainer:"body"},verbosity:{label:"Verbosity",type:"select",ngOptions:"v.label for v in verbosity_options","default":0,addRequired:!0,editRequired:!0,column:1,awPopOver:"

Control the level of output ansible will produce as the playbook executes.

",dataTitle:"Verbosity",dataPlacement:"right",dataContainer:"body"},variables:{label:"Extra Variables",type:"textarea",rows:6,"class":"span12",addRequired:!1,editRequired:!1,"default":"---",column:2,awPopOver:'

Pass extra command line variables to the playbook. This is the -e or --extra-vars command line parameter for ansible-playbook. Provide key/value pairs using either YAML or JSON.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n',dataTitle:"Extra Variables",dataPlacement:"right",dataContainer:"body"},job_tags:{label:"Job Tags",type:"textarea",rows:1,addRequired:!1,editRequired:!1,"class":"span12",column:2,awPopOver:"

Provide a comma separated list of tags.

\n

Tags are useful when you have a large playbook, and you want to run a specific part of a play or task.

For example, you might have a task consisiting of a long list of actions. Tag values can be assigned to each action. Suppose the actions have been assigned tag values of "configuration", "packages" and "install".

If you just want to run the "configuration" and "packages" actions, you would enter the following here in the Job Tags field:

\n
configuration,packages
\n",dataTitle:"Job Tags",dataPlacement:"right",dataContainer:"body"},allow_callbacks:{label:"Allow Callbacks",type:"checkbox",addRequired:!1,editRequird:!1,trueValue:"true",falseValue:"false",ngChange:"toggleCallback('host_config_key')",column:2,awPopOver:'

Create a callback URL a host can use to contact Tower and request a configuration update using the job template. The URL will look like the following:

\n

http://your.server.com:999/api/v1/job_templates/1/callback/

The request from the host must be a POST. Here is an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n

Note the requesting host must be defined in your inventory. If ansible fails to locate the host either by name or IP address in one of your defined inventories, the request will be denied.

Successful requests will result in an entry on the Jobs tab, where the results and history can be viewed.

',dataPlacement:"right",dataTitle:"Callback URL",dataContainer:"body"},callback_url:{label:"Callback URL",type:"text",addRequired:!1,editRequired:!1,readonly:!0,column:2,required:!1,"class":"span12",awPopOver:'

Using this URL a host can contact Tower and request a configuration update using the job template. The request from the host must be a POST. Here is an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n

Note the requesting host must be defined in your inventory. If ansible fails to locate the host either by name or IP address in one of your defined inventories, the request will be denied.

Successful requests will result in an entry on the Jobs tab, where the results and history can be viewed.

',dataPlacement:"right",dataTitle:"Callback URL",dataContainer:"body"},host_config_key:{label:"Host Config Key",type:"text",ngShow:"allow_callbacks",genMD5:!0,column:2,awPopOver:'

When contacting the Tower server using the callback URL, the calling host must authenticate by including this key in the POST data of the request. Here\'s an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n',dataPlacement:"right",dataContainer:"body"}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{jobs:{type:"collection",title:"Jobs",iterator:"job",index:!1,open:!1,actions:{reset:{dataPlacement:"top",icon:"icon-undo",mode:"all","class":"btn-xs btn-primary",awToolTip:"Reset the search filter",ngClick:"resetSearch('job')",iconSize:"large"}},fields:{id:{label:"Job ID",key:!0,desc:!0,searchType:"int"},created:{label:"Date",link:!1,searchable:!1},status:{label:"Status","class":"job-{{ job.status }}",searchType:"select",linkTo:"{{}} job.statusLinkTo }}",searchOptions:[{name:"new",value:"new"},{name:"waiting",value:"waiting"},{name:"pending",value:"pending"},{name:"running",value:"running"},{name:"successful",value:"successful"},{name:"error",value:"error"},{name:"failed",value:"failed"},{name:"canceled",value:"canceled"}],badgeIcon:"fa icon-job-{{ job.status }}",badgePlacement:"left",badgeToolTip:"{{ job.statusBadgeToolTip }}",badgeTipPlacement:"top",badgeNgHref:"{{ job.statusLinkTo }}",awToolTip:"{{ job.statusBadgeToolTip }}",dataPlacement:"top"}},fieldActions:{edit:{label:"View",ngClick:"edit('jobs', job.id, job.name)",icon:"icon-zoom-in"}}}}}),angular.module("JobFormDefinition",[]).value("JobForm",{addTitle:"Create Job",editTitle:"{{ id }} - {{ name }}",name:"jobs",well:!0,collapse:!0,collapseMode:"edit",collapseTitle:"Job Template",twoColumns:!0,navigationLinks:{details:{href:"/#/jobs/{{ job_id }}",label:"Status",icon:"icon-zoom-in",active:!0,ngShow:"job_id !== null"},events:{href:"/#/jobs/{{ job_id }}/job_events",label:"Events",icon:"icon-list-ul"},hosts:{href:"/#/jobs/{{ job_id }}/job_host_summaries",label:"Host Summary",icon:"icon-laptop"}},fields:{name:{label:"Job Template",type:"text",addRequired:!1,editRequired:!1,readonly:!0,column:1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1,column:1},job_type:{label:"Job Type",type:"select",ngOptions:"type.label for type in job_type_options","default":"run",addRequired:!0,editRequired:!0,awPopOver:"

When this template is submitted as a job, setting the type to run will execute the playbook, running tasks on the selected hosts.

Setting the type to check will not execute the playbook. Instead, ansible will check playbook syntax, test environment setup and report problems.

",dataTitle:"Job Type",dataPlacement:"right",dataContainer:"body",column:1},inventory:{label:"Inventory",type:"lookup",sourceModel:"inventory",sourceField:"name",addRequired:!0,editRequired:!0,ngClick:"lookUpInventory()",column:1,awPopOver:"

Select the inventory containing the hosts you want this job to manage.

",dataTitle:"Inventory",dataPlacement:"right",dataContainer:"body"},project:{label:"Project",type:"lookup",sourceModel:"project",sourceField:"name",addRequired:!0,editRequired:!0,ngClick:"lookUpProject()",column:1,awPopOver:"

Select the project containing the playbook you want this job to execute.

",dataTitle:"Project",dataPlacement:"right",dataContainer:"body"},playbook:{label:"Playbook",type:"select",ngOptions:"book for book in playbook_options",id:"playbook-select",addRequired:!0,editRequired:!0,column:1,awPopOver:"

Select the playbook to be executed by this job.

",dataTitle:"Playbook",dataPlacement:"right",dataContainer:"body"},credential:{label:"Credential",type:"lookup",sourceModel:"credential",sourceField:"name",ngClick:"lookUpCredential()",addRequired:!1,editRequired:!1,column:1,awPopOver:"

Select the credential you want the job to use when accessing the remote hosts. Choose the credential containing the username and SSH key or password that Ansbile will need to log into the remote hosts.

",dataTitle:"Credential",dataPlacement:"right",dataContainer:"body"},cloud_credential:{label:"Cloud Credential",type:"lookup",sourceModel:"cloud_credential",sourceField:"name",ngClick:"lookUpCredential()",addRequired:!1,editRequired:!1,column:1,awPopOver:"

Selecting an optional cloud credential in the job template will pass along the access credentials to the running playbook, allowing provisioning into the cloud without manually passing parameters to the included modules.

",dataTitle:"Cloud Credential",dataPlacement:"right",dataContainer:"body"},forks:{label:"Forks",id:"forks-number",type:"number",integer:!0,min:0,spinner:!0,"class":"input-small","default":"0",addRequired:!1,editRequired:!1,column:1,disabled:!0,awPopOver:"

The number of parallel or simultaneous processes to use while executing the playbook.

",dataContainer:"body",dataTitle:"Forks",dataPlacement:"right"},limit:{label:"Limit",type:"text",addRequired:!1,editRequired:!1,column:1,awPopOver:'

Provide a host pattern to further constrain the list of hosts that will be managed or affected by the playbook. Multiple patterns can be separated by ; : or ,

For more information and examples see the Selecting Targets section under Inventory and Patterns in the Ansible documentation.

',dataContainer:"body",dataTitle:"Limit",dataPlacement:"right"},verbosity:{label:"Verbosity",type:"select",ngOptions:"v.label for v in verbosity_options","default":0,addRequired:!0,editRequired:!0,column:1,awPopOver:"

Control the level of output ansible will produce as the playbook executes.

",dataTitle:"Verbosity",dataPlacement:"right",dataContainer:"body"},variables:{label:"Extra Variables",type:"textarea",rows:6,"class":"span12",addRequired:!1,editRequired:!1,column:2,awPopOver:'

Pass extra command line variables to the playbook. This is the -e or --extra-vars command line parameter for ansible-playbook. Provide key/value pairs using either YAML or JSON.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n',dataTitle:"Extra Variables",dataContainer:"body",dataPlacement:"right"},job_tags:{label:"Job Tags",type:"textarea",rows:1,addRequired:!1,editRequired:!1,"class":"span12",column:2,awPopOver:"

Provide a comma separated list of tags.

\n

Tags are useful when you have a large playbook, and you want to run a specific part of a play or task.

For example, you might have a task consisiting of a long list of actions. Tag values can be assigned to each action. Suppose the actions have been assigned tag values of "configuration", "packages" and "install".

If you just want to run the "configuration" and "packages" actions, you would enter the following here in the Job Tags field:

\n
configuration,packages
\n",dataTitle:"Job Tags",dataContainer:"body",dataPlacement:"right"},allow_callbacks:{label:"Allow Callbacks",type:"checkbox",addRequired:!1,editRequird:!1,trueValue:"true",falseValue:"false",ngChange:"toggleCallback('host_config_key')","class":"span12",column:2,awPopOver:'

Create a callback URL a host can use to contact Tower and request a configuration update using the job template. The URL will look like the following:

\n

http://your.server.com:999/api/v1/job_templates/1/callback/

The request from the host must be a POST. Here is an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n

Note the requesting host must be defined in your inventory. If ansible fails to locate the host either by name or IP address in one of your defined inventories, the request will be denied.

Successful requests will result in an entry on the Jobs tab, where the results and history can be viewed.

',dataPlacement:"right",dataContainer:"body",dataTitle:"Callback URL"},callback_url:{label:"Callback URL",type:"text",addRequired:!1,editRequired:!1,readonly:!0,column:2,required:!1,"class":"span12",awPopOver:'

Using this URL a host can contact Tower and request a configuration update using the job template. The request from the host must be a POST. Here is an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n

Note the requesting host must be defined in your inventory. If ansible fails to locate the host either by name or IP address in one of your defined inventories, the request will be denied.

Successful requests will result in an entry on the Jobs tab, where the results and history can be viewed.

',dataPlacement:"right",dataContainer:"body",dataTitle:"Callback URL"},host_config_key:{label:"Host Config Key",type:"text",ngShow:"allow_callbacks",genMD5:!0,column:2,awPopOver:'

When contacting Tower using the callback URL, the calling host must authenticate by including this key in the POST data of the request. Here\'s an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n',dataPlacement:"right",dataContainer:"body"}},buttons:{save:{label:"Save",icon:"icon-ok","class":"btn-success",ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",label:"Reset",icon:"icon-undo","class":"btn btn-default",ngDisabled:!0}},statusFields:{status:{type:"custom",control:'
Status {{ status }}
',readonly:!0},created:{label:"Created On",type:"text",readonly:!0},result_stdout:{label:"Standard Out",type:"textarea",readonly:!0,xtraWide:!0,rows:"{{ stdout_rows }}","class":"nowrap mono-space",ngShow:"result_stdout != ''"},result_traceback:{label:"Traceback",type:"textarea",xtraWide:!0,readonly:!0,rows:"{{ traceback_rows }}","class":"nowrap mono-space",ngShow:"result_traceback != ''"}},statusActions:{refresh:{dataPlacement:"top",icon:"icon-refresh",iconSize:"large",mode:"all","class":"btn-xs btn-primary",awToolTip:"Refresh the page",ngClick:"refresh()"}}}),angular.module("LicenseFormDefinition",[]).value("LicenseForm",{name:"license",well:!1,forceListeners:!0,fields:{license_status:{type:"custom",control:'
{{ license_status }}
',readonly:!0,section:"License"},license_key:{label:"Key",type:"textarea","class":"modal-input-xlarge",readonly:!0,section:"License"},license_date:{label:"Expires On",type:"text",readonly:!0,section:"License"},time_remaining:{label:"Time Left",type:"text",readonly:!0,section:"License"},available_instances:{label:"Available",type:"text",readonly:!0,section:"Managed Hosts"},current_instances:{label:"Used",type:"text",readonly:!0,section:"Managed Hosts"},free_instances:{label:"Remaining",type:"text",readonly:!0,section:"Managed Hosts",controlNGClass:"free_instances_class",labelNGClass:"free_instances_class"},company_name:{label:"Company",type:"text",readonly:!0,section:"Contact Info"},contact_name:{label:"Contact",type:"text",readonly:!0,section:"Contact Info"},contact_email:{label:"Contact Email",type:"text",readonly:!0,section:"Contact Info"}}}),angular.module("OrganizationFormDefinition",[]).value("OrganizationForm",{addTitle:"Create Organization",editTitle:"{{ name }}",name:"organization",well:!0,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:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{users:{type:"collection",title:"Users",iterator:"user",open:!1,actions:{add:{ngClick:"add('users')",label:"Add",icon:"icon-plus",awToolTip:"Add a new user"}},fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('users', user.id, user.username)",icon:"icon-edit","class":"btn-default",awToolTip:"Edit user"},"delete":{label:"Delete",ngClick:"delete('users', user.id, user.username, 'users')",icon:"icon-trash","class":"btn-danger",awToolTip:"Remove user"}}},admins:{type:"collection",title:"Administrators",iterator:"admin",open:!1,base:"/users",actions:{add:{ngClick:"add('admins')",icon:"icon-plus",label:"Add",awToolTip:"Add new administrator"}},fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('users', admin.id, admin.username)",icon:"icon-edit",awToolTip:"Edit administrator","class":"btn-default"},"delete":{label:"Delete",ngClick:"delete('admins', admin.id, admin.username, 'administrators')",icon:"icon-trash","class":"btn-danger",awToolTip:"Remove administrator"}}}}}),angular.module("PermissionFormDefinition",[]).value("PermissionsForm",{addTitle:"Add Permission",editTitle:"{{ name }}",name:"permission",well:!0,forceListeners:!0,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:{category:{label:"Permission Type",labelClass:"prepend-asterisk",type:"radio_group",options:[{label:"Inventory",value:"Inventory",selected:!0},{label:"Deployment",value:"Deploy"}],ngChange:"selectCategory()"},name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1},user:{label:"User",type:"hidden"},team:{label:"Team",type:"hidden"},project:{label:"Project",type:"lookup",sourceModel:"project",sourceField:"name",ngShow:"category == 'Deploy'",ngClick:"lookUpProject()",awRequiredWhen:{variable:"projectrequired",init:"false"}},inventory:{label:"Inventory",type:"lookup",sourceModel:"inventory",sourceField:"name",ngClick:"lookUpInventory()",awRequiredWhen:{variable:"inventoryrequired",init:"true"}},permission_type:{label:"Permission",labelClass:"prepend-asterisk",type:"radio_group",options:[{label:"Read",value:"read",ngShow:"category == 'Inventory'"},{label:"Write",value:"write",ngShow:"category == 'Inventory'"},{label:"Admin",value:"admin",ngShow:"category == 'Inventory'"},{label:"Run",value:"run",ngShow:"category == 'Deploy'"},{label:"Check",value:"check",ngShow:"category == 'Deploy'"}],helpCollapse:[{hdr:"Permission",ngBind:"permissionTypeHelp"}]}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("ProjectStatusDefinition",[]).value("ProjectStatusForm",{name:"project_update",editTitle:"SCM Status",well:!1,"class":"horizontal-narrow",fields:{created:{label:"Created",type:"text",readonly:!0},status:{label:"Status",type:"text",readonly:!0},result_stdout:{label:"Std Out",type:"textarea",ngShow:"result_stdout","class":"mono-space",readonly:!0,rows:15},result_traceback:{label:"Traceback",type:"textarea",ngShow:"result_traceback","class":"mono-space",readonly:!0,rows:15}}}),angular.module("ProjectFormDefinition",[]).value("ProjectsForm",{addTitle:"Create Project",editTitle:"{{ name }}",name:"project",well:!0,forceListeners:!0,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:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1},organization:{label:"Organization",type:"lookup",sourceModel:"organization",sourceField:"name",addRequired:!0,editRequired:!1,excludeMode:"edit",ngClick:"lookUpOrganization()",awRequiredWhen:{variable:"organizationrequired",init:"true"},awPopOver:"

A project must have at least one organization. Pick one organization now to create the project, and then after the project is created you can add additional organizations.

Only super users and organization administrators are allowed to make changes to projects. Associating one or more organizations to a project determins which organizations admins have access to modify the project.",dataTitle:"Organization",dataContainer:"body",dataPlacement:"right"},scm_type:{label:"SCM Type",type:"select",ngOptions:"type.label for type in scm_type_options",ngChange:"scmChange()",addRequired:!0,editRequired:!0},missing_path_alert:{type:"alertblock","class":"alert-info",ngShow:"showMissingPlaybooksAlert && scm_type.value == ''",alertTxt:'

WARNING: There are no unassigned playbook directories in the base project path {{ base_dir }}. Either the projects directory is empty, or all of the contents are already assigned to other projects. New projects can be checked out from source control by changing the SCM type option rather than specifying checkout paths manually. To continue with manual setup, log into the Tower host and ensure content is present in a subdirectory under {{ base_dir }}. Run "chown -R awx" on the content directory to ensure Tower can read the playbooks.

',closeable:!1},base_dir:{label:"Project Base Path",type:"textarea",showonly:!0,ngShow:"scm_type.value == ''",awPopOver:"

Base path used for locating playbooks. Directories found inside this path will be listed in the playbook directory drop-down. Together the base path and selected playbook directory provide the full path used to locate playbooks.

Use PROJECTS_ROOT in your environment settings file to determine the base path value.

",dataTitle:"Project Base Path",dataContainer:"body",dataPlacement:"right"},local_path:{label:"Playbook Directory",type:"select",id:"local-path-select",ngOptions:"path.label for path in project_local_paths",awRequiredWhen:{variable:"pathRequired",init:!1},ngShow:"scm_type.value == '' && !showMissingPlaybooksAlert",awPopOver:"

Select from the list of directories found in the base path.Together the base path and the playbook directory provide the full path used to locate playbooks.

Use PROJECTS_ROOT in your environment settings file to determine the base path value.

",dataTitle:"Project Path",dataContainer:"body",dataPlacement:"right"},scm_url:{label:"SCM URL",type:"text",ngShow:"scm_type && scm_type.value !== ''",awRequiredWhen:{variable:"scmRequired",init:!1},helpCollapse:[{hdr:"GIT URLs",content:'

Example URLs for GIT SCM include:

  • https://github.com/ansible/ansible.git
  • git@github.com:ansible/ansible.git
  • git://servername.example.com/ansible.git

Note: If using SSH protocol for GitHub or Bitbucket, enter in the SSH key only, do not enter a username (other than git). Additionally, GitHub and Bitbucket do not support password authentication when using SSH protocol. GIT read only protocol (git://) does not use username or password information.',show:"scm_type.value == 'git'"},{hdr:"SVN URLs",content:'

Example URLs for Subversion SCM include:

  • https://github.com/ansible/ansible
  • svn://servername.example.com/path
  • svn+ssh://servername.example.com/path
',show:"scm_type.value == 'svn'"},{hdr:"Mercurial URLs",content:'

Example URLs for Mercurial SCM include:

  • https://bitbucket.org/username/project
  • ssh://hg@bitbucket.org/username/project
  • ssh://server.example.com/path

Note: Mercurial does not support password authentication for SSH. If applicable, add the username, password and key below. Do not put the username and key in the URL. If using Bitbucket and SSH, do not supply your Bitbucket username.',show:"scm_type.value == 'hg'"}]},scm_branch:{labelBind:"scmBranchLabel",type:"text",ngShow:"scm_type && scm_type.value !== ''",addRequired:!1,editRequired:!1},credential:{label:"SCM Credential",type:"lookup",ngShow:"scm_type && scm_type.value !== ''",sourceModel:"credential",sourceField:"name",ngClick:"lookUpCredential()",addRequired:!1,editRequired:!1},checkbox_group:{label:"SCM Update Options",type:"checkbox_group",ngShow:"scm_type && scm_type.value !== ''",fields:[{name:"scm_clean",label:"Clean",type:"checkbox",addRequired:!1,editRequired:!1,awPopOver:"

Remove any local modifications prior to performing an update.

",dataTitle:"SCM Clean",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"},{name:"scm_delete_on_update",label:"Delete on Update",type:"checkbox",addRequired:!1,editRequired:!1,awPopOver:"

Delete the local repository in its entirety prior to performing an update.

Depending on the size of the repository this may significantly increase the amount of time required to complete an update.

",dataTitle:"SCM Delete",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"},{name:"scm_update_on_launch",label:"Update on Launch",type:"checkbox",addRequired:!1,editRequired:!1,awPopOver:"

Each time a job runs using this project, perform an update to the local repository prior to starting the job.

",dataTitle:"SCM Update",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"}]}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{organizations:{type:"collection",title:"Organizations",iterator:"organization",open:!1,actions:{add:{ngClick:"add('organizations')",icon:"icon-plus",label:"Add",awToolTip:"Add an organization"}},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('organizations', organization.id, organization.name)",icon:"icon-edit",awToolTip:"Edit the organization","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('organizations', organization.id, organization.name, 'organizations')",icon:"icon-trash","class":"btn-danger",awToolTip:"Delete the organization"}}}}}),angular.module("TeamFormDefinition",[]).value("TeamForm",{addTitle:"Create Team",editTitle:"{{ name }}",name:"team",well:!0,collapse:!0,collapseTitle:"Team Settings",collapseMode:"edit",collapseOpen:!0,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:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1},organization:{label:"Organization",type:"lookup",sourceModel:"organization",sourceField:"name",ngClick:"lookUpOrganization()",awRequiredWhen:{variable:"teamrequired",init:"true"}}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{credentials:{type:"collection",title:"Credentials",iterator:"credential",open:!1,actions:{add:{ngClick:"add('credentials')",icon:"icon-plus",label:"Add",add:"Add a new credential"}},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('credentials', credential.id, credential.name)",icon:"icon-edit",awToolTip:"Modify the credential","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('credentials', credential.id, credential.name, 'credentials')",icon:"icon-trash","class":"btn-danger",awToolTip:"Remove the credential"}}},permissions:{type:"collection",title:"Permissions",iterator:"permission",open:!1,actions:{add:{ngClick:"add('permissions')",icon:"icon-plus",label:"Add",awToolTip:"Add a permission for this user",ngShow:"PermissionAddAllowed"}},fields:{name:{key:!0,label:"Name",ngClick:"edit('permissions', permission.id, permission.name)"},inventory:{label:"Inventory",sourceModel:"inventory",sourceField:"name",ngBind:"permission.summary_fields.inventory.name"},project:{label:"Project",sourceModel:"project",sourceField:"name",ngBind:"permission.summary_fields.project.name"},permission_type:{label:"Permission"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('permissions', permission.id, permission.name)",icon:"icon-edit",awToolTip:"Edit the permission","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('permissions', permission.id, permission.name, 'permissions')",icon:"icon-trash","class":"btn-danger",awToolTip:"Delete the permission",ngShow:"PermissionAddAllowed"}}},projects:{type:"collection",title:"Projects",iterator:"project",open:!1,actions:{add:{ngClick:"add('projects')",icon:"icon-plus",label:"Add"}},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('projects', project.id, project.name)",icon:"icon-edit",awToolTip:"Modify the project","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('projects', project.id, project.name, 'projects')",icon:"icon-trash","class":"btn-danger",awToolTip:"Remove the project"}}},users:{type:"collection",title:"Users",iterator:"user",open:!1,actions:{add:{ngClick:"add('users')",icon:"icon-plus",label:"Add",awToolTip:"Add a user"}},fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('users', user.id, user.username)",icon:"icon-edit",awToolTip:"Edit user","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('users', user.id, user.username, 'users')",icon:"icon-terash","class":"btn-danger",awToolTip:"Remove user"}}}}}),angular.module("UserFormDefinition",[]).value("UserForm",{addTitle:"Create User",editTitle:"{{ username }}",name:"user",well:!0,forceListeners:!0,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:{first_name:{label:"First Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!0},last_name:{label:"Last Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!0},email:{label:"Email",type:"email",addRequired:!0,editRequired:!0,autocomplete:!1},organization:{label:"Organization",type:"lookup",sourceModel:"organization",sourceField:"name",ngClick:"lookUpOrganization()",excludeMode:"edit",awRequiredWhen:{variable:"orgrequired",init:!0}},username:{label:"Username",type:"text",awRequiredWhen:{variable:"not_ldap_user",init:!0},autocomplete:!1},password:{label:"Password",type:"password",ngShow:"ldap_user == false",addRequired:!0,editRequired:!1,ngChange:"clearPWConfirm('password_confirm')",autocomplete:!1,chkPass:!0},password_confirm:{label:"Confirm Password",type:"password",ngShow:"ldap_user == false",addRequired:!1,editRequired:!1,awPassMatch:!0,associated:"password",autocomplete:!1},is_superuser:{label:"Superuser (User has full system administration privileges.)",type:"checkbox",trueValue:"true",falseValue:"false","default":"false",ngShow:"current_user['is_superuser'] == true"},ldap_user:{label:"Created by LDAP",type:"checkbox",readonly:!0}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{credentials:{type:"collection",title:"Credentials",iterator:"credential",open:!1,actions:{add:{ngClick:"add('credentials')",icon:"icon-plus",label:"Add",awToolTip:"Add a credential for this user"}},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('credentials', credential.id, credential.name)",icon:"icon-edit",awToolTip:"Edit the credential","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('credentials', credential.id, credential.name, 'credentials')",icon:"icon-trash","class":"btn-danger",awToolTip:"Delete the credential"}}},permissions:{type:"collection",title:"Permissions",iterator:"permission",open:!1,actions:{add:{ngClick:"add('permissions')",icon:"icon-plus",label:"Add",awToolTip:"Add a permission for this user",ngShow:"PermissionAddAllowed"}},fields:{name:{key:!0,label:"Name",ngClick:"edit('permissions', permission.id, permission.name)"},inventory:{label:"Inventory",sourceModel:"inventory",sourceField:"name",ngBind:"permission.summary_fields.inventory.name"},project:{label:"Project",sourceModel:"project",sourceField:"name",ngBind:"permission.summary_fields.project.name"},permission_type:{label:"Permission"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('permissions', permission.id, permission.name)",icon:"icon-edit",awToolTip:"Edit the permission","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('permissions', permission.id, permission.name, 'permissions')",icon:"icon-trash","class":"btn-danger",awToolTip:"Delete the permission",ngShow:"PermissionAddAllowed"}}},admin_of_organizations:{type:"collection",title:"Admin of Organizations",iterator:"adminof",open:!1,base:"/organizations",actions:{},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}},organizations:{type:"collection",title:"Organizations",iterator:"organization",open:!1,actions:{},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}},teams:{type:"collection",title:"Teams",iterator:"team",open:!1,actions:{},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}},projects:{type:"collection",title:"Projects",iterator:"project",open:!1,actions:{},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}}}}),angular.module("InventoryGroupsHelpDefinition",[]).value("InventoryGroupsHelp",{story:{hdr:"Building your inventory",width:510,height:560,steps:[{intro:"Start by creating a group:",img:{src:"groups001.png",maxWidth:338,maxHeight:222},box:'Click on the groups list (the left side of the page) to add a new group.',autoOffNotice:!0},{intro:"Enter group properties:",img:{src:"groups002.png",maxWidth:443,maxHeight:251},box:'Enter the group name, a description and any inventory variables. Variables can be entered using either JSON or YAML syntax. For more on inventory variables, see docs.ansible.com/intro_inventory.html'},{intro:"Cloud inventory: select cloud source",img:{src:"groups003.png",maxWidth:412,maxHeight:215},box:'For a cloud inventory, choose the cloud provider from the list and select your credentials. If you have not already setup credentials for the provider, you will need to do that first on the Credentials tab.'},{intro:"Cloud inventory: synchronize Tower with the cloud",img:{src:"groups004.png",maxWidth:261,maxHeight:221},box:'To pull the cloud inventory into Tower, initiate an inventory sync by clicking .'},{intro:"Groups can have subgroups:",img:{src:"groups005.png",maxWidth:430,maxHeight:206},box:'
First, select a group. Then click to create a new group. The new group will be added to the selected group.
'},{intro:"Copy or move groups:",img:{src:"groups006.png",maxWidth:263,maxHeight:211},box:'
Copy or move a group by dragging and dropping its name onto another group name. A dialog will appear asking if the group should be coppied or moved.
'},{intro:"Adding hosts:",img:{src:"groups007.png",maxWidth:466,maxHeight:178},box:'

First, select a Group. Then click on the hosts list (the right side of the page) to create a host. The new host will be part of the selected group.

Note hosts cannot be added to the All Hosts group.

'}]}}),angular.module("AccessHelper",["RestServices","Utilities","ngCookies"]).factory("CheckAccess",["$rootScope","Alert","Rest","GetBasePath","ProcessErrors",function(a,b,c,d,e){return function(b){var d=a.current_user,f=b.scope; +}).error(function(b,c){k(a,b,c,B,{hdr:"Error!",msg:"Failed to update project: "+G+". PUT status: "+c})})},a.showActivity=function(){A({scope:a})},a.add=function(a){b.flashMessage=null,d.path("/"+E+"/"+f.id+"/"+a)},a.edit=function(a,c){b.flashMessage=null,d.path("/"+a+"/"+c)},a["delete"]=function(c,d,e,f){var g=function(){var e=q("projects")+G+"/"+c+"/";b.flashMessage=null,i.setUrl(e),i.post({id:d,disassociate:1}).success(function(){$("#prompt-modal").modal("hide"),a.search(B.related[c].iterator)}).error(function(b,c){$("#prompt-modal").modal("hide"),k(a,b,c,null,{hdr:"Error!",msg:"Call to "+e+" failed. POST returned status: "+c})})};o({hdr:"Delete",body:"Are you sure you want to remove "+e+" from "+a.name+" "+f+"?",action:g})},a.scmChange=function(){a.scm_type&&(a.pathRequired=""===a.scm_type.value?!0:!1,a.scmRequired=""!==a.scm_type.value?!0:!1,a.scmBranchLabel="svn"===a.scm_type.value?"Revision #":"SCM Branch")},a.formReset=function(){b.flashMessage=null,C.reset();for(var c in F)a[c]=F[c];a.scmChange()}}function TeamsList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){o();var v,w=h,x=r("teams"),y=i,z=c.path().replace(/^\//,"").split("/"),A="teams"===z[0]?"edit":"select";y.inject(w,{mode:A,scope:a}),a.selected=[],v=r("base")+c.path()+"/",s({scope:a,list:w,url:v,returnToCaller:1}),a.removePostRefresh&&a.removePostRefresh(),a.removePostRefresh=a.$on("PostRefresh",function(){var b;if(a.teams)for(b=0;bb;b++){for(d[b].match(/[A-Z]/g)?(""!==R&&R+1==b&&(y++,C++),R=b,o++):d[b].match(/[a-z]/g)?(""!==S&&S+1==b&&(z++,C++),S=b,p++):d[b].match(/[0-9]/g)?(b>0&&e-1>b&&s++,""!==T&&T+1==b&&(A++,C++),T=b,q++):d[b].match(/[^a-zA-Z0-9_]/g)&&(b>0&&e-1>b&&s++,""!==U&&U+1==b&&(B++,C++),U=b,r++),f=!1,g=0;e>g;g++)d[b]==d[g]&&b!=g&&(f=!0,x+=Math.abs(e/(g-b)));f&&(w++,v=e-w,x=Math.ceil(v?x/v:x))}for(h=0;23>h;h++)i=ib.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(D++,G++);for(h=0;8>h;h++)i=jb.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(E++,G++);for(h=0;8>h;h++)i=kb.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(F++,G++);o>0&&n>o&&(nScore=parseInt(nScore+2*(n-o)),V="+ "+parseInt(2*(n-o))),p>0&&n>p&&(nScore=parseInt(nScore+2*(n-p)),W="+ "+parseInt(2*(n-p))),q>0&&n>q&&(nScore=parseInt(nScore+q*P),X="+ "+parseInt(q*P)),r>0&&(nScore=parseInt(nScore+r*Q),Y="+ "+parseInt(r*Q)),s>0&&(nScore=parseInt(nScore+s*H),Z="+ "+parseInt(s*H)),(p>0||o>0)&&0===r&&0===q&&(nScore=parseInt(nScore-n),t=n,_="- "+n),0===p&&0===o&&0===r&&q>0&&(nScore=parseInt(nScore-n),u=n,ab="- "+n),w>0&&(nScore=parseInt(nScore-x),bb="- "+x),y>0&&(nScore=parseInt(nScore-y*I),cb="- "+parseInt(y*I)),z>0&&(nScore=parseInt(nScore-z*J),db="- "+parseInt(z*J)),A>0&&(nScore=parseInt(nScore-A*K),eb="- "+parseInt(A*K)),D>0&&(nScore=parseInt(nScore-D*L),fb="- "+parseInt(D*L)),E>0&&(nScore=parseInt(nScore-E*M),gb="- "+parseInt(E*M)),F>0&&(nScore=parseInt(nScore-F*N),hb="- "+parseInt(F*N)),nScore>100?nScore=100:0>nScore&&(nScore=0),k=$("#progbar"),l=$AnsibleConfig.password_strength,m=$AnsibleConfig.password_strength-15<0?0:$AnsibleConfig.password_strength-15,k.css("width",nScore+"%"),nScore>=0&&m>=nScore?(lb="Weak",k.addClass("progress-bar-danger"),k.removeClass("progress-bar-success progress-bar-warning")):nScore>m&&l>=nScore?(lb="Good",k.addClass("progress-bar-warning"),k.removeClass("progress-bar-success progress-bar-danger")):nScore>l&&(lb="Strong",k.addClass("progress-bar-success"),k.removeClass("progress-bar-warning progress-bar-danger"))}else k=$("#progbar"),k.css("width","0%"),k.removeClass("progress-bar-success progress-bar-warning");return nScore}function AdminsList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var q=h,r=o("organizations")+e.organization_id+"/users/",s=i,t="select",u=o("organizations")+e.organization_id+"/admins/";s.inject(h,{mode:t,scope:a}),p({scope:a,list:q,url:u,returnToCaller:1}),l({scope:a,set:"admins",list:q,url:r}),m({scope:a,list:q,url:r}),a.search(q.iterator),j()}function Authenticate(a,b,c,d,e,f,g,h,i,j,k){var l,m,n,o;l=function(){$("#login-username").focus()},n=k(d.sessionExpired)?a.get("sessionExpired"):d.sessionExpired,m=function(){return k(d.lastPath)?a.get("lastPath"):d.lastPath},$AnsibleConfig.debug_mode&&console&&(console.log("User session expired: "+n),console.log("Last URL: "+m())),$(".modal[aria-hidden=false]").each(function(){"login-modal"!==$(this).attr("id")&&$(this).modal("hide")}),i("stop"),$("#login-modal").modal({show:!0,keyboard:!1,backdrop:"static"}),$("#login-modal").on("shown.bs.modal",function(){l()}),o=angular.element(document.getElementById("login-modal")).scope(),o.login_username=null,o.login_password=null,o.loginForm.login_username.$setPristine(),o.loginForm.login_password.$setPristine(),"/logout"===e.path()&&f.logout(),d.userLoggedIn=!1,a.put("userLoggedIn",!1),$("#login-password").bind("keypress",function(a){var b=a.keyCode?a.keyCode:a.which;13===b&&$("#login-button").click()}),o.reset=function(){$("#login-form input").each(function(){$(this).val("")})},o.systemLogin=function(a,b){$(".api-error").empty();var c;k(a)||k(b)?h("Error!","Please provide a username and password before attempting to login.","alert-danger",l):(i("start"),f.retrieveToken(a,b).success(function(a,b){$("#login-modal").modal("hide"),c=a.token,f.setToken(a.token,a.expires),d.sessionTimer=j.init(),f.getUser().success(function(a){f.setUserInfo(a),d.user_is_superuser=a.results[0].is_superuser,f.getLicense().success(function(a){f.setLicense(a.license_info),m()?e.path(m()):e.url("/home?login=true")}).error(function(){i("stop"),h("Error","Failed to access user information. GET returned status: "+b,"alert-danger",l)})}).error(function(a,b){i("stop"),h("Error","Failed to access license information. GET returned status: "+b,"alert-danger",l)})}).error(function(a,b){var c,d,e;if(i("stop"),a.non_field_errors&&0===a.non_field_errors.length)for(e in a)o[e+"Error"]=a[e][0];else a.non_field_errors&&a.non_field_errors.length>0?(c="Error",d=a.non_field_errors[0]):(c="Error",d="The login attempt failed with a status of: "+b),o.reset(),h(c,d,"alert-danger",l)}))}}function CredentialsList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){o(),t("start");var v,w=h,x=q("credentials"),y=i,z=c.path().replace(/^\//,"").split("/")[0],A="credentials"===z?"edit":"select";y.inject(w,{mode:A,scope:a}),a.selected=[],a.credentialLoading=!0,v=q(z)+("users"===z?e.user_id+"/credentials/":e.team_id+"/credentials/"),"select"===A&&r({scope:a,list:w,url:v,returnToCaller:1}),a.removePostRefresh&&a.removePostRefresh(),a.removePostRefresh=a.$on("PostRefresh",function(){var b,c;for(t("stop"),$("#prompt-modal").off(),w.fields.kind.searchOptions=a.credential_kind_options,b=0;b/g," ");for(x in z.fields.status.searchOptions)if(z.fields.status.searchOptions[x].value===b.status){B[z.iterator+"SearchSelectValue"]=z.fields.status.searchOptions[x];break}}if(b.source){B[z.iterator+"SearchField"]="source",B[z.iterator+"SelectShow"]=!0,B[z.iterator+"SearchSelectOpts"]=z.fields.source.searchOptions,B[z.iterator+"SearchFieldLabel"]=z.fields.source.label.replace(//g," ");for(x in z.fields.source.searchOptions)if(z.fields.source.searchOptions[x].value===b.source){B[z.iterator+"SearchSelectValue"]=z.fields.source.searchOptions[x];break}b.status&&(B[z.iterator+"ExtraParms"]="&inventory_source__status__icontains="+b.status)}b.has_external_source&&(B[z.iterator+"SearchField"]="has_external_source",B[z.iterator+"SearchValue"]=z.fields.has_external_source.searchValue,B[z.iterator+"InputDisable"]=!0,B[z.iterator+"SearchType"]="in",B[z.iterator+"SearchFieldLabel"]=z.fields.has_external_source.label),B.search(z.iterator),f(),B.showActivity=function(){p({scope:B})},B.editGroup=function(a,b){q({scope:B,group_id:a,inventory_id:b,groups_reload:!1})},B.viewUpdateStatus=function(a){B.groups=B.home_groups,o({scope:B,tree_id:a})},B.updateGroup=function(a){var b=w({list:B.home_groups,key:"id",val:a});b&&(u(b.source)||("updating"===b.status?s("Update in Progress","The inventory update process is currently running for group "+b.name+". Use the Refresh button to monitor the status.","alert-info"):(r("start"),t.setUrl(b.related.inventory_source),t.get().success(function(a){v({scope:B,url:a.related.update,group_name:a.summary_fields.group.name,group_source:a.source,tree_id:b.id,group_id:b.id})}).error(function(a,c){e(B,a,c,null,{hdr:"Error!",msg:"Failed to retrieve inventory source: "+b.related.inventory_source+" POST returned status: "+c})}))))},B.refresh=function(){B.search(z.iterator,null,!1,!0)}}function HomeHosts(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){h("htmlTemplate");var s=d,t=c,u=i("hosts"),v=s.inject(t,{mode:"edit"});v.removePostRefresh&&v.removePostRefresh(),v.removePostRefresh=v.$on("PostRefresh",function(){for(var a=0;a0?(a.inventories[b].failed_hosts_tip=a.inventories[b].hosts_with_active_failures+(1===a.inventories[b].hosts_with_active_failures?" host":" hosts")+" with job failures. Click to view details.",a.inventories[b].failed_hosts_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].failed_hosts_class="true"):0===a.inventories[b].total_hosts?(a.inventories[b].failed_hosts_tip="No hosts defined. Click to add.",a.inventories[b].failed_hosts_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].failed_hosts_class="na"):(a.inventories[b].failed_hosts_tip=a.inventories[b].total_hosts+(a.inventories[b].total_hosts>1?" hosts":" host")+" with no job failures. Click to view details.",a.inventories[b].failed_hosts_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].failed_hosts_class="false"),a.inventories[b].status=a.inventories[b].inventory_sources_with_failures+" / "+a.inventories[b].total_inventory_sources,a.inventories[b].inventory_sources_with_failures>0?(a.inventories[b].status_tip=a.inventories[b].inventory_sources_with_failures+" cloud "+(1===a.inventories[b].inventory_sources_with_failures?"source":"sources")+" with failures. Click to view details.",a.inventories[b].status_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].status_class="failed"):0===a.inventories[b].total_inventory_sources?(a.inventories[b].status_tip="Not synced with a cloud source. Click to edit.",a.inventories[b].status_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].status_class="na"):(a.inventories[b].status_tip=a.inventories[b].total_inventory_sources+" cloud "+(a.inventories[b].total_inventory_sources>1?"sources":"source")+" with no failures. Click to view details.",a.inventories[b].status_link="/#/inventories/"+a.inventories[b].id+"/",a.inventories[b].status_class="successful")}),a.removeRefreshInventories&&a.removeRefreshInventories(),a.removeRefreshInventories=a.$on("RefreshInventories",function(){a.search(u.iterator)}),a.showActivity=function(){s({scope:a})},a.editInventoryProperties=function(b){t({scope:a,inventory_id:b})},a.addInventory=function(){c.path(c.path()+"/add")},a.editInventory=function(a){c.path(c.path()+"/"+a)},a.deleteInventory=function(b,c){var d=function(){var c=v+b+"/";$("#prompt-modal").on("hidden.bs.modal",function(){r("start")}),$("#prompt-modal").modal("hide"),f.setUrl(c),f.destroy().success(function(){a.search(u.iterator)}).error(function(b,d){r("stop"),p(a,b,d,null,{hdr:"Error!",msg:"Call to "+c+" failed. DELETE returned status: "+d})})};k({hdr:"Delete",body:"Are you sure you want to delete "+c+"?",action:d})},a.lookupOrganization=function(a){f.setUrl(q("organizations")+a+"/"),f.get().success(function(a){return a.name})},a.viewJobs=function(a){c.url("/jobs/?inventory__int="+a)},a.viewFailedJobs=function(a){c.url("/jobs/?inventory__int="+a+"&status=failed")}}function InventoriesAdd(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){n();var w=t("inventory"),x=g,y=h;x.well=!0,x.formLabelSize=null,x.formFieldSize=null,y.inject(x,{mode:"add",related:!1,scope:a}),a.inventoryParseType="yaml",y.reset(),l(),u(a,"inventory_variables","inventoryParseType"),s({scope:a,form:x,current_item:f.organization_id?f.organization_id:null,list:p,field:"organization"}),a.formSave=function(){y.clearApiErrors(),v("start");try{var b,c,e;if(c="json"===a.inventoryParseType?JSON.parse(a.inventory_variables):jsyaml.load(a.inventory_variables),"object"!=typeof c)throw"failed to return an object!";e={};for(b in x.fields)"inventory_variables"!==b&&(x.fields[b].realName?e[x.fields[b].realName]=a[b]:e[b]=a[b]);i.setUrl(w),i.post(e).success(function(b){var e=b.id;a.inventory_variables?(i.setUrl(b.related.variable_data),i.put(c).success(function(){v("stop"),d.path("/inventories/"+e+"/")}).error(function(b,c){k(a,b,c,null,{hdr:"Error!",msg:"Failed to add inventory varaibles. PUT returned status: "+c})})):(v("stop"),d.path("/inventories/"+e+"/"))}).error(function(b,c){k(a,b,c,x,{hdr:"Error!",msg:"Failed to add new inventory. Post returned status: "+c})})}catch(f){v("stop"),j("Error","Error parsing inventory variables. Parser returned: "+f)}},a.formReset=function(){y.reset()}}function InventoriesEdit(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P){f();var Q=e,R=g;a.inventory_id=c.inventory_id,r({path:b.path(),title:"{{ inventory_name }}"}),a.removeGroupTreeLoaded&&a.removeGroupTreeLoaded(),a.removeGroupTreeLoaded=a.$on("GroupTreeLoaded",function(b,c,e){var f,g;f=angular.element(document.getElementById("breadcrumbs")),f.html(q({list:R,mode:"edit"})),d(f)(a),Q.inject(R,{mode:"edit",id:"groups-container",breadCrumbs:!1,searchSize:"col-lg-5 col-md-5 col-sm-5"}),a.groups=e,a.inventory_name=c,a.groups.length>0?(a.selected_tree_id=a.groups[0].id,a.selected_group_id=a.groups[0].group_id,a.groups[0].selected_class="selected",a.groups[0].active_class="active-row",a.selected_group_name=a.groups[0].name):(a.selected_tree_id=null,a.selected_group_id=null),a.show_failures=!1,l({scope:a,inventory_id:a.inventory_id,tree_id:a.selected_tree_id,group_id:a.selected_group_id}),setTimeout(function(){$("#groups_table .name-column").each(function(){var a,b,c,d,e;a=$(this).width(),b=$(this).find(".level").width(),c=parseInt($(this).find(".level").css("padding-left").replace(/px/,"")),d=b+c,e=100-Math.ceil(d/a*100)+"%",$(this).find(".group-name").css({width:e})}),L("#groups_table .group-name a"),L("#hosts_table .host-name a")},2500),M(),g=P("inventoryAutoHelp"),"off"!==g&&a.autoShowGroupHelp&&a.showGroupHelp({autoShow:!0})}),a.removeGroupTreeRefreshed&&a.removeGroupTreeRefreshed(),a.removeGroupTreeRefreshed=a.$on("GroupTreeRefreshed",function(){setTimeout(function(){L("#groups_table .group-name a")},2500),a.showHosts(a.selected_tree_id,a.selected_group_id,!1)}),a.removeGroupDeleteCompleted&&a.removeGroupDeleteCompleted(),a.removeGroupDeleteCompleted=a.$on("GroupDeleteCompleted",function(){a.selected_tree_id=1,a.selected_group_id=null,i({scope:a,inventory_id:a.inventory_id,refresh:!0})}),a.removeCopMoveGroup&&a.removeCopyMoveGroup(),a.removeCopyMoveGroup=a.$on("CopyMoveGroup",function(b,c,d){G({scope:a,target_tree_id:d,inbound_tree_id:c})}),a.removeCopMoveHost&&a.removeCopyMoveHost(),a.removeCopyMoveHost=a.$on("CopyMoveHost",function(b,c,d){H({scope:a,target_tree_id:c,host_id:d})}),a.showHosts=function(b,c,d){if(null!==b){j("start"),a.selected_tree_id=b,a.selected_group_id=c,a.hosts=[],a.show_failures=d;for(var e=0;e"+c.name+". Use the Refresh button to monitor the status.","alert-info"):(j("start"),t.setUrl(c.related.inventory_source),t.get().success(function(b){v({scope:a,url:b.related.update,group_name:b.summary_fields.group.name,group_source:b.source,tree_id:c.id,group_id:c.group_id})}).error(function(b,d){j("stop"),u(a,b,d,null,{hdr:"Error!",msg:"Failed to retrieve inventory source: "+c.related.inventory_source+" POST returned status: "+d})}))))},a.cancelUpdate=function(b){z({scope:a,tree_id:b})},a.toggle=function(b){x({scope:a,list:R,id:b})},a.refreshGroups=function(b,c){b&&(a.selected_tree_id=b,a.selected_group_id=c),i({scope:a,inventory_id:a.inventory_id,refresh:!0})},a.viewUpdateStatus=function(b,c){y({scope:a,tree_id:b,group_id:c})},a.deleteGroup=function(b,c){p({scope:a,tree_id:b,group_id:c,inventory_id:a.inventory_id})},a.createHost=function(){B({scope:a})},a.editInventoryProperties=function(){C({scope:a,inventory_id:a.inventory_id})},a.editHost=function(b){D({scope:a,host_id:b,inventory_id:a.inventory_id})},a.deleteHost=function(b,c){E({scope:a,host_id:b,host_name:c})},a.toggleHostEnabled=function(b,c){F({scope:a,host_id:b,external_source:c})},a.showGroupActivity=function(){var b,c,d;a.selected_group_id?(d=A({list:a.groups,key:"id",val:a.selected_tree_id}),b=J("activity_stream")+"?group__id="+a.selected_group_id,c="Showing all activities for group "+d.name):(c="Showing all activities for all "+a.inventory_name+" groups",b=J("activity_stream")+"?group__inventory__id="+a.inventory_id),I({scope:a,inventory_name:a.inventory_name,url:b,title:c})},a.showHostActivity=function(){var b,c;c="Showing all activities for all "+a.inventory_name+" hosts",b=J("activity_stream")+"?host__inventory__id="+a.inventory_id,I({scope:a,inventory_name:a.inventory_name,url:b,title:c})},a.showJobSummary=function(a){K({job_id:a})},a.showGroupHelp=function(a){var b={defn:O};a&&(b.autoShow=a.autoShow||!1),N(b)},i({scope:a,inventory_id:a.inventory_id,refresh:!1})}function JobEventsList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){function y(a){var b,c,d,e,f,g="",h=!1;if(a.res){if("string"==typeof a.res)c=a.res.match(/\n/g),d=c?c.length:1,d=d>10?10:d,h=!0,g+='
\n',g+="\n",g+='\n",g+="
\n";else for(e in a.res){if(("msg"===e||"stdout"===e||"stderr"===e)&&null!==a.res[e]&&""!==a.res[e]){switch(g+='
\n',g+="\n",c=a.res[e].match(/\n/g),d=c?c.length:1,d=d>10?10:d,g+='\n",g+="
\n",h=!0}if("results"===e&&Array.isArray(a.res[e])&&a.res[e].length>0){for(f="",b=0;b10?10:d,""!==f&&(g+='
\n',g+="\n",g+='\n",g+="
\n",h=!0)}"rc"===e&&""!==a.res[e]&&(g+='
\n',g+="\n",g+='\n',g+="
\n",h=!0)}g=h?'
\n'+g+"
\n":""}return g=a.hosts?''+a.host+"\n"+g:""===g?null:g}p();var z,A=i,B=r("jobs")+f.id+"/job_events/",C=j;C.inject(A,{mode:"edit",scope:b}),A.base=d.path(),b.job_id=f.id,c.flashMessage=null,b.selected=[],b.expand=!0,b.parentNode="parent-event",b.childNode="child-event",b.removeSetHostLinks&&b.removeSetHostLinks(),b.removeSetHostLinks=b.$on("SetHostLinks",function(a,c){for(var d=0;d15?5:g,$('textarea[name="'+d+'"]').attr("rows",g)));break;case"module_name":case"module_args":b.event_data.res&&b.event_data.res.invocation&&(a[d]=b.event_data.res.invocation.fld)}q("stop")}).error(function(b){k(a,b,status,null,{hdr:"Error!",msg:"Failed to retrieve host: "+f.event_id+". GET status: "+status})}),a.navigateBack=function(){var a="/jobs/"+f.job_id+"/job_events";f.page&&(a+="?page="+f.page),d.url(a)},a.rawView=function(){p({event_id:a.id})}}function JobHostSummaryList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){o();var u=h,v=c.path().replace(/^\//,"").split("/")[0],w=q(v)+e.id+"/job_host_summaries/",x=i,y=x.inject(u,{mode:"edit"});u.index="hosts"===v?!1:!0,a.selected=[],"hosts"===v?(a.job_id=null,a.host_id=e.id):(a.job_id=e.id,a.host_id=null),a.RemoveSetHostLink&&a.RemoveSetHostLink(),a.RemoveSetHostLink=a.$on("setHostLink",function(b,c){for(var d=0;d0?a.jobhosts[0].summary_fields.host.name:"Host"}),e.inventory&&a.$emit("setHostLink",e.inventory))}),l({scope:y,set:"jobhosts",list:u,url:w}),m({scope:y,list:u,url:w}),e.host_name&&(y[u.iterator+"SearchField"]="host",y[u.iterator+"SearchValue"]=e.host_name,y[u.iterator+"SearchFieldLabel"]=u.fields.host.label),a.search(u.iterator),a.showEvents=function(a,b){f.setUrl(b),f.get().success(function(b){j({path:"/jobs/"+b.id,title:b.name}),c.url("/jobs/"+b.id+"/job_events/?host="+encodeURI(a))}).error(function(a,c){p(y,a,c,null,{hdr:"Error!",msg:"Failed to lookup last job: "+b+". GET status: "+c})})},a.showJob=function(a){c.path("/jobs/"+a)},a.refresh=function(){null===a.host_id&&(a.jobSearchSpin=!0,a.jobLoading=!0,t("start"),r({scope:y,set:"jobhosts",iterator:"jobhost",url:a.current_url}))}}function JobTemplatesList(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){o();var y=h,z=q("job_templates"),A=i,B=c.path().replace(/^\//,"").split("/")[0],C="job_templates"===B?"edit":"select";A.inject(y,{mode:C,scope:a}),b.flashMessage=null,a.removePostRefresh&&a.removePostRefresh(),a.removePostRefresh=a.$on("PostRefresh",function(){w("stop"),$("#prompt-modal").off()}),l({scope:a,set:"job_templates",list:y,url:z}),m({scope:a,list:y,url:z}),e.name&&(a[y.iterator+"SearchField"]="name",a[y.iterator+"SearchValue"]=e.name,a[y.iterator+"SearchFieldLabel"]=y.fields.name.label),a.search(y.iterator),j(),a.showActivity=function(){x({scope:a})},a.addJobTemplate=function(){c.path(c.path()+"/add")},a.editJobTemplate=function(a){c.path(c.path()+"/"+a)},a.deleteJobTemplate=function(b,c){var d=function(){$("#prompt-modal").on("hidden.bs.modal",function(){w("start")}),$("#prompt-modal").modal("hide");var c=z+b+"/";f.setUrl(c),f.destroy().success(function(){a.search(y.iterator)}).error(function(b){w("stop"),p(a,b,status,null,{hdr:"Error!",msg:"Call to "+c+" failed. DELETE returned status: "+status})})};k({hdr:"Delete",body:"Are you sure you want to delete "+c+"?",action:d})},a.submitJob=function(b){v({scope:a,id:b})}}function JobTemplatesAdd(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w){n();var x,y,z=o("job_templates"),A=g,B=h,C={},D={};B.inject(A,{mode:"add",related:!1,scope:a}),a.parseType="yaml",u(a),a.job_type_options=[{value:"run",label:"Run"},{value:"check",label:"Check"}],a.verbosity_options=[{value:"0",label:"Default"},{value:"1",label:"Verbose"},{value:"3",label:"Debug"}],a.playbook_options=[],a.allow_callbacks="false",B.reset(),l(),t({scope:a,master:C,check_field:"allow_callbacks",default_val:!1}),s({scope:a,form:A,current_item:null,list:p,field:"inventory"}),jQuery.extend(!0,D,q),D.name="cloudcredentials",D.iterator="cloudcredential",s({url:o("credentials")+"?cloud=true",scope:a,form:A,current_item:null,list:D,field:"cloud_credential",hdr:"Select Cloud Credential"}),s({url:o("credentials")+"?kind=ssh",scope:a,form:A,current_item:null,list:q,field:"credential",hdr:"Select Machine Credential"}),x=function(b,c){var d;b!==c&&a.project&&(v("start"),d=o("projects")+a.project+"/playbooks/",i.setUrl(d),i.get().success(function(b){var c,d=[];for(c=0;c=2)for(var b in N)a.search(N[b].iterator)}),a.removeRelatedJobs&&a.removeRelatedJobs(),a.removeRelatedJobs=a.$on("relatedjobs",function(){var b,c;if(a.jobs&&a.jobs.length)for(b=0;b0)for(d=0;d/g," ");for(y in z.fields.status.searchOptions)if(z.fields.status.searchOptions[y].value===e.status){a[z.iterator+"SearchSelectValue"]=z.fields.status.searchOptions[y];break}}a.search(z.iterator),j(),a.refresh=function(){x("start"),a.jobLoading=!1,u({scope:a,set:"jobs",iterator:"job",url:a.current_url})},a.refreshJob=a.refresh,a.editJob=function(a,b){j({path:"/jobs/"+a,title:a+" - "+b}),c.path(c.path()+"/"+a)},a.viewEvents=function(a,b){j({path:"/jobs/"+a,title:a+" - "+b}),c.path(c.path()+"/"+a+"/job_events")},a.viewSummary=function(a,b){j({path:"/jobs/"+a,title:a+" - "+b}),c.path(c.path()+"/"+a+"/job_host_summaries")},a.deleteJob=function(b){f.setUrl(A+b+"/"),f.get().success(function(c){var d,e,g,h;"pending"===c.status||"running"===c.status||"waiting"===c.status?(e=c.related.cancel,g="cancel",h="Cancel Job"):(e=A+b+"/",g="delete",h="Delete Job"),d=function(){f.setUrl(e),"cancel"===g?f.post().success(function(){$("#prompt-modal").modal("hide"),a.search(z.iterator)}).error(function(b,c){$("#prompt-modal").modal("hide"),p(a,b,c,null,{hdr:"Error!",msg:"Call to "+e+" failed. POST returned status: "+c})}):f.destroy().success(function(){$("#prompt-modal").modal("hide"),a.search(z.iterator)}).error(function(b,c){$("#prompt-modal").modal("hide"),p(a,b,c,null,{hdr:"Error!",msg:"Call to "+e+" failed. DELETE returned status: "+c})})},k({hdr:h,body:"Are you sure you want to "+g+" job "+b+"?",action:d})}).error(function(b,c){p(a,b,c,null,{hdr:"Error!",msg:"Failed to get job details. GET returned status: "+c})})},a.submitJob=function(b,c){s({scope:a,id:b,template:c})}}function JobsEdit(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z){function A(b){if(null!==b&&""!==b&&void 0!==b){var c=v("projects")+b+"/playbooks/";i.setUrl(c),i.get().success(function(b){a.playbook_options=[];for(var c=0;c15?15:c}p();var C=v("jobs"),D=h,E=g,F={},G=f.id,H={},I=0;D.inject(E,{mode:"edit",related:!0,scope:a}),D.reset(),a.job_id=G,a.parseType="yaml",a.statusSearchSpin=!1,a.jobLoadedRemove&&a.jobLoadedRemove(),a.jobLoadedRemove=a.$on("jobLoaded",function(b,c){A(a.project),a[E.name+"ReadOnly"]="new"===a.status?!1:!0,$("#forks-slider").slider("option","value",a.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"),i.setUrl(a.template_url),i.get().success(function(b){var c=b.host_config_key?"true":"false"; +a.host_config_key=b.host_config_key,w({scope:a,master:F,check_field:"allow_callbacks",default_val:c}),a.callback_url=b.related?b.related.callback:"<< Job template not found >>",a.$emit("jobTemplateLoadFinished")}).error(function(){z("stop"),a.callback_url="<< Job template not found >>"}),c?(i.setUrl(c),i.get().success(function(b){a.cloud_credential_name=b.name,a.$emit("jobTemplateLoadFinished")}).error(function(b,c){k(a,b,c,null,{hdr:"Error!",msg:"Failed to related cloud credential. GET returned status: "+c})})):a.$emit("jobTemplateLoadFinished")}),a.removeJobTemplateLoadFinished&&a.removeJobTemplateLoadFinished(),a.removeJobTemplateLoadFinished=a.$on("jobTemplateLoadFinished",function(){I++,I>=3&&z("stop")}),a.job_type_options=[{value:"run",label:"Run"},{value:"check",label:"Check"}],a.verbosity_options=[{value:"0",label:"Default"},{value:"1",label:"Verbose"},{value:"3",label:"Debug"}],a.playbook_options=null,a.playbook=null,z("start"),i.setUrl(C+":id/"),i.get({params:{id:G}}).success(function(b){var c,d,e,f,g,h;l();for(e in E.fields){if("variables"!==e&&null!==b[e]&&void 0!==b[e]){if("select"===E.fields[e].type)if(a[e+"_options"]&&a[e+"_options"].length>0)for(c=0;c/g," ");for(b in A.fields.scm_type.searchOptions)if(A.fields.scm_type.searchOptions[b].value===e.scm_type){a[A.iterator+"SearchSelectValue"]=A.fields.scm_type.searchOptions[b];break}}else if(e.status){a[A.iterator+"SearchValue"]=e.status,a[A.iterator+"SearchField"]="status",a[A.iterator+"SelectShow"]=!0,a[A.iterator+"SearchFieldLabel"]=A.fields.status.label,a[A.iterator+"SearchSelectOpts"]=A.fields.status.searchOptions;for(b in A.fields.status.searchOptions)if(A.fields.status.searchOptions[b].value===e.status){a[A.iterator+"SearchSelectValue"]=A.fields.status.searchOptions[b];break}}a.search(A.iterator)}),a.removeChoicesReady&&a.removeChoicesReady(),a.removeChoicesReady=a.$on("choicesReadyProject",function(){G++,2===G&&a.$emit("choicesCompleteProject")}),y({scope:a,url:B,field:"status",variable:"project_status_options",callback:"choicesReadyProject"}),y({scope:a,url:B,field:"scm_type",variable:"project_scm_type_options",callback:"choicesReadyProject"}),j(),a.showActivity=function(){x({scope:a})},a.addProject=function(){c.path(c.path()+"/add")},a.editProject=function(a){c.path(c.path()+"/"+a)},a.showSCMStatus=function(b){var c,d=a.$on("PostRefresh",function(){var e;for(c=0;cRefresh button to view the latest status.","alert-info")}).error(function(b,c){p(a,b,c,null,{hdr:"Error!",msg:"Call to "+d+" failed. GET status: "+c})})}),a.cancelUpdate=function(b,c){var d,e,h=!1;for(d=0;dRefresh button to view the latet status.","alert-info")},a.refresh=function(){w("start"),a.projectLoading=!1,v({scope:a,set:"projects",iterator:"project",url:a.current_url})},a.SCMUpdate=function(b){var c;for(c=0;cb;b++){for(d[b].match(/[A-Z]/g)?(""!==R&&R+1==b&&(y++,C++),R=b,o++):d[b].match(/[a-z]/g)?(""!==S&&S+1==b&&(z++,C++),S=b,p++):d[b].match(/[0-9]/g)?(b>0&&e-1>b&&s++,""!==T&&T+1==b&&(A++,C++),T=b,q++):d[b].match(/[^a-zA-Z0-9_]/g)&&(b>0&&e-1>b&&s++,""!==U&&U+1==b&&(B++,C++),U=b,r++),f=!1,g=0;e>g;g++)d[b]==d[g]&&b!=g&&(f=!0,x+=Math.abs(e/(g-b)));f&&(w++,v=e-w,x=Math.ceil(v?x/v:x))}for(h=0;23>h;h++)i=ib.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(D++,G++);for(h=0;8>h;h++)i=jb.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(E++,G++);for(h=0;8>h;h++)i=kb.substring(h,parseInt(h+3)),j=i.strReverse(),(-1!=a.toLowerCase().indexOf(i)||-1!=a.toLowerCase().indexOf(j))&&(F++,G++);o>0&&n>o&&(nScore=parseInt(nScore+2*(n-o)),V="+ "+parseInt(2*(n-o))),p>0&&n>p&&(nScore=parseInt(nScore+2*(n-p)),W="+ "+parseInt(2*(n-p))),q>0&&n>q&&(nScore=parseInt(nScore+q*P),X="+ "+parseInt(q*P)),r>0&&(nScore=parseInt(nScore+r*Q),Y="+ "+parseInt(r*Q)),s>0&&(nScore=parseInt(nScore+s*H),Z="+ "+parseInt(s*H)),(p>0||o>0)&&0===r&&0===q&&(nScore=parseInt(nScore-n),t=n,_="- "+n),0===p&&0===o&&0===r&&q>0&&(nScore=parseInt(nScore-n),u=n,ab="- "+n),w>0&&(nScore=parseInt(nScore-x),bb="- "+x),y>0&&(nScore=parseInt(nScore-y*I),cb="- "+parseInt(y*I)),z>0&&(nScore=parseInt(nScore-z*J),db="- "+parseInt(z*J)),A>0&&(nScore=parseInt(nScore-A*K),eb="- "+parseInt(A*K)),D>0&&(nScore=parseInt(nScore-D*L),fb="- "+parseInt(D*L)),E>0&&(nScore=parseInt(nScore-E*M),gb="- "+parseInt(E*M)),F>0&&(nScore=parseInt(nScore-F*N),hb="- "+parseInt(F*N)),nScore>100?nScore=100:0>nScore&&(nScore=0),k=$("#progbar"),l=$AnsibleConfig.password_strength,m=$AnsibleConfig.password_strength-15<0?0:$AnsibleConfig.password_strength-15,k.css("width",nScore+"%"),nScore>=0&&m>=nScore?(lb="Weak",k.addClass("progress-bar-danger"),k.removeClass("progress-bar-success progress-bar-warning")):nScore>m&&l>=nScore?(lb="Good",k.addClass("progress-bar-warning"),k.removeClass("progress-bar-success progress-bar-danger")):nScore>l&&(lb="Strong",k.addClass("progress-bar-success"),k.removeClass("progress-bar-warning progress-bar-danger"))}else k=$("#progbar"),k.css("width","0%"),k.removeClass("progress-bar-success progress-bar-warning");return nScore}var urlPrefix=$basePath;angular.module("ansible",["ngRoute","ngSanitize","ngCookies","RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"})}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login"));var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var urlPrefix=$basePath;angular.module("ansible",["ngRoute","ngSanitize","ngCookies","RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"})}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login"));var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var urlPrefix=$basePath;angular.module("ansible",["RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"})}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login"));var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var urlPrefix=$basePath;angular.module("ansible",["RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"}) +}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login"));var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var urlPrefix=$basePath;angular.module("ansible",["RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"})}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login"));var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var urlPrefix=$basePath;angular.module("ansible",["RestServices","AuthService","Utilities","OrganizationFormDefinition","UserFormDefinition","FormGenerator","OrganizationListDefinition","UserListDefinition","UserHelper","ListGenerator","PromptDialog","ApiLoader","RelatedSearchHelper","SearchHelper","PaginationHelpers","RefreshHelper","AdminListDefinition","AWDirectives","InventoriesListDefinition","InventoryFormDefinition","InventoryHelper","InventoryGroupsDefinition","InventoryHostsDefinition","HostsHelper","AWFilters","HostFormDefinition","HostListDefinition","GroupFormDefinition","GroupListDefinition","GroupsHelper","TeamsListDefinition","TeamFormDefinition","TeamHelper","CredentialsListDefinition","CredentialFormDefinition","LookUpHelper","JobTemplatesListDefinition","JobTemplateFormDefinition","JobSubmissionHelper","ProjectsListDefinition","ProjectFormDefinition","ProjectStatusDefinition","ProjectsHelper","PermissionFormDefinition","PermissionListDefinition","PermissionsHelper","JobsListDefinition","JobFormDefinition","JobEventsListDefinition","JobEventDataDefinition","JobEventsFormDefinition","JobHostDefinition","JobSummaryDefinition","ParseHelper","ChildrenHelper","EventsHelper","ProjectPathHelper","md5Helper","AccessHelper","SelectionHelper","License","HostGroupsFormDefinition","JobStatusWidget","InventorySyncStatusWidget","SCMSyncStatusWidget","ObjectCountWidget","StreamWidget","JobsHelper","InventoryGroupsHelpDefinition","InventoryTree","CredentialsHelper","TimerService","StreamListDefinition","HomeGroupListDefinition","HomeHostListDefinition","ActivityDetailDefinition"]).config(["$routeProvider",function(a){a.when("/jobs",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsListCtrl"}).when("/jobs/:id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobsEdit"}).when("/jobs/:id/job_events",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsList"}).when("/jobs/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/jobs/:job_id/job_events/:event_id",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobEventsEdit"}).when("/job_templates",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesList"}).when("/job_templates/add",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesAdd"}).when("/job_templates/:id",{templateUrl:urlPrefix+"partials/job_templates.html",controller:"JobTemplatesEdit"}).when("/projects",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsList"}).when("/projects/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsAdd"}).when("/projects/:id",{templateUrl:urlPrefix+"partials/projects.html",controller:"ProjectsEdit"}).when("/projects/:project_id/organizations",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsList"}).when("/projects/:project_id/organizations/add",{templateUrl:urlPrefix+"partials/projects.html",controller:"OrganizationsAdd"}).when("/hosts/:id/job_host_summaries",{templateUrl:urlPrefix+"partials/jobs.html",controller:"JobHostSummaryList"}).when("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesList"}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:"InventoriesAdd"}).when("/inventories/:inventory_id",{templateUrl:urlPrefix+"partials/inventory-edit.html",controller:"InventoriesEdit"}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsList"}).when("/organizations/add",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsAdd"}).when("/organizations/:organization_id",{templateUrl:urlPrefix+"partials/organizations.html",controller:"OrganizationsEdit"}).when("/organizations/:organization_id/admins",{templateUrl:urlPrefix+"partials/organizations.html",controller:"AdminsList"}).when("/organizations/:organization_id/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/organizations/:organization_id/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/organizations/:organization_id/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/teams",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsList"}).when("/teams/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsAdd"}).when("/teams/:team_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"TeamsEdit"}).when("/teams/:team_id/permissions/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsAdd"}).when("/teams/:team_id/permissions",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsList"}).when("/teams/:team_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"PermissionsEdit"}).when("/teams/:team_id/users",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersList"}).when("/teams/:team_id/users/:user_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"UsersEdit"}).when("/teams/:team_id/projects",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsList"}).when("/teams/:team_id/projects/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsAdd"}).when("/teams/:team_id/projects/:project_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"ProjectsEdit"}).when("/teams/:team_id/credentials",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsList"}).when("/teams/:team_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:team_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/credentials",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsList"}).when("/credentials/add",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsAdd"}).when("/credentials/:credential_id",{templateUrl:urlPrefix+"partials/credentials.html",controller:"CredentialsEdit"}).when("/users",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersList"}).when("/users/add",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersAdd"}).when("/users/:user_id",{templateUrl:urlPrefix+"partials/users.html",controller:"UsersEdit"}).when("/users/:user_id/credentials",{templateUrl:urlPrefix+"partials/users.html",controller:"CredentialsList"}).when("/users/:user_id/permissions/add",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsAdd"}).when("/users/:user_id/permissions",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsList"}).when("/users/:user_id/permissions/:permission_id",{templateUrl:urlPrefix+"partials/users.html",controller:"PermissionsEdit"}).when("/users/:user_id/credentials/add",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsAdd"}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:"CredentialsEdit"}).when("/login",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/logout",{templateUrl:urlPrefix+"partials/home.html",controller:"Authenticate"}).when("/home",{templateUrl:urlPrefix+"partials/home.html",controller:"Home"}).when("/home/groups",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeGroups"}).when("/home/hosts",{templateUrl:urlPrefix+"partials/subhome.html",controller:"HomeHosts"}).otherwise({redirectTo:"/home"})}]).run(["$cookieStore","$rootScope","CheckLicense","$location","Authorization","LoadBasePaths","ViewLicense","Timer","ClearScope","HideStream",function(a,b,c,d,e,f,g,h,i,j){f(),b.breadcrumbs=[],b.crumbCache=[],b.sessionTimer=h.init(),b.$on("$routeChangeStart",function(f,g){$("#stream-container").is(":visible")&&j(),/^\/(login|logout)/.test(d.path())||(b.lastPath=d.path(),a.put("lastPath",d.path())),e.isUserLoggedIn()===!1?g.templateUrl!==urlPrefix+"partials/login.html"&&d.path("/login"):b.sessionTimer.isExpired()?g.templateUrl!==urlPrefix+"partials/login.html"&&(b.sessionTimer.expireSession(),d.path("/login")):((void 0===b.current_user||null===b.current_user)&&e.restoreUserInfo(),c());var h=d.path().replace(/^\//,"").split("/")[0];""===h?h="home":h.replace(/\_/g," "),$('.nav-tabs a[href="#'+h+'"]').tab("show")}),e.getToken()?b.user_is_superuser=e.getUserInfo("is_superuser"):(b.sessionExpired=!1,a.put("sessionExpired",!1),d.path("/login"));var k=d.path().replace(/^\//,"").split("/")[0];""===k?(k="home",d.path("/home")):k.replace(/\_/g," "),$('.nav-tabs a[href="#'+k+'"]').tab("show"),b.viewCurrentUser=function(){d.path("/users/"+b.current_user.id)},b.viewLicense=function(){g()}}]);var $AnsibleConfig={tooltip_delay:{show:500,hide:100},debug_mode:!0,password_strength:45,session_timeout:1800};AdminsList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","AdminList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","GetBasePath","SelectionInit"],Authenticate.$inject=["$cookieStore","$window","$scope","$rootScope","$location","Authorization","ToggleClass","Alert","Wait","Timer","Empty"],CredentialsList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","CredentialList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","SelectionInit","GetChoices","Wait","Stream"],CredentialsAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","CredentialForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GenerateList","SearchInit","PaginateInit","LookUpInit","UserList","TeamList","GetBasePath","GetChoices","Empty","KindChange","OwnerChange","FormSave"],CredentialsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","CredentialForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","ReturnToCaller","ClearScope","Prompt","GetBasePath","GetChoices","KindChange","UserList","TeamList","LookUpInit","Empty","OwnerChange","FormSave","Stream","Wait"],Home.$inject=["$scope","$compile","$routeParams","$rootScope","$location","Wait","ObjectCount","JobStatus","InventorySyncStatus","SCMSyncStatus","ClearScope","Stream","Rest","GetBasePath","ProcessErrors","Button"],HomeGroups.$inject=["$location","$routeParams","HomeGroupList","GenerateList","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GetBasePath","SearchInit","PaginateInit","FormatDate","GetHostsStatusMsg","GetSyncStatusMsg","ViewUpdateStatus","Stream","GroupsEdit","Wait","Alert","Rest","Empty","InventoryUpdate","Find"],HomeHosts.$inject=["$location","$routeParams","HomeHostList","GenerateList","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GetBasePath","SearchInit","PaginateInit","FormatDate","SetStatus","ToggleHostEnabled","HostsEdit","Stream","Find","ShowJobSummary"],InventoriesList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","InventoryList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","Wait","Stream","EditInventoryProperties"],InventoriesAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","InventoryForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GenerateList","OrganizationList","SearchInit","PaginateInit","LookUpInit","GetBasePath","ParseTypeChange","Wait"],InventoriesEdit.$inject=["$scope","$location","$routeParams","$compile","GenerateList","ClearScope","InventoryGroups","InventoryHosts","BuildTree","Wait","GetSyncStatusMsg","InjectHosts","HostsReload","GroupsAdd","GroupsEdit","GroupsDelete","Breadcrumbs","LoadBreadCrumbs","Empty","Rest","ProcessErrors","InventoryUpdate","Alert","ToggleChildren","ViewUpdateStatus","GroupsCancelUpdate","Find","HostsCreate","EditInventoryProperties","HostsEdit","HostsDelete","ToggleHostEnabled","CopyMoveGroup","CopyMoveHost","Stream","GetBasePath","ShowJobSummary","ApplyEllipsis","WatchInventoryWindowResize","HelpDialog","InventoryGroupsHelp","Store"],JobEventsList.$inject=["$filter","$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","JobEventList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","LookUpInit","ToggleChildren","FormatDate","EventView","Refresh","Wait"],JobEventsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","JobEventsForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ClearScope","GetBasePath","FormatDate","EventView","Wait"],JobHostSummaryList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","JobHostList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","Refresh","JobStatusToolTip","Wait"],JobTemplatesList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","JobTemplateList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","PromptPasswords","JobTemplateForm","CredentialList","LookUpInit","SubmitJob","Wait","Stream"],JobTemplatesAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","JobTemplateForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GetBasePath","InventoryList","CredentialList","ProjectList","LookUpInit","md5Setup","ParseTypeChange","Wait","Empty"],JobTemplatesEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","JobTemplateForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","ReturnToCaller","ClearScope","InventoryList","CredentialList","ProjectList","LookUpInit","PromptPasswords","GetBasePath","md5Setup","ParseTypeChange","JobStatusToolTip","FormatDate","Wait","Stream","Empty","Prompt"],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"],JobsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","JobForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","ReturnToCaller","ClearScope","InventoryList","CredentialList","ProjectList","LookUpInit","PromptPasswords","GetBasePath","md5Setup","FormatDate","JobStatusToolTip","Wait"],OrganizationsList.$inject=["$routeParams","$scope","$rootScope","$location","$log","Rest","Alert","LoadBreadCrumbs","Prompt","GenerateList","OrganizationList","SearchInit","PaginateInit","ClearScope","ProcessErrors","GetBasePath","SelectionInit","Wait","Stream"],OrganizationsAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","OrganizationForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ClearScope","GetBasePath","ReturnToCaller","Wait"],OrganizationsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","OrganizationForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","Prompt","ClearScope","GetBasePath","Wait","Stream"],PermissionsList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","PermissionList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","CheckAccess","Wait"],PermissionsAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","PermissionsForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ClearScope","GetBasePath","ReturnToCaller","InventoryList","ProjectList","LookUpInit","CheckAccess","Wait","PermissionCategoryChange"],PermissionsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","PermissionsForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","Prompt","GetBasePath","InventoryList","ProjectList","LookUpInit","CheckAccess","Wait","PermissionCategoryChange"],ProjectsList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","ProjectList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","SelectionInit","ProjectUpdate","ProjectStatus","FormatDate","Refresh","Wait","Stream","GetChoices","Empty"],ProjectsAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","ProjectsForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ClearScope","GetBasePath","ReturnToCaller","GetProjectPath","LookUpInit","OrganizationList","CredentialList","GetChoices","DebugForm","Wait"],ProjectsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","ProjectsForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","Prompt","ClearScope","GetBasePath","ReturnToCaller","GetProjectPath","Authorization","CredentialList","LookUpInit","GetChoices","Empty","DebugForm","Wait","Stream"],TeamsList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","TeamList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","SetTeamListeners","GetBasePath","SelectionInit","Wait","Stream"],TeamsAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","TeamForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GenerateList","OrganizationList","SearchInit","PaginateInit","GetBasePath","LookUpInit","Wait"],TeamsEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","TeamForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","ReturnToCaller","ClearScope","LookUpInit","Prompt","GetBasePath","CheckAccess","OrganizationList","Wait","Stream"],UsersList.$inject=["$scope","$rootScope","$location","$log","$routeParams","Rest","Alert","UserList","GenerateList","LoadBreadCrumbs","Prompt","SearchInit","PaginateInit","ReturnToCaller","ClearScope","ProcessErrors","GetBasePath","SelectionInit","Wait","Stream"],UsersAdd.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","UserForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","ReturnToCaller","ClearScope","GetBasePath","LookUpInit","OrganizationList","ResetForm","Wait"],UsersEdit.$inject=["$scope","$rootScope","$compile","$location","$log","$routeParams","UserForm","GenerateForm","Rest","Alert","ProcessErrors","LoadBreadCrumbs","RelatedSearchInit","RelatedPaginateInit","ReturnToCaller","ClearScope","GetBasePath","Prompt","CheckAccess","ResetForm","Wait","Stream"],angular.module("ActivityDetailDefinition",[]).value("ActivityDetailForm",{name:"activity",editTitle:"Activity Detail",well:!1,"class":"horizontal-narrow",formFieldSize:"col-lg-10",formLabelSize:"col-lg-2",fields:{user:{label:"Initiated by",type:"text",readonly:!0},operation:{label:"Action",type:"text",readonly:!0},changes:{label:"Changes",type:"textarea",ngHide:"!changes || changes =='' || changes == 'null'",readonly:!0}}}),angular.module("CredentialFormDefinition",[]).value("CredentialForm",{addTitle:"Create Credential",editTitle:"{{ name }}",name:"credential",well:!0,forceListeners:!0,actions:{stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"edit"}},fields:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,autocomplete:!1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1},owner:{label:"Does this credential belong to a team or user?",type:"radio_group",ngChange:"ownerChange()",options:[{label:"User",value:"user",selected:!0},{label:"Team",value:"team"}],awPopOver:"

A credential must be associated with either a user or a team. Choosing a user allows only the selected user access to the credential. Choosing a team shares the credential with all team members.

",dataTitle:"Owner",dataPlacement:"right",dataContainer:"body"},user:{label:"User that owns this credential",type:"lookup",sourceModel:"user",sourceField:"username",ngClick:"lookUpUser()",ngShow:"owner == 'user'",awRequiredWhen:{variable:"user_required",init:"false"}},team:{label:"Team that owns this credential",type:"lookup",sourceModel:"team",sourceField:"name",ngClick:"lookUpTeam()",ngShow:"owner == 'team'",awRequiredWhen:{variable:"team_required",init:"false"}},kind:{label:"Type",excludeModal:!0,type:"select",ngOptions:"kind.label for kind in credential_kind_options",ngChange:"kindChange()",addRequired:!0,editRequired:!0,helpCollapse:[{hdr:"Select a Credential Type",content:"
\n
AWS
\n
Access keys for Amazon Web Services used for inventory management or deployment.
\n
Machine
\n
Authentication for remote machine access. This can include SSH keys, usernames, passwords, and sudo information. Machine credentials are used when submitting jobs to run playbooks against remote hosts.
Rackspace
\n
Access information for Rackspace Cloud used for inventory management or deployment.
\n
SCM
\n
Used to check out and synchronize playbook repositories with a remote source control management system such as Git, Subversion (svn), or Mercurial (hg). These credentials are used on the Projects tab.
\n
\n"}]},access_key:{label:"Access Key",type:"text",ngShow:"kind.value == 'aws'",awRequiredWhen:{variable:"aws_required",init:!1},autocomplete:!1,apiField:"username"},secret_key:{label:"Secret Key",type:"password",ngShow:"kind.value == 'aws'",awRequiredWhen:{variable:"aws_required",init:!1},autocomplete:!1,ask:!1,clear:!1,apiField:"passwowrd"},username:{labelBind:"usernameLabel",type:"text",ngShow:"kind.value && kind.value !== 'aws'",awRequiredWhen:{variable:"rackspace_required",init:!1},autocomplete:!1},api_key:{label:"API Key",type:"password",ngShow:"kind.value == 'rax'",awRequiredWhen:{variable:"rackspace_required",init:!1},autocomplete:!1,ask:!1,clear:!1,apiField:"passwowrd"},password:{label:"Password",type:"password",ngShow:"kind.value == 'scm'",addRequired:!1,editRequired:!1,ngChange:"clearPWConfirm('password_confirm')",ask:!1,clear:!1,associated:"password_confirm",autocomplete:!1},password_confirm:{label:"Confirm Password",type:"password",ngShow:"kind.value == 'scm'",addRequired:!1,editRequired:!1,awPassMatch:!0,associated:"password",autocomplete:!1},ssh_password:{label:"SSH Password",type:"password",ngShow:"kind.value == 'ssh'",ngChange:"clearPWConfirm('ssh_password_confirm')",addRequired:!1,editRequired:!1,ask:!0,clear:!0,associated:"ssh_password_confirm",autocomplete:!1},ssh_password_confirm:{label:"Confirm SSH Password",type:"password",ngShow:"kind.value == 'ssh'",addRequired:!1,editRequired:!1,awPassMatch:!0,associated:"ssh_password",autocomplete:!1},ssh_key_data:{labelBind:"sshKeyDataLabel",type:"textarea",ngShow:"kind.value == 'ssh' || kind.value == 'scm'",addRequired:!1,editRequired:!1,"class":"ssh-key-field",rows:10},ssh_key_unlock:{label:"Key Password",type:"password",ngShow:"kind.value == 'ssh' || kind.value == 'scm'",addRequired:!1,editRequired:!1,ngChange:"clearPWConfirm('ssh_key_unlock_confirm')",associated:"ssh_key_unlock_confirm",ask:!0,askShow:"kind.value == 'ssh'",clear:!0},ssh_key_unlock_confirm:{label:"Confirm Key Password",type:"password",ngShow:"kind.value == 'ssh' || kind.value == 'scm'",addRequired:!1,editRequired:!1,awPassMatch:!0,associated:"ssh_key_unlock"},sudo_username:{label:"Sudo Username",type:"text",ngShow:"kind.value == 'ssh'",addRequired:!1,editRequired:!1,autocomplete:!1},sudo_password:{label:"Sudo Password",type:"password",ngShow:"kind.value == 'ssh'",addRequired:!1,editRequired:!1,ngChange:"clearPWConfirm('sudo_password_confirm')",ask:!0,clear:!0,associated:"sudo_password_confirm",autocomplete:!1},sudo_password_confirm:{label:"Confirm Sudo Password",type:"password",ngShow:"kind.value == 'ssh'",addRequired:!1,editRequired:!1,awPassMatch:!0,associated:"sudo_password",autocomplete:!1}},buttons:{save:{label:"Save",ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("GroupFormDefinition",[]).value("GroupForm",{addTitle:"Create Group",editTitle:"Edit Group",showTitle:!0,cancelButton:!1,name:"group",well:!0,formLabelSize:"col-lg-3",formFieldSize:"col-lg-9",tabs:[{name:"properties",label:"Properties"},{name:"source",label:"Source"}],fields:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,tab:"properties"},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1,tab:"properties"},variables:{label:"Variables",type:"textarea",addRequired:!1,editRequird:!1,rows:6,"default":"---",dataTitle:"Group Variables",dataPlacement:"right",awPopOver:'

Variables defined here apply to all child groups and hosts.

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n

View JSON examples at www.json.org

View YAML examples at docs.ansible.com

',dataContainer:"body",tab:"properties"},source:{label:"Source",type:"select",ngOptions:"source.label for source in source_type_options",ngChange:"sourceChange()",addRequired:!1,editRequired:!1,tab:"source"},source_path:{label:"Script Path",ngShow:"source && source.value == 'file'",type:"text",awRequiredWhen:{variable:"sourcePathRequired",init:"false"},tab:"source"},credential:{label:"Cloud Credential",type:"lookup",ngShow:"source && source.value !== ''",sourceModel:"credential",sourceField:"name",ngClick:"lookUpCredential()",addRequired:!1,editRequired:!1,tab:"source"},source_regions:{label:"Regions",type:"text",ngShow:"source && (source.value == 'rax' || source.value == 'ec2')",addRequired:!1,editRequired:!1,awMultiselect:"source_region_choices",dataTitle:"Source Regions",dataPlacement:"right",awPopOver:"

Click on the regions field to see a list of regions for your cloud provider. You can select multiple regions, or choose All to include all regions. Tower will only be updated with Hosts associated with the selected regions.

",dataContainer:"body",tab:"source"},source_vars:{label:"Source Variables",ngShow:"source && (source.value == 'file' || source.value == 'ec2')",type:"textarea",addRequired:!1,editRequird:!1,rows:6,"default":"---",parseTypeName:"envParseType",dataTitle:"Source Variables",dataPlacement:"right",awPopOver:'

Override variables found in ec2.ini and used by the inventory update script. For a detailed description of these variables view ec2.ini in the Ansible github repo.

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n

View JSON examples at www.json.org

View YAML examples at docs.ansible.com

',dataContainer:"body",tab:"source"},checkbox_group:{label:"Update Options",type:"checkbox_group",ngShow:"source && (source.value !== '' && source.value !== null)",tab:"source",fields:[{name:"overwrite",label:"Overwrite",type:"checkbox",ngShow:"source.value !== '' && source.value !== null",addRequired:!1,editRequired:!1,awPopOver:"

When checked all child groups and hosts not found on the remote source will be deleted from the local inventory.

Unchecked any local child hosts and groups not found on the external source will remain untouched by the inventory update process.

",dataTitle:"Overwrite",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"},{name:"overwrite_vars",label:"Overwrite Variables",type:"checkbox",ngShow:"source.value !== '' && source.value !== null",addRequired:!1,editRequired:!1,awPopOver:"

If checked, all variables for child groups and hosts will be removed and replaced by those found on the external source.

When not checked a merge will be performed, combining local variables with those found on the external source.

",dataTitle:"Overwrite Variables",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"},{name:"update_on_launch",label:"Update on Launch",type:"checkbox",ngShow:"source.value !== '' && source.value !== null",addRequired:!1,editRequired:!1,awPopOver:"

Each time a job runs using this inventory, refresh the inventory from the selected source before executing job tasks.

",dataTitle:"Update on Launch",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"}]}},buttons:{labelClass:"col-lg-3",controlClass:"col-lg-5",save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("HostGroupsFormDefinition",[]).value("HostGroupsForm",{editTitle:"Host Groups",name:"host",well:!1,formLabelSize:"col-lg-3",formFieldSize:"col-lg-9",fields:{groups:{label:"Groups",type:"select",multiple:!0,ngOptions:"group.name for group in inventory_groups",addRequired:!0,editRequired:!0,awPopOver:"

Provide a host name, ip address, or ip address:port. Examples include:

myserver.domain.com
127.0.0.1
10.1.0.140:25
server.example.com:25
",dataTitle:"Host Name",dataPlacement:"right",dataContainer:"#form-modal .modal-content"}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("HostFormDefinition",[]).value("HostForm",{addTitle:"Create Host",editTitle:"{{ name }}",name:"host",well:!1,formLabelSize:"col-lg-3",formFieldSize:"col-lg-9",fields:{name:{label:"Host Name",type:"text",addRequired:!0,editRequired:!0,awPopOver:"

Provide a host name, ip address, or ip address:port. Examples include:

myserver.domain.com
127.0.0.1
10.1.0.140:25
server.example.com:25
",dataTitle:"Host Name",dataPlacement:"right",dataContainer:"#form-modal .modal-content"},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1},enabled:{label:"Enabled?",type:"checkbox",addRequired:!1,editRequired:!1,"default":!0,awPopOver:"

Indicates if a host is available and should be included in running jobs.

For hosts that are part of an external inventory, this flag cannot be changed. It will be set by the inventory sync process.

",dataTitle:"Host Enabled",dataPlacement:"right",dataContainer:"#form-modal .modal-content",ngDisabled:"has_inventory_sources == true"},variables:{label:"Variables",type:"textarea",addRequired:!1,editRequird:!1,rows:6,"class":"modal-input-xlarge","default":"---",awPopOver:'

Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n

View JSON examples at www.json.org

View YAML examples at docs.ansible.com

',dataTitle:"Host Variables",dataPlacement:"right",dataContainer:"#form-modal .modal-content"},inventory:{type:"hidden",includeOnEdit:!0,includeOnAdd:!0}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("InventoryFormDefinition",[]).value("InventoryForm",{addTitle:"Create Inventory",editTitle:"{{ inventory_name | capitalize }}",name:"inventory",well:!0,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:{inventory_name:{realName:"name",label:"Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!1},inventory_description:{realName:"description",label:"Description",type:"text",addRequired:!1,editRequired:!1},organization:{label:"Organization",type:"lookup",sourceModel:"organization",sourceField:"name",ngClick:"lookUpOrganization()",awRequiredWhen:{variable:"organizationrequired",init:"true"}},inventory_variables:{realName:"variables",label:"Variables",type:"textarea","class":"span12",addRequired:!1,editRequird:!1,parseTypeName:"inventoryParseType",rows:6,"default":"---",awPopOver:'

Enter inventory variables using either JSON or YAML syntax. Use the radio button to toggle between the two.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n

View JSON examples at www.json.org

View YAML examples at docs.ansible.com

',dataTitle:"Inventory Variables",dataPlacement:"right",dataContainer:"body"}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("JobEventDataDefinition",[]).value("JobEventDataForm",{editTitle:"{{ id }} - {{ event_display }}",name:"job_events",well:!1,"class":"horizontal-narrow",fields:{event_data:{label:!1,type:"textarea",readonly:!0,rows:18,"class":"modal-input-xxlarge"}}}),angular.module("JobEventsFormDefinition",[]).value("JobEventsForm",{name:"job_events",well:!1,forceListeners:!0,fields:{status:{labelClass:"job-{{ status }}",type:"custom",section:"Event",control:'
{{ status }}
'},id:{label:"ID",type:"text",readonly:!0,section:"Event","class":"span1"},created:{label:"Created On",type:"text",section:"Event",readonly:!0},host:{label:"Host",type:"text",readonly:!0,section:"Event",ngShow:"host !== ''"},play:{label:"Play",type:"text",readonly:!0,section:"Event",ngShow:"play !== ''"},task:{label:"Task",type:"text",readonly:!0,section:"Event",ngShow:"task !== ''"},rc:{label:"Return Code",type:"text",readonly:!0,section:"Results","class":"span1",ngShow:"rc !== ''"},msg:{label:"Msg",type:"textarea",readonly:!0,section:"Results","class":"nowrap",ngShow:"msg !== ''",rows:10},stdout:{label:"Std Out",type:"textarea",readonly:!0,section:"Results","class":"nowrap",ngShow:"stdout !== ''",rows:10},stderr:{label:"Std Err",type:"textarea",readonly:!0,section:"Results","class":"nowrap",ngShow:"stderr !== ''",rows:10},results:{label:"Results",type:"textarea",section:"Results",readonly:!0,"class":"nowrap",ngShow:"results !== ''",rows:10},start:{label:"Start",type:"text",readonly:!0,section:"Timing",ngShow:"start !== ''"},traceback:{label:!1,type:"textarea",readonly:!0,section:"Traceback","class":"nowrap",ngShow:"traceback !== ''",rows:10},end:{label:"End",type:"text",readonly:!0,section:"Timing",ngShow:"end !== ''"},delta:{label:"Elapsed",type:"text",readonly:!0,section:"Timing",ngShow:"delta !== ''"},module_name:{label:"Name",type:"text",readonly:!0,section:"Module",ngShow:"module_name !== ''"},module_args:{label:"Args",type:"text",readonly:!0,section:"Module",ngShow:"module_args !== ''"}}}),angular.module("JobSummaryDefinition",[]).value("JobSummary",{editTitle:"{{ id }} - {{ name }}",name:"jobs",well:!1,fields:{status:{type:"custom",control:'
Status {{ status }}
',readonly:!0},created:{label:"Created On",type:"text",readonly:!0},result_stdout:{label:"Standard Out",type:"textarea",readonly:!0,xtraWide:!0,rows:"{{ stdout_rows }}","class":"nowrap mono-space resizable",ngShow:'result_stdout != ""'},result_traceback:{label:"Traceback",type:"textarea",xtraWide:!0,readonly:!0,rows:"{{ traceback_rows }}","class":"nowrap mono-space resizable",ngShow:'result_traceback != ""'}}}),angular.module("JobTemplateFormDefinition",[]).value("JobTemplateForm",{addTitle:"Create Job Templates",editTitle:"{{ name }}",name:"job_templates",twoColumns:!0,well:!0,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:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,column:1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1,column:1},job_type:{label:"Job Type",type:"select",ngOptions:"type.label for type in job_type_options","default":0,addRequired:!0,editRequired:!0,column:1,awPopOver:"

When this template is submitted as a job, setting the type to run will execute the playbook, running tasks on the selected hosts.

Setting the type to check will not execute the playbook. Instead, ansible will check playbook syntax, test environment setup and report problems.

",dataTitle:"Job Type",dataPlacement:"right",dataContainer:"body"},inventory:{label:"Inventory",type:"lookup",sourceModel:"inventory",sourceField:"name",ngClick:"lookUpInventory()",awRequiredWhen:{variable:"inventoryrequired",init:"true"},column:1,awPopOver:"

Select the inventory containing the hosts you want this job to manage.

",dataTitle:"Inventory",dataPlacement:"right",dataContainer:"body"},project:{label:"Project",type:"lookup",sourceModel:"project",sourceField:"name",ngClick:"lookUpProject()",awRequiredWhen:{variable:"projectrequired",init:"true"},column:1,awPopOver:"

Select the project containing the playbook you want this job to execute.

",dataTitle:"Project",dataPlacement:"right",dataContainer:"body"},playbook:{label:"Playbook",type:"select",ngOptions:"book for book in playbook_options",id:"playbook-select",awRequiredWhen:{variable:"playbookrequired",init:"true"},column:1,awPopOver:"

Select the playbook to be executed by this job.

",dataTitle:"Playbook",dataPlacement:"right",dataContainer:"body"},credential:{label:"Machine Credential",type:"lookup",sourceModel:"credential",sourceField:"name",ngClick:"lookUpCredential()",addRequired:!1,editRequired:!1,column:1,awPopOver:"

Select the credential you want the job to use when accessing the remote hosts. Choose the credential containing the username and SSH key or password that Ansbile will need to log into the remote hosts.

",dataTitle:"Credential",dataPlacement:"right",dataContainer:"body"},cloud_credential:{label:"Cloud Credential",type:"lookup",sourceModel:"cloud_credential",sourceField:"name",ngClick:"lookUpCloudcredential()",addRequired:!1,editRequired:!1,column:1,awPopOver:"

Selecting an optional cloud credential in the job template will pass along the access credentials to the running playbook, allowing provisioning into the cloud without manually passing parameters to the included modules.

",dataTitle:"Cloud Credential",dataPlacement:"right",dataContainer:"body"},forks:{label:"Forks",id:"forks-number",type:"number",integer:!0,min:0,spinner:!0,"default":"0",addRequired:!1,editRequired:!1,"class":"input-small",column:1,awPopOver:'

The number of parallel or simultaneous processes to use while executing the playbook. 0 signifies the default value from the ansible configuration file.

',dataTitle:"Forks",dataPlacement:"right",dataContainer:"body"},limit:{label:"Limit",type:"text",addRequired:!1,editRequired:!1,column:1,awPopOver:'

Provide a host pattern to further constrain the list of hosts that will be managed or affected by the playbook. Multiple patterns can be separated by ; : or ,

For more information and examples see the Patters top at docs.ansible.com.

',dataTitle:"Limit",dataPlacement:"right",dataContainer:"body"},verbosity:{label:"Verbosity",type:"select",ngOptions:"v.label for v in verbosity_options","default":0,addRequired:!0,editRequired:!0,column:1,awPopOver:"

Control the level of output ansible will produce as the playbook executes.

",dataTitle:"Verbosity",dataPlacement:"right",dataContainer:"body"},variables:{label:"Extra Variables",type:"textarea",rows:6,"class":"span12",addRequired:!1,editRequired:!1,"default":"---",column:2,awPopOver:'

Pass extra command line variables to the playbook. This is the -e or --extra-vars command line parameter for ansible-playbook. Provide key/value pairs using either YAML or JSON.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n',dataTitle:"Extra Variables",dataPlacement:"right",dataContainer:"body"},job_tags:{label:"Job Tags",type:"textarea",rows:1,addRequired:!1,editRequired:!1,"class":"span12",column:2,awPopOver:"

Provide a comma separated list of tags.

\n

Tags are useful when you have a large playbook, and you want to run a specific part of a play or task.

For example, you might have a task consisiting of a long list of actions. Tag values can be assigned to each action. Suppose the actions have been assigned tag values of "configuration", "packages" and "install".

If you just want to run the "configuration" and "packages" actions, you would enter the following here in the Job Tags field:

\n
configuration,packages
\n",dataTitle:"Job Tags",dataPlacement:"right",dataContainer:"body"},allow_callbacks:{label:"Allow Callbacks",type:"checkbox",addRequired:!1,editRequird:!1,trueValue:"true",falseValue:"false",ngChange:"toggleCallback('host_config_key')",column:2,awPopOver:'

Create a callback URL a host can use to contact Tower and request a configuration update using the job template. The URL will look like the following:

\n

http://your.server.com:999/api/v1/job_templates/1/callback/

The request from the host must be a POST. Here is an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n

Note the requesting host must be defined in your inventory. If ansible fails to locate the host either by name or IP address in one of your defined inventories, the request will be denied.

Successful requests will result in an entry on the Jobs tab, where the results and history can be viewed.

',dataPlacement:"right",dataTitle:"Callback URL",dataContainer:"body"},callback_url:{label:"Callback URL",type:"text",addRequired:!1,editRequired:!1,readonly:!0,column:2,required:!1,"class":"span12",awPopOver:'

Using this URL a host can contact Tower and request a configuration update using the job template. The request from the host must be a POST. Here is an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n

Note the requesting host must be defined in your inventory. If ansible fails to locate the host either by name or IP address in one of your defined inventories, the request will be denied.

Successful requests will result in an entry on the Jobs tab, where the results and history can be viewed.

',dataPlacement:"right",dataTitle:"Callback URL",dataContainer:"body"},host_config_key:{label:"Host Config Key",type:"text",ngShow:"allow_callbacks",genMD5:!0,column:2,awPopOver:'

When contacting the Tower server using the callback URL, the calling host must authenticate by including this key in the POST data of the request. Here\'s an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n',dataPlacement:"right",dataContainer:"body"}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{jobs:{type:"collection",title:"Jobs",iterator:"job",index:!1,open:!1,actions:{reset:{dataPlacement:"top",icon:"icon-undo",mode:"all","class":"btn-xs btn-primary",awToolTip:"Reset the search filter",ngClick:"resetSearch('job')",iconSize:"large"}},fields:{id:{label:"Job ID",key:!0,desc:!0,searchType:"int"},created:{label:"Date",link:!1,searchable:!1},status:{label:"Status","class":"job-{{ job.status }}",searchType:"select",linkTo:"{{}} job.statusLinkTo }}",searchOptions:[{name:"new",value:"new"},{name:"waiting",value:"waiting"},{name:"pending",value:"pending"},{name:"running",value:"running"},{name:"successful",value:"successful"},{name:"error",value:"error"},{name:"failed",value:"failed"},{name:"canceled",value:"canceled"}],badgeIcon:"fa icon-job-{{ job.status }}",badgePlacement:"left",badgeToolTip:"{{ job.statusBadgeToolTip }}",badgeTipPlacement:"top",badgeNgHref:"{{ job.statusLinkTo }}",awToolTip:"{{ job.statusBadgeToolTip }}",dataPlacement:"top"}},fieldActions:{edit:{label:"View",ngClick:"edit('jobs', job.id, job.name)",icon:"icon-zoom-in"}}}}}),angular.module("JobFormDefinition",[]).value("JobForm",{addTitle:"Create Job",editTitle:"{{ id }} - {{ name }}",name:"jobs",well:!0,collapse:!0,collapseMode:"edit",collapseTitle:"Job Template",twoColumns:!0,navigationLinks:{details:{href:"/#/jobs/{{ job_id }}",label:"Status",icon:"icon-zoom-in",active:!0,ngShow:"job_id !== null"},events:{href:"/#/jobs/{{ job_id }}/job_events",label:"Events",icon:"icon-list-ul"},hosts:{href:"/#/jobs/{{ job_id }}/job_host_summaries",label:"Host Summary",icon:"icon-laptop"}},fields:{name:{label:"Job Template",type:"text",addRequired:!1,editRequired:!1,readonly:!0,column:1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1,column:1},job_type:{label:"Job Type",type:"select",ngOptions:"type.label for type in job_type_options","default":"run",addRequired:!0,editRequired:!0,awPopOver:"

When this template is submitted as a job, setting the type to run will execute the playbook, running tasks on the selected hosts.

Setting the type to check will not execute the playbook. Instead, ansible will check playbook syntax, test environment setup and report problems.

",dataTitle:"Job Type",dataPlacement:"right",dataContainer:"body",column:1},inventory:{label:"Inventory",type:"lookup",sourceModel:"inventory",sourceField:"name",addRequired:!0,editRequired:!0,ngClick:"lookUpInventory()",column:1,awPopOver:"

Select the inventory containing the hosts you want this job to manage.

",dataTitle:"Inventory",dataPlacement:"right",dataContainer:"body"},project:{label:"Project",type:"lookup",sourceModel:"project",sourceField:"name",addRequired:!0,editRequired:!0,ngClick:"lookUpProject()",column:1,awPopOver:"

Select the project containing the playbook you want this job to execute.

",dataTitle:"Project",dataPlacement:"right",dataContainer:"body"},playbook:{label:"Playbook",type:"select",ngOptions:"book for book in playbook_options",id:"playbook-select",addRequired:!0,editRequired:!0,column:1,awPopOver:"

Select the playbook to be executed by this job.

",dataTitle:"Playbook",dataPlacement:"right",dataContainer:"body"},credential:{label:"Credential",type:"lookup",sourceModel:"credential",sourceField:"name",ngClick:"lookUpCredential()",addRequired:!1,editRequired:!1,column:1,awPopOver:"

Select the credential you want the job to use when accessing the remote hosts. Choose the credential containing the username and SSH key or password that Ansbile will need to log into the remote hosts.

",dataTitle:"Credential",dataPlacement:"right",dataContainer:"body"},cloud_credential:{label:"Cloud Credential",type:"lookup",sourceModel:"cloud_credential",sourceField:"name",ngClick:"lookUpCredential()",addRequired:!1,editRequired:!1,column:1,awPopOver:"

Selecting an optional cloud credential in the job template will pass along the access credentials to the running playbook, allowing provisioning into the cloud without manually passing parameters to the included modules.

",dataTitle:"Cloud Credential",dataPlacement:"right",dataContainer:"body"},forks:{label:"Forks",id:"forks-number",type:"number",integer:!0,min:0,spinner:!0,"class":"input-small","default":"0",addRequired:!1,editRequired:!1,column:1,disabled:!0,awPopOver:"

The number of parallel or simultaneous processes to use while executing the playbook.

",dataContainer:"body",dataTitle:"Forks",dataPlacement:"right"},limit:{label:"Limit",type:"text",addRequired:!1,editRequired:!1,column:1,awPopOver:'

Provide a host pattern to further constrain the list of hosts that will be managed or affected by the playbook. Multiple patterns can be separated by ; : or ,

For more information and examples see the Selecting Targets section under Inventory and Patterns in the Ansible documentation.

',dataContainer:"body",dataTitle:"Limit",dataPlacement:"right"},verbosity:{label:"Verbosity",type:"select",ngOptions:"v.label for v in verbosity_options","default":0,addRequired:!0,editRequired:!0,column:1,awPopOver:"

Control the level of output ansible will produce as the playbook executes.

",dataTitle:"Verbosity",dataPlacement:"right",dataContainer:"body"},variables:{label:"Extra Variables",type:"textarea",rows:6,"class":"span12",addRequired:!1,editRequired:!1,column:2,awPopOver:'

Pass extra command line variables to the playbook. This is the -e or --extra-vars command line parameter for ansible-playbook. Provide key/value pairs using either YAML or JSON.

JSON:
\n
{
"somevar": "somevalue",
"password": "magic"
}
\nYAML:
\n
---
somevar: somevalue
password: magic
\n',dataTitle:"Extra Variables",dataContainer:"body",dataPlacement:"right"},job_tags:{label:"Job Tags",type:"textarea",rows:1,addRequired:!1,editRequired:!1,"class":"span12",column:2,awPopOver:"

Provide a comma separated list of tags.

\n

Tags are useful when you have a large playbook, and you want to run a specific part of a play or task.

For example, you might have a task consisiting of a long list of actions. Tag values can be assigned to each action. Suppose the actions have been assigned tag values of "configuration", "packages" and "install".

If you just want to run the "configuration" and "packages" actions, you would enter the following here in the Job Tags field:

\n
configuration,packages
\n",dataTitle:"Job Tags",dataContainer:"body",dataPlacement:"right"},allow_callbacks:{label:"Allow Callbacks",type:"checkbox",addRequired:!1,editRequird:!1,trueValue:"true",falseValue:"false",ngChange:"toggleCallback('host_config_key')","class":"span12",column:2,awPopOver:'

Create a callback URL a host can use to contact Tower and request a configuration update using the job template. The URL will look like the following:

\n

http://your.server.com:999/api/v1/job_templates/1/callback/

The request from the host must be a POST. Here is an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n

Note the requesting host must be defined in your inventory. If ansible fails to locate the host either by name or IP address in one of your defined inventories, the request will be denied.

Successful requests will result in an entry on the Jobs tab, where the results and history can be viewed.

',dataPlacement:"right",dataContainer:"body",dataTitle:"Callback URL"},callback_url:{label:"Callback URL",type:"text",addRequired:!1,editRequired:!1,readonly:!0,column:2,required:!1,"class":"span12",awPopOver:'

Using this URL a host can contact Tower and request a configuration update using the job template. The request from the host must be a POST. Here is an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n

Note the requesting host must be defined in your inventory. If ansible fails to locate the host either by name or IP address in one of your defined inventories, the request will be denied.

Successful requests will result in an entry on the Jobs tab, where the results and history can be viewed.

',dataPlacement:"right",dataContainer:"body",dataTitle:"Callback URL"},host_config_key:{label:"Host Config Key",type:"text",ngShow:"allow_callbacks",genMD5:!0,column:2,awPopOver:'

When contacting Tower using the callback URL, the calling host must authenticate by including this key in the POST data of the request. Here\'s an example using curl:

\n

curl --data "host_config_key=5a8ec154832b780b9bdef1061764ae5a" http://your.server.com:999/api/v1/job_templates/1/callback/

\n',dataPlacement:"right",dataContainer:"body"}},buttons:{save:{label:"Save",icon:"icon-ok","class":"btn-success",ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",label:"Reset",icon:"icon-undo","class":"btn btn-default",ngDisabled:!0}},statusFields:{status:{type:"custom",control:'
Status {{ status }}
',readonly:!0},created:{label:"Created On",type:"text",readonly:!0},result_stdout:{label:"Standard Out",type:"textarea",readonly:!0,xtraWide:!0,rows:"{{ stdout_rows }}","class":"nowrap mono-space",ngShow:"result_stdout != ''"},result_traceback:{label:"Traceback",type:"textarea",xtraWide:!0,readonly:!0,rows:"{{ traceback_rows }}","class":"nowrap mono-space",ngShow:"result_traceback != ''"}},statusActions:{refresh:{dataPlacement:"top",icon:"icon-refresh",iconSize:"large",mode:"all","class":"btn-xs btn-primary",awToolTip:"Refresh the page",ngClick:"refresh()"}}}),angular.module("LicenseFormDefinition",[]).value("LicenseForm",{name:"license",well:!1,forceListeners:!0,fields:{license_status:{type:"custom",control:'
{{ license_status }}
',readonly:!0,section:"License"},license_key:{label:"Key",type:"textarea","class":"modal-input-xlarge",readonly:!0,section:"License"},license_date:{label:"Expires On",type:"text",readonly:!0,section:"License"},time_remaining:{label:"Time Left",type:"text",readonly:!0,section:"License"},available_instances:{label:"Available",type:"text",readonly:!0,section:"Managed Hosts"},current_instances:{label:"Used",type:"text",readonly:!0,section:"Managed Hosts"},free_instances:{label:"Remaining",type:"text",readonly:!0,section:"Managed Hosts",controlNGClass:"free_instances_class",labelNGClass:"free_instances_class"},company_name:{label:"Company",type:"text",readonly:!0,section:"Contact Info"},contact_name:{label:"Contact",type:"text",readonly:!0,section:"Contact Info"},contact_email:{label:"Contact Email",type:"text",readonly:!0,section:"Contact Info"}}}),angular.module("OrganizationFormDefinition",[]).value("OrganizationForm",{addTitle:"Create Organization",editTitle:"{{ name }}",name:"organization",well:!0,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:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{users:{type:"collection",title:"Users",iterator:"user",open:!1,actions:{add:{ngClick:"add('users')",label:"Add",icon:"icon-plus",awToolTip:"Add a new user"}},fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('users', user.id, user.username)",icon:"icon-edit","class":"btn-default",awToolTip:"Edit user"},"delete":{label:"Delete",ngClick:"delete('users', user.id, user.username, 'users')",icon:"icon-trash","class":"btn-danger",awToolTip:"Remove user"}}},admins:{type:"collection",title:"Administrators",iterator:"admin",open:!1,base:"/users",actions:{add:{ngClick:"add('admins')",icon:"icon-plus",label:"Add",awToolTip:"Add new administrator"}},fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('users', admin.id, admin.username)",icon:"icon-edit",awToolTip:"Edit administrator","class":"btn-default"},"delete":{label:"Delete",ngClick:"delete('admins', admin.id, admin.username, 'administrators')",icon:"icon-trash","class":"btn-danger",awToolTip:"Remove administrator"}}}}}),angular.module("PermissionFormDefinition",[]).value("PermissionsForm",{addTitle:"Add Permission",editTitle:"{{ name }}",name:"permission",well:!0,forceListeners:!0,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:{category:{label:"Permission Type",labelClass:"prepend-asterisk",type:"radio_group",options:[{label:"Inventory",value:"Inventory",selected:!0},{label:"Deployment",value:"Deploy"}],ngChange:"selectCategory()"},name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1},user:{label:"User",type:"hidden"},team:{label:"Team",type:"hidden"},project:{label:"Project",type:"lookup",sourceModel:"project",sourceField:"name",ngShow:"category == 'Deploy'",ngClick:"lookUpProject()",awRequiredWhen:{variable:"projectrequired",init:"false"}},inventory:{label:"Inventory",type:"lookup",sourceModel:"inventory",sourceField:"name",ngClick:"lookUpInventory()",awRequiredWhen:{variable:"inventoryrequired",init:"true"}},permission_type:{label:"Permission",labelClass:"prepend-asterisk",type:"radio_group",options:[{label:"Read",value:"read",ngShow:"category == 'Inventory'"},{label:"Write",value:"write",ngShow:"category == 'Inventory'"},{label:"Admin",value:"admin",ngShow:"category == 'Inventory'"},{label:"Run",value:"run",ngShow:"category == 'Deploy'"},{label:"Check",value:"check",ngShow:"category == 'Deploy'"}],helpCollapse:[{hdr:"Permission",ngBind:"permissionTypeHelp"}]}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{}}),angular.module("ProjectStatusDefinition",[]).value("ProjectStatusForm",{name:"project_update",editTitle:"SCM Status",well:!1,"class":"horizontal-narrow",fields:{created:{label:"Created",type:"text",readonly:!0},status:{label:"Status",type:"text",readonly:!0},result_stdout:{label:"Std Out",type:"textarea",ngShow:"result_stdout","class":"mono-space",readonly:!0,rows:15},result_traceback:{label:"Traceback",type:"textarea",ngShow:"result_traceback","class":"mono-space",readonly:!0,rows:15}}}),angular.module("ProjectFormDefinition",[]).value("ProjectsForm",{addTitle:"Create Project",editTitle:"{{ name }}",name:"project",well:!0,forceListeners:!0,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:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1},organization:{label:"Organization",type:"lookup",sourceModel:"organization",sourceField:"name",addRequired:!0,editRequired:!1,excludeMode:"edit",ngClick:"lookUpOrganization()",awRequiredWhen:{variable:"organizationrequired",init:"true"},awPopOver:"

A project must have at least one organization. Pick one organization now to create the project, and then after the project is created you can add additional organizations.

Only super users and organization administrators are allowed to make changes to projects. Associating one or more organizations to a project determins which organizations admins have access to modify the project.",dataTitle:"Organization",dataContainer:"body",dataPlacement:"right"},scm_type:{label:"SCM Type",type:"select",ngOptions:"type.label for type in scm_type_options",ngChange:"scmChange()",addRequired:!0,editRequired:!0},missing_path_alert:{type:"alertblock","class":"alert-info",ngShow:"showMissingPlaybooksAlert && scm_type.value == ''",alertTxt:'

WARNING: There are no unassigned playbook directories in the base project path {{ base_dir }}. Either the projects directory is empty, or all of the contents are already assigned to other projects. New projects can be checked out from source control by changing the SCM type option rather than specifying checkout paths manually. To continue with manual setup, log into the Tower host and ensure content is present in a subdirectory under {{ base_dir }}. Run "chown -R awx" on the content directory to ensure Tower can read the playbooks.

',closeable:!1},base_dir:{label:"Project Base Path",type:"textarea",showonly:!0,ngShow:"scm_type.value == ''",awPopOver:"

Base path used for locating playbooks. Directories found inside this path will be listed in the playbook directory drop-down. Together the base path and selected playbook directory provide the full path used to locate playbooks.

Use PROJECTS_ROOT in your environment settings file to determine the base path value.

",dataTitle:"Project Base Path",dataContainer:"body",dataPlacement:"right"},local_path:{label:"Playbook Directory",type:"select",id:"local-path-select",ngOptions:"path.label for path in project_local_paths",awRequiredWhen:{variable:"pathRequired",init:!1},ngShow:"scm_type.value == '' && !showMissingPlaybooksAlert",awPopOver:"

Select from the list of directories found in the base path.Together the base path and the playbook directory provide the full path used to locate playbooks.

Use PROJECTS_ROOT in your environment settings file to determine the base path value.

",dataTitle:"Project Path",dataContainer:"body",dataPlacement:"right"},scm_url:{label:"SCM URL",type:"text",ngShow:"scm_type && scm_type.value !== ''",awRequiredWhen:{variable:"scmRequired",init:!1},helpCollapse:[{hdr:"GIT URLs",content:'

Example URLs for GIT SCM include:

  • https://github.com/ansible/ansible.git
  • git@github.com:ansible/ansible.git
  • git://servername.example.com/ansible.git

Note: If using SSH protocol for GitHub or Bitbucket, enter in the SSH key only, do not enter a username (other than git). Additionally, GitHub and Bitbucket do not support password authentication when using SSH protocol. GIT read only protocol (git://) does not use username or password information.',show:"scm_type.value == 'git'"},{hdr:"SVN URLs",content:'

Example URLs for Subversion SCM include:

  • https://github.com/ansible/ansible
  • svn://servername.example.com/path
  • svn+ssh://servername.example.com/path
',show:"scm_type.value == 'svn'"},{hdr:"Mercurial URLs",content:'

Example URLs for Mercurial SCM include:

  • https://bitbucket.org/username/project
  • ssh://hg@bitbucket.org/username/project
  • ssh://server.example.com/path

Note: Mercurial does not support password authentication for SSH. If applicable, add the username, password and key below. Do not put the username and key in the URL. If using Bitbucket and SSH, do not supply your Bitbucket username.',show:"scm_type.value == 'hg'"}]},scm_branch:{labelBind:"scmBranchLabel",type:"text",ngShow:"scm_type && scm_type.value !== ''",addRequired:!1,editRequired:!1},credential:{label:"SCM Credential",type:"lookup",ngShow:"scm_type && scm_type.value !== ''",sourceModel:"credential",sourceField:"name",ngClick:"lookUpCredential()",addRequired:!1,editRequired:!1},checkbox_group:{label:"SCM Update Options",type:"checkbox_group",ngShow:"scm_type && scm_type.value !== ''",fields:[{name:"scm_clean",label:"Clean",type:"checkbox",addRequired:!1,editRequired:!1,awPopOver:"

Remove any local modifications prior to performing an update.

",dataTitle:"SCM Clean",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"},{name:"scm_delete_on_update",label:"Delete on Update",type:"checkbox",addRequired:!1,editRequired:!1,awPopOver:"

Delete the local repository in its entirety prior to performing an update.

Depending on the size of the repository this may significantly increase the amount of time required to complete an update.

",dataTitle:"SCM Delete",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"},{name:"scm_update_on_launch",label:"Update on Launch",type:"checkbox",addRequired:!1,editRequired:!1,awPopOver:"

Each time a job runs using this project, perform an update to the local repository prior to starting the job.

",dataTitle:"SCM Update",dataContainer:"body",dataPlacement:"right",labelClass:"checkbox-options"}]}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{organizations:{type:"collection",title:"Organizations",iterator:"organization",open:!1,actions:{add:{ngClick:"add('organizations')",icon:"icon-plus",label:"Add",awToolTip:"Add an organization"}},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('organizations', organization.id, organization.name)",icon:"icon-edit",awToolTip:"Edit the organization","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('organizations', organization.id, organization.name, 'organizations')",icon:"icon-trash","class":"btn-danger",awToolTip:"Delete the organization"}}}}}),angular.module("TeamFormDefinition",[]).value("TeamForm",{addTitle:"Create Team",editTitle:"{{ name }}",name:"team",well:!0,collapse:!0,collapseTitle:"Team Settings",collapseMode:"edit",collapseOpen:!0,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:{name:{label:"Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!1},description:{label:"Description",type:"text",addRequired:!1,editRequired:!1},organization:{label:"Organization",type:"lookup",sourceModel:"organization",sourceField:"name",ngClick:"lookUpOrganization()",awRequiredWhen:{variable:"teamrequired",init:"true"}}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{credentials:{type:"collection",title:"Credentials",iterator:"credential",open:!1,actions:{add:{ngClick:"add('credentials')",icon:"icon-plus",label:"Add",add:"Add a new credential"}},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('credentials', credential.id, credential.name)",icon:"icon-edit",awToolTip:"Modify the credential","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('credentials', credential.id, credential.name, 'credentials')",icon:"icon-trash","class":"btn-danger",awToolTip:"Remove the credential"}}},permissions:{type:"collection",title:"Permissions",iterator:"permission",open:!1,actions:{add:{ngClick:"add('permissions')",icon:"icon-plus",label:"Add",awToolTip:"Add a permission for this user",ngShow:"PermissionAddAllowed"}},fields:{name:{key:!0,label:"Name",ngClick:"edit('permissions', permission.id, permission.name)"},inventory:{label:"Inventory",sourceModel:"inventory",sourceField:"name",ngBind:"permission.summary_fields.inventory.name"},project:{label:"Project",sourceModel:"project",sourceField:"name",ngBind:"permission.summary_fields.project.name"},permission_type:{label:"Permission"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('permissions', permission.id, permission.name)",icon:"icon-edit",awToolTip:"Edit the permission","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('permissions', permission.id, permission.name, 'permissions')",icon:"icon-trash","class":"btn-danger",awToolTip:"Delete the permission",ngShow:"PermissionAddAllowed"}}},projects:{type:"collection",title:"Projects",iterator:"project",open:!1,actions:{add:{ngClick:"add('projects')",icon:"icon-plus",label:"Add"}},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('projects', project.id, project.name)",icon:"icon-edit",awToolTip:"Modify the project","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('projects', project.id, project.name, 'projects')",icon:"icon-trash","class":"btn-danger",awToolTip:"Remove the project"}}},users:{type:"collection",title:"Users",iterator:"user",open:!1,actions:{add:{ngClick:"add('users')",icon:"icon-plus",label:"Add",awToolTip:"Add a user"}},fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('users', user.id, user.username)",icon:"icon-edit",awToolTip:"Edit user","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('users', user.id, user.username, 'users')",icon:"icon-terash","class":"btn-danger",awToolTip:"Remove user"}}}}}),angular.module("UserFormDefinition",[]).value("UserForm",{addTitle:"Create User",editTitle:"{{ username }}",name:"user",well:!0,forceListeners:!0,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:{first_name:{label:"First Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!0},last_name:{label:"Last Name",type:"text",addRequired:!0,editRequired:!0,capitalize:!0},email:{label:"Email",type:"email",addRequired:!0,editRequired:!0,autocomplete:!1},organization:{label:"Organization",type:"lookup",sourceModel:"organization",sourceField:"name",ngClick:"lookUpOrganization()",excludeMode:"edit",awRequiredWhen:{variable:"orgrequired",init:!0}},username:{label:"Username",type:"text",awRequiredWhen:{variable:"not_ldap_user",init:!0},autocomplete:!1},password:{label:"Password",type:"password",ngShow:"ldap_user == false",addRequired:!0,editRequired:!1,ngChange:"clearPWConfirm('password_confirm')",autocomplete:!1,chkPass:!0},password_confirm:{label:"Confirm Password",type:"password",ngShow:"ldap_user == false",addRequired:!1,editRequired:!1,awPassMatch:!0,associated:"password",autocomplete:!1},is_superuser:{label:"Superuser (User has full system administration privileges.)",type:"checkbox",trueValue:"true",falseValue:"false","default":"false",ngShow:"current_user['is_superuser'] == true"},ldap_user:{label:"Created by LDAP",type:"checkbox",readonly:!0}},buttons:{save:{ngClick:"formSave()",ngDisabled:!0},reset:{ngClick:"formReset()",ngDisabled:!0}},related:{credentials:{type:"collection",title:"Credentials",iterator:"credential",open:!1,actions:{add:{ngClick:"add('credentials')",icon:"icon-plus",label:"Add",awToolTip:"Add a credential for this user"}},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('credentials', credential.id, credential.name)",icon:"icon-edit",awToolTip:"Edit the credential","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('credentials', credential.id, credential.name, 'credentials')",icon:"icon-trash","class":"btn-danger",awToolTip:"Delete the credential"}}},permissions:{type:"collection",title:"Permissions",iterator:"permission",open:!1,actions:{add:{ngClick:"add('permissions')",icon:"icon-plus",label:"Add",awToolTip:"Add a permission for this user",ngShow:"PermissionAddAllowed"}},fields:{name:{key:!0,label:"Name",ngClick:"edit('permissions', permission.id, permission.name)"},inventory:{label:"Inventory",sourceModel:"inventory",sourceField:"name",ngBind:"permission.summary_fields.inventory.name"},project:{label:"Project",sourceModel:"project",sourceField:"name",ngBind:"permission.summary_fields.project.name"},permission_type:{label:"Permission"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('permissions', permission.id, permission.name)",icon:"icon-edit",awToolTip:"Edit the permission","class":"btn btn-default"},"delete":{label:"Delete",ngClick:"delete('permissions', permission.id, permission.name, 'permissions')",icon:"icon-trash","class":"btn-danger",awToolTip:"Delete the permission",ngShow:"PermissionAddAllowed"}}},admin_of_organizations:{type:"collection",title:"Admin of Organizations",iterator:"adminof",open:!1,base:"/organizations",actions:{},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}},organizations:{type:"collection",title:"Organizations",iterator:"organization",open:!1,actions:{},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}},teams:{type:"collection",title:"Teams",iterator:"team",open:!1,actions:{},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}},projects:{type:"collection",title:"Projects",iterator:"project",open:!1,actions:{},fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}}}}),angular.module("InventoryGroupsHelpDefinition",[]).value("InventoryGroupsHelp",{story:{hdr:"Building your inventory",width:510,height:560,steps:[{intro:"Start by creating a group:",img:{src:"groups001.png",maxWidth:338,maxHeight:222},box:'Click on the groups list (the left side of the page) to add a new group.',autoOffNotice:!0},{intro:"Enter group properties:",img:{src:"groups002.png",maxWidth:443,maxHeight:251},box:'Enter the group name, a description and any inventory variables. Variables can be entered using either JSON or YAML syntax. For more on inventory variables, see docs.ansible.com/intro_inventory.html'},{intro:"Cloud inventory: select cloud source",img:{src:"groups003.png",maxWidth:412,maxHeight:215},box:'For a cloud inventory, choose the cloud provider from the list and select your credentials. If you have not already setup credentials for the provider, you will need to do that first on the Credentials tab.'},{intro:"Cloud inventory: synchronize Tower with the cloud",img:{src:"groups004.png",maxWidth:261,maxHeight:221},box:'To pull the cloud inventory into Tower, initiate an inventory sync by clicking .'},{intro:"Groups can have subgroups:",img:{src:"groups005.png",maxWidth:430,maxHeight:206},box:'
First, select a group. Then click to create a new group. The new group will be added to the selected group.
'},{intro:"Copy or move groups:",img:{src:"groups006.png",maxWidth:263,maxHeight:211},box:'
Copy or move a group by dragging and dropping its name onto another group name. A dialog will appear asking if the group should be coppied or moved.
'},{intro:"Adding hosts:",img:{src:"groups007.png",maxWidth:466,maxHeight:178},box:'

First, select a Group. Then click on the hosts list (the right side of the page) to create a host. The new host will be part of the selected group.

Note hosts cannot be added to the All Hosts group.

'}]}}),angular.module("AccessHelper",["RestServices","Utilities","ngCookies"]).factory("CheckAccess",["$rootScope","Alert","Rest","GetBasePath","ProcessErrors",function(a,b,c,d,e){return function(b){var d=a.current_user,f=b.scope; d.is_superuser?f.PermissionAddAllowed=!0:d.related.admin_of_organizations&&(c.setUrl(d.related.admin_of_organizations),c.get().success(function(a){f.PermissionAddAllowed=a.results.length>0?!0:!1}).error(function(a,b){e(f,a,b,null,{hdr:"Error!",msg:"Call to "+d.related.admin_of_organizations+" failed. DELETE returned status: "+b})}))}}]).factory("CheckLicense",["$rootScope","$cookieStore","Alert","$location","Authorization",function(a,b,c,d,e){return function(){var d,f,g="success",h=b.get("license"),i='

To purchase a license or extend an existing license visit the Ansible online store, or visit support.ansible.com for assistance.

';h&&!e.licenseTested()&&(h.tested=!0,b.remove("license"),b.put("license",h),a.license_tested=!0,void 0!==h.valid_key&&h.valid_key===!1?(g="alert-danger",d="License Error",f="

There is a problem with the /etc/awx/license file on your Tower server. Check to make sure Tower can access the file.

"+i,c(d,f,g,null,!1,!0)):void 0!==h.demo&&h.demo===!0&&(g="alert-info",d="Tower Demo",f="

Thank you for trying Ansible Tower. You can use this edition to manage up to 10 hosts free.

"+i,c(d,f,g)),void 0!==h.date_expired&&h.date_expired===!0?(g="alert-info",d="License Expired",f="

Your Ansible Tower License has expired and is no longer compliant. You can continue, but you will be unable to add any additional hosts.

"+i,c(d,f,g)):void 0!==h.date_warning&&h.date_warning===!0&&(g="alert-info",d="License Warning",f="

Your Ansible Tower license is about to expire!

"+i,c(d,f,g)),void 0!==h.free_instances&&parseInt(h.free_instances)<=0&&(g="alert-info",d="License Warning",f="

Your Ansible Tower license has reached capacity for the number of managed hosts allowed. You will not be able to add any additional hosts.

"+i,c(d,f,g,null,!0)))}}]),angular.module("ChildrenHelper",["RestServices","Utilities"]).factory("ToggleChildren",[function(){return function(a){function b(a){var b;for(i[a].ngicon="fa fa-minus-square-o node-toggle",b=a+1;b10?10:i,i=3>i?3:i,f.fields[h].rows=i);break;case"results":if(a.event_data&&a.event_data.res&&void 0===a.event_data.res[h])delete f.fields[h];else if(Array.isArray(a.event_data.res[h])&&0!==a.event_data.res[h].length){for(j="",c=0;c10?10:i,i=3>i?3:i,f.fields[h].rows=i)}else delete f.fields[h];break;case"module_name":case"module_args":a.event_data&&a.event_data.res&&(void 0===a.event_data.res.invocation||void 0===a.event_data.res.invocation[h])&&delete f.fields[h]}b=d.inject(f,{mode:"edit",modal:!0,related:!1}),d.reset(),b.formModalAction=function(){$("#form-modal").modal("hide")},b.formModalActionLabel="OK",b.formModalCancelShow=!1,b.formModalInfo="View JSON",$("#form-modal .btn-success").removeClass("btn-success").addClass("btn-none"),$("#form-modal").addClass("skinny-modal"),b.formModalHeader=a.event_display.replace(/^\u00a0*/g,""),b.formModalInfoAction=function(){var b=g,c=b.inject(l,{mode:"edit",modal:!0,related:!1,modal_selector:"#form-modal2",modal_body_id:"form-modal2-body",modal_title_id:"formModal2Header"});b.reset(),c.formModal2Header=a.event_display.replace(/^\u00a0*/g,""),c.event_data=JSON.stringify(a.event_data,null," "),c.formModal2ActionLabel="OK",c.formModal2CancelShow=!1,c.formModal2Info=!1,c.formModalInfo="View JSON",c.formModal2Action=function(){$("#form-modal2").modal("hide")},$("#form-modal2 .btn-success").removeClass("btn-success").addClass("btn-none")},"string"==typeof a.event_data.res&&(b.traceback=a.event_data.res);for(h in f.fields)switch(h){case"status":b.status=a.failed?"error":a.changed?"changed":"success";break;case"created":n=new Date(a.created),b.created=k(n);break;case"host":a.summary_fields&&a.summary_fields.host&&(b.host=a.summary_fields.host.name);break;case"id":case"task":case"play":b[h]=a[h];break;case"start":case"end":a.event_data&&a.event_data.res&&!m(a.event_data.res[h])&&(b[h]=a.event_data.res[h]);break;case"results":if(Array.isArray(a.event_data.res[h])&&a.event_data.res[h].length>0){for(j="",c=0;c button.',"alert-info"):(f("start"),a.setUrl(l.related.inventory_source),a.get().success(function(a){var b=a.related.current_update?a.related.current_update:a.related.last_update;d({group_name:a.summary_fields.group.name,last_update:b,license_error:a.summary_fields.last_update&&a.summary_fields.last_update.license_error?!0:!1,tree_id:j,group_id:k,parent_scope:i})}).error(function(a,c){f("stop"),b(i,a,c,null,{hdr:"Error!",msg:"Failed to retrieve inventory source: "+l.related.inventory_source+" POST returned status: "+c})})))}}]).factory("GetHostsStatusMsg",[function(){return function(a){var b,c,d,e=a.active_failures,f=a.total_hosts;return e>0?(b=f+(1===f?" host":" hosts")+". "+e+" with failed jobs.",d="true",c=!0):(c=!1,0===f?(b="Group contains 0 hosts.",d="na"):(b=f+(1===f?" host":" hosts")+". No job failures",d="false")),{tooltip:b,failures:c,"class":d}}}]).factory("GetSyncStatusMsg",[function(){return function(a){var b,c,d,e=a.status,f="",g="Start sync process";switch(b=e,c="icon-cloud-"+b,e){case"never updated":b="never",c="icon-cloud-na disabled",d='Sync not performed. Click to start it now.';break;case"none":case"":f="btn-disabled",b="n/a",c="icon-cloud-na disabled",d='Cloud source not configured. Click to update.',g=d;break;case"failed":d="Sync failed. Click to view log.";break;case"successful":d="Sync completed. Click to view log.";break;case"updating":d="Sync running"}return{"class":c,tooltip:d,status:b,launch_class:f,launch_tip:g}}}]).factory("SourceChange",["GetBasePath","CredentialList","LookUpInit","Empty",function(a,b,c,d){return function(e){var f,g,h=e.scope,i=e.form;d(h.source)||("file"===h.source.value?h.sourcePathRequired=!0:(h.sourcePathRequired=!1,h.source_path="",h[i.name+"_form"].source_path.$setValidity("required",!0)),"rax"===h.source.value?(h.source_region_choices=h.rax_regions,$("#s2id_group_source_regions").select2("data",[{id:"all",text:"All"}])):"ec2"===h.source.value&&(h.source_region_choices=h.ec2_regions,$("#s2id_group_source_regions").select2("data",[{id:"all",text:"All"}])),("rax"===h.source.value||"ec2"===h.source.value)&&(f="rax"===h.source.value?"rax":"aws",g=a("credentials")+"?cloud=true&kind="+f,c({url:g,scope:h,form:i,list:b,field:"credential"})))}}]).factory("GroupsCancelUpdate",["Rest","ProcessErrors","Alert","Wait","Find",function(a,b,c,d,e){return function(f){var g,h=f.scope,i=f.tree_id;h.removeCancelUpdate&&h.removeCancelUpdate(),h.removeCancelUpdate=h.$on("CancelUpdate",function(e,f){a.setUrl(f),a.post().success(function(){d("stop"),c("Inventory Sync Cancelled",'Your request to cancel the sync process was submitted to the task manger. Click the button to monitor the status.',"alert-info")}).error(function(a,c){d("stop"),b(h,a,c,null,{hdr:"Error!",msg:"Call to "+f+" failed. POST status: "+c})})}),h.removeCheckCancel&&h.removeCheckCancel(),h.removeCheckCancel=h.$on("CheckCancel",function(e,f,g){var i=g?g:f;i+="cancel/",a.setUrl(i),a.get().success(function(a){a.can_cancel?h.$emit("CancelUpdate",i):(d("stop"),c("Cancel Inventory Sync",'Either you do not have access or the sync process completed.
Click the button to view the latest status.',"alert-info"))}).error(function(a,c){d("stop"),b(h,a,c,null,{hdr:"Error!",msg:"Call to "+i+" failed. GET status: "+c})})}),g=e({list:h.groups,key:"id",val:i}),h.selected_tree_id=g.id,h.selected_group_id=g.group_id,!g||"updating"!==g.status&&"pending"!==g.status?c("Cancel Inventory Sync",'The sync process completed. Click the to view the latest status.',"alert-info"):(d("start"),a.setUrl(g.related.inventory_source),a.get().success(function(a){h.$emit("CheckCancel",a.related.last_update,a.related.current_update)}).error(function(a,c){d("stop"),b(h,a,c,null,{hdr:"Error!",msg:"Call to "+g.related.inventory_source+" failed. GET status: "+c})}))}}]).factory("GroupsAdd",["$rootScope","$location","$log","$routeParams","Rest","Alert","GroupForm","GenerateForm","Prompt","ProcessErrors","GetBasePath","ParseTypeChange","GroupsEdit","Wait","GetChoices","GetSourceTypeOptions","LookUpInit","BuildTree","SourceChange","WatchInventoryWindowResize",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){return function(b){var c,d=b.inventory_id,i=void 0!==b.group_id?b.group_id:null,m=b.scope,q=null!==i?k("groups")+i+"/children/":k("inventory")+d+"/groups/",u=g,v=h,w=v.inject(u,{mode:"add",modal:!0,related:!1,show_modal:!1});$("#form-modal .btn-none").removeClass("btn-none").addClass("btn-success"),w.formModalActionLabel="Save",w.formModalCancelShow=!0,w.parseType="yaml",w.source=null,l(w),v.reset(),w.removeAddTreeRefreshed&&w.removeAddTreeRefreshed(),w.removeAddTreeRefreshed=w.$on("GroupTreeRefreshed",function(){a.formModalHeader=null,a.formModalCancleShow=null,a.formModalActionLabel=null,n("stop"),$("#form-modal").modal("hide"),w.removeAddTreeRefreshed()}),w.removeSaveComplete&&w.removeSaveComplete(),w.removeSaveComplete=w.$on("SaveComplete",function(a,b,c){c||(w.searchCleanup&&w.searchCleanup(),w.formModalActionDisabled=!1,r({scope:m,inventory_id:d,refresh:!0,new_group_id:b}),t())}),w.removeFormSaveSuccess&&w.removeFormSaveSuccess(),w.removeFormSaveSuccess=w.$on("formSaveSuccess",function(a,b,c){var d,g,h,i,k=!1,l={};if(null!==w.source.value&&""!==w.source.value){for(l.group=b,l.source=w.source.value,l.source_path=w.source_path,l.credential=w.credential,l.overwrite=w.overwrite,l.overwrite_vars=w.overwrite_vars,l.update_on_launch=w.update_on_launch,d=$("#s2id_group_source_regions").select2("data"),g=[],h=0;h"+A.summary_fields.group.name+". Use the Refresh button to monitor the status.","alert-info"):o({scope:A,group_id:d,url:A.group_update_url,group_name:A.name,group_source:A.source.value})},A.sourceChange=function(){v({scope:A,form:g})}}}]).factory("GroupsDelete",["$rootScope","$location","$log","$routeParams","Rest","Alert","GroupForm","GenerateForm","Prompt","ProcessErrors","GetBasePath","Wait","BuildTree","Find",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){return function(a){var b,c=a.scope,d=a.tree_id,f=a.inventory_id,g=n({list:c.groups,key:"id",val:d}),h=k("inventory")+f+"/groups/";b=function(){$("#prompt-modal").on("hidden.bs.modal",function(){l("start")}),$("#prompt-modal").modal("hide"),e.setUrl(h),e.post({id:g.group_id,disassociate:1}).success(function(){$("#prompt-modal").off(),c.$emit("GroupDeleteCompleted")}).error(function(a,b){l("stop"),j(c,a,b,null,{hdr:"Error!",msg:"Call to "+h+" failed. POST returned status: "+b})})},i({hdr:"Delete Group",body:"

Are you sure you want to delete group "+g.name+"?

",action:b,"class":"btn-danger"})}}]).factory("ShowUpdateStatus",["$rootScope","$location","$log","$routeParams","Rest","Alert","GenerateForm","Prompt","ProcessErrors","GetBasePath","FormatDate","InventoryStatusForm","Wait","Empty","WatchInventoryWindowResize",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return function(a){function b(a){var b,d;return b=a.match(/\n/g),d=b?b.length:1,d>c?c:d}var c,d,h,j,n,p,q,r=a.group_name,s=a.last_update,t=g,u=l,v=a.license_error;void 0===s||null===s||""===s?(m("stop"),f("Missing Configuration","The selected group is not configured for inventory sync. Edit the group and provide Source information.","alert-info")):(d='
\n
\n',$("#inventory-modal-container").empty().append(d),h=t.inject(u,{mode:"edit",id:"form-container",breadCrumbs:!1,related:!1}),j=$(document).width(),n=$("body").height(),j>1199?(p=675,q=750>n?n-20:750,c=18):1199>=j&&j>=768?(p=550,q=620>n?n-15:620,c=12):(p=j-20,q=500>n?n:500,c=10),$("#status-modal-dialog").dialog({buttons:{OK:function(){$(this).dialog("close")}},modal:!0,width:p,height:q,autoOpen:!1,create:function(){$('.ui-dialog[aria-describedby="status-modal-dialog"]').find(".ui-dialog-titlebar button").empty().attr({"class":"close"}).text("x"),$('.ui-dialog[aria-describedby="status-modal-dialog"]').find(".ui-dialog-buttonset button:first").attr({"class":"btn btn-primary"})},resizeStop:function(){var a=$('.ui-dialog[aria-describedby="status-modal-dialog"]'),b=a.find("#status-modal-dialog");b.width(a.width()-28)},close:function(){$(".tooltip").each(function(){$(this).remove()}),$(".popover").each(function(){$(this).remove()}),$("#status-modal-dialog").dialog("destroy"),$("#inventory-modal-container").empty(),o()},open:function(){m("stop")}}),e.setUrl(s),e.get().success(function(a){for(var c in u.fields)a[c]&&(h[c]="created"===c?k(new Date(a[c])):a[c]);h.license_error=v,h.status_rows=b(a.status),h.stdout_rows=b(a.result_stdout),h.traceback_rows=b(a.result_traceback),$("#status-modal-dialog").dialog("open")}).error(function(a,b){$("#form-modal").modal("hide"),i(h,a,b,null,{hdr:"Error!",msg:"Failed to retrieve last update: "+s+". GET status: "+b})}))}}]),angular.module("HostsHelper",["RestServices","Utilities","ListGenerator","HostListDefinition","SearchHelper","PaginationHelpers","ListGenerator","AuthService","HostsHelper","InventoryHelper","RelatedSearchHelper","InventoryFormDefinition","SelectionHelper","HostGroupsFormDefinition"]).factory("SetEnabledMsg",[function(){return function(a){a.enabledToolTip=a.has_inventory_sources?a.enabled?"Host is available":"Host is not available":a.enabled?"Host is available. Click to toggle.":"Host is not available. Click to toggle."}}]).factory("SetHostStatus",["SetEnabledMsg",function(a){return function(b){b.activeFailuresLink="/#/hosts/"+b.id+"/job_host_summaries/?inventory="+b.inventory+"&host_name="+encodeURI(b.name),b.has_active_failures===!0?(b.badgeToolTip="Most recent job failed. Click to view jobs.",b.active_failures="failed"):b.has_active_failures===!1&&null===b.last_job?(b.has_active_failures="none",b.badgeToolTip="No job data available.",b.active_failures="n/a"):b.has_active_failures===!1&&null!==b.last_job&&(b.badgeToolTip="Most recent job successful. Click to view jobs.",b.active_failures="success"),b.enabled_flag=b.enabled,a(b)}}]).factory("SetStatus",["SetEnabledMsg","Empty",function(a,b){return function(c){function d(a){return a.length>25?a.substr(0,25)+"...":a}function e(a){var b,c,e;if(a.has_active_failures===!0||a.has_active_failures===!1&&null!==a.last_job)if(a.has_active_failures===!0?(a.badgeToolTip="Most recent job failed. Click to view jobs.",a.active_failures="failed"):(a.badgeToolTip="Most recent job successful. Click to view jobs.",a.active_failures="success"),a.summary_fields.recent_jobs.length>0){for(e=a.summary_fields.recent_jobs.sort(function(a,b){return-1*(a-b)}),h="Recent Jobs",g='\n',g+="\n",g+="\n",g+="\n",g+="\n",g+="\n",g+="\n",b=0;b\n",g+='\n",g+='\n',g+='\n',g+='\n",g+="\n";g+="\n",g+="
ID\n",g+='Status\n',g+="ViewName\n",g+="
'+c.id+"Events Hosts'+d(c.name)+"
\n"}else h="No job data",g="

No recent job data available for this host.

";else a.has_active_failures===!1&&null===a.last_job&&(a.has_active_failures="none",a.badgeToolTip="No job data available.",a.active_failures="n/a");a.job_status_html=g,a.job_status_title=h}var f,g,h,i=c.scope,j=c.host;if(b(j))for(f=0;fAre you sure you want to delete host "+j+" from group "+n.name+"?

":"

Are you sure you want to delete host "+j+"?

",g({hdr:"Delete Host",body:c,action:b,"class":"btn-danger"})}}]).factory("EditHostGroups",["$rootScope","$location","$log","$routeParams","Rest","Alert","GenerateForm","Prompt","ProcessErrors","GetBasePath","HostsReload","ParseTypeChange","Wait",function(a,b,c,d,e,f,g,h,i,j,k,l,m){return function(a){var b,c,d,f,h,l=a.host_id,n=a.inventory_id,o=g,p=[];for(c='
\n',c+='
\n',c+="\n",c+='\n',c+="
\n",c+='
\n',c+="\n",c+='\n',c+="
\n",c+="
\n",c+='
\n',c+='
\n',c+='\n',c+='\n',c+="

(move selected groups)

\n",c+="
\n",c+="
\n",d=j("hosts")+l+"/",f=o.inject(null,{mode:"edit",modal:!0,related:!1,html:c}),b=0;bGroups',f.formModalCancelShow=!0,f.formModalActionDisabled=!0,$("#form-modal .btn-none").removeClass("btn-none").addClass("btn-success"),f.hostGroupChangeRemove&&f.hostGroupChangeRemove(),f.hostGroupChangeRemove=f.$on("hostGroupChange",function(){p.pop(),0===p.length&&(h=function(){setTimeout(function(){m("stop")},500)},k({scope:f,inventory_id:n,group_id:f.group_id,action:h}))}),f.formModalAction=function(){var a,b,c;for($("#form-modal").modal("hide"),m("start"),a=0;a0?(f.assignedGroups=null,f.leftButtonDisabled=!0,f.rightButtonDisabled=!1):f.rightButtonDisabled=!0},f.rightChange=function(){null!==f.assignedGroups&&f.assignedGroups.length>0?(f.selectedGroups=null,f.leftButtonDisabled=!1,f.rightButtonDisabled=!0):f.leftButtonDisabled=!0},f.moveLeft=function(){var a,b,c,d;for(a=0;af.available_groups[b].name.toLowerCase()&&f.assignedGroups[a].name.toLowerCase()f.host_groups[b].name.toLowerCase()&&f.selectedGroups[a].name.toLowerCase()0){for(j("stop"),u+='
\n',u+=w?w:"",o=0;o\n',u+='\n",u+='
\n',u+='A value is required!\n',u+='\n',u+="
\n",u+="\n",n=l.associated,l=p.fields[l.associated],q[n]="",u+='
\n',u+='\n",u+='
\n',u+='A value is required!\n',l.awPassMatch&&(u+='Must match Password value\n'),u+='\n',u+="
\n",u+="
\n";u+="\n",m=angular.element(document.getElementById("password-body")),m.html(u),c(m.contents())(q),$("#password-modal").modal(),$("#password-modal").on("shown.bs.modal",function(){$("#password-body").find('input[type="password"]:first').focus()})}else q.startJob()}}]).factory("SubmitJob",["PromptPasswords","$compile","Rest","$location","GetBasePath","CredentialList","LookUpInit","CredentialForm","ProcessErrors","JobTemplateForm","Wait",function(a,b,c,d,e,f,g,h,i,j,k){return function(b){function l(b){var e,f,g;m.credentialWatchRemove&&m.credentialWatchRemove(),e=(new Date).toISOString(),f=b.related.jobs?b.related.jobs:b.related.job_template+"jobs/",g=o?o:b.name,k("start"),c.setUrl(f),c.post({name:g+" "+e,description:b.description,job_template:b.id,inventory:b.inventory,project:b.project,playbook:b.playbook,credential:b.credential,forks:b.forks,limit:b.limit,verbosity:b.verbosity,extra_vars:b.extra_vars}).success(function(b){m.job_id=b.id,b.passwords_needed_to_start.length>0?a({scope:m,passwords:b.passwords_needed_to_start,start_url:b.related.start,form:h}):(c.setUrl(b.related.start),c.post().success(function(){k("stop");var a=d.path().replace(/^\//,"").split("/")[0];"jobs"===a?m.refresh():d.path("/jobs")}).error(function(a,b){i(m,a,b,null,{hdr:"Error!",msg:"Failed to start job. POST returned status: "+b})}))}).error(function(a,b){k("stop"),i(m,a,b,null,{hdr:"Error!",msg:"Failed to create job. POST returned status: "+b})})}var m=b.scope,n=b.id,o=b.template?b.template:null,p=d.path().replace(/^\//,"").split("/")[0],q=e(p)+n+"/";k("start"),c.setUrl(q),c.get().success(function(a){m.credential="",""===a.credential||null===a.credential?(k("stop"),m.credentialWatchRemove&&m.credentialWatchRemove(),m.credentialWatchRemove=m.$watch("credential",function(b,c){b!==c&&""!==m.credential&&null!==m.credential&&void 0!==m.credential&&(a.credential=m.credential,l(a))}),g({scope:m,form:j,current_item:null,list:f,field:"credential",hdr:"Credential Required"}),m.lookUpCredential()):l(a)}).error(function(a,b){i(m,a,b,null,{hdr:"Error!",msg:"Failed to get job template details. GET returned status: "+b})})}}]).factory("ProjectUpdate",["PromptPasswords","$compile","Rest","$location","GetBasePath","ProcessErrors","Alert","ProjectsForm","Wait",function(a,b,c,d,e,f,g,h,i){return function(b){var d=b.scope,j=b.project_id,k=e("projects")+j+"/update/";d.removeUpdateSubmitted&&d.removeUpdateSubmitted(),d.removeUpdateSubmitted=d.$on("UpdateSubmitted",function(){i("stop"),g("Update Started","The request to start the SCM update process was submitted. To monitor the update status, refresh the page by clicking the Refresh button.","alert-info"),d.refresh()}),d.removeSCMSubmit&&d.removeSCMSubmit(),d.removeSCMSubmit=d.$on("SCMSubmit",function(b,c,e){a({scope:d,passwords:c,start_url:k,form:h,extra_html:e})}),i("start"),c.setUrl(k),c.get().success(function(a){var b,c;if(i("stop"),a.can_update){for(c="",b=0;b\n',c+='\n',c+='
\n',c+=' button.',"alert-info"),d.removeHostReloadComplete&&d.removeHostReloadComplete()}),d.removeUpdateSubmitted&&d.removeUpdateSubmitted(),d.removeUpdateSubmitted=d.$on("UpdateSubmitted",function(a,b){"started"===b&&(d.refreshGroups?(d.selected_tree_id=k,d.selected_group_id=i,d.refreshGroups()):d.refresh&&d.refresh(),d.$emit("HostReloadComplete"))}),d.removeInventorySubmit&&d.removeInventorySubmit(),d.removeInventorySubmit=d.$on("InventorySubmit",function(b,c,f){a({scope:d,passwords:c,start_url:e,form:h,extra_html:f})}),j("start"),c.setUrl(e),c.get().success(function(a){a.can_update?d.$emit("InventorySubmit",a.passwords_needed_to_update):(j("stop"),g("Permission Denied","You do not have access to run the update. Please contact your system administrator.","alert-danger"))}).error(function(a,b){j("stop"),f(d,a,b,null,{hdr:"Error!",msg:"Failed to get inventory_source details. "+e+"GET status: "+b})})}}]),angular.module("JobsHelper",["Utilities","FormGenerator","JobSummaryDefinition","InventoryHelper"]).factory("JobStatusToolTip",[function(){return function(a){var b;switch(a){case"successful":case"success":b="There were no failed tasks.";break;case"failed":b="Some tasks encountered errors.";break;case"canceled":b="Stopped by user request.";break;case"new":b="In queue, waiting on task manager.";break;case"waiting":b="SCM Update or Inventory Update is executing.";break;case"pending":b="Not in queue, waiting on task manager.";break;case"running":b="Playbook tasks executing."}return b}}]).factory("ShowJobSummary",["Rest","Wait","GetBasePath","FormatDate","ProcessErrors","GenerateForm","JobSummary","WatchInventoryWindowResize",function(a,b,c,d,e,f,g,h){return function(i){function j(a){var b=a.match(/\n/g),c=b?b.length:1;return c>p?20:c}var k,l,m,n,o,p,q,r,s=i.job_id,t=f,u=g;r='
\n',$("#inventory-modal-container").empty().append(r),k=t.inject(u,{mode:"edit",id:"form-container",breadCrumbs:!1,related:!1}),l=$(document).width(),m=$("body").height(),l>1199?(n=675,o=750>m?m-20:750,p=20):1199>=l&&l>=768?(n=550,o=620>m?m-15:620,p=15):(n=l-20,o=500>m?m:500,p=10),$("#status-modal-dialog").dialog({buttons:{OK:function(){$(this).dialog("close")}},modal:!0,width:n,height:o,autoOpen:!1,create:function(){$('.ui-dialog[aria-describedby="status-modal-dialog"]').find(".ui-dialog-titlebar button").empty().attr({"class":"close"}).text("x"),$('.ui-dialog[aria-describedby="status-modal-dialog"]').find(".ui-dialog-buttonset button:first").attr({"class":"btn btn-primary"})},resizeStop:function(){var a=$('.ui-dialog[aria-describedby="status-modal-dialog"]'),b=a.find("#status-modal-dialog");b.width(a.width()-28)},close:function(){$(".tooltip").each(function(){$(this).remove()}),$(".popover").each(function(){$(this).remove()}),$("#status-modal-dialog").dialog("destroy"),$("#inventory-modal-container").empty(),h()},open:function(){b("stop")}}),b("start"),q=c("jobs")+s+"/",a.setUrl(q),a.get().success(function(a){var b;k.id=a.id,k.name=a.name,k.status=a.status,k.result_stdout=a.result_stdout,k.result_traceback=a.result_traceback,k.stdout_rows=j(k.result_stdout),k.traceback_rows=j(k.result_traceback),b=new Date(a.created),k.created=d(b),$("#status-modal-dialog").dialog("open")}).error(function(a,b){e(k,a,b,null,{hdr:"Error!",msg:"Attempt to load job failed. GET returned status: "+b})})}}]),angular.module("LookUpHelper",["RestServices","Utilities","SearchHelper","PaginationHelpers","ListGenerator","ApiLoader"]).factory("LookUpInit",["Alert","Rest","GenerateList","SearchInit","PaginateInit","GetBasePath","FormatDate","Empty",function(a,b,c,d,e,f,g,h){return function(b){var i,j,k,l,m=b.scope,n=b.form,o=b.list,p=b.field,q=b.postAction;i=b.url?b.url:f("inventories"===o.name?"inventory":o.name),j=o.iterator.charAt(0).toUpperCase()+o.iterator.substring(1),k=b.hdr?b.hdr:"Select "+j,l=/\/$/.test(i)?i+"?":i+"&",l+=n.fields[p].sourceField+"__iexact=:value",$('input[name="'+n.fields[p].sourceModel+"_"+n.fields[p].sourceField+'"]').attr("data-url",l),$('input[name="'+n.fields[p].sourceModel+"_"+n.fields[p].sourceField+'"]').attr("data-source",p),m["lookUp"+j]=function(){var b=c,f=b.inject(o,{mode:"lookup",hdr:k});$("#lookup-modal").on("hidden.bs.modal",function(){f.searchCleanup&&f.searchCleanup(),(""===m[p]||null===m[p])&&(m[n.fields[p].sourceModel+"_"+n.fields[p].sourceField]="",m.$$phase||m.$digest())}),f.selectAction=function(){var c,d=!1;for(c=0;c5?f[j+"_page"]-5:1,e=f[j+"_page"]<6?10<=f[j+"_num_pages"]?10:f[j+"_num_pages"]:f[j+"_page"]+4=c;c++)f[j+"_page_range"].push(c)}}]).factory("RelatedPaginateInit",["RefreshRelated","$cookieStore","Wait",function(a,b,c){return function(d){var e,f=d.scope,g=d.relatedSets,h=d.pageSize?d.pageSize:10;for(e in g)f[g[e].iterator+"_url"]=g[e].url,f[g[e].iterator+"_page"]=0,f[g[e].iterator+"_page_size"]=h;f.getPage=function(b,d,e){var g=f[e+"_url"].replace(/.page\=\d+/,""),h=/\/$/.test(g)?"?":"&";g+=h+"page="+b,g+=f[e+"SearchParams"]?"&"+f[e+"SearchParams"]+"&page_size="+f[e+"_page_size"]:"page_size="+f[e+"PageSize"],c("start"),a({scope:f,set:d,iterator:e,url:g})},f.pageIsActive=function(a,b){return a===f[b+"_page"]?"active":""},f.changePageSize=function(c,d){f[d+"_page"]=1;var e=f[d+"_url"];b.put(d+"_page_size",f[d+"_page_size"]),e=e.replace(/\/\?.*$/,"/"),e+=f[d+"SearchParams"]?"?"+f[d+"SearchParams"]+"&page_size="+f[d+"_page_size"]:"?page_size="+f[d+"_page_size"],a({scope:f,set:c,iterator:d,url:e})}}}]).factory("PaginateInit",["Refresh","$cookieStore","Wait",function(a,b,c){return function(b){var d=b.scope,e=b.list,f=b.iterator?b.iterator:e.iterator,g=b.mode?b.mode:null;d[f+"_page"]=b.page?b.page:1,d[f+"_url"]=b.url,d[f+"_mode"]=g,d[f+"_page_size"]=b.pageSize?b.pageSize:"lookup"===g?5:20,d.getPage=function(b,e,f){var g=d[f+"_url"].replace(/.page\=\d+/,""),h=/\/$/.test(g)?"?":"&";g+=h+"page="+b,g+=d[f+"SearchParams"]?"&"+d[f+"SearchParams"]+"&page_size="+d[f+"_page_size"]:"page_size="+d[f+"PageSize"],c("start"),a({scope:d,set:e,iterator:f,url:g})},d.pageIsActive=function(a,b){return a===d[b+"_page"]?"active":""},d.changePageSize=function(b,e){d[e+"_page"]=0;var f=d[e+"_url"].replace(/\?page_size\=\d+/,""),g=/\/$/.test(f)?"?":"&";f+=d[e+"SearchParams"]?g+d[e+"SearchParams"]+"&page_size="+d[e+"_page_size"]:g+"page_size="+d[e+"_page_size"],c("start"),a({scope:d,set:b,iterator:e,url:f})}}}]),angular.module("ParseHelper",[]).factory("ParseTypeChange",[function(){return function(a,b,c){var d=b?b:"variables",e=c?c:"parseType";a.blockParseTypeWatch=!1,a.blockVariableDataWatch=!1,a["remove"+d+"Watch"]&&a["remove"+d+"Watch"](),a["remove"+d+"Watch"]=a.$watch(e,function(b,c){var e;if(b!==c)if("json"===b)if(a[d]&&!/^---$/.test(a[d]))try{e=jsyaml.load(a[d]),a[d]=JSON.stringify(e,null," ")}catch(f){}else a[d]="{}";else if(a[d]&&!/^\{\}$/.test(a[d]))try{e=JSON.parse(a[d]),a[d]=jsyaml.safeDump(e)}catch(f){}else a[d]="---"})}}]),angular.module("PermissionsHelper",[]).factory("PermissionCategoryChange",[function(){return function(a){var b=a.scope,c=a.reset;"Inventory"===b.category?(b.projectrequired=!1,b.permissionTypeHelp="
\n
Read
\n
Only allow the user or team to view the inventory.
\n
Write
\n
Allow the user or team to modify hosts and groups contained in the inventory, add new hosts and groups, and perform inventory sync operations.\n
Admin
\n
Allow the user or team full access to the inventory. This includes reading, writing, deletion of the inventory and inventory sync operations.
\n
\n"):(b.projectrequired=!0,b.permissionTypeHelp="
\n
Run
\n
Allow the user or team to perform a live deployment of the project against the inventory. In Run mode modules will be executed, and changes to the inventory will occur.
\n
Check
\n
Only allow the user or team to deploy the project against the inventory as a dry-run operation. In Check mode, module operations will only be simulated. No changes will occur.
\n
\n"),c&&(b.permission_type="Inventory"===b.category?"read":"run")}}]),angular.module("ProjectPathHelper",["RestServices","Utilities"]).factory("GetProjectPath",["Alert","Rest","GetBasePath","ProcessErrors",function(a,b,c,d){return function(a){function e(a){var b,c,d=[],e=[];for(b=0;b
\n',$("#projects-modal-container").empty().append(b),c=q.inject(r,{mode:"edit",id:"form-container",related:!1,breadCrumbs:!1}),q.reset(),d=$(document).width(),f=$("body").height(),d>1199?(h=675,j=750>f?f-20:750,n=20):1199>=d&&d>=768?(h=550,j=620>f?f-15:620,n=15):(h=d-20,j=500>f?f:500,n=10),$("#status-modal-dialog").dialog({buttons:{OK:function(){$(this).dialog("close")}},modal:!0,width:h,height:j,autoOpen:!1,create:function(){$('.ui-dialog[aria-describedby="status-modal-dialog"]').find(".ui-dialog-titlebar button").empty().attr({"class":"close"}).text("x"),$('.ui-dialog[aria-describedby="status-modal-dialog"]').find(".ui-dialog-buttonset button:first").attr({"class":"btn btn-primary"})},resizeStop:function(){var a=$('.ui-dialog[aria-describedby="status-modal-dialog"]'),b=a.find("#status-modal-dialog");b.width(a.width()-28)},close:function(){$(".tooltip").each(function(){$(this).remove()}),$(".popover").each(function(){$(this).remove()}),$("#status-modal-dialog").dialog("destroy"),$("#projects-modal-container").empty()},open:function(){m("stop")}}),e.setUrl(p),e.get().success(function(a){var b,d=a;for(b in r.fields)d[b]?c[b]="created"===b?k(new Date(d[b])):d[b]:d.summary_fields.project[b]&&(c[b]=d.summary_fields.project[b]);$("#status-modal-dialog").dialog({title:d.summary_fields.project.name+" Status"}).dialog("open")}).error(function(a,b){$("#form-modal").modal("hide"),i(c,a,b,r,{hdr:"Error!",msg:"Failed to retrieve status of project: "+o+". GET status: "+b})})}}]),angular.module("SelectionHelper",["Utilities","RestServices"]).factory("SelectionInit",["Rest","Alert","ProcessErrors","ReturnToCaller","Wait",function(a,b,c,d,e){return function(b){var f,g=b.scope,h=b.list,i=b.url,j=b.returnToCaller;f=void 0!==b.selected?b.selected:[],g.formModalActionDisabled=!0,g.disableSelectBtn=!0,g["toggle_"+h.iterator]=function(a,b){var c,d,e;for(c=0;c0?(g.formModalActionDisabled=!1,g.disableSelectBtn=!1):(g.formModalActionDisabled=!0,g.disableSelectBtn=!0)},g.finishSelection=function(){function b(){f=[],void 0!==j?d(j):($("#form-modal").modal("hide"),g.$emit("modalClosed"))}function k(b){a.post(b).success(function(a,b){m.push({result:"success",data:a,status:b}),g.$emit("callFinished")}).error(function(a,b,c){m.push({result:"error",data:a,status:b,headers:c}),g.$emit("callFinished")})}a.setUrl(i);var l,m=[];if(g.formModalActionDisabled=!0,g.disableSelectBtn=!0,e("start"),g.callFinishedRemove&&g.callFinishedRemove(),g.callFinishedRemove=g.$on("callFinished",function(){var a,d=0;if(m.length===f.length){for(e("stop"),a=0;a0)for(l=0;lh)h++,setTimeout(1e3,e());else if("success"===g.status)return d(a)}var f,g={},h=0;return null===c.apiDefaults||void 0===c.apiDefaults?(f="/api/v1/",b.setUrl(f),b.get().success(function(a){var b,d=a;for(b in d)switch(b){case"organizations":d[b].iterator="organization";break;case"jobs":d[b].iterator="job";break;case"users":d[b].iterator="user";break;case"teams":d[b].iterator="team";break;case"hosts":d[b].iterator="host";break;case"groups":d[b].iterator="group";break;case"projects":d[b].iterator="project";break;case"inventories":d[b].iterator="inventory"}c.apiDefaults=d,g={status:"success"}}).error(function(a,b){g={status:"error",msg:"Call to "+f+" failed. GET returned status: "+b}}),e()):d(a)}}]),angular.module("InventoryHelper",["RestServices","Utilities","OrganizationListDefinition","ListGenerator","AuthService","InventoryHelper","InventoryFormDefinition","ParseHelper","SearchHelper"]).factory("WatchInventoryWindowResize",["ApplyEllipsis",function(a){return function(){var b;$(window).resize(function(){clearTimeout(b),b=setTimeout(function(){$("#groups_table .name-column").each(function(){var a=$(this).width(),b=$(this).find(".level").width(),c=parseInt($(this).find(".level").css("padding-left").replace(/px/,"")),d=b+c,e=100-Math.ceil(d/a*100)+"%";$(this).find(".group-name").css({width:e})}),a("#groups_table .group-name a"),a("#hosts_table .host-name a")},100)})}}]).factory("SaveInventory",["InventoryForm","Rest","Alert","ProcessErrors","LookUpInit","OrganizationList","GetBasePath","ParseTypeChange","Wait",function(a,b,c,d,e,f,g,h,i){return function(e){var f,h,j,k=e.scope,l=a,m=g("inventory");i("start");try{if(h="json"===k.inventoryParseType?JSON.parse(k.inventory_variables):jsyaml.load(k.inventory_variables),"object"!=typeof h)throw"failed to return an object!";j={};for(f in l.fields)"inventory_variables"!==f&&(l.fields[f].realName?j[l.fields[f].realName]=k[f]:j[f]=k[f]);b.setUrl(m+k.inventory_id+"/"),b.put(j).success(function(a){k.inventory_variables?(b.setUrl(a.related.variable_data),b.put(h).success(function(){i("stop"),k.$emit("InventorySaved")}).error(function(a,b){d(k,a,b,l,{hdr:"Error!",msg:"Failed to update inventory varaibles. PUT returned status: "+b})})):k.$emit("InventorySaved")}).error(function(a,b){d(k,a,b,l,{hdr:"Error!",msg:"Failed to update inventory. POST returned status: "+b})})}catch(n){i("stop"),c("Error","Error parsing inventory variables. Parser returned: "+n)}}}]).factory("EditInventoryProperties",["InventoryForm","GenerateForm","Rest","Alert","ProcessErrors","LookUpInit","OrganizationList","GetBasePath","ParseTypeChange","SaveInventory","Wait","Store","SearchInit",function(a,b,c,d,e,f,g,h,i,j,k,l,m){return function(n){var o,p=n.scope,q=n.inventory_id,r=b,s=a,t={},u=l("CurrentSearchParams");s.well=!1,o=r.inject(s,{mode:"edit",modal:!0,related:!1,modal_show:!1}),s.well=!0,i(o,"inventory_variables","inventoryParseType"),o.inventoryParseType="yaml",o.formModalActionLabel="Save",o.formModalCancelShow=!0,o.formModalInfo=!1,o.formModalHeader="Inventory Properties",k("start"),c.setUrl(h("inventory")+q+"/"),c.get().success(function(a){var b,c;for(b in s.fields){if("inventory_variables"===b){if($.isEmptyObject(a.variables)||"{}"===a.variables||"null"===a.variables||""===a.variables)o.inventory_variables="---";else try{c=JSON.parse(a.variables),o.inventory_variables=jsyaml.safeDump(c)}catch(e){d("Variable Parse Error","Attempted to parse variables for inventory: "+q+". Parse returned: "+e),console&&(console.log(e),console.log("data:"),console.log(a.variables)),o.inventory_variables="---"}t.inventory_variables=o.variables}else"inventory_name"===b?(o[b]=a.name,t[b]=o[b]):"inventory_description"===b?(o[b]=a.description,t[b]=o[b]):a[b]&&(o[b]=a[b],t[b]=o[b]);s.fields[b].sourceModel&&a.summary_fields&&a.summary_fields[s.fields[b].sourceModel]&&(o[s.fields[b].sourceModel+"_"+s.fields[b].sourceField]=a.summary_fields[s.fields[b].sourceModel][s.fields[b].sourceField],t[s.fields[b].sourceModel+"_"+s.fields[b].sourceField]=a.summary_fields[s.fields[b].sourceModel][s.fields[b].sourceField])}f({scope:o,form:s,current_item:o.organization,list:g,field:"organization"}),k("stop"),$("#form-modal").modal("show")}).error(function(a,b){e(o,a,b,null,{hdr:"Error!",msg:"Failed to get inventory: "+q+". GET returned: "+b})}),o.removeInventorySaved&&o.removeInventorySaved(),o.removeInventorySaved=o.$on("InventorySaved",function(){$("#form-modal").modal("hide"),o.searchCleanp&&o.searchCleanup(),m({scope:p,set:u.set,list:u.list,url:u.defaultUrl,iterator:u.iterator,sort_order:u.sort_order,setWidgets:!1}),p.$emit("RefreshInventories")}),o.cancelModal=function(){o.searchCleanp&&o.searchCleanup(),m({scope:p,set:u.set,list:u.list,url:u.defaultUrl,iterator:u.iterator,sort_order:u.sort_order,setWidgets:!1})},o.formModalAction=function(){p.inventory_id=q,p.inventory_name=o.inventory_name,j({scope:o})}}}]),angular.module("md5Helper",["RestServices","Utilities"]).factory("md5Setup",[function(){return function(a){var b=a.scope,c=a.master,d=a.check_field,e=a.default_val;b[d]=e,c[d]=e,b.genMD5=function(a){var c=new Date;b[a]=$.md5("AnsibleWorks"+c.getTime())},b.toggleCallback=function(a){"false"===b.allow_callbacks&&(b[a]="")},b.selectAll=function(a){$('input[name="'+a+'"]').focus().select()}}}]),angular.module("RefreshRelatedHelper",["RestServices","Utilities","PaginationHelpers"]).factory("RefreshRelated",["ProcessErrors","Rest","Wait","PageRangeSetup",function(a,b,c,d){return function(e){var f=e.scope,g=e.set,h=e.iterator,i=e.url;b.setUrl(i),b.get().success(function(a){d({scope:f,count:a.count,next:a.next,previous:a.previous,iterator:h}),f[g]=a.results,f[h+"Loading"]=!1,f[h+"HoldInput"]=!1,c("stop"),f.$emit("related"+g)}).error(function(b,c){a(f,b,c,null,{hdr:"Error!",msg:"Failed to retrieve "+g+". GET returned status: "+c})})}}]),angular.module("RefreshHelper",["RestServices","Utilities","PaginationHelpers"]).factory("Refresh",["ProcessErrors","Rest","Wait","Empty","PageRangeSetup",function(a,b,c,d,e){return function(d){var f=d.scope,g=d.set,h=d.iterator,i=d.url;f.current_url=i,b.setUrl(i),b.get().success(function(a){var b,d;for(e({scope:f,count:a.count,next:a.next,previous:a.previous,iterator:h}),f[h+"Loading"]=!1,b=1;3>=b;b++)d=1===b?"":b,f[h+"HoldInput"+d]=!1;f[g]=a.results,window.scrollTo(0,0),c("stop"),f.$emit("PostRefresh")}).error(function(b,c){f[h+"HoldInput"]=!1,a(f,b,c,null,{hdr:"Error!",msg:"Failed to retrieve "+g+". GET returned status: "+c})})}}]),angular.module("RelatedSearchHelper",["RestServices","Utilities","RefreshRelatedHelper"]).factory("RelatedSearchInit",["$timeout","Alert","Rest","RefreshRelated","Wait",function(a,b,c,d,e){return function(a){function b(a){var b,c,d,e;for(e in h.related)if("tree"!==h.related[e].type&&(void 0===a||a===h.related[e].iterator)){b=h.related[e].iterator;for(d in h.related[e].fields)if(h.related[e].fields[d].key){f[b+"SearchField"]=d,f[b+"SearchFieldLabel"]=h.related[e].fields[d].label;break}f[b+"SortOrder"]=null,f[b+"SearchType"]="icontains",f[b+"SearchTypeLabel"]="Contains",f[b+"SearchValue"]=null,f[b+"SelectShow"]=!1,f[b+"ShowStartBtn"]=!0,f[b+"HideAllStartBtn"]=!1,c=f[b+"SearchField"],!h.related[e].fields[c].searchType||"boolean"!==h.related[e].fields[c].searchType&&"select"!==h.related[e].fields[c].searchType||(f[b+"SelectShow"]=!0,f[b+"SearchSelectOpts"]=h.fields[c].searchOptions),h.related[e].fields[c].searchType&&"gtzero"===h.related[e].fields[c].searchType&&(f[b+"InputHide"]=!0)}}var c,f=a.scope,g=a.relatedSets,h=a.form;b(),f.resetSearch=function(a){b(a),f.search(a)},f.setSearchField=function(a,b,c){var d,e;for(e in h.related)h.related[e].iterator===a&&(d=h.related[e].fields[b]);f[a+"SearchFieldLabel"]=c,f[a+"SearchField"]=b,f[a+"SearchValue"]="",f[a+"SelectShow"]=!1,f[a+"InputHide"]=!1,f[a+"ShowStartBtn"]=!0,void 0!==d.searchType&&"gtzero"===d.searchType&&(f[a+"InputHide"]=!0,f[a+"ShowStartBtn"]=!1),void 0===d.searchType||"boolean"!==d.searchType&&"select"!==d.searchType||(f[a+"SelectShow"]=!0,f[a+"SearchSelectOpts"]=d.searchOptions),void 0!==d.searchType&&"int"===d.searchType&&(f[a+"SearchType"]="int"),f.search(a)},f.setSearchType=function(a,b,c){f[a+"SearchTypeLabel"]=c,f[a+"SearchType"]=b,f.search(a)},f.startSearch=function(a,b){13===a.keyCode&&f.search(b)},f.search=function(a){e("start"),f[a+"Loading"]=!0,f[a+"HoldInput"]=!0,f[a+"SearchValue"]&&(f[a+"ShowStartBtn"]=!1),"host"===a&&"has_active_failures"===f.hostSearchField&&(f.hostFailureFilter=f.hostSearchSelectValue&&1===f.hostSearchSelectValue.value?!0:!1);var b,i,j,k,l;for(i in g)if(g[i].iterator===a){j=i,k=g[i].url;for(b in h.related[i].fields)h.related[i].fields[b].key&&(l=h.related[i].fields[b].desc?"-"+b:b);break}l=null===f[a+"SortOrder"]?l:f[a+"SortOrder"],c=h.related[j].fields[f[a+"SearchField"]],f[a+"SelectShow"]===!1&&""!==f[a+"SearchValue"]&&void 0!==f[a+"SearchValue"]||f[a+"SelectShow"]&&f[a+"SearchSelectValue"]||c.searchType&&"gtzero"===c.searchType?(f[a+"SearchParams"]=c.sourceModel?c.sourceModel+"__"+c.sourceField+"__":c.searchField?c.searchField+"__":f[a+"SearchField"]+"__",f[a+"SearchParams"]+=!c.searchType||"int"!==c.searchType&&"boolean"!==c.searchType?c.searchType&&"gtzero"===c.searchType?"gt=0":f[a+"SearchType"]+"=":"int=",!c.searchType||"boolean"!==c.searchType&&"select"!==c.searchType?(void 0===c.searchType||"gtzero"===c.searchType)&&(f[a+"SearchParams"]+=encodeURI(f[a+"SearchValue"])):f[a+"SearchParams"]+=f[a+"SearchSelectValue"].value,f[a+"SearchParams"]+=l?"&order_by="+encodeURI(l):""):f[a+"SearchParams"]=l?"order_by="+encodeURI(l):"",f[a+"Page"]=0,k+=k.match(/\/$/)?"?":"&",k+=f[a+"SearchParams"],k+=f[a+"PageSize"]?"&page_size="+f[a+"PageSize"]:"",d({scope:f,set:j,iterator:a,url:k})},f.sort=function(a,b){var c,d,e,g;$("."+a+" .list-header").each(function(){if($(this).attr("id")!==a+"-"+b+"-header"){var c=$(this).find("i");c.attr("class","icon-sort")}}),d=$("#"+a+"-"+b+"-header i"),e="",d.hasClass("icon-sort")?(d.removeClass("icon-sort"),d.addClass("icon-sort-up")):d.hasClass("icon-sort-up")?(d.removeClass("icon-sort-up"),d.addClass("icon-sort-down"),e="-"):d.hasClass("icon-sort-down")&&(d.removeClass("icon-sort-down"),d.addClass("icon-sort-up"));for(g in h.related)h.related[g].iterator===a&&(c=h.related[g].fields[b].sourceModel?e+h.related[g].fields[b].sourceModel+"__"+h.related[g].fields[b].sourceField:e+b);f[a+"SortOrder"]=c,f.search(a)}}}]),angular.module("SearchHelper",["RestServices","Utilities","RefreshHelper"]).factory("SearchInit",["Alert","Rest","Refresh","$location","GetBasePath","Empty","$timeout","Wait","Store",function(a,b,c,d,e,f,g,h,i){return function(a){function b(a){var b,c,d,e;e=void 0===a||1===a?"":a,l[p+"SearchField"+e]="",l[p+"SearchFieldLabel"+e]="";for(c in o.fields)if((void 0===o.fields[c].searchWidget&&1===a||o.fields[c].searchWidget===a)&&o.fields[c].key){o.fields[c].sourceModel?(d=o.fields[c].sourceModel+"__"+o.fields[c].sourceField,r=o.fields[c].desc?"-"+d:d):r=o.fields[c].desc?"-"+c:c,(void 0===o.fields[c].searchable||o.fields[c].searchable===!0)&&(l[p+"SearchField"+e]=c,l[p+"SearchFieldLabel"+e]=o.fields[c].label);break}if(f(l[p+"SearchField"+e]))for(c in o.fields)if((void 0===o.fields[c].searchWidget&&1===a||o.fields[c].searchWidget===a)&&(void 0===o.fields[c].searchable||o.fields[c].searchable===!0)){l[p+"SearchField"+e]=c,l[p+"SearchFieldLabel"+e]=o.fields[c].label;break}l[p+"SearchType"+e]="icontains",l[p+"SearchTypeLabel"+e]="Contains",l[p+"SearchParams"+e]="",l[p+"SearchValue"+e]="",l[p+"SelectShow"+e]=!1,l[p+"HideSearchType"+e]=!1,l[p+"InputDisable"+e]=!1,l[p+"ExtraParms"+e]="",l[p+"ShowStartBtn"+e]=!0,l[p+"HideAllStartBtn"+e]=!1,l[p+"SearchPlaceholder"+e]=o.fields[l[p+"SearchField"+e]]&&o.fields[l[p+"SearchField"+e]].searchPlaceholder?l[o.fields[l[p+"SearchField"+e]].searchPlaceholder]?l[o.fields[l[p+"SearchField"+e]].searchPlaceholder]:o.fields[l[p+"SearchField"+e]].searchPlaceholder:"Search",l[p+"InputDisable"+e]=o.fields[l[p+"SearchField"+e]]&&"all"===o.fields[l[p+"SearchField"+e]].searchObject?!0:!1,b=l[p+"SearchField"+e],o.fields[b]&&(!o.fields[b].searchType||"boolean"!==o.fields[b].searchType&&"select"!==o.fields[b].searchType||(l[p+"SelectShow"+e]=!0,l[p+"SearchSelectOpts"+e]=o.fields[b].searchOptions),o.fields[b].searchType&&"int"===o.fields[b].searchType&&(l[p+"HideSearchType"+e]=!0),o.fields[b].searchType&&"gtzero"===o.fields[b].searchType&&(l[p+"InputHide"+e]=!0))}var e,g,j,k,l=a.scope,m=a.set,n=a.url,o=a.list,p=a.iterator?a.iterator:o.iterator,q=a.setWidgets===!1?!1:!0,r=a.sort_order||"";if(q)for(e=o.searchWidgets?o.searchWidgets:1,g=1;e>=g;g++)j=1===g?"":g,$("#search-widget-container"+j)&&b(g);k={set:m,defaultUrl:n,list:o,iterator:p,sort_order:r},i("CurrentSearchParams",k),l.setSearchField=function(a,b,c,d){var e=void 0===d||1===d?"":d;l[a+"SearchFieldLabel"+e]=c,l[a+"SearchField"+e]=b,l[a+"SearchValue"+e]="",l[a+"SelectShow"+e]=!1,l[a+"HideSearchType"+e]=!1,l[a+"InputHide"+e]=!1,l[a+"SearchType"+e]="icontains",l[a+"InputDisable"+e]="all"===o.fields[b].searchObject?!0:!1,l[a+"ShowStartBtn"+e]=!0,l[a+"SearchPlaceholder"+e]=o.fields[l[a+"SearchField"+e]]&&o.fields[l[a+"SearchField"+e]].searchPlaceholder?l[o.fields[l[a+"SearchField"+e]].searchPlaceholder]?l[o.fields[l[a+"SearchField"+e]].searchPlaceholder]:o.fields[l[a+"SearchField"+e]].searchPlaceholder:"Search",o.fields[b].searchType&&"gtzero"===o.fields[b].searchType?(l[a+"InputDisable"+e]=!0,l[a+"ShowStartBtn"+e]=!1,l.search(a)):o.fields[b].searchSingleValue?(l[a+"InputDisable"+e]=!0,l[a+"SearchValue"+e]=o.fields[b].searchValue,l[a+"SearchSelectValue"+e]="boolean"===o.fields[b].searchType&&"true"===o.fields[b].searchValue?{value:1}:"boolean"===o.fields[b].searchType&&"false"===o.fields[b].searchValue?{value:0}:{value:o.fields[b].searchValue},l[a+"ShowStartBtn"+e]=!1):"in"===o.fields[b].searchType?(l[a+"SearchType"+e]="in",l[a+"SearchValue"+e]=o.fields[b].searchValue,l[a+"InputDisable"+e]=!0,l[a+"ShowStartBtn"+e]=!1):!o.fields[b].searchType||"boolean"!==o.fields[b].searchType&&"select"!==o.fields[b].searchType&&"select_or"!==o.fields[b].searchType?o.fields[b].searchType&&"int"===o.fields[b].searchType?l[a+"SearchType"+e]="int":o.fields[b].searchType&&"isnull"===o.fields[b].searchType&&(l[a+"SearchType"+e]="isnull",l[a+"InputDisable"+e]=!0,l[a+"SearchValue"+e]="true",l[a+"ShowStartBtn"+e]=!1):(l[a+"SelectShow"+e]=!0,l[a+"SearchSelectOpts"+e]=o.fields[b].searchOptions),l.search(a)},l.resetSearch=function(a){var c,e=o.searchWidgets?o.searchWidgets:1;for(c=1;e>=c;c++)b(c);window.location="/#"+d.path(),l.search(a)},l.removeDoSearch&&l.removeDoSearch(),l.removeDoSearch=l.$on("doSearch",function(a,b,d,e){l[b+"Loading"]=void 0===e||e===!0?!0:!1;var f,g=n;l[b+"Page"]=d?parseInt(d)-1:0,l[b+"SearchParams"]&&(g+=/\/$/.test(g)?"?"+l[b+"SearchParams"]:"&"+l[b+"SearchParams"]),f=/\/$/.test(g)?"?":"&",g+=l[b+"_page_size"]?f+"page_size="+l[b+"_page_size"]:"",d&&(f=/\/$/.test(g)?"?":"&",g+=f+"page="+d),l[b+"ExtraParms"]&&(f=/\/$/.test(g)?"?":"&",g+=f+l[b+"ExtraParms"]),g=g.replace(/\&\&/,"&"),c({scope:l,set:m,iterator:b,url:g})}),l.removePrepareSearch&&l.removePrepareSearch(),l.removePrepareSearch=l.$on("prepareSearch",function(a,b,c,d,e){h("start"),l[b+"SearchParams"]="";var f,g,i=o.searchWidgets?o.searchWidgets:1;for(f=1;i>=f;f++)g=1===f?"":f,$("#search-widget-container"+g)&&o.fields[l[b+"SearchField"+g]]&&o.fields[l[b+"SearchField"+g]].searchObject&&("all"!==o.fields[l[b+"SearchField"+g]].searchObject?(l[b+"HideAllStartBtn"+g]=!1,l[b+"SearchValue"+g]?(l[b+"ShowStartBtn"+g]=!1,l[b+"SearchParams"]+=o.fields[l[b+"SearchField"+g]].searchOnID?"&"+o.fields[l[b+"SearchField"+g]].searchObject+"__id="+l[b+"SearchValue"+g]:"&"+o.fields[l[b+"SearchField"+g]].searchObject+"__name__icontains="+l[b+"SearchValue"+g]):(l[b+"ShowStartBtn"+g]=!0,l[b+"SearchParams"]+="&"+o.fields[l[b+"SearchField"+g]].searchField+"="+o.fields[l[b+"SearchField"+g]].searchObject)):l[b+"HideAllStartBtn"+g]=!0);l.$emit("prepareSearch2",b,c,d,e)}),l.removePrepareSearch2&&l.removePrepareSearch2(),l.removePrepareSearch2=l.$on("prepareSearch2",function(a,b,c,d,e){var g,h,i=o.searchWidgets?o.searchWidgets:1;for(g=1;i>=g;g++)h=1===g?"":g,l[b+"HoldInput"+h]=!0,$("#search-widget-container"+h)&&o.fields[l[b+"SearchField"+h]]&&!o.fields[l[b+"SearchField"+h]].searchObject&&(l[b+"ShowStartBtn"+h]=l[b+"SearchValue"+h]?!1:!0,(!l[b+"SelectShow"+h]&&!f(l[b+"SearchValue"+h])||l[b+"SelectShow"+h]&&l[b+"SearchSelectValue"+h]||o.fields[l[b+"SearchField"+h]]&&"gtzero"===o.fields[l[b+"SearchField"+h]].searchType)&&(l[b+"SearchParams"]+=o.fields[l[b+"SearchField"+h]].searchField?"&"+o.fields[l[b+"SearchField"+h]].searchField+"__":o.fields[l[b+"SearchField"+h]].sourceModel?"&"+o.fields[l[b+"SearchField"+h]].sourceModel+"__"+o.fields[l[b+"SearchField"+h]].sourceField+"__":"select"!==o.fields[l[b+"SearchField"+h]].searchType||""!==l[b+"SearchSelectValue"+h].value&&null!==l[b+"SearchSelectValue"+h].value?"&"+l[b+"SearchField"+h]+"__":"&"+l[b+"SearchField"+h]+"__",l[b+"SearchParams"]+=!o.fields[l[b+"SearchField"+h]].searchType||"int"!==o.fields[l[b+"SearchField"+h]].searchType&&"boolean"!==o.fields[l[b+"SearchField"+h]].searchType?o.fields[l[b+"SearchField"+h]].searchType&&"gtzero"===o.fields[l[b+"SearchField"+h]].searchType?"gt=0":"select"!==o.fields[l[b+"SearchField"+h]].searchType||""!==l[b+"SearchSelectValue"+h].value&&null!==l[b+"SearchSelectValue"+h].value?l[b+"SearchType"+h]+"=":"iexact=":"int=",!o.fields[l[b+"SearchField"+h]].searchType||"boolean"!==o.fields[l[b+"SearchField"+h]].searchType&&"select"!==o.fields[l[b+"SearchField"+h]].searchType?(!o.fields[l[b+"SearchField"+h]].searchType||o.fields[l[b+"SearchField"+h]].searchType&&"or"!==o.fields[l[b+"SearchField"+h]].searchType&&"gtzero"!==o.fields[l[b+"SearchField"+h]].searchType)&&(l[b+"SearchParams"]+=encodeURI(l[b+"SearchValue"+h])):l[b+"SearchParams"]+=l[b+"SearchSelectValue"+h].value));("inventory"===b&&l.inventoryFailureFilter||"host"===b&&l.hostFailureFilter)&&(l[b+"SearchParams"]+="&has_active_failures=true"),r&&(l[b+"SearchParams"]+=l[b+"SearchParams"]?"&":"",l[b+"SearchParams"]+="order_by="+encodeURI(r)),l.$emit("doSearch",b,c,d,e)}),l.startSearch=function(a,b){13===a.keyCode&&l.search(b)},l.search=function(a,b,c){c=void 0===c?!0:!1,c&&(l[m]=[]),l.$emit("prepareSearch",a,b,c)},l.sort=function(a){$(".list-header").each(function(){if($(this).attr("id")!==a+"-header"){var b=$(this).find("i");b.attr("class","fa fa-sort")}});var b=$("#"+a+"-header i"),c="";b.hasClass("fa-sort")?(b.removeClass("fa-sort"),b.addClass("fa-sort-up")):b.hasClass("fa-sort-up")?(b.removeClass("fa-sort-up"),b.addClass("fa-sort-down"),c="-"):b.hasClass("fa-sort-down")&&(b.removeClass("fa-sort-down"),b.addClass("fa-sort-up")),r=o.fields[a].searchField?c+o.fields[a].searchField:o.fields[a].sortField?c+o.fields[a].sortField:o.fields[a].sourceModel?c+o.fields[a].sourceModel+"__"+o.fields[a].sourceField:c+a,l.search(o.iterator)},l.searchCleanup=function(){l.removeDoSearch(),l.removePrepareSearch(),l.removePrepareSearch2()}}}]),angular.module("TeamHelper",["RestServices","Utilities","OrganizationListDefinition","SearchHelper","PaginationHelpers","ListGenerator"]).factory("SetTeamListeners",["Alert","Rest",function(a,b){return function(a){var c=a.scope,d=a.set,e=a.iterator;c.$on("TeamResultFound",function(a,b,f){var g,h,i,j;if(f.length===b.length){for(i="organization",j="organization_name",g=0;gSelect existing users by clicking each user or checking the related checkbox. When finished, click the blue Select button, located bottom right.

",base:"users",index:!0,hover:!0,fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},actions:{},fieldActions:{}}),angular.module("CloudCredentialsListDefinition",[]).value("CloudCredentialList",{name:"cloudcredentials",iterator:"cloudcredential",selectTitle:"Add Cloud Credentials",editTitle:"Cloud Credentials",selectInstructions:"

Select existing credentials by clicking each credential or checking the related checkbox. When finished, click the blue Select button, located bottom right.

Create a brand new credential by clicking the green Create New button.

",index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description",excludeModal:!1},team:{label:"Team",ngBind:"credential.team_name",sourceModel:"team",sourceField:"name",excludeModal:!0},user:{label:"User",ngBind:"credential.user_username",sourceModel:"user",sourceField:"username",excludeModal:!0}},actions:{add:{mode:"all",ngClick:"addCredential()","class":"btn-sm",awToolTip:"Create a new credential"}},fieldActions:{edit:{ngClick:"editCredential(credential.id)",icon:"fa-edit",label:"Edit","class":"btn-sm",awToolTip:"Edit credential",dataPlacement:"top"},"delete":{ngClick:"deleteCredential(credential.id, credential.name)",icon:"fa-trash-o",label:"Delete","class":"btn-sm",awToolTip:"Delete credential",dataPlacement:"top"}}}),angular.module("CredentialsListDefinition",[]).value("CredentialList",{name:"credentials",iterator:"credential",selectTitle:"Add Credentials",editTitle:"Credentials",selectInstructions:"

Select existing credentials by clicking each credential or checking the related checkbox. When finished, click the blue Select button, located bottom right.

Create a brand new credential by clicking the green Create New button.

",index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description",excludeModal:!1},kind:{label:"Type",searchType:"select",searchOptions:[],excludeModal:!0,nosort:!0}},actions:{add:{mode:"all",ngClick:"addCredential()",awToolTip:"Create a new credential"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{ngClick:"editCredential(credential.id)",icon:"fa-edit",label:"Edit","class":"btn-sm",awToolTip:"Edit credential",dataPlacement:"top"},"delete":{ngClick:"deleteCredential(credential.id, credential.name)",icon:"fa-trash",label:"Delete","class":"btn-sm",awToolTip:"Delete credential",dataPlacement:"top"}}}),angular.module("GroupListDefinition",[]).value("GroupList",{name:"groups",iterator:"group",selectTitle:"Copy Groups",editTitle:"Groups",index:!0,well:!1,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},actions:{help:{awPopOver:"Choose groups by clicking on each group you wish to add. Click the Select button to add the groups to the selected inventory group.",dataContainer:"#form-modal .modal-content",mode:"all",awToolTip:"Click for help",dataTitle:"Adding Groups"}},fieldActions:{edit:{label:"Edit",ngClick:"editGroup(group.id)",icon:"icon-edit","class":"btn-xs",awToolTip:"Edit group",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteGroup(group.id, group.name)",icon:"icon-trash","class":"btn-xs",awToolTip:"Delete group",dataPlacement:"top"}}}),angular.module("HomeGroupListDefinition",[]).value("HomeGroupList",{name:"home_groups",iterator:"group",editTitle:"Groups",index:!0,hover:!0,well:!0,fields:{name:{key:!0,label:"Group",ngClick:"editGroup(group.id, group.inventory)",columnClass:"col-lg-4 col-md3 col-sm-3 col-xs-6 ellipsis"},inventory_name:{label:"Inventory",sourceModel:"inventory",sourceField:"name",columnClass:"col-lg-3 col-md2 col-sm-2 hidden-xs elllipsis",linkTo:"{{ /#/inventories/' + group.inventory + '/' }}"},source:{label:"Source",searchType:"select",searchOptions:[{name:"ec2",value:"ec2"},{name:"none",value:""},{name:"rax",value:"rax"}],sourceModel:"inventory_source",sourceField:"source",searchOnly:!0},has_external_source:{label:"Has external source?",searchType:"in",searchValue:"ec2,rax",searchOnly:!0,sourceModel:"inventory_source",sourceField:"source"},has_active_failures:{label:"Has failed hosts?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0},last_update_failed:{label:"Update failed?",searchType:"select",searchSingleValue:!0,searchValue:"failed",searchOnly:!0,sourceModel:"inventory_source",sourceField:"status"},id:{label:"ID",searchOnly:!0}},fieldActions:{sync_status:{mode:"all",ngClick:"viewUpdateStatus(group.id, group.group_id)",awToolTip:"{{ group.status_tooltip }}",ngClass:"group.status_class",dataPlacement:"top"},failed_hosts:{mode:"all",awToolTip:"{{ group.hosts_status_tip }}",dataPlacement:"top",ngHref:"/#/inventories/{{ group.inventory }}/",iconClass:"{{ 'fa icon-failures-' + group.hosts_status_class }}"},group_update:{mode:"all",ngClick:"updateGroup(group.id)",awToolTip:"{{ group.launch_tooltip }}",ngShow:"(group.status !== 'running' && group.status !== 'pending' && group.status !== 'updating')",ngClass:"group.launch_class",dataPlacement:"top"},cancel:{mode:"all",ngClick:"cancelUpdate(group.id)",awToolTip:"Cancel sync process","class":"red-txt",ngShow:"(group.status == 'running' || group.status == 'pending' || group.status == 'updating')",dataPlacement:"top"},edit:{label:"Edit",mode:"all",ngClick:"editGroup(group.id)",awToolTip:"Edit group",dataPlacement:"top"}},actions:{refresh:{mode:"all",awToolTip:"Refresh the page",ngClick:"refresh()"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}}}),angular.module("HomeHostListDefinition",[]).value("HomeHostList",{name:"hosts",iterator:"host",selectTitle:"Add Existing Hosts",editTitle:"Hosts",index:!0,hover:!0,well:!0,fields:{name:{key:!0,label:"Name",columnClass:"col-lg-4 col-md3 col-sm-3 col-xs-7 ellipsis",ngClick:"editHost(host.id, host.name)"},inventory_name:{label:"Inventory",sourceModel:"inventory",sourceField:"name",columnClass:"col-lg-3 col-md2 col-sm-2 hidden-xs elllipsis",linkTo:"{{ '/#/inventories/' + host.inventory }}"},enabled:{label:"Disabled?",searchSingleValue:!0,searchType:"boolean",searchValue:"false",searchOnly:!0},has_active_failures:{label:"Has failed jobs?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0},has_inventory_sources:{label:"Has external source?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0},id:{label:"ID",searchOnly:!0}},fieldActions:{enabled_flag:{iconClass:"{{ 'fa icon-enabled-' + host.enabled }}",dataPlacement:"top",awToolTip:"{{ host.enabledToolTip }}",dataTipWatch:"host.enabledToolTip",ngClick:"toggleHostEnabled(host.id, host.has_inventory_sources)"},active_failures:{awPopOver:"{{ host.job_status_html }}",dataTitle:"{{ host.job_status_title }}",awToolTip:"{{ host.badgeToolTip }}",awTipPlacement:"top",dataPlacement:"left",iconClass:"{{ 'fa icon-failures-' + host.has_active_failures }}"},edit:{label:"Edit",ngClick:"editHost(host.id)",icon:"icon-edit",awToolTip:"Edit host",dataPlacement:"top"}},actions:{stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}}}),angular.module("HostListDefinition",[]).value("HostList",{name:"hosts",iterator:"host",selectTitle:"Add Existing Hosts",editTitle:"Hosts",index:!0,well:!1,fields:{name:{key:!0,label:"Host Name",linkTo:"/inventories/{{ inventory_id }}/hosts/{{ host.id }}"},description:{label:"Description"}},actions:{help:{awPopOver:"Select hosts by clicking on each host you wish to add. Add the selected hosts to the group by clicking the Select button.",dataContainer:"#form-modal .modal-content",mode:"all",awToolTip:"Click for help",dataTitle:"Selecting Hosts"}},fieldActions:{edit:{label:"Edit",ngClick:"editHost({{ host.id }})",icon:"icon-edit","class":"btn-xs",awToolTip:"Edit host",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteHost(host.id, host.name)",icon:"icon-trash","class":"btn-xs",awToolTip:"Delete host",dataPlacement:"top"}}}),angular.module("InventoriesListDefinition",[]).value("InventoryList",{name:"inventories",iterator:"inventory",selectTitle:"Add Inventories",editTitle:"Inventories",selectInstructions:'Click on a row to select it, and click Finished when done. Use the green button to create a new row.',index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},organization:{label:"Organization",ngBind:"inventory.summary_fields.organization.name",linkTo:"/#/organizations/{{ inventory.organization }}",sourceModel:"organization",sourceField:"name",excludeModal:!0},has_inventory_sources:{label:"Cloud sourced?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0},has_active_failures:{label:"Failed hosts?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0},inventory_sources_with_failures:{label:"Sync failures?",searchType:"gtzero",searchValue:"true",searchOnly:!0}},actions:{add:{mode:"all",ngClick:"addInventory()",awToolTip:"Create a new inventory"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",icon:"icon-comments-alt",mode:"all"}},fieldActions:{status:{ngHref:"inventory.status_link",iconClass:"{{ 'fa fa-cloud icon-cloud-' + inventory.status_class }}",awToolTip:"{{ inventory.status_tip }}",dataPlacement:"top"},failed_hosts:{ngHref:"inventory.failed_hosts_link",iconClass:"{{ 'fa icon-failures-' + inventory.failed_hosts_class }}",awToolTip:"{{ inventory.failed_hosts_tip }}",dataPlacement:"top"},edit:{label:"Edit",ngClick:"editInventoryProperties(inventory.id)",awToolTip:"Edit inventory",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteInventory(inventory.id, inventory.names')",awToolTip:"Delete inventory",dataPlacement:"top"}}}),angular.module("InventoryGroupsDefinition",[]).value("InventoryGroups",{name:"groups",iterator:"group",editTitle:"{{ inventory_name }}",showTitle:!1,well:!0,index:!1,hover:!1,hasChildren:!0,filterBy:"{ show: true }","class":"table-condensed table-no-border",fields:{name:{label:"Groups",key:!0,ngClick:"showHosts(group.id,group.group_id, false)",ngClass:"group.selected_class",hasChildren:!0,columnClass:"col-lg-9 col-md-9 col-sm-7 col-xs-7",nosort:!0,awDroppable:"{{ group.isDroppable }}",awDraggable:"{{ group.isDraggable }}",dataContainment:"#groups_table",dataTreeId:"{{ group.id }}",dataGroupId:"{{ group.group_id }}",dataType:"group"}},actions:{columnClass:"col-lg-3 col-md-3 col-sm-5 col-xs-5",create:{mode:"all",ngClick:"createGroup()",awToolTip:"Create a new group"},properties:{mode:"all",awToolTip:"Edit inventory properties",ngClick:"editInventoryProperties()"},refresh:{mode:"all",awToolTip:"Refresh the page",ngClick:"refreshGroups()"},stream:{ngClick:"showGroupActivity()",awToolTip:"View Activity Stream",mode:"all"},help:{mode:"all",awToolTip:"Get help building your inventory",ngClick:"showGroupHelp()",id:"inventory-summary-help"}},fieldActions:{sync_status:{mode:"all",ngClick:"viewUpdateStatus(group.id, group.group_id)",ngShow:"group.id > 1",awToolTip:"{{ group.status_tooltip }}",dataTipWatch:"group.launch_tooltip",ngClass:"group.status_class",dataPlacement:"top"},failed_hosts:{mode:"all",awToolTip:"{{ group.hosts_status_tip }}",ngShow:"group.id > 1",dataPlacement:"top",ngClick:"showHosts(group.id, group.group_id, group.show_failures)",iconClass:"{{ 'fa icon-failures-' + group.hosts_status_class }}"},group_update:{mode:"all",ngClick:"updateGroup(group.id)",awToolTip:"{{ group.launch_tooltip }}",dataTipWatch:"group.launch_tooltip",ngShow:"group.id > 1 && (group.status !== 'running' && group.status !== 'pending' && group.status !== 'updating')",ngClass:"group.launch_class",dataPlacement:"top"},cancel:{mode:"all",ngClick:"cancelUpdate({{ group.id }})",awToolTip:"Cancel sync process","class":"red-txt",ngShow:"group.id > 1 && (group.status == 'running' || group.status == 'pending' || group.status == 'updating')",dataPlacement:"top"},edit:{mode:"all",ngClick:"editGroup({{ group.group_id + ',' + group.id }})",awToolTip:"Edit group",ngShow:"group.id > 1",dataPlacement:"top"},"delete":{mode:"all",ngClick:"deleteGroup({{ group.id + ',' + group.group_id }})",awToolTip:"Delete group",ngShow:"group.id != 1",dataPlacement:"top"}}}),angular.module("InventoryHostsDefinition",[]).value("InventoryHosts",{name:"hosts",iterator:"host",editTitle:"{{ selected_group }}",showTitle:!1,well:!0,index:!1,hover:!1,hasChildren:!0,"class":"table-condensed table-no-border",fields:{name:{key:!0,label:"Hosts",ngClick:"editHost(host.id)",searchPlaceholder:"search_place_holder",columnClass:"col-lg-9 col-md-9 col-sm-7 col-xs-7",dataHostId:"{{ host.id }}",dataType:"host",awDraggable:"true"},enabled:{label:"Disabled?",searchSingleValue:!0,searchType:"boolean",searchValue:"false",searchOnly:!0},has_active_failures:{label:"Failed jobs?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0}},fieldActions:{enabled_flag:{iconClass:"{{ 'fa icon-enabled-' + host.enabled }}",dataPlacement:"top",awToolTip:"{{ host.enabledToolTip }}",dataTipWatch:"host.enabledToolTip",ngClick:"toggleHostEnabled(host.id, host.has_inventory_sources)"},active_failures:{awPopOver:"{{ host.job_status_html }}",dataTitle:"{{ host.job_status_title }}",awToolTip:"{{ host.badgeToolTip }}",awTipPlacement:"top",dataPlacement:"left",iconClass:"{{ 'fa icon-failures-' + host.has_active_failures }}"},edit:{ngClick:"editHost(host.id)",icon:"icon-edit",awToolTip:"Edit host",dataPlacement:"top"},"delete":{ngClick:"deleteHost(host.id, host.name)",icon:"icon-trash",awToolTip:"Delete host",dataPlacement:"top"}},actions:{columnClass:"col-lg-3 col-md-3 col-sm-5 col-xs-5",create:{mode:"all",ngClick:"createHost()",ngHide:"selected_tree_id == 1",awToolTip:"Create a new host"},stream:{ngClick:"showHostActivity()",awToolTip:"View Activity Stream",mode:"all"}}}),angular.module("JobEventsListDefinition",[]).value("JobEventList",{name:"jobevents",iterator:"jobevent",editTitle:"Job Events",index:!1,hover:!0,hasChildren:!0,filterBy:"{ show: true }",navigationLinks:{details:{href:"/#/jobs/{{ job_id }}",label:"Status",icon:"icon-zoom-in",ngShow:"job_id !== null"},events:{href:"/#/jobs/{{ job_id }}/job_events",label:"Events",active:!0,icon:"icon-list-ul"},hosts:{href:"/#/jobs/{{ job_id }}/job_host_summaries",label:"Host Summary",icon:"icon-laptop"}},fields:{created:{label:"Created On",columnClass:"col-lg-1 col-md-1 hidden-sm hidden-xs",key:!0,nosort:!0,searchable:!1,link:!1},status:{label:"Status",showValue:!1,columnClass:"col-sm-1 col-xs-2 text-center",searchField:"failed",searchType:"boolean",searchOptions:[{name:"success",value:0},{name:"error",value:1}],nosort:!0,searchable:!1,ngClick:"viewJobEvent({{ jobevent.id }})",awToolTip:"{{ jobevent.statusBadgeToolTip }}",dataPlacement:"top",badgeIcon:"fa icon-job-{{ jobevent.status }}",badgePlacement:"left",badgeToolTip:"{{ jobevent.statusBadgeToolTip }}",badgeTipPlacement:"top",badgeNgClick:"viewJobEvent({{ jobevent.id }})"},event_display:{label:"Event",hasChildren:!0,ngClick:"toggleChildren(jobevent.id, jobevent.related.children)",nosort:!0,searchable:!1,ngClass:"{{ jobevent.class }}",appendHTML:"jobevent.event_detail"},host:{label:"Host",ngBind:"jobevent.summary_fields.host.name",ngHref:"{{ jobevent.hostLink }}",searchField:"hosts__name",nosort:!0,searchOnly:!1,id:"job-event-host-header","class":"break",columnClass:"col-lg-2 hidden-sm hidden-xs"}},actions:{refresh:{mode:"all",awToolTip:"Refresh the page",ngClick:"refresh()"}},fieldActions:{columnClass:"col-sm-1 col-xs-2",view:{label:"View",ngClick:"viewJobEvent(jobevent.id)",awToolTip:"View event details",dataPlacement:"top"}}}),angular.module("JobHostDefinition",[]).value("JobHostList",{name:"jobhosts",iterator:"jobhost",editTitle:"All summaries",index:!0,hover:!0,navigationLinks:{ngHide:"host_id !== null",details:{href:"/#/jobs/{{ job_id }}",label:"Status",icon:"icon-zoom-in",ngShow:"job_id !== null"},events:{href:"/#/jobs/{{ job_id }}/job_events",label:"Events",icon:"icon-list-ul"},hosts:{href:"/#/jobs/{{ job_id }}/job_host_summaries",label:"Host Summary",active:!0,icon:"icon-laptop"}},fields:{job:{label:"Job ID",ngClick:"showJob(jobhost.job)",columnShow:"host_id !== null",key:!0,desc:!0},host:{label:"Host",key:!0,sourceModel:"host",sourceField:"name",ngBind:"jobhost.host_name",ngHref:"jobhost.hostLinkTo"},status:{label:"Status",badgeNgHref:"{{ jobhost.statusLinkTo }}",badgeIcon:"fa icon-job-{{ jobhost.status }}",badgePlacement:"left",badgeToolTip:"{{ jobhost.statusBadgeToolTip }}",badgeTipPlacement:"top",ngHref:"{{ jobhost.statusLinkTo }}",awToolTip:"{{ jobhost.statusBadgeToolTip }}",dataPlacement:"top",searchField:"failed",searchType:"boolean",searchOptions:[{name:"success",value:0},{name:"error",value:1}]},failed:{label:"Job failed?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0,nosort:!0},ok:{label:"Success",searchable:!1},changed:{label:"Changed",searchable:!1},failures:{label:"Failure",searchable:!0,searchLabel:"Contains failed events?",searchType:"gtzero"},dark:{label:"Unreachable",searchable:!0,searchType:"gtzero",searchLabel:"Contains unreachable hosts?"},skipped:{label:"Skipped",searchable:!1}},actions:{help:{awPopOver:"
\n
Success
Tasks successfully executed on the host.
\n
Changed
Actions taken on the host.
\n
Failure
Tasks that failed on the host.
\n
Unreachable
Times the ansible server could not reach the host.
\n
Skipped
Tasks bypassed and not performed on the host due to prior task failure or the host being unreachable.
\n
\n",dataPlacement:"left",dataContainer:"body",mode:"all","class":"btn-xs btn-help",awToolTip:"Click for help",dataTitle:"Job Host Summary",id:"jobhost-help-button"},refresh:{mode:"all","class":"btn-xs",awToolTip:"Refresh the page",ngClick:"refresh()",ngShow:"host_id == null"}},fieldActions:{}}),angular.module("JobTemplatesListDefinition",[]).value("JobTemplateList",{name:"job_templates",iterator:"job_template",selectTitle:"Add Job Template",editTitle:"Job Templates",selectInstructions:'Click on a row to select it, and click Finished when done. Use the green button to create a new row.',index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},actions:{add:{mode:"all",ngClick:"addJobTemplate()",basePaths:["job_templates"],awToolTip:"Create a new template"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",icon:"icon-comments-alt",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editJobTemplate(job_template.id)",icon:"icon-edit",awToolTip:"Edit template","class":"btn-default btn-xs",dataPlacement:"top"},submit:{label:"Launch",icon:"icon-rocket",mode:"all","class":"btn-xs btn-success",ngClick:"submitJob(job_template.id)",awToolTip:"Start a job using this template",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteJobTemplate(job_template.id, job_template.name)",icon:"icon-trash","class":"btn-danger btn-xs",awToolTip:"Delete template",dataPlacement:"top"}}}),angular.module("JobsListDefinition",[]).value("JobList",{name:"jobs",iterator:"job",editTitle:"Jobs",index:!1,hover:!0,"class":"jobs-table",fields:{id:{label:"Job ID",key:!0,desc:!0,searchType:"int"},inventory:{label:"Inventory ID",searchType:"int",searchOnly:!0},created:{label:"Create On",link:!1,searchable:!1},job_template:{label:"Job Template",ngBind:"job.summary_fields.job_template.name",ngHref:"{{ '/#/job_templates/' + job.job_template }}",sourceModel:"job_template",sourceField:"name"},failed:{label:"Job failed?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0,nosort:!0},status:{label:"Status","class":"job-{{ job.status }}",searchType:"select",linkTo:"{{ job.statusLinkTo }}",searchOptions:[{name:"new",value:"new"},{name:"waiting",value:"waiting"},{name:"pending",value:"pending"},{name:"running",value:"running"},{name:"successful",value:"successful"},{name:"error",value:"error"},{name:"failed",value:"failed"},{name:"canceled",value:"canceled"}],badgeIcon:"fa icon-job-{{ job.status }}",badgePlacement:"left",badgeToolTip:"{{ job.statusBadgeToolTip }}",badgeTipPlacement:"top",badgeNgHref:"{{ job.statusLinkTo }}",awToolTip:"{{ job.statusBadgeToolTip }}",dataPlacement:"top"}},actions:{refresh:{mode:"all",awToolTip:"Refresh the page",ngClick:"refresh()"}},fieldActions:{submit:{label:"Relaunch",icon:"icon-rocket",mode:"all",ngClick:"submitJob(job.id, job.summary_fields.job_template.name)",awToolTip:"Start the job",dataPlacement:"top"},cancel:{label:"Stop",mode:"all",ngClick:"deleteJob(job.id)",awToolTip:"Cancel a running or pending job",ngShow:"job.status == 'pending' || job.status == 'running' || job.status == 'waiting'",dataPlacement:"top"},"delete":{label:"Delete",mode:"all",ngClick:"deleteJob(job.id)",awToolTip:"Delete the job",ngShow:"job.status != 'pending' && job.status != 'running' && job.status != 'waiting'",dataPlacement:"top"},dropdown:{type:"DropDown",label:"View",icon:"fa-search-plus","class":"btn-default btn-xs",options:[{ngClick:"editJob(job.id, job.summary_fields.job_template.name)",label:"Status"},{ngClick:"viewEvents(job.id, job.summary_fields.job_template.name)",label:"Events",ngHide:"job.status == 'new'"},{ngClick:"viewSummary(job.id, job.summary_fields.job_template.name)",label:"Host Summary",ngHide:"job.status == 'new'"}]}}}),angular.module("OrganizationListDefinition",[]).value("OrganizationList",{name:"organizations",iterator:"organization",selectTitle:"Add Organizations",editTitle:"Organizations",hover:!0,index:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},actions:{add:{mode:"all",ngClick:"addOrganization()",awToolTip:"Create a new organization"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editOrganization(organization.id)",icon:"icon-edit","class":"btn-xs btn-default",awToolTip:"Edit organization",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteOrganization(organization.id, organization.name)",icon:"icon-trash","class":"btn-xs btn-danger",awToolTip:"Delete organization",dataPlacement:"top"}}}),angular.module("PermissionListDefinition",[]).value("PermissionList",{name:"permissions",iterator:"permission",selectTitle:"Add Permission",selectInstructions:'Click on a row to select it, and click Finished when done. Use the green button to create a new row.',editTitle:"Permissions",index:!0,well:!0,fields:{name:{key:!0,label:"Name",ngClick:"editPermission(permission.id)"},inventory:{label:"Inventory",sourceModel:"inventory",sourceField:"name",ngBind:"permission.summary_fields.inventory.name"},project:{label:"Project",sourceModel:"project",sourceField:"name",ngBind:"permission.summary_fields.project.name"},permission_type:{label:"Permission"}},actions:{add:{mode:"all",ngClick:"addPermission()",awToolTip:"Add a new permission",ngShow:"PermissionAddAllowed"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editPermission(permission.id)",icon:"icon-edit","class":"btn-xs btn-default",awToolTip:"Edit permission",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deletePermission(permission.id, permission.name)",icon:"icon-trash","class":"btn-xs btn-danger",awToolTip:"Delete permission",ngShow:"PermissionAddAllowed",dataPlacement:"top"}}}),angular.module("ProjectsListDefinition",[]).value("ProjectList",{name:"projects",iterator:"project",selectTitle:"Add Project",editTitle:"Projects",selectInstructions:"

Select existing projects by clicking each project or checking the related checkbox. When finished, click the blue Select button, located bottom right.

Create a brand new project by clicking the green Create New button.

",index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description",columnClass:"hidden-sm hidden-xs",excludeModal:!0},scm_type:{label:"Type",searchType:"select",searchOptions:[],excludeModal:!0,nosort:!0},status:{label:"Status",ngClick:"showSCMStatus(project.id)",awToolTip:"View details of last SCM Update",dataPlacement:"top",badgeIcon:"{{ 'fa icon-failures-' + project.badge }}",badgePlacement:"left",searchType:"select",searchOptions:[],excludeModal:!0},last_updated:{label:"Last Updated",type:"date",excludeModal:!0,searchable:!1}},actions:{add:{mode:"all",ngClick:"addProject()",awToolTip:"Create a new project"},help:{awPopOver:"
\n
Updating
A source control update is in progress.
\n
Never Updated
This project has not yet been updated from source control.
\n
Failed
An error occurred during the most recent source control update, click the status text for more information.
\n
Successful
TThe latest source control update completed successfully.
\n
Missing
The previously configured local project directory is missing.
\n
N/A
The project is not linked to source control, so updates are not applicable.
\n
\n",dataPlacement:"left",dataContainer:"body",mode:"all",awToolTip:"Click for help",awTipPlacement:"top"},refresh:{mode:"all",awToolTip:"Refresh the page",ngClick:"refresh()"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editProject(project.id)",awToolTip:"Edit project properties",dataPlacement:"top"},scm_update:{label:"Update",ngClick:"SCMUpdate(project.id)",awToolTip:"{{ project.scm_update_tooltip }}",ngClass:"project.scm_type_class",dataPlacement:"top"},cancel:{label:"Stop",ngClick:"cancelUpdate(project.id, project.name)",awToolTip:"Cancel a running SCM update process",ngShow:"project.status == 'updating'",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteProject(project.id, project.name)",awToolTip:"Permanently remove project from the database",ngShow:"project.status !== 'updating'",dataPlacement:"top"}}}),angular.module("StreamListDefinition",[]).value("StreamList",{name:"activities",iterator:"activity",editTitle:"Activity Stream",selectInstructions:"",index:!1,hover:!0,"class":"table-condensed",searchWidgets:3,fields:{timestamp:{label:"Event Time",key:!0,desc:!0,noLink:!0,searchable:!1},user:{label:"Initiated by",ngBindHtml:"activity.user",sourceModel:"actor",sourceField:"username",searchPlaceholder:"Username",searchWidget:1},description:{label:"Action",ngBindHtml:"activity.description",nosort:!0,searchable:!1,columnClass:"col-lg-7"},system_event:{label:"System event",searchOnly:!0,searchType:"isnull",sourceModel:"actor",sourceField:"username",searchWidget:1},all_objects:{label:"All",searchOnly:!0,searchObject:"all",searchPlaceholder:"All resources",searchWidget:2},credential_search:{label:"Credential",searchOnly:!0,searchObject:"credential",searchPlaceholder:"Credential name",searchWidget:2,searchField:"object1"},group_search:{label:"Group",searchOnly:!0,searchObject:"group",searchPlaceholder:"Group name",searchWidget:2,searchField:"object1"},host_search:{label:"Host",searchOnly:!0,searchObject:"host",searchPlaceholder:"Host name",searchWidget:2,searchField:"object1"},inventory_search:{label:"Inventory",searchOnly:!0,searchObject:"inventory",searchPlaceholder:"Inventory name",searchWidget:2,searchField:"object1"},job_template_search:{label:"Job Template",searchOnly:!0,searchObject:"job_template",searchPlaceholder:"Job template name",searchWidget:2,searchField:"object1"},job_search:{label:"Job",searchOnly:!0,searchObject:"job",searchPlaceholder:"Job id",searchOnID:!0,searchWidget:2,searchField:"object1"},organization_search:{label:"Organization",searchOnly:!0,searchObject:"organization",searchPlaceholder:"Organization name",searchWidget:2,searchField:"object1"},project_search:{label:"Project",searchOnly:!0,searchObject:"project",searchPlaceholder:"Project name",searchWidget:2,searchField:"object1"},user_search:{label:"User",searchOnly:!0,searchObject:"user",searchPlaceholder:"Primary username",searchWidget:2,searchField:"object1"},all_objects3:{label:"All",searchOnly:!0,searchObject:"all",searchPlaceholder:"All related resources",searchWidget:3,searchField:"object2"},credential_search3:{label:"Credential",searchOnly:!0,searchObject:"credential",searchPlaceholder:"Related credential name",searchWidget:3,searchField:"object2"},group_search3:{label:"Group",searchOnly:!0,searchObject:"group",searchPlaceholder:"Related group name",searchWidget:3,searchField:"object2"},host_search3:{label:"Host",searchOnly:!0,searchObject:"host",searchPlaceholder:"Related host name",searchWidget:3,searchField:"object2"},inventory_search3:{label:"Inventory",searchOnly:!0,searchObject:"inventory",searchPlaceholder:"Related inventory name",searchWidget:3,searchField:"object2"},job_search3:{label:"Job",searchOnly:!0,searchObject:"job",searchPlaceholder:"Job id",searchOnID:!0,searchWidget:3,searchField:"object2"},job_template_search3:{label:"Job Template",searchOnly:!0,searchObject:"job_template",searchPlaceholder:"Related job template name",searchWidget:3,searchField:"object2"},organization_search3:{label:"Organization",searchOnly:!0,searchObject:"organization",searchPlaceholder:"Related organization name",searchWidget:3,searchField:"object2"},project_search3:{label:"Project",searchOnly:!0,searchObject:"project",searchPlaceholder:"Related project name",searchWidget:3,searchField:"object2"},user_search3:{label:"User",searchOnly:!0,searchObject:"user",searchPlaceholder:"Related username",searchWidget:3,searchField:"object2"}},actions:{refresh:{mode:"all","class":"btn-xs",awToolTip:"Refresh the page",ngClick:"refreshStream()"},close:{mode:"all",awToolTip:"Close Activity Stream view",ngClick:"closeStream()"}},fieldActions:{view:{label:"View",ngClick:"showDetail(activity.id)",icon:"fa-zoom-in","class":"btn-default btn-xs",awToolTip:"View event details",dataPlacement:"top"}}}),angular.module("TeamsListDefinition",[]).value("TeamList",{name:"teams",iterator:"team",selectTitle:"Add Team",editTitle:"Teams",selectInstructions:'Click on a row to select it, and click Finished when done. Use the green button to create a new row.',index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description"},organization:{label:"Organization",ngBind:"team.organization_name",sourceModel:"organization",sourceField:"name"}},actions:{add:{mode:"all",ngClick:"addTeam()",awToolTip:"Create a new team"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editTeam(team.id)",icon:"icon-edit","class":"btn-xs btn-default",awToolTip:"Edit team",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteTeam(team.id, team.name)",icon:"icon-trash","class":"btn-xs btn-danger",awToolTip:"Delete team",dataPlacement:"top"}}}),angular.module("UserListDefinition",[]).value("UserList",{name:"users",iterator:"user",selectTitle:"Add Users",editTitle:"Users",selectInstructions:"

Select existing users by clicking each user or checking the related checkbox. When finished, click the blue Select button, located bottom right.

When available, a brand new user can be created by clicking the green Create New button.

",index:!0,hover:!0,fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},actions:{add:{label:"Create New",mode:"all",ngClick:"addUser()",basePaths:["organizations","users"],"class":"btn-xs",awToolTip:"Create a new user"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editUser(user.id)",icon:"icon-edit","class":"btn-xs btn-default",awToolTip:"Edit user",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteUser(user.id, user.username)",icon:"icon-trash","class":"btn-xs btn-danger",awToolTip:"Delete user",dataPlacement:"top"}}}),angular.module("InventorySyncStatusWidget",["RestServices","Utilities"]).factory("InventorySyncStatus",["$rootScope","$compile",function(a,b){return function(a){function c(a){var b=a.label,c=a.count,d=a.fail,e=a.link,f=a.fail_link,g="\n"; @@ -45,6 +48,13 @@ d.is_superuser?f.PermissionAddAllowed=!0:d.related.admin_of_organizations&&(c.se }}]).factory("InjectHosts",["GenerateList","InventoryHosts","HostsReload",function(a,b,c){return function(d){var e=d.scope,f=d.inventory_id,g=d.group_id,h=d.tree_id,i=a;i.inject(b,{scope:e,mode:"edit",id:"hosts-container",breadCrumbs:!1,searchSize:"col-lg-6 col-md-6 col-sm-6"}),c({scope:e,group_id:g,tree_id:h,inventory_id:f})}}]).factory("ToggleHostEnabled",["GetBasePath","Rest","Wait","ProcessErrors","Alert","Find","SetEnabledMsg",function(a,b,c,d,e,f,g){return function(h){function i(a){a.enabled=a.enabled?!1:!0,a.enabled_flag=a.enabled,g(a)}var j,k=h.host_id,l=h.external_source,m=h.scope;l?e("Action Not Allowed","This host is part of a cloud inventory. It can only be disabled in the cloud. After disabling it, run an inventory sync to see the new status reflected here.","alert-info"):(c("start"),j=f({list:m.hosts,key:"id",val:k}),i(j),b.setUrl(a("hosts")+k+"/"),b.put(j).success(function(){c("stop")}).error(function(a,b){i(j),c("stop"),d(m,a,b,null,{hdr:"Error!",msg:"Failed to update host. PUT returned status: "+b})}))}}]).factory("HostsList",["$rootScope","$location","$log","$routeParams","Rest","Alert","HostList","GenerateList","Prompt","SearchInit","PaginateInit","ProcessErrors","GetBasePath","HostsAdd","HostsReload","SelectionInit",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){return function(a){var b,c,d=a.inventory_id,e=a.group_id,f=g,i=h;f.iterator="subhost",f.name="subhosts",c=i.inject(f,{id:"form-modal-body",mode:"select",breadCrumbs:!1,selectButton:!1}),b=m("inventory")+d+"/hosts/?not__groups__id="+c.group_id,c.formModalActionLabel="Select",c.formModalHeader="Add Existing Hosts",c.formModalCancelShow=!0,p({scope:c,list:f,url:m("groups")+e+"/hosts/"}),c.removeModalClosed&&c.removeModalClosed(),c.removeModalClosed=c.$on("modalClosed",function(){o(a)}),$(".popover").popover("hide"),$("#form-modal .btn-none").removeClass("btn-none").addClass("btn-success"),$("#form-modal").modal({backdrop:"static",keyboard:!1}),j({scope:c,set:"subhosts",list:f,url:b}),k({scope:c,list:f,url:b,mode:"lookup"}),c.search(f.iterator),c.$$phase||c.$digest(),c.createHost=function(){$("#form-modal").modal("hide"),n({scope:a.scope,inventory_id:d,group_id:e})}}}]).factory("HostsCreate",["$rootScope","$location","$log","$routeParams","Rest","Alert","HostForm","GenerateForm","Prompt","ProcessErrors","GetBasePath","HostsReload","ParseTypeChange","Wait","WatchInventoryWindowResize",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){return function(a){var b=a.scope,c=b.inventory_id,d=b.selected_group_id,i=k("groups")+d+"/hosts/",p=g,q=h,r=q.inject(p,{mode:"add",modal:!0,related:!1}),s={};r.formModalActionLabel="Save",r.formModalHeader="Create New Host",r.formModalCancelShow=!0,r.parseType="yaml",m(r),r.removeHostsReload&&r.removeHostsReload(),r.removeHostsReload=r.$on("hostsReload",function(){l(a)}),$("#form-modal .btn-none").removeClass("btn-none").addClass("btn-success"),q.reset(),s={},r.$$phase||r.$digest(),r.removeHostSaveComplete&&r.removeHostSaveComplete(),r.removeHostSaveComplete=r.$on("HostSaveComplete",function(){n("stop"),$("#form-modal").modal("hide"),l({scope:b,group_id:b.selected_group_id,tree_id:b.selected_tree_id,inventory_id:b.inventory_id}),o()}),r.formModalAction=function(){n("start");try{var a,b,d={};if(r.formModalActionDisabled=!0,b="json"===r.parseType?JSON.parse(r.variables):jsyaml.load(r.variables),"object"!=typeof b)throw"failed to return an object!";for(a in p.fields)"variables"!==a&&(d[a]=r[a]);d.inventory=c,d.variables=$.isEmptyObject(b)?"":JSON.stringify(b,void 0," "),e.setUrl(i),e.post(d).success(function(){r.$emit("HostSaveComplete")}).error(function(a,b){n("stop"),r.formModalActionDisabled=!1,j(r,a,b,p,{hdr:"Error!",msg:"Failed to add new host. POST returned status: "+b})})}catch(g){n("stop"),r.formModalActionDisabled=!1,f("Error","Error parsing host variables. Parser returned: "+g)}},r.formReset=function(){q.reset()},r.cancelModal=function(){o()}}}]).factory("HostsEdit",["$rootScope","$location","$log","$routeParams","Rest","Alert","HostForm","GenerateForm","Prompt","ProcessErrors","GetBasePath","HostsReload","ParseTypeChange","Wait","Find","SetStatus","ApplyEllipsis","WatchInventoryWindowResize",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){return function(a){var b=a.scope,c=a.host_id,d=a.inventory_id,i=h,l=g,s=k("hosts")+c+"/",t=i.inject(l,{mode:"edit",modal:!0,related:!1,show_modal:!1}),u={},v={};i.reset(),t.formModalActionLabel="Save",t.formModalHeader="Host Properties",t.formModalCancelShow=!0,t.parseType="yaml",m(t),t.hostLoadedRemove&&t.hostLoadedRemove(),t.hostLoadedRemove=t.$on("hostLoaded",function(){t.variable_url?(e.setUrl(t.variable_url),e.get().success(function(a){t.variables=$.isEmptyObject(a)?"---":jsyaml.safeDump(a),n("stop"),$("#form-modal").modal("show")}).error(function(a,b){t.variables=null,j(t,a,b,l,{hdr:"Error!",msg:"Failed to retrieve host variables. GET returned status: "+b})})):(t.variables="---",n("stop"),$("#form-modal").modal("show")),u.variables=t.variables}),n("start"),e.setUrl(s),e.get().success(function(a){var b,c,d;for(c in l.fields)a[c]&&(t[c]=a[c],u[c]=t[c]);d=a.related;for(b in l.related)d[b]&&(v[b]={url:d[b],iterator:l.related[b].iterator});t.variable_url=a.related.variable_data,t.$emit("hostLoaded")}).error(function(a,b){j(t,a,b,l,{hdr:"Error!",msg:"Failed to retrieve host: "+c+". GET returned status: "+b})}),t.removeSaveCompleted&&t.removeSaveCompleted(),t.removeSaveCompleted=t.$on("saveCompleted",function(){var a=o({list:b.hosts,key:"id",val:c}),d=a.name;a.name=t.name,a.enabled=t.enabled,a.enabled_flag=t.enabled,p({scope:b,host:a}),d?setTimeout(function(){$('#hosts_table .host-name a[title="'+d+'"').attr("title",a.name),q("#hosts_table .host-name a"),n("stop"),$("#form-modal").modal("hide")},2e3):(n("stop"),$("#form-modal").modal("hide")),r()}),t.formModalAction=function(){n("start");try{var a,b,g={};if(b="json"===t.parseType?JSON.parse(t.variables):jsyaml.load(t.variables),"object"!=typeof b)throw"failed to return an object!";for(a in l.fields)g[a]=t[a];g.inventory=d,g.variables=$.isEmptyObject(b)?"":JSON.stringify(b,void 0," "),e.setUrl(s),e.put(g).success(function(){t.$emit("saveCompleted")}).error(function(a,b){n("stop"),j(t,a,b,l,{hdr:"Error!",msg:"Failed to update host: "+c+". PUT returned status: "+b})})}catch(h){n("stop"),f("Error","Error parsing host variables. Parser returned: "+h)}},t.formReset=function(){i.reset();for(var a in u)t[a]=u[a];t.parseType="yaml"},t.cancelModal=function(){r()}}}]).factory("HostsDelete",["$rootScope","$location","$log","$routeParams","Rest","Alert","Prompt","ProcessErrors","GetBasePath","HostsReload","Wait","Find",function(a,b,c,d,e,f,g,h,i,j,k,l){return function(a){var b,c,d=a.scope,f=a.host_id,j=a.host_name,m=null===d.selected_group_id?i("inventory")+d.inventory_id+"/hosts/":i("groups")+d.selected_group_id+"/hosts/",n=d.selected_tree_id?l({list:d.groups,key:"id",val:d.selected_tree_id}):null;d.removeHostsReload&&d.removeHostsReload(),d.removeHostsReload=d.$on("hostsReload",function(){d.showHosts(d.selected_tree_id,d.selected_group_id,!1)}),b=function(){$("#prompt-modal").on("hidden.bs.modal",function(){k("start")}),$("#prompt-modal").modal("hide"),e.setUrl(m),e.post({id:f,disassociate:1}).success(function(){d.$emit("hostsReload")}).error(function(a,b){k("stop"),h(d,a,b,null,{hdr:"Error!",msg:"Attempt to delete "+j+" failed. POST returned status: "+b})})},c=n?"

Are you sure you want to delete host "+j+" from group "+n.name+"?

":"

Are you sure you want to delete host "+j+"?

",g({hdr:"Delete Host",body:c,action:b,"class":"btn-danger"})}}]).factory("EditHostGroups",["$rootScope","$location","$log","$routeParams","Rest","Alert","GenerateForm","Prompt","ProcessErrors","GetBasePath","HostsReload","ParseTypeChange","Wait",function(a,b,c,d,e,f,g,h,i,j,k,l,m){return function(a){var b,c,d,f,h,l=a.host_id,n=a.inventory_id,o=g,p=[];for(c='
\n',c+='
\n',c+="\n",c+='\n',c+="
\n",c+='
\n',c+="\n",c+='\n',c+="
\n",c+="
\n",c+='
\n',c+='
\n',c+='\n',c+='\n',c+="

(move selected groups)

\n",c+="
\n",c+="
\n",d=j("hosts")+l+"/",f=o.inject(null,{mode:"edit",modal:!0,related:!1,html:c}),b=0;bGroups',f.formModalCancelShow=!0,f.formModalActionDisabled=!0,$("#form-modal .btn-none").removeClass("btn-none").addClass("btn-success"),f.hostGroupChangeRemove&&f.hostGroupChangeRemove(),f.hostGroupChangeRemove=f.$on("hostGroupChange",function(){p.pop(),0===p.length&&(h=function(){setTimeout(function(){m("stop")},500)},k({scope:f,inventory_id:n,group_id:f.group_id,action:h}))}),f.formModalAction=function(){var a,b,c;for($("#form-modal").modal("hide"),m("start"),a=0;a0?(f.assignedGroups=null,f.leftButtonDisabled=!0,f.rightButtonDisabled=!1):f.rightButtonDisabled=!0},f.rightChange=function(){null!==f.assignedGroups&&f.assignedGroups.length>0?(f.selectedGroups=null,f.leftButtonDisabled=!1,f.rightButtonDisabled=!0):f.leftButtonDisabled=!0},f.moveLeft=function(){var a,b,c,d;for(a=0;af.available_groups[b].name.toLowerCase()&&f.assignedGroups[a].name.toLowerCase()f.host_groups[b].name.toLowerCase()&&f.selectedGroups[a].name.toLowerCase()0){for(j("stop"),u+='
\n',u+=w?w:"",o=0;o\n',u+='\n",u+='
\n',u+='A value is required!\n',u+='\n',u+="
\n",u+="\n",n=l.associated,l=p.fields[l.associated],q[n]="",u+='
\n',u+='\n",u+='
\n',u+='A value is required!\n',l.awPassMatch&&(u+='Must match Password value\n'),u+='\n',u+="
\n",u+="
\n";u+="\n",m=angular.element(document.getElementById("password-body")),m.html(u),c(m.contents())(q),$("#password-modal").modal(),$("#password-modal").on("shown.bs.modal",function(){$("#password-body").find('input[type="password"]:first').focus()})}else q.startJob()}}]).factory("SubmitJob",["PromptPasswords","$compile","Rest","$location","GetBasePath","CredentialList","LookUpInit","CredentialForm","ProcessErrors","JobTemplateForm","Wait",function(a,b,c,d,e,f,g,h,i,j,k){return function(b){function l(b){var e,f,g;m.credentialWatchRemove&&m.credentialWatchRemove(),e=(new Date).toISOString(),f=b.related.jobs?b.related.jobs:b.related.job_template+"jobs/",g=o?o:b.name,k("start"),c.setUrl(f),c.post({name:g+" "+e,description:b.description,job_template:b.id,inventory:b.inventory,project:b.project,playbook:b.playbook,credential:b.credential,forks:b.forks,limit:b.limit,verbosity:b.verbosity,extra_vars:b.extra_vars}).success(function(b){m.job_id=b.id,b.passwords_needed_to_start.length>0?a({scope:m,passwords:b.passwords_needed_to_start,start_url:b.related.start,form:h}):(c.setUrl(b.related.start),c.post().success(function(){k("stop");var a=d.path().replace(/^\//,"").split("/")[0];"jobs"===a?m.refresh():d.path("/jobs")}).error(function(a,b){i(m,a,b,null,{hdr:"Error!",msg:"Failed to start job. POST returned status: "+b})}))}).error(function(a,b){k("stop"),i(m,a,b,null,{hdr:"Error!",msg:"Failed to create job. POST returned status: "+b})})}var m=b.scope,n=b.id,o=b.template?b.template:null,p=d.path().replace(/^\//,"").split("/")[0],q=e(p)+n+"/";k("start"),c.setUrl(q),c.get().success(function(a){m.credential="",""===a.credential||null===a.credential?(k("stop"),m.credentialWatchRemove&&m.credentialWatchRemove(),m.credentialWatchRemove=m.$watch("credential",function(b,c){b!==c&&""!==m.credential&&null!==m.credential&&void 0!==m.credential&&(a.credential=m.credential,l(a))}),g({scope:m,form:j,current_item:null,list:f,field:"credential",hdr:"Credential Required"}),m.lookUpCredential()):l(a)}).error(function(a,b){i(m,a,b,null,{hdr:"Error!",msg:"Failed to get job template details. GET returned status: "+b})})}}]).factory("ProjectUpdate",["PromptPasswords","$compile","Rest","$location","GetBasePath","ProcessErrors","Alert","ProjectsForm","Wait",function(a,b,c,d,e,f,g,h,i){return function(b){var d=b.scope,j=b.project_id,k=e("projects")+j+"/update/";d.removeUpdateSubmitted&&d.removeUpdateSubmitted(),d.removeUpdateSubmitted=d.$on("UpdateSubmitted",function(){i("stop"),g("Update Started","The request to start the SCM update process was submitted. To monitor the update status, refresh the page by clicking the Refresh button.","alert-info"),d.refresh()}),d.removeSCMSubmit&&d.removeSCMSubmit(),d.removeSCMSubmit=d.$on("SCMSubmit",function(b,c,e){a({scope:d,passwords:c,start_url:k,form:h,extra_html:e})}),i("start"),c.setUrl(k),c.get().success(function(a){var b,c;if(i("stop"),a.can_update){for(c="",b=0;b\n',c+='\n',c+='
\n',c+=' button.',"alert-info"),d.removeHostReloadComplete&&d.removeHostReloadComplete()}),d.removeUpdateSubmitted&&d.removeUpdateSubmitted(),d.removeUpdateSubmitted=d.$on("UpdateSubmitted",function(a,b){"started"===b&&(d.refreshGroups?(d.selected_tree_id=k,d.selected_group_id=i,d.refreshGroups()):d.refresh&&d.refresh(),d.$emit("HostReloadComplete"))}),d.removeInventorySubmit&&d.removeInventorySubmit(),d.removeInventorySubmit=d.$on("InventorySubmit",function(b,c,f){a({scope:d,passwords:c,start_url:e,form:h,extra_html:f})}),j("start"),c.setUrl(e),c.get().success(function(a){a.can_update?d.$emit("InventorySubmit",a.passwords_needed_to_update):(j("stop"),g("Permission Denied","You do not have access to run the update. Please contact your system administrator.","alert-danger"))}).error(function(a,b){j("stop"),f(d,a,b,null,{hdr:"Error!",msg:"Failed to get inventory_source details. "+e+"GET status: "+b})})}}]),angular.module("JobsHelper",["Utilities","FormGenerator","JobSummaryDefinition","InventoryHelper"]).factory("JobStatusToolTip",[function(){return function(a){var b;switch(a){case"successful":case"success":b="There were no failed tasks.";break;case"failed":b="Some tasks encountered errors.";break;case"canceled":b="Stopped by user request.";break;case"new":b="In queue, waiting on task manager.";break;case"waiting":b="SCM Update or Inventory Update is executing.";break;case"pending":b="Not in queue, waiting on task manager.";break;case"running":b="Playbook tasks executing."}return b}}]).factory("ShowJobSummary",["Rest","Wait","GetBasePath","FormatDate","ProcessErrors","GenerateForm","JobSummary","WatchInventoryWindowResize",function(a,b,c,d,e,f,g,h){return function(i){function j(a){var b=a.match(/\n/g),c=b?b.length:1;return c>p?20:c}var k,l,m,n,o,p,q,r,s=i.job_id,t=f,u=g;r='
\n',$("#inventory-modal-container").empty().append(r),k=t.inject(u,{mode:"edit",id:"form-container",breadCrumbs:!1,related:!1}),l=$(document).width(),m=$("body").height(),l>1199?(n=675,o=750>m?m-20:750,p=20):1199>=l&&l>=768?(n=550,o=620>m?m-15:620,p=15):(n=l-20,o=500>m?m:500,p=10),$("#status-modal-dialog").dialog({buttons:{OK:function(){$(this).dialog("close")}},modal:!0,width:n,height:o,autoOpen:!1,create:function(){$('.ui-dialog[aria-describedby="status-modal-dialog"]').find(".ui-dialog-titlebar button").empty().attr({"class":"close"}).text("x"),$('.ui-dialog[aria-describedby="status-modal-dialog"]').find(".ui-dialog-buttonset button:first").attr({"class":"btn btn-primary"})},resizeStop:function(){var a=$('.ui-dialog[aria-describedby="status-modal-dialog"]'),b=a.find("#status-modal-dialog");b.width(a.width()-28)},close:function(){$(".tooltip").each(function(){$(this).remove()}),$(".popover").each(function(){$(this).remove()}),$("#status-modal-dialog").dialog("destroy"),$("#inventory-modal-container").empty(),h()},open:function(){b("stop")}}),b("start"),q=c("jobs")+s+"/",a.setUrl(q),a.get().success(function(a){var b;k.id=a.id,k.name=a.name,k.status=a.status,k.result_stdout=a.result_stdout,k.result_traceback=a.result_traceback,k.stdout_rows=j(k.result_stdout),k.traceback_rows=j(k.result_traceback),b=new Date(a.created),k.created=d(b),$("#status-modal-dialog").dialog("open")}).error(function(a,b){e(k,a,b,null,{hdr:"Error!",msg:"Attempt to load job failed. GET returned status: "+b})})}}]),angular.module("LookUpHelper",["RestServices","Utilities","SearchHelper","PaginationHelpers","ListGenerator","ApiLoader"]).factory("LookUpInit",["Alert","Rest","GenerateList","SearchInit","PaginateInit","GetBasePath","FormatDate","Empty",function(a,b,c,d,e,f,g,h){return function(b){var i,j,k,l,m=b.scope,n=b.form,o=b.list,p=b.field,q=b.postAction;i=b.url?b.url:f("inventories"===o.name?"inventory":o.name),j=o.iterator.charAt(0).toUpperCase()+o.iterator.substring(1),k=b.hdr?b.hdr:"Select "+j,l=/\/$/.test(i)?i+"?":i+"&",l+=n.fields[p].sourceField+"__iexact=:value",$('input[name="'+n.fields[p].sourceModel+"_"+n.fields[p].sourceField+'"]').attr("data-url",l),$('input[name="'+n.fields[p].sourceModel+"_"+n.fields[p].sourceField+'"]').attr("data-source",p),m["lookUp"+j]=function(){var b=c,f=b.inject(o,{mode:"lookup",hdr:k});$("#lookup-modal").on("hidden.bs.modal",function(){f.searchCleanup&&f.searchCleanup(),(""===m[p]||null===m[p])&&(m[n.fields[p].sourceModel+"_"+n.fields[p].sourceField]="",m.$$phase||m.$digest())}),f.selectAction=function(){var c,d=!1;for(c=0;c5?f[j+"_page"]-5:1,e=f[j+"_page"]<6?10<=f[j+"_num_pages"]?10:f[j+"_num_pages"]:f[j+"_page"]+4=c;c++)f[j+"_page_range"].push(c)}}]).factory("RelatedPaginateInit",["RefreshRelated","$cookieStore","Wait",function(a,b,c){return function(d){var e,f=d.scope,g=d.relatedSets,h=d.pageSize?d.pageSize:10;for(e in g)f[g[e].iterator+"_url"]=g[e].url,f[g[e].iterator+"_page"]=0,f[g[e].iterator+"_page_size"]=h;f.getPage=function(b,d,e){var g=f[e+"_url"].replace(/.page\=\d+/,""),h=/\/$/.test(g)?"?":"&";g+=h+"page="+b,g+=f[e+"SearchParams"]?"&"+f[e+"SearchParams"]+"&page_size="+f[e+"_page_size"]:"page_size="+f[e+"PageSize"],c("start"),a({scope:f,set:d,iterator:e,url:g})},f.pageIsActive=function(a,b){return a===f[b+"_page"]?"active":""},f.changePageSize=function(c,d){f[d+"_page"]=1;var e=f[d+"_url"];b.put(d+"_page_size",f[d+"_page_size"]),e=e.replace(/\/\?.*$/,"/"),e+=f[d+"SearchParams"]?"?"+f[d+"SearchParams"]+"&page_size="+f[d+"_page_size"]:"?page_size="+f[d+"_page_size"],a({scope:f,set:c,iterator:d,url:e})}}}]).factory("PaginateInit",["Refresh","$cookieStore","Wait",function(a,b,c){return function(b){var d=b.scope,e=b.list,f=b.iterator?b.iterator:e.iterator,g=b.mode?b.mode:null;d[f+"_page"]=b.page?b.page:1,d[f+"_url"]=b.url,d[f+"_mode"]=g,d[f+"_page_size"]=b.pageSize?b.pageSize:"lookup"===g?5:20,d.getPage=function(b,e,f){var g=d[f+"_url"].replace(/.page\=\d+/,""),h=/\/$/.test(g)?"?":"&";g+=h+"page="+b,g+=d[f+"SearchParams"]?"&"+d[f+"SearchParams"]+"&page_size="+d[f+"_page_size"]:"page_size="+d[f+"PageSize"],c("start"),a({scope:d,set:e,iterator:f,url:g})},d.pageIsActive=function(a,b){return a===d[b+"_page"]?"active":""},d.changePageSize=function(b,e){d[e+"_page"]=0;var f=d[e+"_url"].replace(/\?page_size\=\d+/,""),g=/\/$/.test(f)?"?":"&";f+=d[e+"SearchParams"]?g+d[e+"SearchParams"]+"&page_size="+d[e+"_page_size"]:g+"page_size="+d[e+"_page_size"],c("start"),a({scope:d,set:b,iterator:e,url:f})}}}]),angular.module("ParseHelper",[]).factory("ParseTypeChange",[function(){return function(a,b,c){var d=b?b:"variables",e=c?c:"parseType";a.blockParseTypeWatch=!1,a.blockVariableDataWatch=!1,a["remove"+d+"Watch"]&&a["remove"+d+"Watch"](),a["remove"+d+"Watch"]=a.$watch(e,function(b,c){var e;if(b!==c)if("json"===b)if(a[d]&&!/^---$/.test(a[d]))try{e=jsyaml.load(a[d]),a[d]=JSON.stringify(e,null," ")}catch(f){}else a[d]="{}";else if(a[d]&&!/^\{\}$/.test(a[d]))try{e=JSON.parse(a[d]),a[d]=jsyaml.safeDump(e)}catch(f){}else a[d]="---"})}}]),angular.module("PermissionsHelper",[]).factory("PermissionCategoryChange",[function(){return function(a){var b=a.scope,c=a.reset;"Inventory"===b.category?(b.projectrequired=!1,b.permissionTypeHelp="
\n
Read
\n
Only allow the user or team to view the inventory.
\n
Write
\n
Allow the user or team to modify hosts and groups contained in the inventory, add new hosts and groups, and perform inventory sync operations.\n
Admin
\n
Allow the user or team full access to the inventory. This includes reading, writing, deletion of the inventory and inventory sync operations.
\n
\n"):(b.projectrequired=!0,b.permissionTypeHelp="
\n
Run
\n
Allow the user or team to perform a live deployment of the project against the inventory. In Run mode modules will be executed, and changes to the inventory will occur.
\n
Check
\n
Only allow the user or team to deploy the project against the inventory as a dry-run operation. In Check mode, module operations will only be simulated. No changes will occur.
\n
\n"),c&&(b.permission_type="Inventory"===b.category?"read":"run")}}]),angular.module("ProjectPathHelper",["RestServices","Utilities"]).factory("GetProjectPath",["Alert","Rest","GetBasePath","ProcessErrors",function(a,b,c,d){return function(a){function e(a){var b,c,d=[],e=[];for(b=0;b
\n',$("#projects-modal-container").empty().append(b),c=q.inject(r,{mode:"edit",id:"form-container",related:!1,breadCrumbs:!1}),q.reset(),d=$(document).width(),f=$("body").height(),d>1199?(h=675,j=750>f?f-20:750,n=20):1199>=d&&d>=768?(h=550,j=620>f?f-15:620,n=15):(h=d-20,j=500>f?f:500,n=10),$("#status-modal-dialog").dialog({buttons:{OK:function(){$(this).dialog("close")}},modal:!0,width:h,height:j,autoOpen:!1,create:function(){$('.ui-dialog[aria-describedby="status-modal-dialog"]').find(".ui-dialog-titlebar button").empty().attr({"class":"close"}).text("x"),$('.ui-dialog[aria-describedby="status-modal-dialog"]').find(".ui-dialog-buttonset button:first").attr({"class":"btn btn-primary"})},resizeStop:function(){var a=$('.ui-dialog[aria-describedby="status-modal-dialog"]'),b=a.find("#status-modal-dialog");b.width(a.width()-28)},close:function(){$(".tooltip").each(function(){$(this).remove()}),$(".popover").each(function(){$(this).remove()}),$("#status-modal-dialog").dialog("destroy"),$("#projects-modal-container").empty()},open:function(){m("stop")}}),e.setUrl(p),e.get().success(function(a){var b,d=a;for(b in r.fields)d[b]?c[b]="created"===b?k(new Date(d[b])):d[b]:d.summary_fields.project[b]&&(c[b]=d.summary_fields.project[b]);$("#status-modal-dialog").dialog({title:d.summary_fields.project.name+" Status"}).dialog("open")}).error(function(a,b){$("#form-modal").modal("hide"),i(c,a,b,r,{hdr:"Error!",msg:"Failed to retrieve status of project: "+o+". GET status: "+b})})}}]),angular.module("SelectionHelper",["Utilities","RestServices"]).factory("SelectionInit",["Rest","Alert","ProcessErrors","ReturnToCaller","Wait",function(a,b,c,d,e){return function(b){var f,g=b.scope,h=b.list,i=b.url,j=b.returnToCaller;f=void 0!==b.selected?b.selected:[],g.formModalActionDisabled=!0,g.disableSelectBtn=!0,g["toggle_"+h.iterator]=function(a,b){var c,d,e;for(c=0;c0?(g.formModalActionDisabled=!1,g.disableSelectBtn=!1):(g.formModalActionDisabled=!0,g.disableSelectBtn=!0)},g.finishSelection=function(){function b(){f=[],void 0!==j?d(j):($("#form-modal").modal("hide"),g.$emit("modalClosed"))}function k(b){a.post(b).success(function(a,b){m.push({result:"success",data:a,status:b}),g.$emit("callFinished")}).error(function(a,b,c){m.push({result:"error",data:a,status:b,headers:c}),g.$emit("callFinished")})}a.setUrl(i);var l,m=[];if(g.formModalActionDisabled=!0,g.disableSelectBtn=!0,e("start"),g.callFinishedRemove&&g.callFinishedRemove(),g.callFinishedRemove=g.$on("callFinished",function(){var a,d=0;if(m.length===f.length){for(e("stop"),a=0;a0)for(l=0;lh)h++,setTimeout(1e3,e());else if("success"===g.status)return d(a)}var f,g={},h=0;return null===c.apiDefaults||void 0===c.apiDefaults?(f="/api/v1/",b.setUrl(f),b.get().success(function(a){var b,d=a;for(b in d)switch(b){case"organizations":d[b].iterator="organization";break;case"jobs":d[b].iterator="job";break;case"users":d[b].iterator="user";break;case"teams":d[b].iterator="team";break;case"hosts":d[b].iterator="host";break;case"groups":d[b].iterator="group";break;case"projects":d[b].iterator="project";break;case"inventories":d[b].iterator="inventory"}c.apiDefaults=d,g={status:"success"}}).error(function(a,b){g={status:"error",msg:"Call to "+f+" failed. GET returned status: "+b}}),e()):d(a)}}]),angular.module("InventoryHelper",["RestServices","Utilities","OrganizationListDefinition","ListGenerator","AuthService","InventoryHelper","InventoryFormDefinition","ParseHelper","SearchHelper"]).factory("WatchInventoryWindowResize",["ApplyEllipsis",function(a){return function(){var b;$(window).resize(function(){clearTimeout(b),b=setTimeout(function(){$("#groups_table .name-column").each(function(){var a=$(this).width(),b=$(this).find(".level").width(),c=parseInt($(this).find(".level").css("padding-left").replace(/px/,"")),d=b+c,e=100-Math.ceil(d/a*100)+"%";$(this).find(".group-name").css({width:e})}),a("#groups_table .group-name a"),a("#hosts_table .host-name a")},100)})}}]).factory("SaveInventory",["InventoryForm","Rest","Alert","ProcessErrors","LookUpInit","OrganizationList","GetBasePath","ParseTypeChange","Wait",function(a,b,c,d,e,f,g,h,i){return function(e){var f,h,j,k=e.scope,l=a,m=g("inventory");i("start");try{if(h="json"===k.inventoryParseType?JSON.parse(k.inventory_variables):jsyaml.load(k.inventory_variables),"object"!=typeof h)throw"failed to return an object!";j={};for(f in l.fields)"inventory_variables"!==f&&(l.fields[f].realName?j[l.fields[f].realName]=k[f]:j[f]=k[f]);b.setUrl(m+k.inventory_id+"/"),b.put(j).success(function(a){k.inventory_variables?(b.setUrl(a.related.variable_data),b.put(h).success(function(){i("stop"),k.$emit("InventorySaved")}).error(function(a,b){d(k,a,b,l,{hdr:"Error!",msg:"Failed to update inventory varaibles. PUT returned status: "+b})})):k.$emit("InventorySaved")}).error(function(a,b){d(k,a,b,l,{hdr:"Error!",msg:"Failed to update inventory. POST returned status: "+b})})}catch(n){i("stop"),c("Error","Error parsing inventory variables. Parser returned: "+n)}}}]).factory("EditInventoryProperties",["InventoryForm","GenerateForm","Rest","Alert","ProcessErrors","LookUpInit","OrganizationList","GetBasePath","ParseTypeChange","SaveInventory","Wait","Store","SearchInit",function(a,b,c,d,e,f,g,h,i,j,k,l,m){return function(n){var o,p=n.scope,q=n.inventory_id,r=b,s=a,t={},u=l("CurrentSearchParams");s.well=!1,o=r.inject(s,{mode:"edit",modal:!0,related:!1,modal_show:!1}),s.well=!0,i(o,"inventory_variables","inventoryParseType"),o.inventoryParseType="yaml",o.formModalActionLabel="Save",o.formModalCancelShow=!0,o.formModalInfo=!1,o.formModalHeader="Inventory Properties",k("start"),c.setUrl(h("inventory")+q+"/"),c.get().success(function(a){var b,c;for(b in s.fields){if("inventory_variables"===b){if($.isEmptyObject(a.variables)||"{}"===a.variables||"null"===a.variables||""===a.variables)o.inventory_variables="---";else try{c=JSON.parse(a.variables),o.inventory_variables=jsyaml.safeDump(c)}catch(e){d("Variable Parse Error","Attempted to parse variables for inventory: "+q+". Parse returned: "+e),console&&(console.log(e),console.log("data:"),console.log(a.variables)),o.inventory_variables="---"}t.inventory_variables=o.variables}else"inventory_name"===b?(o[b]=a.name,t[b]=o[b]):"inventory_description"===b?(o[b]=a.description,t[b]=o[b]):a[b]&&(o[b]=a[b],t[b]=o[b]);s.fields[b].sourceModel&&a.summary_fields&&a.summary_fields[s.fields[b].sourceModel]&&(o[s.fields[b].sourceModel+"_"+s.fields[b].sourceField]=a.summary_fields[s.fields[b].sourceModel][s.fields[b].sourceField],t[s.fields[b].sourceModel+"_"+s.fields[b].sourceField]=a.summary_fields[s.fields[b].sourceModel][s.fields[b].sourceField])}f({scope:o,form:s,current_item:o.organization,list:g,field:"organization"}),k("stop"),$("#form-modal").modal("show")}).error(function(a,b){e(o,a,b,null,{hdr:"Error!",msg:"Failed to get inventory: "+q+". GET returned: "+b})}),o.removeInventorySaved&&o.removeInventorySaved(),o.removeInventorySaved=o.$on("InventorySaved",function(){$("#form-modal").modal("hide"),o.searchCleanp&&o.searchCleanup(),m({scope:p,set:u.set,list:u.list,url:u.defaultUrl,iterator:u.iterator,sort_order:u.sort_order,setWidgets:!1}),p.$emit("RefreshInventories")}),o.cancelModal=function(){o.searchCleanp&&o.searchCleanup(),m({scope:p,set:u.set,list:u.list,url:u.defaultUrl,iterator:u.iterator,sort_order:u.sort_order,setWidgets:!1})},o.formModalAction=function(){p.inventory_id=q,p.inventory_name=o.inventory_name,j({scope:o})}}}]),angular.module("md5Helper",["RestServices","Utilities"]).factory("md5Setup",[function(){return function(a){var b=a.scope,c=a.master,d=a.check_field,e=a.default_val;b[d]=e,c[d]=e,b.genMD5=function(a){var c=new Date;b[a]=$.md5("AnsibleWorks"+c.getTime())},b.toggleCallback=function(a){"false"===b.allow_callbacks&&(b[a]="")},b.selectAll=function(a){$('input[name="'+a+'"]').focus().select()}}}]),angular.module("RefreshRelatedHelper",["RestServices","Utilities","PaginationHelpers"]).factory("RefreshRelated",["ProcessErrors","Rest","Wait","PageRangeSetup",function(a,b,c,d){return function(e){var f=e.scope,g=e.set,h=e.iterator,i=e.url;b.setUrl(i),b.get().success(function(a){d({scope:f,count:a.count,next:a.next,previous:a.previous,iterator:h}),f[g]=a.results,f[h+"Loading"]=!1,f[h+"HoldInput"]=!1,c("stop"),f.$emit("related"+g)}).error(function(b,c){a(f,b,c,null,{hdr:"Error!",msg:"Failed to retrieve "+g+". GET returned status: "+c})})}}]),angular.module("RefreshHelper",["RestServices","Utilities","PaginationHelpers"]).factory("Refresh",["ProcessErrors","Rest","Wait","Empty","PageRangeSetup",function(a,b,c,d,e){return function(d){var f=d.scope,g=d.set,h=d.iterator,i=d.url;f.current_url=i,b.setUrl(i),b.get().success(function(a){var b,d;for(e({scope:f,count:a.count,next:a.next,previous:a.previous,iterator:h}),f[h+"Loading"]=!1,b=1;3>=b;b++)d=1===b?"":b,f[h+"HoldInput"+d]=!1;f[g]=a.results,window.scrollTo(0,0),c("stop"),f.$emit("PostRefresh")}).error(function(b,c){f[h+"HoldInput"]=!1,a(f,b,c,null,{hdr:"Error!",msg:"Failed to retrieve "+g+". GET returned status: "+c})})}}]),angular.module("RelatedSearchHelper",["RestServices","Utilities","RefreshRelatedHelper"]).factory("RelatedSearchInit",["$timeout","Alert","Rest","RefreshRelated","Wait",function(a,b,c,d,e){return function(a){function b(a){var b,c,d,e;for(e in h.related)if("tree"!==h.related[e].type&&(void 0===a||a===h.related[e].iterator)){b=h.related[e].iterator;for(d in h.related[e].fields)if(h.related[e].fields[d].key){f[b+"SearchField"]=d,f[b+"SearchFieldLabel"]=h.related[e].fields[d].label;break}f[b+"SortOrder"]=null,f[b+"SearchType"]="icontains",f[b+"SearchTypeLabel"]="Contains",f[b+"SearchValue"]=null,f[b+"SelectShow"]=!1,f[b+"ShowStartBtn"]=!0,f[b+"HideAllStartBtn"]=!1,c=f[b+"SearchField"],!h.related[e].fields[c].searchType||"boolean"!==h.related[e].fields[c].searchType&&"select"!==h.related[e].fields[c].searchType||(f[b+"SelectShow"]=!0,f[b+"SearchSelectOpts"]=h.fields[c].searchOptions),h.related[e].fields[c].searchType&&"gtzero"===h.related[e].fields[c].searchType&&(f[b+"InputHide"]=!0)}}var c,f=a.scope,g=a.relatedSets,h=a.form;b(),f.resetSearch=function(a){b(a),f.search(a)},f.setSearchField=function(a,b,c){var d,e;for(e in h.related)h.related[e].iterator===a&&(d=h.related[e].fields[b]);f[a+"SearchFieldLabel"]=c,f[a+"SearchField"]=b,f[a+"SearchValue"]="",f[a+"SelectShow"]=!1,f[a+"InputHide"]=!1,f[a+"ShowStartBtn"]=!0,void 0!==d.searchType&&"gtzero"===d.searchType&&(f[a+"InputHide"]=!0,f[a+"ShowStartBtn"]=!1),void 0===d.searchType||"boolean"!==d.searchType&&"select"!==d.searchType||(f[a+"SelectShow"]=!0,f[a+"SearchSelectOpts"]=d.searchOptions),void 0!==d.searchType&&"int"===d.searchType&&(f[a+"SearchType"]="int"),f.search(a)},f.setSearchType=function(a,b,c){f[a+"SearchTypeLabel"]=c,f[a+"SearchType"]=b,f.search(a)},f.startSearch=function(a,b){13===a.keyCode&&f.search(b)},f.search=function(a){e("start"),f[a+"Loading"]=!0,f[a+"HoldInput"]=!0,f[a+"SearchValue"]&&(f[a+"ShowStartBtn"]=!1),"host"===a&&"has_active_failures"===f.hostSearchField&&(f.hostFailureFilter=f.hostSearchSelectValue&&1===f.hostSearchSelectValue.value?!0:!1);var b,i,j,k,l;for(i in g)if(g[i].iterator===a){j=i,k=g[i].url;for(b in h.related[i].fields)h.related[i].fields[b].key&&(l=h.related[i].fields[b].desc?"-"+b:b);break}l=null===f[a+"SortOrder"]?l:f[a+"SortOrder"],c=h.related[j].fields[f[a+"SearchField"]],f[a+"SelectShow"]===!1&&""!==f[a+"SearchValue"]&&void 0!==f[a+"SearchValue"]||f[a+"SelectShow"]&&f[a+"SearchSelectValue"]||c.searchType&&"gtzero"===c.searchType?(f[a+"SearchParams"]=c.sourceModel?c.sourceModel+"__"+c.sourceField+"__":c.searchField?c.searchField+"__":f[a+"SearchField"]+"__",f[a+"SearchParams"]+=!c.searchType||"int"!==c.searchType&&"boolean"!==c.searchType?c.searchType&&"gtzero"===c.searchType?"gt=0":f[a+"SearchType"]+"=":"int=",!c.searchType||"boolean"!==c.searchType&&"select"!==c.searchType?(void 0===c.searchType||"gtzero"===c.searchType)&&(f[a+"SearchParams"]+=encodeURI(f[a+"SearchValue"])):f[a+"SearchParams"]+=f[a+"SearchSelectValue"].value,f[a+"SearchParams"]+=l?"&order_by="+encodeURI(l):""):f[a+"SearchParams"]=l?"order_by="+encodeURI(l):"",f[a+"Page"]=0,k+=k.match(/\/$/)?"?":"&",k+=f[a+"SearchParams"],k+=f[a+"PageSize"]?"&page_size="+f[a+"PageSize"]:"",d({scope:f,set:j,iterator:a,url:k})},f.sort=function(a,b){var c,d,e,g;$("."+a+" .list-header").each(function(){if($(this).attr("id")!==a+"-"+b+"-header"){var c=$(this).find("i");c.attr("class","icon-sort")}}),d=$("#"+a+"-"+b+"-header i"),e="",d.hasClass("icon-sort")?(d.removeClass("icon-sort"),d.addClass("icon-sort-up")):d.hasClass("icon-sort-up")?(d.removeClass("icon-sort-up"),d.addClass("icon-sort-down"),e="-"):d.hasClass("icon-sort-down")&&(d.removeClass("icon-sort-down"),d.addClass("icon-sort-up"));for(g in h.related)h.related[g].iterator===a&&(c=h.related[g].fields[b].sourceModel?e+h.related[g].fields[b].sourceModel+"__"+h.related[g].fields[b].sourceField:e+b);f[a+"SortOrder"]=c,f.search(a)}}}]),angular.module("SearchHelper",["RestServices","Utilities","RefreshHelper"]).factory("SearchInit",["Alert","Rest","Refresh","$location","GetBasePath","Empty","$timeout","Wait","Store",function(a,b,c,d,e,f,g,h,i){return function(a){function b(a){var b,c,d,e;e=void 0===a||1===a?"":a,l[p+"SearchField"+e]="",l[p+"SearchFieldLabel"+e]="";for(c in o.fields)if((void 0===o.fields[c].searchWidget&&1===a||o.fields[c].searchWidget===a)&&o.fields[c].key){o.fields[c].sourceModel?(d=o.fields[c].sourceModel+"__"+o.fields[c].sourceField,r=o.fields[c].desc?"-"+d:d):r=o.fields[c].desc?"-"+c:c,(void 0===o.fields[c].searchable||o.fields[c].searchable===!0)&&(l[p+"SearchField"+e]=c,l[p+"SearchFieldLabel"+e]=o.fields[c].label);break}if(f(l[p+"SearchField"+e]))for(c in o.fields)if((void 0===o.fields[c].searchWidget&&1===a||o.fields[c].searchWidget===a)&&(void 0===o.fields[c].searchable||o.fields[c].searchable===!0)){l[p+"SearchField"+e]=c,l[p+"SearchFieldLabel"+e]=o.fields[c].label;break}l[p+"SearchType"+e]="icontains",l[p+"SearchTypeLabel"+e]="Contains",l[p+"SearchParams"+e]="",l[p+"SearchValue"+e]="",l[p+"SelectShow"+e]=!1,l[p+"HideSearchType"+e]=!1,l[p+"InputDisable"+e]=!1,l[p+"ExtraParms"+e]="",l[p+"ShowStartBtn"+e]=!0,l[p+"HideAllStartBtn"+e]=!1,l[p+"SearchPlaceholder"+e]=o.fields[l[p+"SearchField"+e]]&&o.fields[l[p+"SearchField"+e]].searchPlaceholder?l[o.fields[l[p+"SearchField"+e]].searchPlaceholder]?l[o.fields[l[p+"SearchField"+e]].searchPlaceholder]:o.fields[l[p+"SearchField"+e]].searchPlaceholder:"Search",l[p+"InputDisable"+e]=o.fields[l[p+"SearchField"+e]]&&"all"===o.fields[l[p+"SearchField"+e]].searchObject?!0:!1,b=l[p+"SearchField"+e],o.fields[b]&&(!o.fields[b].searchType||"boolean"!==o.fields[b].searchType&&"select"!==o.fields[b].searchType||(l[p+"SelectShow"+e]=!0,l[p+"SearchSelectOpts"+e]=o.fields[b].searchOptions),o.fields[b].searchType&&"int"===o.fields[b].searchType&&(l[p+"HideSearchType"+e]=!0),o.fields[b].searchType&&"gtzero"===o.fields[b].searchType&&(l[p+"InputHide"+e]=!0))}var e,g,j,k,l=a.scope,m=a.set,n=a.url,o=a.list,p=a.iterator?a.iterator:o.iterator,q=a.setWidgets===!1?!1:!0,r=a.sort_order||"";if(q)for(e=o.searchWidgets?o.searchWidgets:1,g=1;e>=g;g++)j=1===g?"":g,$("#search-widget-container"+j)&&b(g);k={set:m,defaultUrl:n,list:o,iterator:p,sort_order:r},i("CurrentSearchParams",k),l.setSearchField=function(a,b,c,d){var e=void 0===d||1===d?"":d;l[a+"SearchFieldLabel"+e]=c,l[a+"SearchField"+e]=b,l[a+"SearchValue"+e]="",l[a+"SelectShow"+e]=!1,l[a+"HideSearchType"+e]=!1,l[a+"InputHide"+e]=!1,l[a+"SearchType"+e]="icontains",l[a+"InputDisable"+e]="all"===o.fields[b].searchObject?!0:!1,l[a+"ShowStartBtn"+e]=!0,l[a+"SearchPlaceholder"+e]=o.fields[l[a+"SearchField"+e]]&&o.fields[l[a+"SearchField"+e]].searchPlaceholder?l[o.fields[l[a+"SearchField"+e]].searchPlaceholder]?l[o.fields[l[a+"SearchField"+e]].searchPlaceholder]:o.fields[l[a+"SearchField"+e]].searchPlaceholder:"Search",o.fields[b].searchType&&"gtzero"===o.fields[b].searchType?(l[a+"InputDisable"+e]=!0,l[a+"ShowStartBtn"+e]=!1,l.search(a)):o.fields[b].searchSingleValue?(l[a+"InputDisable"+e]=!0,l[a+"SearchValue"+e]=o.fields[b].searchValue,l[a+"SearchSelectValue"+e]="boolean"===o.fields[b].searchType&&"true"===o.fields[b].searchValue?{value:1}:"boolean"===o.fields[b].searchType&&"false"===o.fields[b].searchValue?{value:0}:{value:o.fields[b].searchValue},l[a+"ShowStartBtn"+e]=!1):"in"===o.fields[b].searchType?(l[a+"SearchType"+e]="in",l[a+"SearchValue"+e]=o.fields[b].searchValue,l[a+"InputDisable"+e]=!0,l[a+"ShowStartBtn"+e]=!1):!o.fields[b].searchType||"boolean"!==o.fields[b].searchType&&"select"!==o.fields[b].searchType&&"select_or"!==o.fields[b].searchType?o.fields[b].searchType&&"int"===o.fields[b].searchType?l[a+"SearchType"+e]="int":o.fields[b].searchType&&"isnull"===o.fields[b].searchType&&(l[a+"SearchType"+e]="isnull",l[a+"InputDisable"+e]=!0,l[a+"SearchValue"+e]="true",l[a+"ShowStartBtn"+e]=!1):(l[a+"SelectShow"+e]=!0,l[a+"SearchSelectOpts"+e]=o.fields[b].searchOptions),l.search(a)},l.resetSearch=function(a){var c,e=o.searchWidgets?o.searchWidgets:1;for(c=1;e>=c;c++)b(c);window.location="/#"+d.path(),l.search(a)},l.removeDoSearch&&l.removeDoSearch(),l.removeDoSearch=l.$on("doSearch",function(a,b,d,e){l[b+"Loading"]=void 0===e||e===!0?!0:!1;var f,g=n;l[b+"Page"]=d?parseInt(d)-1:0,l[b+"SearchParams"]&&(g+=/\/$/.test(g)?"?"+l[b+"SearchParams"]:"&"+l[b+"SearchParams"]),f=/\/$/.test(g)?"?":"&",g+=l[b+"_page_size"]?f+"page_size="+l[b+"_page_size"]:"",d&&(f=/\/$/.test(g)?"?":"&",g+=f+"page="+d),l[b+"ExtraParms"]&&(f=/\/$/.test(g)?"?":"&",g+=f+l[b+"ExtraParms"]),g=g.replace(/\&\&/,"&"),c({scope:l,set:m,iterator:b,url:g})}),l.removePrepareSearch&&l.removePrepareSearch(),l.removePrepareSearch=l.$on("prepareSearch",function(a,b,c,d,e){h("start"),l[b+"SearchParams"]="";var f,g,i=o.searchWidgets?o.searchWidgets:1;for(f=1;i>=f;f++)g=1===f?"":f,$("#search-widget-container"+g)&&o.fields[l[b+"SearchField"+g]]&&o.fields[l[b+"SearchField"+g]].searchObject&&("all"!==o.fields[l[b+"SearchField"+g]].searchObject?(l[b+"HideAllStartBtn"+g]=!1,l[b+"SearchValue"+g]?(l[b+"ShowStartBtn"+g]=!1,l[b+"SearchParams"]+=o.fields[l[b+"SearchField"+g]].searchOnID?"&"+o.fields[l[b+"SearchField"+g]].searchObject+"__id="+l[b+"SearchValue"+g]:"&"+o.fields[l[b+"SearchField"+g]].searchObject+"__name__icontains="+l[b+"SearchValue"+g]):(l[b+"ShowStartBtn"+g]=!0,l[b+"SearchParams"]+="&"+o.fields[l[b+"SearchField"+g]].searchField+"="+o.fields[l[b+"SearchField"+g]].searchObject)):l[b+"HideAllStartBtn"+g]=!0);l.$emit("prepareSearch2",b,c,d,e)}),l.removePrepareSearch2&&l.removePrepareSearch2(),l.removePrepareSearch2=l.$on("prepareSearch2",function(a,b,c,d,e){var g,h,i=o.searchWidgets?o.searchWidgets:1;for(g=1;i>=g;g++)h=1===g?"":g,l[b+"HoldInput"+h]=!0,$("#search-widget-container"+h)&&o.fields[l[b+"SearchField"+h]]&&!o.fields[l[b+"SearchField"+h]].searchObject&&(l[b+"ShowStartBtn"+h]=l[b+"SearchValue"+h]?!1:!0,(!l[b+"SelectShow"+h]&&!f(l[b+"SearchValue"+h])||l[b+"SelectShow"+h]&&l[b+"SearchSelectValue"+h]||o.fields[l[b+"SearchField"+h]]&&"gtzero"===o.fields[l[b+"SearchField"+h]].searchType)&&(l[b+"SearchParams"]+=o.fields[l[b+"SearchField"+h]].searchField?"&"+o.fields[l[b+"SearchField"+h]].searchField+"__":o.fields[l[b+"SearchField"+h]].sourceModel?"&"+o.fields[l[b+"SearchField"+h]].sourceModel+"__"+o.fields[l[b+"SearchField"+h]].sourceField+"__":"select"!==o.fields[l[b+"SearchField"+h]].searchType||""!==l[b+"SearchSelectValue"+h].value&&null!==l[b+"SearchSelectValue"+h].value?"&"+l[b+"SearchField"+h]+"__":"&"+l[b+"SearchField"+h]+"__",l[b+"SearchParams"]+=!o.fields[l[b+"SearchField"+h]].searchType||"int"!==o.fields[l[b+"SearchField"+h]].searchType&&"boolean"!==o.fields[l[b+"SearchField"+h]].searchType?o.fields[l[b+"SearchField"+h]].searchType&&"gtzero"===o.fields[l[b+"SearchField"+h]].searchType?"gt=0":"select"!==o.fields[l[b+"SearchField"+h]].searchType||""!==l[b+"SearchSelectValue"+h].value&&null!==l[b+"SearchSelectValue"+h].value?l[b+"SearchType"+h]+"=":"iexact=":"int=",!o.fields[l[b+"SearchField"+h]].searchType||"boolean"!==o.fields[l[b+"SearchField"+h]].searchType&&"select"!==o.fields[l[b+"SearchField"+h]].searchType?(!o.fields[l[b+"SearchField"+h]].searchType||o.fields[l[b+"SearchField"+h]].searchType&&"or"!==o.fields[l[b+"SearchField"+h]].searchType&&"gtzero"!==o.fields[l[b+"SearchField"+h]].searchType)&&(l[b+"SearchParams"]+=encodeURI(l[b+"SearchValue"+h])):l[b+"SearchParams"]+=l[b+"SearchSelectValue"+h].value));("inventory"===b&&l.inventoryFailureFilter||"host"===b&&l.hostFailureFilter)&&(l[b+"SearchParams"]+="&has_active_failures=true"),r&&(l[b+"SearchParams"]+=l[b+"SearchParams"]?"&":"",l[b+"SearchParams"]+="order_by="+encodeURI(r)),l.$emit("doSearch",b,c,d,e)}),l.startSearch=function(a,b){13===a.keyCode&&l.search(b)},l.search=function(a,b,c){c=void 0===c?!0:!1,c&&(l[m]=[]),l.$emit("prepareSearch",a,b,c)},l.sort=function(a){$(".list-header").each(function(){if($(this).attr("id")!==a+"-header"){var b=$(this).find("i");b.attr("class","fa fa-sort")}});var b=$("#"+a+"-header i"),c="";b.hasClass("fa-sort")?(b.removeClass("fa-sort"),b.addClass("fa-sort-up")):b.hasClass("fa-sort-up")?(b.removeClass("fa-sort-up"),b.addClass("fa-sort-down"),c="-"):b.hasClass("fa-sort-down")&&(b.removeClass("fa-sort-down"),b.addClass("fa-sort-up")),r=o.fields[a].searchField?c+o.fields[a].searchField:o.fields[a].sortField?c+o.fields[a].sortField:o.fields[a].sourceModel?c+o.fields[a].sourceModel+"__"+o.fields[a].sourceField:c+a,l.search(o.iterator)},l.searchCleanup=function(){l.removeDoSearch(),l.removePrepareSearch(),l.removePrepareSearch2()}}}]),angular.module("TeamHelper",["RestServices","Utilities","OrganizationListDefinition","SearchHelper","PaginationHelpers","ListGenerator"]).factory("SetTeamListeners",["Alert","Rest",function(a,b){return function(a){var c=a.scope,d=a.set,e=a.iterator;c.$on("TeamResultFound",function(a,b,f){var g,h,i,j;if(f.length===b.length){for(i="organization",j="organization_name",g=0;gSelect existing users by clicking each user or checking the related checkbox. When finished, click the blue Select button, located bottom right.

",base:"users",index:!0,hover:!0,fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},actions:{},fieldActions:{}}),angular.module("CloudCredentialsListDefinition",[]).value("CloudCredentialList",{name:"cloudcredentials",iterator:"cloudcredential",selectTitle:"Add Cloud Credentials",editTitle:"Cloud Credentials",selectInstructions:"

Select existing credentials by clicking each credential or checking the related checkbox. When finished, click the blue Select button, located bottom right.

Create a brand new credential by clicking the green Create New button.

",index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description",excludeModal:!1},team:{label:"Team",ngBind:"credential.team_name",sourceModel:"team",sourceField:"name",excludeModal:!0},user:{label:"User",ngBind:"credential.user_username",sourceModel:"user",sourceField:"username",excludeModal:!0}},actions:{add:{mode:"all",ngClick:"addCredential()","class":"btn-sm",awToolTip:"Create a new credential"}},fieldActions:{edit:{ngClick:"editCredential(credential.id)",icon:"fa-edit",label:"Edit","class":"btn-sm",awToolTip:"Edit credential",dataPlacement:"top"},"delete":{ngClick:"deleteCredential(credential.id, credential.name)",icon:"fa-trash-o",label:"Delete","class":"btn-sm",awToolTip:"Delete credential",dataPlacement:"top"}}}),angular.module("CredentialsListDefinition",[]).value("CredentialList",{name:"credentials",iterator:"credential",selectTitle:"Add Credentials",editTitle:"Credentials",selectInstructions:"

Select existing credentials by clicking each credential or checking the related checkbox. When finished, click the blue Select button, located bottom right.

Create a brand new credential by clicking the green Create New button.

",index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description",excludeModal:!1},kind:{label:"Type",searchType:"select",searchOptions:[],excludeModal:!0,nosort:!0}},actions:{add:{mode:"all",ngClick:"addCredential()",awToolTip:"Create a new credential"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{ngClick:"editCredential(credential.id)",icon:"fa-edit",label:"Edit","class":"btn-sm",awToolTip:"Edit credential",dataPlacement:"top"},"delete":{ngClick:"deleteCredential(credential.id, credential.name)",icon:"fa-trash",label:"Delete","class":"btn-sm",awToolTip:"Delete credential",dataPlacement:"top"}}}),angular.module("GroupListDefinition",[]).value("GroupList",{name:"groups",iterator:"group",selectTitle:"Copy Groups",editTitle:"Groups",index:!0,well:!1,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},actions:{help:{awPopOver:"Choose groups by clicking on each group you wish to add. Click the Select button to add the groups to the selected inventory group.",dataContainer:"#form-modal .modal-content",mode:"all",awToolTip:"Click for help",dataTitle:"Adding Groups"}},fieldActions:{edit:{label:"Edit",ngClick:"editGroup(group.id)",icon:"icon-edit","class":"btn-xs",awToolTip:"Edit group",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteGroup(group.id, group.name)",icon:"icon-trash","class":"btn-xs",awToolTip:"Delete group",dataPlacement:"top"}}}),angular.module("HomeGroupListDefinition",[]).value("HomeGroupList",{name:"home_groups",iterator:"group",editTitle:"Groups",index:!0,hover:!0,well:!0,fields:{name:{key:!0,label:"Group",ngClick:"editGroup(group.id, group.inventory)",columnClass:"col-lg-4 col-md3 col-sm-3 col-xs-6 ellipsis"},inventory_name:{label:"Inventory",sourceModel:"inventory",sourceField:"name",columnClass:"col-lg-3 col-md2 col-sm-2 hidden-xs elllipsis",linkTo:"{{ /#/inventories/' + group.inventory + '/' }}"},source:{label:"Source",searchType:"select",searchOptions:[{name:"ec2",value:"ec2"},{name:"none",value:""},{name:"rax",value:"rax"}],sourceModel:"inventory_source",sourceField:"source",searchOnly:!0},has_external_source:{label:"Has external source?",searchType:"in",searchValue:"ec2,rax",searchOnly:!0,sourceModel:"inventory_source",sourceField:"source"},has_active_failures:{label:"Has failed hosts?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0},last_update_failed:{label:"Update failed?",searchType:"select",searchSingleValue:!0,searchValue:"failed",searchOnly:!0,sourceModel:"inventory_source",sourceField:"status"},id:{label:"ID",searchOnly:!0}},fieldActions:{sync_status:{mode:"all",ngClick:"viewUpdateStatus(group.id, group.group_id)",awToolTip:"{{ group.status_tooltip }}",ngClass:"group.status_class",dataPlacement:"top"},failed_hosts:{mode:"all",awToolTip:"{{ group.hosts_status_tip }}",dataPlacement:"top",ngHref:"/#/inventories/{{ group.inventory }}/",iconClass:"{{ 'fa icon-failures-' + group.hosts_status_class }}"},group_update:{mode:"all",ngClick:"updateGroup(group.id)",awToolTip:"{{ group.launch_tooltip }}",ngShow:"(group.status !== 'running' && group.status !== 'pending' && group.status !== 'updating')",ngClass:"group.launch_class",dataPlacement:"top"},cancel:{mode:"all",ngClick:"cancelUpdate(group.id)",awToolTip:"Cancel sync process","class":"red-txt",ngShow:"(group.status == 'running' || group.status == 'pending' || group.status == 'updating')",dataPlacement:"top"},edit:{label:"Edit",mode:"all",ngClick:"editGroup(group.id)",awToolTip:"Edit group",dataPlacement:"top"}},actions:{refresh:{mode:"all",awToolTip:"Refresh the page",ngClick:"refresh()"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}}}),angular.module("HomeHostListDefinition",[]).value("HomeHostList",{name:"hosts",iterator:"host",selectTitle:"Add Existing Hosts",editTitle:"Hosts",index:!0,hover:!0,well:!0,fields:{name:{key:!0,label:"Name",columnClass:"col-lg-4 col-md3 col-sm-3 col-xs-7 ellipsis",ngClick:"editHost(host.id, host.name)"},inventory_name:{label:"Inventory",sourceModel:"inventory",sourceField:"name",columnClass:"col-lg-3 col-md2 col-sm-2 hidden-xs elllipsis",linkTo:"{{ '/#/inventories/' + host.inventory }}"},enabled:{label:"Disabled?",searchSingleValue:!0,searchType:"boolean",searchValue:"false",searchOnly:!0},has_active_failures:{label:"Has failed jobs?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0},has_inventory_sources:{label:"Has external source?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0},id:{label:"ID",searchOnly:!0}},fieldActions:{enabled_flag:{iconClass:"{{ 'fa icon-enabled-' + host.enabled }}",dataPlacement:"top",awToolTip:"{{ host.enabledToolTip }}",dataTipWatch:"host.enabledToolTip",ngClick:"toggleHostEnabled(host.id, host.has_inventory_sources)"},active_failures:{awPopOver:"{{ host.job_status_html }}",dataTitle:"{{ host.job_status_title }}",awToolTip:"{{ host.badgeToolTip }}",awTipPlacement:"top",dataPlacement:"left",iconClass:"{{ 'fa icon-failures-' + host.has_active_failures }}"},edit:{label:"Edit",ngClick:"editHost(host.id)",icon:"icon-edit",awToolTip:"Edit host",dataPlacement:"top"}},actions:{stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}}}),angular.module("HostListDefinition",[]).value("HostList",{name:"hosts",iterator:"host",selectTitle:"Add Existing Hosts",editTitle:"Hosts",index:!0,well:!1,fields:{name:{key:!0,label:"Host Name",linkTo:"/inventories/{{ inventory_id }}/hosts/{{ host.id }}"},description:{label:"Description"}},actions:{help:{awPopOver:"Select hosts by clicking on each host you wish to add. Add the selected hosts to the group by clicking the Select button.",dataContainer:"#form-modal .modal-content",mode:"all",awToolTip:"Click for help",dataTitle:"Selecting Hosts"}},fieldActions:{edit:{label:"Edit",ngClick:"editHost({{ host.id }})",icon:"icon-edit","class":"btn-xs",awToolTip:"Edit host",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteHost(host.id, host.name)",icon:"icon-trash","class":"btn-xs",awToolTip:"Delete host",dataPlacement:"top"}}}),angular.module("InventoriesListDefinition",[]).value("InventoryList",{name:"inventories",iterator:"inventory",selectTitle:"Add Inventories",editTitle:"Inventories",selectInstructions:'Click on a row to select it, and click Finished when done. Use the green button to create a new row.',index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},organization:{label:"Organization",ngBind:"inventory.summary_fields.organization.name",linkTo:"/#/organizations/{{ inventory.organization }}",sourceModel:"organization",sourceField:"name",excludeModal:!0},has_inventory_sources:{label:"Cloud sourced?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0},has_active_failures:{label:"Failed hosts?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0},inventory_sources_with_failures:{label:"Sync failures?",searchType:"gtzero",searchValue:"true",searchOnly:!0}},actions:{add:{mode:"all",ngClick:"addInventory()",awToolTip:"Create a new inventory"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",icon:"icon-comments-alt",mode:"all"}},fieldActions:{status:{ngHref:"inventory.status_link",iconClass:"{{ 'fa fa-cloud icon-cloud-' + inventory.status_class }}",awToolTip:"{{ inventory.status_tip }}",dataPlacement:"top"},failed_hosts:{ngHref:"inventory.failed_hosts_link",iconClass:"{{ 'fa icon-failures-' + inventory.failed_hosts_class }}",awToolTip:"{{ inventory.failed_hosts_tip }}",dataPlacement:"top"},edit:{label:"Edit",ngClick:"editInventoryProperties(inventory.id)",awToolTip:"Edit inventory",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteInventory(inventory.id, inventory.names')",awToolTip:"Delete inventory",dataPlacement:"top"}}}),angular.module("InventoryGroupsDefinition",[]).value("InventoryGroups",{name:"groups",iterator:"group",editTitle:"{{ inventory_name }}",showTitle:!1,well:!0,index:!1,hover:!1,hasChildren:!0,filterBy:"{ show: true }","class":"table-condensed table-no-border",fields:{name:{label:"Groups",key:!0,ngClick:"showHosts(group.id,group.group_id, false)",ngClass:"group.selected_class",hasChildren:!0,columnClass:"col-lg-9 col-md-9 col-sm-7 col-xs-7",nosort:!0,awDroppable:"{{ group.isDroppable }}",awDraggable:"{{ group.isDraggable }}",dataContainment:"#groups_table",dataTreeId:"{{ group.id }}",dataGroupId:"{{ group.group_id }}",dataType:"group"}},actions:{columnClass:"col-lg-3 col-md-3 col-sm-5 col-xs-5",create:{mode:"all",ngClick:"createGroup()",awToolTip:"Create a new group"},properties:{mode:"all",awToolTip:"Edit inventory properties",ngClick:"editInventoryProperties()"},refresh:{mode:"all",awToolTip:"Refresh the page",ngClick:"refreshGroups()"},stream:{ngClick:"showGroupActivity()",awToolTip:"View Activity Stream",mode:"all"},help:{mode:"all",awToolTip:"Get help building your inventory",ngClick:"showGroupHelp()",id:"inventory-summary-help"}},fieldActions:{sync_status:{mode:"all",ngClick:"viewUpdateStatus(group.id, group.group_id)",ngShow:"group.id > 1",awToolTip:"{{ group.status_tooltip }}",dataTipWatch:"group.launch_tooltip",ngClass:"group.status_class",dataPlacement:"top"},failed_hosts:{mode:"all",awToolTip:"{{ group.hosts_status_tip }}",ngShow:"group.id > 1",dataPlacement:"top",ngClick:"showHosts(group.id, group.group_id, group.show_failures)",iconClass:"{{ 'fa icon-failures-' + group.hosts_status_class }}"},group_update:{mode:"all",ngClick:"updateGroup(group.id)",awToolTip:"{{ group.launch_tooltip }}",dataTipWatch:"group.launch_tooltip",ngShow:"group.id > 1 && (group.status !== 'running' && group.status !== 'pending' && group.status !== 'updating')",ngClass:"group.launch_class",dataPlacement:"top"},cancel:{mode:"all",ngClick:"cancelUpdate({{ group.id }})",awToolTip:"Cancel sync process","class":"red-txt",ngShow:"group.id > 1 && (group.status == 'running' || group.status == 'pending' || group.status == 'updating')",dataPlacement:"top"},edit:{mode:"all",ngClick:"editGroup({{ group.group_id + ',' + group.id }})",awToolTip:"Edit group",ngShow:"group.id > 1",dataPlacement:"top"},"delete":{mode:"all",ngClick:"deleteGroup({{ group.id + ',' + group.group_id }})",awToolTip:"Delete group",ngShow:"group.id != 1",dataPlacement:"top"}}}),angular.module("InventoryHostsDefinition",[]).value("InventoryHosts",{name:"hosts",iterator:"host",editTitle:"{{ selected_group }}",showTitle:!1,well:!0,index:!1,hover:!1,hasChildren:!0,"class":"table-condensed table-no-border",fields:{name:{key:!0,label:"Hosts",ngClick:"editHost(host.id)",searchPlaceholder:"search_place_holder",columnClass:"col-lg-9 col-md-9 col-sm-7 col-xs-7",dataHostId:"{{ host.id }}",dataType:"host",awDraggable:"true"},enabled:{label:"Disabled?",searchSingleValue:!0,searchType:"boolean",searchValue:"false",searchOnly:!0},has_active_failures:{label:"Failed jobs?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0}},fieldActions:{enabled_flag:{iconClass:"{{ 'fa icon-enabled-' + host.enabled }}",dataPlacement:"top",awToolTip:"{{ host.enabledToolTip }}",dataTipWatch:"host.enabledToolTip",ngClick:"toggleHostEnabled(host.id, host.has_inventory_sources)"},active_failures:{awPopOver:"{{ host.job_status_html }}",dataTitle:"{{ host.job_status_title }}",awToolTip:"{{ host.badgeToolTip }}",awTipPlacement:"top",dataPlacement:"left",iconClass:"{{ 'fa icon-failures-' + host.has_active_failures }}"},edit:{ngClick:"editHost(host.id)",icon:"icon-edit",awToolTip:"Edit host",dataPlacement:"top"},"delete":{ngClick:"deleteHost(host.id, host.name)",icon:"icon-trash",awToolTip:"Delete host",dataPlacement:"top"}},actions:{columnClass:"col-lg-3 col-md-3 col-sm-5 col-xs-5",create:{mode:"all",ngClick:"createHost()",ngHide:"selected_tree_id == 1",awToolTip:"Create a new host"},stream:{ngClick:"showHostActivity()",awToolTip:"View Activity Stream",mode:"all"}}}),angular.module("JobEventsListDefinition",[]).value("JobEventList",{name:"jobevents",iterator:"jobevent",editTitle:"Job Events",index:!1,hover:!0,hasChildren:!0,filterBy:"{ show: true }",navigationLinks:{details:{href:"/#/jobs/{{ job_id }}",label:"Status",icon:"icon-zoom-in",ngShow:"job_id !== null"},events:{href:"/#/jobs/{{ job_id }}/job_events",label:"Events",active:!0,icon:"icon-list-ul"},hosts:{href:"/#/jobs/{{ job_id }}/job_host_summaries",label:"Host Summary",icon:"icon-laptop"}},fields:{created:{label:"Created On",columnClass:"col-lg-1 col-md-1 hidden-sm hidden-xs",key:!0,nosort:!0,searchable:!1,link:!1},status:{label:"Status",showValue:!1,columnClass:"col-sm-1 col-xs-2 text-center",searchField:"failed",searchType:"boolean",searchOptions:[{name:"success",value:0},{name:"error",value:1}],nosort:!0,searchable:!1,ngClick:"viewJobEvent({{ jobevent.id }})",awToolTip:"{{ jobevent.statusBadgeToolTip }}",dataPlacement:"top",badgeIcon:"fa icon-job-{{ jobevent.status }}",badgePlacement:"left",badgeToolTip:"{{ jobevent.statusBadgeToolTip }}",badgeTipPlacement:"top",badgeNgClick:"viewJobEvent({{ jobevent.id }})"},event_display:{label:"Event",hasChildren:!0,ngClick:"toggleChildren(jobevent.id, jobevent.related.children)",nosort:!0,searchable:!1,ngClass:"{{ jobevent.class }}",appendHTML:"jobevent.event_detail"},host:{label:"Host",ngBind:"jobevent.summary_fields.host.name",ngHref:"{{ jobevent.hostLink }}",searchField:"hosts__name",nosort:!0,searchOnly:!1,id:"job-event-host-header","class":"break",columnClass:"col-lg-2 hidden-sm hidden-xs"}},actions:{refresh:{mode:"all",awToolTip:"Refresh the page",ngClick:"refresh()"}},fieldActions:{columnClass:"col-sm-1 col-xs-2",view:{label:"View",ngClick:"viewJobEvent(jobevent.id)",awToolTip:"View event details",dataPlacement:"top"}}}),angular.module("JobHostDefinition",[]).value("JobHostList",{name:"jobhosts",iterator:"jobhost",editTitle:"All summaries",index:!0,hover:!0,navigationLinks:{ngHide:"host_id !== null",details:{href:"/#/jobs/{{ job_id }}",label:"Status",icon:"icon-zoom-in",ngShow:"job_id !== null"},events:{href:"/#/jobs/{{ job_id }}/job_events",label:"Events",icon:"icon-list-ul"},hosts:{href:"/#/jobs/{{ job_id }}/job_host_summaries",label:"Host Summary",active:!0,icon:"icon-laptop"}},fields:{job:{label:"Job ID",ngClick:"showJob(jobhost.job)",columnShow:"host_id !== null",key:!0,desc:!0},host:{label:"Host",key:!0,sourceModel:"host",sourceField:"name",ngBind:"jobhost.host_name",ngHref:"jobhost.hostLinkTo"},status:{label:"Status",badgeNgHref:"{{ jobhost.statusLinkTo }}",badgeIcon:"fa icon-job-{{ jobhost.status }}",badgePlacement:"left",badgeToolTip:"{{ jobhost.statusBadgeToolTip }}",badgeTipPlacement:"top",ngHref:"{{ jobhost.statusLinkTo }}",awToolTip:"{{ jobhost.statusBadgeToolTip }}",dataPlacement:"top",searchField:"failed",searchType:"boolean",searchOptions:[{name:"success",value:0},{name:"error",value:1}]},failed:{label:"Job failed?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0,nosort:!0},ok:{label:"Success",searchable:!1},changed:{label:"Changed",searchable:!1},failures:{label:"Failure",searchable:!0,searchLabel:"Contains failed events?",searchType:"gtzero"},dark:{label:"Unreachable",searchable:!0,searchType:"gtzero",searchLabel:"Contains unreachable hosts?"},skipped:{label:"Skipped",searchable:!1}},actions:{help:{awPopOver:"
\n
Success
Tasks successfully executed on the host.
\n
Changed
Actions taken on the host.
\n
Failure
Tasks that failed on the host.
\n
Unreachable
Times the ansible server could not reach the host.
\n
Skipped
Tasks bypassed and not performed on the host due to prior task failure or the host being unreachable.
\n
\n",dataPlacement:"left",dataContainer:"body",mode:"all","class":"btn-xs btn-help",awToolTip:"Click for help",dataTitle:"Job Host Summary",id:"jobhost-help-button"},refresh:{mode:"all","class":"btn-xs",awToolTip:"Refresh the page",ngClick:"refresh()",ngShow:"host_id == null"}},fieldActions:{}}),angular.module("JobTemplatesListDefinition",[]).value("JobTemplateList",{name:"job_templates",iterator:"job_template",selectTitle:"Add Job Template",editTitle:"Job Templates",selectInstructions:'Click on a row to select it, and click Finished when done. Use the green button to create a new row.',index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},actions:{add:{mode:"all",ngClick:"addJobTemplate()",basePaths:["job_templates"],awToolTip:"Create a new template"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",icon:"icon-comments-alt",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editJobTemplate(job_template.id)",icon:"icon-edit",awToolTip:"Edit template","class":"btn-default btn-xs",dataPlacement:"top"},submit:{label:"Launch",icon:"icon-rocket",mode:"all","class":"btn-xs btn-success",ngClick:"submitJob(job_template.id)",awToolTip:"Start a job using this template",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteJobTemplate(job_template.id, job_template.name)",icon:"icon-trash","class":"btn-danger btn-xs",awToolTip:"Delete template",dataPlacement:"top"}}}),angular.module("JobsListDefinition",[]).value("JobList",{name:"jobs",iterator:"job",editTitle:"Jobs",index:!1,hover:!0,"class":"jobs-table",fields:{id:{label:"Job ID",key:!0,desc:!0,searchType:"int"},inventory:{label:"Inventory ID",searchType:"int",searchOnly:!0},created:{label:"Create On",link:!1,searchable:!1},job_template:{label:"Job Template",ngBind:"job.summary_fields.job_template.name",ngHref:"{{ '/#/job_templates/' + job.job_template }}",sourceModel:"job_template",sourceField:"name"},failed:{label:"Job failed?",searchSingleValue:!0,searchType:"boolean",searchValue:"true",searchOnly:!0,nosort:!0},status:{label:"Status","class":"job-{{ job.status }}",searchType:"select",linkTo:"{{ job.statusLinkTo }}",searchOptions:[{name:"new",value:"new"},{name:"waiting",value:"waiting"},{name:"pending",value:"pending"},{name:"running",value:"running"},{name:"successful",value:"successful"},{name:"error",value:"error"},{name:"failed",value:"failed"},{name:"canceled",value:"canceled"}],badgeIcon:"fa icon-job-{{ job.status }}",badgePlacement:"left",badgeToolTip:"{{ job.statusBadgeToolTip }}",badgeTipPlacement:"top",badgeNgHref:"{{ job.statusLinkTo }}",awToolTip:"{{ job.statusBadgeToolTip }}",dataPlacement:"top"}},actions:{refresh:{mode:"all",awToolTip:"Refresh the page",ngClick:"refresh()"}},fieldActions:{submit:{label:"Relaunch",icon:"icon-rocket",mode:"all",ngClick:"submitJob(job.id, job.summary_fields.job_template.name)",awToolTip:"Start the job",dataPlacement:"top"},cancel:{label:"Stop",mode:"all",ngClick:"deleteJob(job.id)",awToolTip:"Cancel a running or pending job",ngShow:"job.status == 'pending' || job.status == 'running' || job.status == 'waiting'",dataPlacement:"top"},"delete":{label:"Delete",mode:"all",ngClick:"deleteJob(job.id)",awToolTip:"Delete the job",ngShow:"job.status != 'pending' && job.status != 'running' && job.status != 'waiting'",dataPlacement:"top"},dropdown:{type:"DropDown",label:"View",icon:"fa-search-plus","class":"btn-default btn-xs",options:[{ngClick:"editJob(job.id, job.summary_fields.job_template.name)",label:"Status"},{ngClick:"viewEvents(job.id, job.summary_fields.job_template.name)",label:"Events",ngHide:"job.status == 'new'"},{ngClick:"viewSummary(job.id, job.summary_fields.job_template.name)",label:"Host Summary",ngHide:"job.status == 'new'"}]}}}),angular.module("OrganizationListDefinition",[]).value("OrganizationList",{name:"organizations",iterator:"organization",selectTitle:"Add Organizations",editTitle:"Organizations",hover:!0,index:!1,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},actions:{add:{mode:"all",ngClick:"addOrganization()",awToolTip:"Create a new organization"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{}}),angular.module("PermissionListDefinition",[]).value("PermissionList",{name:"permissions",iterator:"permission",selectTitle:"Add Permission",selectInstructions:'Click on a row to select it, and click Finished when done. Use the green button to create a new row.',editTitle:"Permissions",index:!0,well:!0,fields:{name:{key:!0,label:"Name",ngClick:"editPermission(permission.id)"},inventory:{label:"Inventory",sourceModel:"inventory",sourceField:"name",ngBind:"permission.summary_fields.inventory.name"},project:{label:"Project",sourceModel:"project",sourceField:"name",ngBind:"permission.summary_fields.project.name"},permission_type:{label:"Permission"}},actions:{add:{mode:"all",ngClick:"addPermission()",awToolTip:"Add a new permission",ngShow:"PermissionAddAllowed"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editPermission(permission.id)",icon:"icon-edit","class":"btn-xs btn-default",awToolTip:"Edit permission",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deletePermission(permission.id, permission.name)",icon:"icon-trash","class":"btn-xs btn-danger",awToolTip:"Delete permission",ngShow:"PermissionAddAllowed",dataPlacement:"top"}}}),angular.module("ProjectsListDefinition",[]).value("ProjectList",{name:"projects",iterator:"project",selectTitle:"Add Project",editTitle:"Projects",selectInstructions:"

Select existing projects by clicking each project or checking the related checkbox. When finished, click the blue Select button, located bottom right.

Create a brand new project by clicking the green Create New button.

",index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description",columnClass:"hidden-sm hidden-xs",excludeModal:!0},scm_type:{label:"Type",searchType:"select",searchOptions:[],excludeModal:!0,nosort:!0},status:{label:"Status",ngClick:"showSCMStatus(project.id)",awToolTip:"View details of last SCM Update",dataPlacement:"top",badgeIcon:"{{ 'fa icon-failures-' + project.badge }}",badgePlacement:"left",searchType:"select",searchOptions:[],excludeModal:!0},last_updated:{label:"Last Updated",type:"date",excludeModal:!0,searchable:!1}},actions:{add:{mode:"all",ngClick:"addProject()",awToolTip:"Create a new project"},help:{awPopOver:"
\n
Updating
A source control update is in progress.
\n
Never Updated
This project has not yet been updated from source control.
\n
Failed
An error occurred during the most recent source control update, click the status text for more information.
\n
Successful
TThe latest source control update completed successfully.
\n
Missing
The previously configured local project directory is missing.
\n
N/A
The project is not linked to source control, so updates are not applicable.
\n
\n",dataPlacement:"left",dataContainer:"body",mode:"all",awToolTip:"Click for help",awTipPlacement:"top"},refresh:{mode:"all",awToolTip:"Refresh the page",ngClick:"refresh()"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editProject(project.id)",awToolTip:"Edit project properties",dataPlacement:"top"},scm_update:{label:"Update",ngClick:"SCMUpdate(project.id)",awToolTip:"{{ project.scm_update_tooltip }}",ngClass:"project.scm_type_class",dataPlacement:"top"},cancel:{label:"Stop",ngClick:"cancelUpdate(project.id, project.name)",awToolTip:"Cancel a running SCM update process",ngShow:"project.status == 'updating'",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteProject(project.id, project.name)",awToolTip:"Permanently remove project from the database",ngShow:"project.status !== 'updating'",dataPlacement:"top"}}}),angular.module("StreamListDefinition",[]).value("StreamList",{name:"activities",iterator:"activity",editTitle:"Activity Stream",selectInstructions:"",index:!1,hover:!0,"class":"table-condensed",searchWidgets:3,fields:{timestamp:{label:"Event Time",key:!0,desc:!0,noLink:!0,searchable:!1},user:{label:"Initiated by",ngBindHtml:"activity.user",sourceModel:"actor",sourceField:"username",searchPlaceholder:"Username",searchWidget:1},description:{label:"Action",ngBindHtml:"activity.description",nosort:!0,searchable:!1,columnClass:"col-lg-7"},system_event:{label:"System event",searchOnly:!0,searchType:"isnull",sourceModel:"actor",sourceField:"username",searchWidget:1},all_objects:{label:"All",searchOnly:!0,searchObject:"all",searchPlaceholder:"All resources",searchWidget:2},credential_search:{label:"Credential",searchOnly:!0,searchObject:"credential",searchPlaceholder:"Credential name",searchWidget:2,searchField:"object1"},group_search:{label:"Group",searchOnly:!0,searchObject:"group",searchPlaceholder:"Group name",searchWidget:2,searchField:"object1"},host_search:{label:"Host",searchOnly:!0,searchObject:"host",searchPlaceholder:"Host name",searchWidget:2,searchField:"object1"},inventory_search:{label:"Inventory",searchOnly:!0,searchObject:"inventory",searchPlaceholder:"Inventory name",searchWidget:2,searchField:"object1"},job_template_search:{label:"Job Template",searchOnly:!0,searchObject:"job_template",searchPlaceholder:"Job template name",searchWidget:2,searchField:"object1"},job_search:{label:"Job",searchOnly:!0,searchObject:"job",searchPlaceholder:"Job id",searchOnID:!0,searchWidget:2,searchField:"object1"},organization_search:{label:"Organization",searchOnly:!0,searchObject:"organization",searchPlaceholder:"Organization name",searchWidget:2,searchField:"object1"},project_search:{label:"Project",searchOnly:!0,searchObject:"project",searchPlaceholder:"Project name",searchWidget:2,searchField:"object1"},user_search:{label:"User",searchOnly:!0,searchObject:"user",searchPlaceholder:"Primary username",searchWidget:2,searchField:"object1"},all_objects3:{label:"All",searchOnly:!0,searchObject:"all",searchPlaceholder:"All related resources",searchWidget:3,searchField:"object2"},credential_search3:{label:"Credential",searchOnly:!0,searchObject:"credential",searchPlaceholder:"Related credential name",searchWidget:3,searchField:"object2"},group_search3:{label:"Group",searchOnly:!0,searchObject:"group",searchPlaceholder:"Related group name",searchWidget:3,searchField:"object2"},host_search3:{label:"Host",searchOnly:!0,searchObject:"host",searchPlaceholder:"Related host name",searchWidget:3,searchField:"object2"},inventory_search3:{label:"Inventory",searchOnly:!0,searchObject:"inventory",searchPlaceholder:"Related inventory name",searchWidget:3,searchField:"object2"},job_search3:{label:"Job",searchOnly:!0,searchObject:"job",searchPlaceholder:"Job id",searchOnID:!0,searchWidget:3,searchField:"object2"},job_template_search3:{label:"Job Template",searchOnly:!0,searchObject:"job_template",searchPlaceholder:"Related job template name",searchWidget:3,searchField:"object2"},organization_search3:{label:"Organization",searchOnly:!0,searchObject:"organization",searchPlaceholder:"Related organization name",searchWidget:3,searchField:"object2"},project_search3:{label:"Project",searchOnly:!0,searchObject:"project",searchPlaceholder:"Related project name",searchWidget:3,searchField:"object2"},user_search3:{label:"User",searchOnly:!0,searchObject:"user",searchPlaceholder:"Related username",searchWidget:3,searchField:"object2"}},actions:{refresh:{mode:"all","class":"btn-xs",awToolTip:"Refresh the page",ngClick:"refreshStream()"},close:{mode:"all",awToolTip:"Close Activity Stream view",ngClick:"closeStream()"}},fieldActions:{view:{label:"View",ngClick:"showDetail(activity.id)",icon:"fa-zoom-in","class":"btn-default btn-xs",awToolTip:"View event details",dataPlacement:"top"}}}),angular.module("TeamsListDefinition",[]).value("TeamList",{name:"teams",iterator:"team",selectTitle:"Add Team",editTitle:"Teams",selectInstructions:'Click on a row to select it, and click Finished when done. Use the green button to create a new row.',index:!0,hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description"},organization:{label:"Organization",ngBind:"team.organization_name",sourceModel:"organization",sourceField:"name"}},actions:{add:{mode:"all",ngClick:"addTeam()",awToolTip:"Create a new team"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editTeam(team.id)",icon:"icon-edit","class":"btn-xs btn-default",awToolTip:"Edit team",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteTeam(team.id, team.name)",icon:"icon-trash","class":"btn-xs btn-danger",awToolTip:"Delete team",dataPlacement:"top"}}}),angular.module("UserListDefinition",[]).value("UserList",{name:"users",iterator:"user",selectTitle:"Add Users",editTitle:"Users",selectInstructions:"

Select existing users by clicking each user or checking the related checkbox. When finished, click the blue Select button, located bottom right.

When available, a brand new user can be created by clicking the green Create New button.

",index:!0,hover:!0,fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},actions:{add:{label:"Create New",mode:"all",ngClick:"addUser()",basePaths:["organizations","users"],"class":"btn-xs",awToolTip:"Create a new user"},stream:{ngClick:"showActivity()",awToolTip:"View Activity Stream",mode:"all"}},fieldActions:{edit:{label:"Edit",ngClick:"editUser(user.id)",icon:"icon-edit","class":"btn-xs btn-default",awToolTip:"Edit user",dataPlacement:"top"},"delete":{label:"Delete",ngClick:"deleteUser(user.id, user.username)",icon:"icon-trash","class":"btn-xs btn-danger",awToolTip:"Delete user",dataPlacement:"top"}}}),angular.module("InventorySyncStatusWidget",["RestServices","Utilities"]).factory("InventorySyncStatus",["$rootScope","$compile",function(a,b){return function(a){function c(a){var b=a.label,c=a.count,d=a.fail,e=a.link,f=a.fail_link,g="\n"; return g+='\n",g+=''+d+"",g+="\n",g+='',g+=''+c+"",g+="\n"}var d,e,f,g,h,i=a.scope,j=a.target,k=a.dashboard;if(d='
\n',d+='
Inventory Sync Status
\n',d+='
\n',d+='\n',d+="\n",d+="\n",d+='\n',d+='\n',d+='\n',d+="\n",d+="\n",d+="\n",d+=c({label:"Inventories",count:k.inventories&&k.inventories.total_with_inventory_source?k.inventories.total_with_inventory_source:0,fail:k.inventories&&k.inventories.inventory_failed?k.inventories.inventory_failed:0,link:"/#/inventories/?has_inventory_sources=true",fail_link:"/#/inventories/?inventory_sources_with_failures=true"}),e=0,f=0,k.inventory_sources)for(h in k.inventory_sources)e+=k.inventory_sources[h].total?k.inventory_sources[h].total:0,f+=k.inventory_sources[h].failed?k.inventory_sources[h].failed:0;d+=c({label:"Groups",count:e,fail:f,link:"/#/home/groups/?has_external_source=true",fail_link:"/#/home/groups/?status=failed"});for(h in k.inventory_sources)k.inventory_sources[h].total&&(d+=c({label:k.inventory_sources[h].label,count:k.inventory_sources[h].total?k.inventory_sources[h].total:0,fail:k.inventory_sources[h].failed?k.inventory_sources[h].failed:0,link:"/#/home/groups/?source="+h,fail_link:"/#/home/groups/?status=failed&source="+h}));d+="\n",d+="
FailedTotal
\n",d+="
\n",d+="
\n",d+="\n",g=angular.element(document.getElementById(j)),g.html(d),b(g)(i),i.$emit("WidgetLoaded")}}]),angular.module("JobStatusWidget",["RestServices","Utilities"]).factory("JobStatus",["$rootScope","$compile","Rest","GetBasePath","ProcessErrors","Wait",function(a,b){return function(a){function c(a){var b="",c=a.label,d=a.link,e=a.fail_link,f=a.count,g=a.fail;return b+="\n",b+='\n",b+=''+g+"",b+="\n",b+='',b+=''+f+"",b+="\n"}var d,e=a.scope,f=a.target,g=a.dashboard,h="";h='
\n',h+='
Job Status
\n',h+='
\n',h+='\n',h+="\n",h+="\n",h+='\n',h+='\n',h+='\n',h+="\n",h+="\n",h+="\n",h+=c({label:"Jobs",link:"/#/jobs",count:g.jobs&&g.jobs.total?g.jobs.total:0,fail:g.jobs&&g.jobs.failed?g.jobs.failed:0,fail_link:"/#/jobs/?status=failed"}),h+=c({label:"Inventories",link:"/#/inventories",count:g.inventories&&g.inventories.total?g.inventories.total:0,fail:g.inventories&&g.inventories.job_failed?g.inventories.job_failed:0,fail_link:"/#/inventories/?has_active_failures=true"}),h+=c({label:"Groups",link:"/#/home/groups",count:g.groups&&g.groups.total?g.groups.total:0,fail:g.groups&&g.groups.job_failed?g.groups.job_failed:0,fail_link:"/#/home/groups/?has_active_failures=true"}),h+=c({label:"Hosts",link:"/#/home/hosts",count:g.hosts&&g.hosts.total?g.hosts.total:0,fail:g.hosts&&g.hosts.failed?g.hosts.failed:0,fail_link:"/#/home/hosts/?has_active_failures=true"}),h+="\n",h+="
FailedTotal
\n",h+="
\n",h+="
\n",h+="\n",d=angular.element(document.getElementById(f)),d.html(h),b(d)(e),e.$emit("WidgetLoaded")}}]),angular.module("ObjectCountWidget",["RestServices","Utilities"]).factory("ObjectCount",["$rootScope","$compile","Rest","GetBasePath","ProcessErrors","Wait",function(a,b){return function(a){function c(a){var b="",c=a.label,d=a.link,e=a.count;return b+="\n",b+='\n",b+='',b+=''+e+"",b+="\n"}var d,e,f,g=a.scope,h=a.target,i=a.dashboard,j=["organizations","users","teams","credentials","projects","inventories","groups","hosts","job_templates","jobs"];for(e='
\n',e+='
System Summary
\n',e+='
\n',e+='\n',e+="\n",e+="\n",e+='\n',e+='\n',e+="\n",e+="\n",e+="\n",d=0;d\n",e+="
Total
\n",e+="
\n",e+="
\n",f=angular.element(document.getElementById(h)),f.html(e),b(f)(g),g.$emit("WidgetLoaded")}}]),angular.module("SCMSyncStatusWidget",["RestServices","Utilities"]).factory("SCMSyncStatus",["$rootScope","$compile",function(a,b){return function(a){function c(a){var b="",c=a.label,d=a.link,e=a.fail_link,f=a.count,g=a.fail;return b+="\n",b+=''+c+"\n",b+=''+g+"",b+="\n",b+='',b+=''+f+"",b+="\n"}var d,e,f,g,h,i,j=a.scope,k=a.target,l=a.dashboard;if(e='
\n',e+='
Project SCM Status
\n',e+='
\n',e+='\n',e+="\n",e+="\n",e+='\n',e+='\n',e+='\n',e+="\n",e+="\n",e+="\n",f=0,l.scm_types)for(h in l.scm_types)f+=l.scm_types[h].total?l.scm_types[h].total:0;e+=c({label:"Projects",link:"/#/projects",count:f,fail:l.projects&&l.projects.failed?l.projects.failed:0,fail_link:"/#/projects/?status=failed"}),i=[];for(h in l.scm_types)i.push(h);for(i.sort(),d=0;d\n",e+="
FailedTotal
\n",e+="
\n",e+="
\n",e+="\n",g=angular.element(document.getElementById(k)),g.html(e),b(g)(j),j.$emit("WidgetLoaded")}}]),angular.module("StreamWidget",["RestServices","Utilities","StreamListDefinition","SearchHelper","PaginationHelpers","RefreshHelper","ListGenerator","StreamWidget","AuthService"]).factory("setStreamHeight",[function(){return function(){var a=$("#stream-content").height(),b=parseInt($("#tab-content-container").css("min-height").replace(/px/,"")),c=a>b?a:b;$("#tab-content-container").css({"min-height":c})}}]).factory("ShowStream",["setStreamHeight","Authorization",function(a){return function(){var b=$("#stream-container");b.css({position:"absolute",top:0,left:0,width:"100%","min-height":"100%","background-color":"#FFF"}),a(),b.show("slide",{direction:"left"},{duration:500,queue:!1})}}]).factory("HideStream",["LoadBreadCrumbs",function(a){return function(){var b=$("#stream-container");b.hide("slide",{direction:"left"},{duration:500,queue:!1}),setTimeout(function(){b.detach(),b.empty(),b.unbind(),$("#tab-content-container").css({"min-height":0})},500),a()}}]).factory("StreamBreadCrumbs",["$rootScope","$location",function(a,b){return function(){a.breadcrumbs=[];var c,d,e,f,g=b.path().split("/");for(g.splice(0,1),e=0;e=f;f++)c+="/"+g[f];for(f=0;f0)for(f=0;e>=f;f++)c+="/"+g[f];else c="/"+g[e];d=g[e],d=d.charAt(0).toUpperCase()+d.slice(1)}a.breadcrumbs.push({path:c,title:d})}}}]).factory("FixUrl",[function(){return function(a){return a.replace(/\/api\/v1\//,"/#/")}}]).factory("BuildUrl",[function(){return function(a){var b="/#/";switch(a.base){case"group":case"host":b+="home/"+a.base+"s/?id="+a.id;break;case"inventory":b+="inventories/"+a.id+"/";break;default:b+=a.base+"s/"+a.id+"/"}return b}}]).factory("BuildDescription",["FixUrl","BuildUrl",function(a,b){return function(a){function c(a){return a.replace(/^_deleted_\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d+\+\d+:\d+_/,"")}var d,e,f,g,h,i,j,k;d=a.operation,d+=/e$/.test(a.operation)?"d ":"ed ",e=d,f=a.object1,g=a.object2,h=a.summary_fields[f]?a.summary_fields[f][0]:null,i=f===g?a.summary_fields[f][1]:a.summary_fields[g]?a.summary_fields[g][0]:null,("user"===f||"user"===g)&&(a.summary_fields.user[0].name=a.summary_fields.user[0].username),i&&i.name&&!/^_delete/.test(i.name)?(i.base=g,d+=g+' '+i.name+""+("disassociate"===a.operation?" from ":" to "),e+=g+" "+i.name+("disassociate"===a.operation?" from ":" to ")):g&&(j="",i&&i.name&&(j=" "+c(i.name)),d+=g+j+("disassociate"===a.operation?" from ":" to "),e+=g+j+("disassociate"===a.operation?" from ":" to ")),h&&h.name&&!/^\_delete/.test(h.name)?(h.base=f,d+=f+' '+h.name+"",e+=f+" "+h.name):f&&(j="",k="",!h||!h.name||h&&h.name&&/^_delete/.test(h.name)?a.changes&&a.changes.name?"string"==typeof a.changes.name?(j=" "+a.changes.name,k=j):"object"==typeof a.changes.name&&Array.isArray(a.changes.name)&&(j=" "+a.changes.name[0],k=j):"job"===f&&h&&a.changes&&a.changes.job_template?"delete"!==a.operation?(h.base=f,j=' '+h.id+" "+a.changes.job_template+"",k=" "+h.id+" "+a.changes.job_template):(j=" "+h.id+" "+a.changes.job_template,k=j):"job"===f&&h&&("delete"!==a.operation?(h.base=f,j=' '+h.id+"",k=" "+h.id):(j=" "+h.id,k=j)):h&&h.name&&(j=" "+c(h.name),k=j),d+=f+j,e+=f+k),a.description=d,a.description_nolink=e}}]).factory("ShowDetail",["$rootScope","Rest","Alert","GenerateForm","ProcessErrors","GetBasePath","FormatDate","ActivityDetailForm","Empty","Find",function(a,b,c,d,e,f,g,h,i,j){return function(a){var b,c,e,f=a.activity_id,i=a.scope,k=d,l=h,m=j({list:i.activities,key:"id",val:f});m&&(m.changes_stringified=JSON.stringify(m.changes,null," "),b=m.changes_stringified.match(/\n/g),c=b?b.length:1,c=1>c?3:10,l.fields.changes.rows=10,e=k.inject(l,{mode:"edit",modal:!0,related:!1}),e.changes=m.changes_stringified,e.user=(m.summary_fields.actor?m.summary_fields.actor.username:"system")+" on "+g(new Date(m.timestamps)),e.operation=m.description_nolink,e.formModalAction=function(){$("#form-modal").modal("hide")},$("#form-modal").on("show.bs.modal",function(){$("#form-modal-body").css({width:"auto",height:"auto","max-height":"100%"})}),e.formModalActionLabel="OK",e.formModalCancelShow=!1,e.formModalInfo=!1,e.formModalHeader="Event "+m.id,e.$$phase||e.$digest())}}]).factory("Stream",["$rootScope","$location","Rest","GetBasePath","ProcessErrors","Wait","StreamList","SearchInit","PaginateInit","GenerateList","FormatDate","ShowStream","HideStream","BuildDescription","FixUrl","BuildUrl","ShowDetail","StreamBreadCrumbs","setStreamHeight","Find","Store",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){return function(c){var e,f,o,v,w=g,x=d("activity_stream"),y=j,z=b.path().replace(/^\//,"").split("/")[0],A=c.scope,B=u("CurrentSearchParams"),C=c&&c.inventory_name?c.inventory_name:null,D=c&&c.url?c.url:null;a.flashMessage=null,D?x=D:"/home"!==b.path()&&(e="inventories"===z?"inventory":z.replace(/s$/,""),f=b.path().split("/"),f.splice(0,1),f.length>1&&/^\d+/.test(f[f.length-1])?(e=f[f.length-2],e="inventories"===e?"inventory":e.replace(/s$/,""),x+="?"+e+"__id="+f[f.length-1]):f.length>1?(e=f[f.length-1],e="inventories"===e?"inventory":e.replace(/s$/,""),x+="?or__object1="+e+"&or__object2="+e):x+="?or__object1="+e+"&or__object2="+e),$("#tab-content-container").append('
'),r(),C&&(o=t({list:a.breadcrumbs,key:"title",val:"{{ inventory_name }}"}),o&&(o.title=C)),l(),v=y.inject(w,{mode:"edit",id:"stream-content",searchSize:"col-lg-3",secondWidget:!0,activityStream:!0}),v.streamTitle=c&&c.title?c.title:null,v.closeStream=function(a){m(),v.searchCleanup&&v.searchCleanup(),B&&h({scope:A,set:B.set,list:B.list,url:B.defaultUrl,iterator:B.iterator,sort_order:B.sort_order,setWidgets:!1}),a&&b.path(a)},v.refreshStream=function(){v.search(w.iterator)},v.showDetail=function(a){q({scope:v,activity_id:a})},v.removeStreamPostRefresh&&v.removeStreamPostRefresh(),v.removeStreamPostRefresh=v.$on("PostRefresh",function(){var a,b,c,d,e,f;for(a=0;a'+v.activities[a].summary_fields.actor.username+"":"system",d=/^\_delete/,e=v.activities[a].object1,f=v.activities[a].object2,e&&v.activities[a].summary_fields[e]&&v.activities[a].summary_fields[e].name?d.test(v.activities[a].summary_fields[e].name)?v.activities[a].objects=v.activities[a].summary_fields[e].name:(c=p(v.activities[a].summary_fields.object1),v.activities[a].objects=''+v.activities[a].summary_fields[e].name+""):v.activities[a].object1&&(v.activities[a].objects=v.activities[a].object1),f&&v.activities[a].summary_fields[f]&&v.activities[a].summary_fields[f].name?d.test(v.activities[a].summary_fields.object2.name)?v.activities[a].objects+=","+v.activities[a].summary_fields[f].name:(c=p(v.activities[a].summary_fields.object2),v.activities[a].objects+=', '+v.activities[a].summary_fields[f].name+""):v.activities[a].object2&&(v.activities[a].objects+=", "+v.activities[a].object2),n(v.activities[a]);setTimeout(function(){s()},500)}),h({scope:v,set:w.name,list:w,url:x}),i({scope:v,list:w,url:x}),v.search(w.iterator)}}]),angular.module("AuthService",["ngCookies","Utilities"]).factory("Authorization",["$http","$rootScope","$location","$cookieStore","GetBasePath",function(a,b,c,d,e){return{setToken:function(a,c){d.remove("token"),d.remove("token_expires"),d.remove("userLoggedIn"),d.put("token",a),d.put("token_expires",c),d.put("userLoggedIn",!0),d.put("sessionExpired",!1),b.token=a,b.userLoggedIn=!0,b.token_expires=c,b.sessionExpired=!1},isUserLoggedIn:function(){return void 0===b.userLoggedIn&&(b.userLoggedIn=d.get("userLoggedIn"),b.sessionExpired=d.get("sessionExpired")),b.userLoggedIn},getToken:function(){return b.token?b.token:d.get("token")},retrieveToken:function(b,c){return a({method:"POST",url:e("authtoken"),data:{username:b,password:c}})},logout:function(){var a=angular.element(document.getElementById("main-view")).scope();a.$destroy(),b.$destroy(),d.remove("accordions"),d.remove("token"),d.remove("token_expires"),d.remove("current_user"),d.remove("lastPath"),d.put("userLoggedIn",!1),d.put("sessionExpired",!1),d.remove("lastPath","/home"),b.current_user={},b.license_tested=void 0,b.userLoggedIn=!1,b.sessionExpired=!1,b.token=null,b.token_expires=null,b.lastPath="/home"},getLicense:function(){return a({method:"GET",url:e("config"),headers:{Authorization:"Token "+this.getToken()}})},setLicense:function(a){a.tested=!1,d.put("license",a)},licenseTested:function(){var a,c;return void 0!==b.license_tested?c=b.license_tested:(a=d.get("license"),c=a&&void 0!==a.tested?a.tested:!1),c},getUser:function(){return a({method:"GET",url:"/api/v1/me/",headers:{Authorization:"Token "+this.getToken()}})},setUserInfo:function(a){b.current_user=a.results[0],d.put("current_user",a.results[0])},restoreUserInfo:function(){b.current_user=d.get("current_user")},getUserInfo:function(a){var c;return b.current_user?b.current_user[a]:(this.restoreUserInfo(),c=d.get("current_user"),c[a])}}}]),angular.module("InventoryTree",["Utilities","RestServices","GroupsHelper","PromptDialog"]).factory("SortNodes",[function(){return function(a){var b,c,d=[],e=[];for(b=0;b0?!0:!1,has_inventory_sources:s[e].has_inventory_sources,id:r,source:s[e].summary_fields.inventory_source.source,group_id:s[e].id,event_level:c,children:i,ngicon:s[e].children.length>0?"fa fa-minus-square-o node-toggle":"fa fa-square-o node-no-toggle",ngclick:"toggle("+r+")",related:{children:s[e].children.length>0?s[e].related.children:"",inventory_source:s[e].related.inventory_source},status:s[e].summary_fields.inventory_source.status,status_class:k["class"],status_tooltip:k.tooltip,launch_tooltip:k.launch_tip,launch_class:k.launch_class,hosts_status_tip:n.tooltip,show_failures:n.failures,hosts_status_class:n["class"],selected_class:"",show:!0,isDraggable:!0,isDroppable:!0},q.push(o),p&&o.group_id===p&&(m.selected_tree_id=r,m.selected_group_id=o.group_id),s[e].children.length>0&&j(s[e].children,r,c+1)}}function k(){e("start"),a.setUrl(b("inventory")+l+"/"),a.get().success(function(a){m.$emit("buildAllGroups",a.name,a.related.tree,a.related.groups)}).error(function(a,b){e("stop"),c(m,a,b,null,{hdr:"Error!",msg:"Failed to get inventory: "+l+". GET returned: "+b})})}var l=h.inventory_id,m=h.scope,n=h.refresh,o=h.emit,p=h.new_group_id,q=[],r=1;m.buildAllGroupsRemove&&m.buildAllGroupsRemove(),m.buildAllGroupsRemove=m.$on("buildAllGroups",function(b,d,f){a.setUrl(f),a.get().success(function(a){i(a),j(a,0,0),m.autoShowGroupHelp=0===a.length?!0:!1,n?(m.groups=q,m.$emit("GroupTreeRefreshed",d,q,o)):m.$emit("GroupTreeLoaded",d,q,o)}).error(function(a,b){e("stop"),c(m,a,b,null,{hdr:"Error!",msg:"Failed to get inventory tree for: "+l+". GET returned: "+b})})}),k()}}]).factory("UpdateGroup",["ApplyEllipsis","GetSyncStatusMsg","Empty",function(a,b,c){return function(d){var e,f,g,h,i,j=d.scope,k=d.group_id,l=d.properties;for(e=0;e\n',m+='\n",m+="\n",i=angular.element(document.getElementById("inventory-modal-container")),i.empty().append(m),a(i)(j),$("#copy-prompt-modal").modal({backdrop:"static",keyboard:!0,show:!0}),j.moveGroup=function(){var a,b,i;$("#copy-prompt-modal").modal("hide"),e("start"),j.removeGroupRemove&&j.removeGroupRemove(),j.removeGroupRemove=j.$on("removeGroup",function(){l.parent>0?(i=d({list:j.groups,key:"id",val:l.parent}),a=h("base")+"groups/"+i.group_id+"/children/",f.setUrl(a),f.post({id:l.group_id,disassociate:1}).success(function(){j.$emit("GroupDeleteCompleted")}).error(function(a,b){e("stop"),c(j,a,b,null,{hdr:"Error!",msg:"Failed to remove "+l.name+" from "+i.name+". POST returned status: "+b})})):j.$emit("GroupDeleteCompleted")}),a=g(k.group_id)?h("inventory")+j.inventory_id+"/groups/":h("base")+"groups/"+k.group_id+"/children/",b={id:l.group_id,name:l.name,description:l.description,inventory:j.inventory_id},f.setUrl(a),f.post(b).success(function(){j.$emit("removeGroup")}).error(function(a,b){var d=g(k.group_id)?"inventory":k.name;e("stop"),c(j,a,b,null,{hdr:"Error!",msg:"Failed to add "+l.name+" to "+d+". POST returned status: "+b})})},j.copyGroup=function(){$("#copy-prompt-modal").modal("hide"),e("start");var a=g(k.group_id)?h("inventory")+j.inventory_id+"/groups/":h("base")+"groups/"+k.group_id+"/children/",b={id:l.group_id,name:l.name,description:l.description,inventory:j.inventory_id};f.setUrl(a),f.post(b).success(function(){j.$emit("GroupDeleteCompleted")}).error(function(a,b){var d=g(k.group_id)?"inventory":k.name;e("stop"),c(j,a,b,null,{hdr:"Error!",msg:"Failed to add "+l.name+" to "+d+". POST returned status: "+b})})}}}]).factory("CopyMoveHost",["$compile","Alert","ProcessErrors","Find","Wait","Rest","Empty","GetBasePath",function(a,b,c,d,e,f,g,h){return function(b){var g,i,j=b.scope,k=d({list:j.groups,key:"id",val:b.target_tree_id}),l=d({list:j.hosts,key:"id",val:b.host_id}),m=!1,n="";if(l.summary_fields.all_groups)for(i=0;i\n',n+='\n",n+="\n",n+="\n",g=angular.element(document.getElementById("inventory-modal-container")),g.empty().append(n),a(g)(j),$("#copy-alert-modal").modal({backdrop:"static",keyboard:!0,show:!0})):(n="",n+='\n",g=angular.element(document.getElementById("inventory-modal-container")),g.empty().append(n),a(g)(j),$("#copy-prompt-modal").modal({backdrop:"static",keyboard:!0,show:!0}),j.copyHost=function(){$("#copy-prompt-modal").modal("hide"),e("start"),f.setUrl(h("groups")+k.group_id+"/hosts/"),f.post(l).success(function(){j.$emit("GroupTreeRefreshed")}).error(function(a,b){e("stop"),c(j,a,b,null,{hdr:"Error!",msg:"Failed to add "+l.name+" to "+k.name+". POST returned status: "+b})})})}}]),angular.module("RestServices",["ngCookies","AuthService"]).factory("Rest",["$http","$rootScope","$cookieStore","$q","Authorization",function(a,b,c,d,e){return{headers:{},setUrl:function(a){this.url=a},checkExpired:function(){return b.sessionTimer.isExpired()},pReplace:function(){var a,b;for(a in this.params)b=new RegExp("\\:"+a,"gm"),b.test(this.url)&&(this.url=this.url.replace(b,this.params[a]),delete this.params[a])},createResponse:function(a,b){var c=d.reject({data:a,status:b});return c.success=function(a){return c.then(function(b){a(b.data,b.status)},null),c},c.error=function(a){return c.then(null,function(b){a(b.data,b.status)}),c},c},setHeader:function(a){for(var b in a)this.headers[b]=a[b]},get:function(b){b=b?b:{},this.params=b.params?b.params:null,this.pReplace();var c=this.checkExpired(),d=e.getToken();return c?this.createResponse({detail:"Token is expired"},401):d?(this.setHeader({Authorization:"Token "+d}),this.setHeader({"X-Auth-Token":"Token "+d}),a({method:"GET",url:this.url,headers:this.headers,params:this.params})):this.createResponse({detail:"Invalid token"},401)},post:function(b){var c=e.getToken(),d=this.checkExpired();return d?this.createResponse({detail:"Token is expired"},401):c?(this.setHeader({Authorization:"Token "+c}),this.setHeader({"X-Auth-Token":"Token "+c}),a({method:"POST",url:this.url,headers:this.headers,data:b})):this.createResponse({detail:"Invalid token"},401)},put:function(b){var c=e.getToken(),d=this.checkExpired();return d?this.createResponse({detail:"Token is expired"},401):c?(this.setHeader({Authorization:"Token "+c}),this.setHeader({"X-Auth-Token":"Token "+c}),a({method:"PUT",url:this.url,headers:this.headers,data:b})):this.createResponse({detail:"Invalid token"},401)},destroy:function(b){var c=e.getToken(),d=this.checkExpired();return d?this.createResponse({detail:"Token is expired"},401):c?(this.setHeader({Authorization:"Token "+c}),this.setHeader({"X-Auth-Token":"Token "+c}),a({method:"DELETE",url:this.url,headers:this.headers,data:b})):this.createResponse({detail:"Invalid token"},401)},options:function(){var b=e.getToken(),c=this.checkExpired();return c?this.createResponse({detail:"Token is expired"},401):b?(this.setHeader({Authorization:"Token "+b}),this.setHeader({"X-Auth-Token":"Token "+b}),a({method:"OPTIONS",url:this.url,headers:this.headers})):this.createResponse({detail:"Invalid token"},401)}}}]),angular.module("TimerService",["ngCookies","Utilities"]).factory("Timer",["$rootScope","$cookieStore","$location","GetBasePath","Empty",function(a,b){return{sessionTime:null,timeout:null,getSessionTime:function(){return this.sessionTime?this.sessionTime:b.get("sessionTime")},isExpired:function(){var a=this.getSessionTime(),b=(new Date).getTime();return 0>=a-b?!0:(this.moveForward(),!1)},expireSession:function(){this.sessionTime=0,a.sessionExpired=!0,b.put("sessionExpired",!0)},moveForward:function(){var c=(new Date).getTime()+1e3*$AnsibleConfig.session_timeout;this.sessionTime=c,b.put("sessionTime",c),a.sessionExpired=!1,b.put("sessionExpired",!1)},init:function(){return this.moveForward(),this}}}]),angular.module("Utilities",["RestServices","Utilities"]).factory("ClearScope",[function(){return function(){$(".tooltip").each(function(){$(this).remove()}),$(".popover").each(function(){$(this).remove()});try{$("#help-modal").dialog("close")}catch(a){}$(window).unbind("resize")}}]).factory("Empty",[function(){return function(a){return null===a||void 0===a||""===a?!0:!1}}]).factory("ToggleClass",function(){return function(a,b){$(a)&&$(a).hasClass(b)?$(a).removeClass(b):$(a)&&$(a).addClass(b)}}).factory("Alert",["$rootScope",function(a){return function(b,c,d,e,f,g){f?(a.alertHeader2=b,a.alertBody2=c,a.alertClass2=d?d:"alert-danger",$("#alert-modal2").modal({show:!0,keyboard:!0,backdrop:"static"}),a.disableButtons2=g?!0:!1,e&&$("#alert-modal2").on("hidden",function(){e()}),$(document).bind("keydown",function(a){27===a.keyCode&&($("#alert-modal2").modal("hide"),e&&e())})):(a.alertHeader=b,a.alertBody=c,a.alertClass=d?d:"alert-danger",$("#alert-modal").modal({show:!0,keyboard:!0,backdrop:"static"}),$(document).bind("keydown",function(a){27===a.keyCode&&($("#alert-modal").modal("hide"),e&&e())}),a.disableButtons=g?!0:!1,e&&$("#alert-modal").on("hidden",function(){e()}))}}]).factory("ProcessErrors",["$rootScope","$cookieStore","$log","$location","Alert","Wait",function(a,b,c,d,e,f){return function(b,c,g,h,i){var j,k,l;if(f("stop"),$AnsibleConfig.debug_mode&&console&&(console.log("Debug status: "+g),console.log("Debug data: "),console.log(c)),403===g)l="The API responded with a 403 Access Denied error. ",l+=c.detail?"Detail: "+c.detail:"Please contact your system administrator.",e(i.hdr,l);else if(401===g&&c.detail&&"Token is expired"===c.detail||401===g&&c.detail&&"Invalid token"===c.detail)a.sessionTimer.expireSession(),d.url("/login");else if(c.non_field_errors)e("Error!",c.non_field_errors);else if(c.detail)e(i.hdr,i.msg+" "+c.detail);else if(c.__all__)e("Error!",c.__all__);else if(h){k=!1;for(j in h.fields)c[j]&&h.fields[j].tab&&$("#"+h.name+'_tabs a[href="#'+h.fields[j].tab+'"]').tab("show"),h.fields[j].realName&&c[h.fields[j].realName]&&(b[j+"_api_error"]=c[h.fields[j]][0],$('[name="'+h.fields[j].realName+'"]').addClass("ng-invalid"),k=!0),h.fields[j].sourceModel?c[j]&&(b[h.fields[j].sourceModel+"_"+h.fields[j].sourceField+"_api_error"]=c[j][0],$('[name="'+h.fields[j].sourceModel+"_"+h.fields[j].sourceField+'"]').addClass("ng-invalid"),k=!0):c[j]&&(b[j+"_api_error"]=c[j][0],$('[name="'+j+'"]').addClass("ng-invalid"),k=!0); +!k&&i&&e(i.hdr,i.msg)}else e(i.hdr,i.msg)}}]).factory("LoadBreadCrumbs",["$rootScope","$routeParams","$location","Empty",function(a,b,c,d){return function(b){function e(a){return a.toUpperCase()}function f(a){return"ies"===a?"y":""}var g,h,i,j,k,l,m,n;if(!d(b)){for(h=!1,j=0;j1)for(j=0;j0&&k[j].match(/\d+/)){for(m=k[j-1],n=m.replace(/(ies$|s$)/,f),n=n.charAt(0).toUpperCase()+n.slice(1),h=!1,i=0;i\n",b+='
\n',b+='',b+="
\n",b+='
'+a.box+"
",b+=f&&a.autoOffNotice?'
\n':""}var h,i,j,k,l=!1;e=a,j=d.story.width?d.story.width:510,k=d.story.height?d.story.height:600,i=$(document).width(),j=j>i?i:j;try{l=$("#help-modal").dialog("isOpen")}catch(m){}l?$("#help-modal").html(g(d.story.steps[e])):(h=[],d.story.steps.length>1&&(h.push({text:"Prev",click:function(a){e-1===0&&$(a.target).button("disable"),e-10&&$(a.target).prev().button("enable"),e+1===d.story.steps.length-1&&$(a.target).button("disable"),b(e+1)}})),h.push({text:"Close",click:function(){$("#help-modal").dialog("close")}}),$("#help-modal").html(g(d.story.steps[e])).dialog({position:{my:"center top",at:"center top+150",of:"body"},title:d.story.hdr,width:j,height:k,buttons:h,closeOnEscape:!0,show:500,hide:500,resizable:!1,close:function(){$("#help-modal").empty()}}),$(".ui-dialog-buttonset button").each(function(){var a,b,c;c=$(this).text(),"Close"===c?(b="fa-times",a="btn btn-default",$(this).attr({"class":a}).html(' Close')):"Prev"===c?(b="fa-chevron-left",a="btn btn-primary",$(this).attr({"class":a}).html(' Prev')):(b="fa-chevron-right",a="btn btn-primary",$(this).attr({"class":a}).html('Next ').css({"margin-right":"20px"}))}),$('.ui-dialog[aria-describedby="help-modal"]').find(".ui-dialog-titlebar button").empty().attr({"class":"close"}).text("x"),$("#auto-off-checkbox").click(function(){$('input[name="auto-off-checkbox"]:checked').length?c("inventoryAutoHelp","off"):c("inventoryAutoHelp","on")}))}var d=a.defn,e=a.step,f=a.autoShow||!1;b(0)}}]).factory("ReturnToCaller",["$location","Empty",function(a,b){return function(c){var d,e=a.path().replace(/^\//,"").split("/"),f="";for(c=b(c)?e.length-1:c+1,d=0;c>d;d++)f+="/"+e[d];a.path(f)}}]).factory("FormatDate",["$filter",function(a){return function(b){return a("date")(b,"MM/dd/yy HH:mm:ss")}}]).factory("Wait",["$rootScope",function(a){return function(b){var c,d,e,f,g,h;"start"!==b||a.waiting?"stop"===b&&a.waiting&&$(".spinny, .overlay").fadeOut(400,function(){a.waiting=!1}):(a.waiting=!0,c=$(window).width(),d=$(window).height(),e=$(".spinny").width(),f=$(".spinny").height(),g=(c-e)/2,h=(d-f)/2,$(".overlay").css({width:$(document).width(),height:$(document).height()}).fadeIn(),$(".spinny").css({top:h,left:g}).fadeIn(400))}}]).factory("HideElement",[function(){return function(a,b){var c=$(a),d=c.css("width"),e=c.css("height"),f=c.position(),g=c.parent(),h=c.css("border-radius"),i=c.css("background-color"),j=c.css("margin"),k=c.css("padding");g.append('
'),$("#curtain-div").show(0,b)}}]).factory("ShowElement",[function(){return function(){$("#curtain-div").fadeOut(500,function(){$(this).remove()})}}]).factory("GetChoices",["Rest","ProcessErrors",function(a,b){return function(c){var d=c.scope,e=c.url,f=c.field,g=c.variable,h=c.callback,i=c.choice_name;d[g]?d[g].length=0:d[g]=[],a.setUrl(e),a.options().success(function(a){var b,c;for(b=i?a.actions.GET[f][i]:a.actions.GET[f].choices,c=0;c