From 44f7ce42cc01d98767595f8e52a571f0aaf976a7 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Sat, 13 Jul 2013 05:56:49 -0400 Subject: [PATCH] Help icon is now the same everywhere. In some places it was an 'i' and in others a '?'. Same with the color. We had two different flavors of blue. Also streamlined the code. Now all help html is genereated from one place. --- awx/ui/static/css/ansible-ui.css | 4 + awx/ui/static/js/awx-min.js | 437 +++++++++--------- awx/ui/static/js/forms/Jobs.js | 2 +- awx/ui/static/lib/ansible/form-generator.js | 60 +-- .../static/lib/ansible/generator-helpers.js | 10 +- awx/ui/static/lib/ansible/list-generator.js | 3 +- 6 files changed, 240 insertions(+), 276 deletions(-) diff --git a/awx/ui/static/css/ansible-ui.css b/awx/ui/static/css/ansible-ui.css index c51f78e609..cb842cc0b4 100644 --- a/awx/ui/static/css/ansible-ui.css +++ b/awx/ui/static/css/ansible-ui.css @@ -126,6 +126,10 @@ text-decoration: none; } + .help-link { + color: #49afcd; + } + .site-footer { width: 100%; margin-top: 60px; diff --git a/awx/ui/static/js/awx-min.js b/awx/ui/static/js/awx-min.js index ec3d218532..009f979d7d 100644 --- a/awx/ui/static/js/awx-min.js +++ b/awx/ui/static/js/awx-min.js @@ -4,11 +4,11 @@ * * awx-min.js * - * master-987e4d1, Fri Jul 12 13:46:38 2013 -0400 + * master-6495420, Fri Jul 12 17:08:30 2013 -0400 * */ var urlPrefix="/static/"; -angular.module("ansible","RestServices AuthService Utilities OrganizationFormDefinition UserFormDefinition FormGenerator OrganizationListDefinition UserListDefinition ListGenerator PromptDialog ApiLoader RelatedSearchHelper RelatedPaginateHelper SearchHelper PaginateHelper RefreshHelper AdminListDefinition AWDirectives InventoriesListDefinition InventoryFormDefinition InventoryHelper AWFilters HostFormDefinition HostListDefinition GroupFormDefinition GroupListDefinition TeamsListDefinition TeamFormDefinition TeamHelper CredentialsListDefinition CredentialFormDefinition LookUpHelper JobTemplatesListDefinition JobTemplateFormDefinition JobTemplateHelper ProjectsListDefinition ProjectFormDefinition PermissionFormDefinition PermissionListDefinition JobsListDefinition JobFormDefinition JobEventsListDefinition JobEventFormDefinition JobHostDefinition GroupsHelper HostsHelper ParseHelper ChildrenHelper EventsHelper ProjectPathHelper md5Helper AccessHelper".split(" ")).config(["$routeProvider",function(l){l.when("/jobs", +angular.module("ansible","RestServices AuthService Utilities OrganizationFormDefinition UserFormDefinition FormGenerator OrganizationListDefinition UserListDefinition ListGenerator PromptDialog ApiLoader RelatedSearchHelper RelatedPaginateHelper SearchHelper PaginateHelper RefreshHelper AdminListDefinition AWDirectives InventoriesListDefinition InventoryFormDefinition InventoryHelper AWFilters HostFormDefinition HostListDefinition GroupFormDefinition GroupListDefinition TeamsListDefinition TeamFormDefinition TeamHelper CredentialsListDefinition CredentialFormDefinition LookUpHelper JobTemplatesListDefinition JobTemplateFormDefinition JobTemplateHelper ProjectsListDefinition ProjectFormDefinition PermissionFormDefinition PermissionListDefinition JobsListDefinition JobFormDefinition JobEventsListDefinition JobEventFormDefinition JobHostDefinition GroupsHelper HostsHelper ParseHelper ChildrenHelper EventsHelper ProjectPathHelper md5Helper AccessHelper".split(" ")).config(["$routeProvider",function(k){k.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("/inventories",{templateUrl:urlPrefix+"partials/inventories.html",controller:InventoriesList}).when("/inventories/add",{templateUrl:urlPrefix+"partials/inventories.html",controller:InventoriesAdd}).when("/inventories/:id",{templateUrl:urlPrefix+"partials/inventories.html",controller:InventoriesEdit}).when("/organizations",{templateUrl:urlPrefix+"partials/organizations.html",controller:OrganizationsList}).when("/organizations/add",{templateUrl:urlPrefix+ @@ -18,128 +18,128 @@ controller:UsersAdd}).when("/organizations/:organization_id/users/:user_id",{tem {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/: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/login-dialog.html",controller:Authenticate}).when("/logout",{templateUrl:urlPrefix+"partials/login-dialog.html",controller:Authenticate}).otherwise({redirectTo:"/"})}]).run(["$rootScope","CheckLicense","$location","Authorization","LoadBasePaths",function(l,m,h,g,c){c();l.breadcrumbs=[];l.crumbCache=[]; -l.$on("$routeChangeStart",function(c,f,e){!1==g.isTokenValid()?f.templateUrl!=urlPrefix+"partials/login.html"&&h.path("/login"):((void 0==l.current_user||null==l.current_user)&&g.restoreUserInfo(),m());c=h.path().replace(/^\//,"").split("/")[0];""==c?$('.nav-tabs a[href="#organizations"]').tab("show"):(c.replace(/\_/g," "),$('.nav-tabs a[href="#'+c+'"]').tab("show"))});g.isTokenValid()||h.path("/login");c=h.path().replace(/^\//,"").split("/")[0];""==c?(c="organizations",h.path("/organizations")): -c.replace(/\_/g," ");$('.nav-tabs a[href="#'+c+'"]').tab("show");l.viewCurrentUser=function(){h.path("/users/"+l.current_user.id)}}]);var $AnsibleConfig={session_timeout:3600,tooltip_delay:{show:500,hide:100},debug_mode:!0};function AdminsList(l,m,h,g,c,p,f,e,k,a,d,b,y,v,A){l=A("organizations")+c.organization_id+"/users/";var u=k.inject(e,{mode:"select"});u.selected=[];u.PostRefreshRemove&&u.PostRefreshRemove();u.PostRefreshRemove=u.$on("PostRefresh",function(){$("tr.success").each(function(a){a=$(this).attr("ng-class");u[a]=""})});b({scope:u,set:"admins",list:e,url:l});y({scope:u,list:e,url:l});u.search(e.iterator);a();u.finishSelection=function(){var a=A("organizations")+c.organization_id+"/admins/";p.setUrl(a);u.queue= +controller:CredentialsAdd}).when("/teams/:user_id/credentials/:credential_id",{templateUrl:urlPrefix+"partials/teams.html",controller:CredentialsEdit}).when("/login",{templateUrl:urlPrefix+"partials/login-dialog.html",controller:Authenticate}).when("/logout",{templateUrl:urlPrefix+"partials/login-dialog.html",controller:Authenticate}).otherwise({redirectTo:"/"})}]).run(["$rootScope","CheckLicense","$location","Authorization","LoadBasePaths",function(k,m,h,g,c){c();k.breadcrumbs=[];k.crumbCache=[]; +k.$on("$routeChangeStart",function(c,f,e){!1==g.isTokenValid()?f.templateUrl!=urlPrefix+"partials/login.html"&&h.path("/login"):((void 0==k.current_user||null==k.current_user)&&g.restoreUserInfo(),m());c=h.path().replace(/^\//,"").split("/")[0];""==c?$('.nav-tabs a[href="#organizations"]').tab("show"):(c.replace(/\_/g," "),$('.nav-tabs a[href="#'+c+'"]').tab("show"))});g.isTokenValid()||h.path("/login");c=h.path().replace(/^\//,"").split("/")[0];""==c?(c="organizations",h.path("/organizations")): +c.replace(/\_/g," ");$('.nav-tabs a[href="#'+c+'"]').tab("show");k.viewCurrentUser=function(){h.path("/users/"+k.current_user.id)}}]);var $AnsibleConfig={session_timeout:3600,tooltip_delay:{show:500,hide:100},debug_mode:!0};function AdminsList(k,m,h,g,c,p,f,e,l,a,d,b,y,v,A){k=A("organizations")+c.organization_id+"/users/";var u=l.inject(e,{mode:"select"});u.selected=[];u.PostRefreshRemove&&u.PostRefreshRemove();u.PostRefreshRemove=u.$on("PostRefresh",function(){$("tr.success").each(function(a){a=$(this).attr("ng-class");u[a]=""})});b({scope:u,set:"admins",list:e,url:k});y({scope:u,list:e,url:k});u.search(e.iterator);a();u.finishSelection=function(){var a=A("organizations")+c.organization_id+"/admins/";p.setUrl(a);u.queue= [];u.$on("callFinished",function(){if(u.queue.length==u.selected.length){$('input[type="checkbox"]').prop("checked",!1);u.selected=[];for(var a=0,b=0;b -a[d].event_level)a[d].ngclick="toggleChildren("+a[d].id+', "'+a[d].related.children+'")',a[d].ngicon="icon-collapse-alt",a[d]["class"]="parentNode";else{a[d]["class"]="childNode";b=a[d];var c=a[d].event_data,f="";if(c.res){var n=void 0,n=void 0,k=!1;if("string"==typeof c.res)n=(n=c.res.match(/\n/g))?n.length:1,k=!0,f+="\n",f+='\n";else{var g=void 0;for(g in c.res){if(("msg"==g||"stdout"==g||"stderr"== -g)&&null!==c.res[g]&&""!==c.res[g]){f+="\n";n=(n=c.res[g].match(/\n/g))?n.length:1;f+='\n";k=!0}if("results"==g&&Array.isArray(c.res[g])&&0Results:\n";k="";for(n=0;n'+k+"\n";k=!0}"rc"==g&&0!=c.res[g]&&(f+="\n",f+='\n',k=!0)}}f=k?'
\n'+f+"
\n":""}f=c.host?''+c.host+"\n"+f:""==f?null:f;b.event_detail=f}a[d].show=!0;a[d].spaces=24*a[d].event_level;q.jobevents[d].status=q.jobevents[d].failed?"error":q.jobevents[d].changed?"changed":"success";b=new Date(a[d].created); -a[d].created=B(b)}});b({scope:q,set:"jobevents",list:e,url:l});y({scope:q,list:e,url:l});c.host&&(q[e.iterator+"SearchField"]="host",q[e.iterator+"SearchValue"]=c.host,q[e.iterator+"SearchFieldLabel"]=e.fields.host.label);q.search(e.iterator);q.toggleChildren=function(a,b){r({scope:q,list:e,id:a,children:b})};a();q.viewJobEvent=function(a){n({event_id:a})};q.refresh=function(){q.expand=!0;q.search(e.iterator)};q.jobDetails=function(){h.path("/jobs/"+c.id)};q.jobSummary=function(){h.path("/jobs/"+ +inventory_id:I,group_id:x.group_id})};x.editHost=function(a,b){s({scope:x,inventory_id:I,group_id:x.group_id,host_id:a,host_name:b})};x.deleteHost=function(a,b){K({scope:x,inventory_id:I,group_id:x.group_id,host_id:a,host_name:b})};x.showEvents=function(a,c){l.setUrl(c);l.get().success(function(d,c,f,e){b({path:"/jobs/"+d.id,title:d.name});g.url("/jobs/"+d.id+"/job_events/?host="+escape(a))}).error(function(a,b,e,n){d(x,a,b,f,{hdr:"Error!",msg:"Failed to lookup last job: "+c+". GET status: "+b})})}} +InventoriesEdit.$inject="$scope $rootScope $compile $location $log $routeParams InventoryForm GenerateForm Rest Alert ProcessErrors LoadBreadCrumbs RelatedSearchInit RelatedPaginateInit ReturnToCaller ClearScope LookUpInit Prompt OrganizationList TreeInit GetBasePath GroupsList GroupsEdit LoadInventory GroupsDelete HostsList HostsAdd HostsEdit HostsDelete RefreshTree ParseTypeChange".split(" ");function JobEventsList(k,m,h,g,c,p,f,e,l,a,d,b,y,v,A,u,C,t,r,n,B){A("htmlTemplate");e.base=h.path();k=C("jobs")+c.id+"/job_events/";h.path().replace(/^\//,"").split("/");var q=l.inject(e,{mode:"edit"});m.flashMessage=null;q.selected=[];q.expand=!0;q.parentNode="parent-event";q.childNode="child-event";q.RemovePostRefresh&&q.RemovePostRefresh();q.RemovePostRefresh=q.$on("PostRefresh",function(){for(var a=q[e.name],b,d=0;d +a[d].event_level)a[d].ngclick="toggleChildren("+a[d].id+', "'+a[d].related.children+'")',a[d].ngicon="icon-collapse-alt",a[d]["class"]="parentNode";else{a[d]["class"]="childNode";b=a[d];var c=a[d].event_data,f="";if(c.res){var n=void 0,n=void 0,l=!1;if("string"==typeof c.res)n=(n=c.res.match(/\n/g))?n.length:1,l=!0,f+="\n",f+='\n";else{var g=void 0;for(g in c.res){if(("msg"==g||"stdout"==g||"stderr"== +g)&&null!==c.res[g]&&""!==c.res[g]){f+="\n";n=(n=c.res[g].match(/\n/g))?n.length:1;f+='\n";l=!0}if("results"==g&&Array.isArray(c.res[g])&&0Results:\n";l="";for(n=0;n'+l+"\n";l=!0}"rc"==g&&0!=c.res[g]&&(f+="\n",f+='\n',l=!0)}}f=l?'
\n'+f+"
\n":""}f=c.host?''+c.host+"\n"+f:""==f?null:f;b.event_detail=f}a[d].show=!0;a[d].spaces=24*a[d].event_level;q.jobevents[d].status=q.jobevents[d].failed?"error":q.jobevents[d].changed?"changed":"success";b=new Date(a[d].created); +a[d].created=B(b)}});b({scope:q,set:"jobevents",list:e,url:k});y({scope:q,list:e,url:k});c.host&&(q[e.iterator+"SearchField"]="host",q[e.iterator+"SearchValue"]=c.host,q[e.iterator+"SearchFieldLabel"]=e.fields.host.label);q.search(e.iterator);q.toggleChildren=function(a,b){r({scope:q,list:e,id:a,children:b})};a();q.viewJobEvent=function(a){n({event_id:a})};q.refresh=function(){q.expand=!0;q.search(e.iterator)};q.jobDetails=function(){h.path("/jobs/"+c.id)};q.jobSummary=function(){h.path("/jobs/"+ c.id+"/job_host_summaries")}}JobEventsList.$inject="$scope $rootScope $location $log $routeParams Rest Alert JobEventList GenerateList LoadBreadCrumbs Prompt SearchInit PaginateInit ReturnToCaller ClearScope ProcessErrors GetBasePath LookUpInit ToggleChildren EventView FormatDate".split(" "); -function JobEventsEdit(l,m,h,g,c,p,f,e,k,a,d,b,y,v,A){y("htmlTemplate");var u=e.inject(f,{mode:"edit",related:!0});e.reset();l=v("base")+"job_events/"+p.event_id+"/";g.path().replace(/^\//,"").split("/");k.setUrl(l);k.get().success(function(a,d,c,e){b({path:"/job_events/"+p.event_id,title:a.event});for(var k in f.fields)"status"==k?u.status=a.failed?"error":"success":"event_data"==k?u.event_data=JSON.stringify(a.event_data,void 0,"\t"):"created"==k?u.created=A(new Date(a.created)):a[k]&&(u[k]=a[k])}).error(function(a, -b,c,e){d(u,a,b,f,{hdr:"Error!",msg:"Failed to retrieve event detail: "+p.event_id+". GET status: "+b})})}JobEventsEdit.$inject="$scope $rootScope $compile $location $log $routeParams JobEventForm GenerateForm Rest Alert ProcessErrors LoadBreadCrumbs ClearScope GetBasePath FormatDate".split(" ");function JobHostSummaryList(l,m,h,g,c,p,f,e,k,a,d,b,y,v,A,u,C){A("htmlTemplate");l=C("jobs")+c.id+"/job_host_summaries/";h.path().replace(/^\//,"").split("/");var t=k.inject(e,{mode:"edit"});t.selected=[];t.PostRefreshRemove&&t.PostRefreshRemove();t.PostRefershRemove=t.$on("PostRefresh",function(){for(var a=0;aEnter 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 ansibleworks.com

', @@ -189,87 +189,87 @@ is_superuser:{label:"Superuser?",type:"checkbox",trueValue:"true",falseValue:"fa fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},fieldActions:{edit:{label:"Edit",ngClick:"edit('credentials', {{ credential.id }}, '{{ credential.name }}')",icon:"icon-edit","class":"btn-success",awToolTip:"Edit the credential"},"delete":{label:"Delete",ngClick:"delete('credentials', {{ credential.id }}, '{{ credential.name }}', 'credentials')",icon:"icon-remove","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"}},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","class":"btn-success",awToolTip:"Edit the permission"},"delete":{label:"Delete",ngClick:"delete('permissions', {{ permission.id }}, '{{ permission.name }}', 'permissions')",icon:"icon-remove","class":"btn-danger",awToolTip:"Delete the permission"}}},admin_of_organizations:{type:"collection",title:"Admin of Organizations",iterator:"adminof",open:!1,base:"/organizations",fields:{name:{key:!0, -label:"Name"},description:{label:"Description"}}},organizations:{type:"collection",title:"Organizations",iterator:"organization",open:!1,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}},teams:{type:"collection",title:"Teams",iterator:"team",open:!1,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}},projects:{type:"collection",title:"Projects",iterator:"project",open:!1,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}}}});angular.module("AccessHelper",["RestServices","Utilities","ngCookies"]).factory("CheckAccess",["$rootScope","Alert","Rest","GetBasePath","ProcessErrors",function(l,m,h,g,c){return function(g){var f=l.current_user,e=!1;f.is_superuser?e=!0:f.related.admin_of_organizations&&(h.setUrl(f.related.admin_of_organizations),h.get().success(function(c,a,d,b){0info@ansibleworks.com for assistance.', +label:"Name"},description:{label:"Description"}}},organizations:{type:"collection",title:"Organizations",iterator:"organization",open:!1,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}},teams:{type:"collection",title:"Teams",iterator:"team",open:!1,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}},projects:{type:"collection",title:"Projects",iterator:"project",open:!1,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}}}}});angular.module("AccessHelper",["RestServices","Utilities","ngCookies"]).factory("CheckAccess",["$rootScope","Alert","Rest","GetBasePath","ProcessErrors",function(k,m,h,g,c){return function(g){var f=k.current_user,e=!1;f.is_superuser?e=!0:f.related.admin_of_organizations&&(h.setUrl(f.related.admin_of_organizations),h.get().success(function(c,a,d,b){0info@ansibleworks.com for assistance.', "alert-error",null,!1,!0):void 0!==g.demo&&!0==g.demo&&h("AWX Demo",'Thank you for trying AnsibleWorks AWX. You can use this edition to manage up to 5 hosts. Should you wish to acquire a license for additional servers, please visit ansibleworks.com/ansibleworks-awx, or contact info@ansibleworks.com for assistance.',"alert-info"),void 0!==g.date_warning&& !0==g.date_warning&&h("License Expired",'Your AnsibleWorks AWX License has expired and is no longer compliant. You can continue, but you will be unable to add any additional hosts. Please visit ansibleworks.com/ansibleworks-awx for license and renewal information, or contact info@ansibleworks.com for assistance.',"alert-info"),void 0!==g.free_instances&& -0>=parseInt(g.free_instances)&&h("License Warning",'Your AnsibleWorks AWX License has reached capacity for the number of managed hosts allowed. You will not be able to add any additional hosts. To extend your license, please visit ansibleworks.com/ansibleworks-awx., or contact info@ansibleworks.com for more information.',"alert-info",null,!0))}}]);angular.module("APIDefaults",["RestServices","Utilities"]).factory("GetAPIDefaults",["Alert","Rest","$rootScope",function(l,m,h){return function(g){function c(c){var a={};for(id in h.apiDefaults)if(id==c||id.iterator==c){a[id]=defaults[id];break}return a}function l(){if(f=={}&&5>e)e++,setTimeout(1E3,l());else if("success"==f.status)return c(g)}var f={},e=0;return null==h.apiDefaults||void 0==h.apiDefaults?(f={},m.setUrl("/api/v1"),m.get().success(function(c,a,d,b){defaults=c;for(var e in defaults)switch(e){case "organizations":dafaults[e].iterator= -"organization";break;case "jobs":defaults[e].iterator="job";break;case "users":defaults[e].iterator="user";break;case "teams":defaults[e].iterator="team";break;case "hosts":defaults[e].iterator="host";break;case "groups":defaults[e].iterator="group";break;case "projects":defaults[e].iterator="project"}h.apiDefaults=defaults;f={status:"success"}}).error(function(c,a,d,b){f={status:"error",msg:"Call to /api/v1 failed. GET returned status: "+a}}),l()):c(g)}}]);angular.module("ChildrenHelper",["RestServices","Utilities"]).factory("ToggleChildren",["Alert","Rest","GetBasePath","ProcessErrors","FormatDate",function(l,m,h,g,c){return function(c){function f(b){a[b].ngicon="icon-collapse-alt";for(var d=b+1;d=parseInt(g.free_instances)&&h("License Warning",'Your AnsibleWorks AWX License has reached capacity for the number of managed hosts allowed. You will not be able to add any additional hosts. To extend your license, please visit ansibleworks.com/ansibleworks-awx., or contact info@ansibleworks.com for more information.',"alert-info",null,!0))}}]);angular.module("APIDefaults",["RestServices","Utilities"]).factory("GetAPIDefaults",["Alert","Rest","$rootScope",function(k,m,h){return function(g){function c(c){var a={};for(id in h.apiDefaults)if(id==c||id.iterator==c){a[id]=defaults[id];break}return a}function k(){if(f=={}&&5>e)e++,setTimeout(1E3,k());else if("success"==f.status)return c(g)}var f={},e=0;return null==h.apiDefaults||void 0==h.apiDefaults?(f={},m.setUrl("/api/v1"),m.get().success(function(c,a,d,b){defaults=c;for(var e in defaults)switch(e){case "organizations":dafaults[e].iterator= +"organization";break;case "jobs":defaults[e].iterator="job";break;case "users":defaults[e].iterator="user";break;case "teams":defaults[e].iterator="team";break;case "hosts":defaults[e].iterator="host";break;case "groups":defaults[e].iterator="group";break;case "projects":defaults[e].iterator="project"}h.apiDefaults=defaults;f={status:"success"}}).error(function(c,a,d,b){f={status:"error",msg:"Call to /api/v1 failed. GET returned status: "+a}}),k()):c(g)}}]);angular.module("ChildrenHelper",["RestServices","Utilities"]).factory("ToggleChildren",["Alert","Rest","GetBasePath","ProcessErrors","FormatDate",function(k,m,h,g,c){return function(c){function f(b){a[b].ngicon="icon-collapse-alt";for(var d=b+1;d\n';for(var u=0;u\n',f+='\n",f+='
\n',f+='A value is required!\n',f+='\n',f+="
\n",f+="\n",v=y.associated,y=l.fields[y.associated],a[v]="",f+='
\n',f+='\n",f+='
\n',f+='\n';for(var u=0;u\n',f+='\n",f+='
\n',f+='A value is required!\n',f+='\n',f+="
\n",f+="
\n",v=y.associated,y=k.fields[y.associated],a[v]="",f+='
\n',f+='\n",f+='
\n',f+='A value is required!\n',y.awPassMatch&&(f+='Must match Password value\n'),f+='\n',f+="
\n",f+="
\n";f+="\n";d=angular.element(document.getElementById("password-body"));d.html(f);m(d.contents())(a); -$("#password-modal").modal({})}}]).factory("SubmitJob",["PromptPasswords","$compile","Rest","$location","GetBasePath","CredentialList","LookUpInit","JobTemplateForm","ProcessErrors",function(l,m,h,g,c,p,f,e,k){return function(a){function d(a){b.credentialWatchRemove&&b.credentialWatchRemove();var d=(new Date).toISOString(),c=v?v:a.name;h.setUrl(a.related.jobs?a.related.jobs:a.related.job_template+"jobs/");h.post({name:c+" "+d,description:a.description,job_template:a.id,inventory:a.inventory,project:a.project, -playbook:a.playbook,credential:a.credential,forks:a.forks,limit:a.limit,verbosity:a.verbosity,extra_vars:a.extra_vars}).success(function(a,d,c,e){b.job_id=a.id;0 button to create a new user.',editInstructions:"Create a new credential from either the Teams tab or the Users tab. Teams and Users each have an associated set of Credentials.",index:!0, +escape(c[a+"SearchValue"]),c[a+"SearchParams"]+=l?"&order_by="+escape(l):""):c[a+"SearchParams"]=l?"order_by="+escape(l):"";c[a+"Page"]=0;b=/\/$/.test(b)?b+("?"+c[a+"SearchParams"]):b+("&"+c[a+"SearchParams"]);b=b.replace(/\&\&/,"&");b+=c[a+"PageSize"]?"&page_size="+c[a+"PageSize"]:"";h({scope:c,set:k,iterator:a,url:b})};c.sort=function(a){$(".list-header").each(function(b){$(this).attr("id")!=a+"-header"&&$(this).find("i").attr("class","icon-sort")});var b=$("#"+a+"-header i"),f="";b.hasClass("icon-sort")? +(b.removeClass("icon-sort"),b.addClass("icon-sort-up")):b.hasClass("icon-sort-up")?(b.removeClass("icon-sort-up"),b.addClass("icon-sort-down"),f="-"):b.hasClass("icon-sort-down")&&(b.removeClass("icon-sort-down"),b.addClass("icon-sort-up"));l=e.fields[a].searchField?f+e.fields[a].searchField:e.fields[a].sourceModel?f+e.fields[a].sourceModel+"__"+e.fields[a].sourceField:f+a;c.search(e.iterator)}}}]);angular.module("TeamHelper","RestServices Utilities OrganizationListDefinition SearchHelper PaginateHelper ListGenerator".split(" ")).factory("SetTeamListeners",["Alert","Rest",function(k,m){return function(h){var g=h.scope,c=h.set,k=h.iterator;g.$on("TeamResultFound",function(f,e,l){if(l.length==e.length){key="organization";property="organization_name";for(f=0;f button to create a new user.',editInstructions:"Create a new credential from either the Teams tab or the Users tab. Teams and Users each have an associated set of Credentials.",index:!0, hover:!0,fields:{name:{key:!0,label:"Name"},description:{label:"Description"},team:{label:"Team",ngBind:"credential.summary_fields.team.name",sourceModel:"team",sourceField:"name"},user:{label:"User",ngBind:"credential.summary_fields.user.usename",sourceModel:"user",sourceField:"username"}},actions:{add:{icon:"icon-plus",label:"Add",mode:"all",ngClick:"addCredential()",basePaths:["teams","users"],"class":"btn-success btn-small",awToolTip:"Create a new credential"}},fieldActions:{edit:{ngClick:"editCredential({{ credential.id }})", icon:"icon-edit",label:"Edit","class":"btn-small btn-success",awToolTip:"View/Edit credential"},"delete":{ngClick:"deleteCredential({{ credential.id }},'{{ credential.name }}')",icon:"icon-remove",label:"Delete","class":"btn-small btn-danger",awToolTip:"Delete credential"}}});angular.module("GroupListDefinition",[]).value("GroupList",{name:"groups",iterator:"group",selectTitle:"Add Group",editTitle:"Groups",index:!0,well:!1,fields:{name:{key:!0,label:"Name"},description:{label:"Description"}},actions:{add:{label:"Create New Group",icon:"icon-plus",mode:"all",ngClick:"createGroup()","class":"btn-success btn-small",awToolTip:"Create a new group"},help:{awPopOver:"Select groups by clicking on each group you wish to add. Add the selected groups to your inventory or to the selected parent group by clicking the Select button. You can also create a new group by clicking the Create New Group button.", dataPlacement:"left",dataContainer:"#form-modal",icon:"icon-question-sign",mode:"all","class":"btn-small btn-info",awToolTip:"Click for help",dataTitle:"Adding Groups"}},fieldActions:{edit:{label:"Edit",ngClick:"editGroup({{ group.id }})",icon:"icon-edit","class":"btn-small btn-success",awToolTip:"View/Edit group"},"delete":{label:"Delete",ngClick:"deleteGroup({{ group.id }},'{{ group.name }}')",icon:"icon-remove","class":"btn-small btn-danger",awToolTip:"Delete group"}}});angular.module("HostListDefinition",[]).value("HostList",{name:"hosts",iterator:"host",selectTitle:"Select Host",editTitle:"Hosts",index:!0,well:!0,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.",dataPlacement:"left",dataContainer:"#form-modal",icon:"icon-question-sign", @@ -291,96 +291,93 @@ project:{label:"Project",sourceModel:"project",sourceField:"name",ngBind:"permis icon:"icon-remove","class":"btn-small btn-danger",awToolTip:"Delete permission"}}});angular.module("ProjectsListDefinition",[]).value("ProjectList",{name:"projects",iterator:"project",selectTitle:"Add Project",editTitle:"{{ name }}",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:{label:"Add",icon:"icon-plus",mode:"all",ngClick:"addProject()","class":"btn-success btn-small",awToolTip:"Create a new project"}}, fieldActions:{edit:{label:"Edit",ngClick:"editProject({{ project.id }})",icon:"icon-edit","class":"btn-small btn-success",awToolTip:"View/edit project"},"delete":{label:"Delete",ngClick:"deleteProject({{ project.id }},'{{ project.name }}')",icon:"icon-remove","class":"btn-small btn-danger",awToolTip:"Delete project"}}});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:{label:"Add", icon:"icon-plus",mode:"all",ngClick:"addTeam()","class":"btn-success btn-small",awToolTip:"Create a new team"}},fieldActions:{edit:{label:"Edit",ngClick:"editTeam({{ team.id }})",icon:"icon-edit","class":"btn-small btn-success",awToolTip:"View/Edit team"},"delete":{label:"Delete",ngClick:"deleteTeam({{ team.id }},'{{ team.name }}')",icon:"icon-remove","class":"btn-small btn-danger",awToolTip:"Delete team"}}});angular.module("UserListDefinition",[]).value("UserList",{name:"users",iterator:"user",selectTitle:"Add Users",editTitle:"Users",selectInstructions:'Check the Select checkbox next to each user to be added, and click Finished when done. Use the green button to create a new user.',index:!0,hover:!0,fields:{username:{key:!0,label:"Username"},first_name:{label:"First Name"},last_name:{label:"Last Name"}},actions:{add:{label:"Add",icon:"icon-plus",mode:"all",ngClick:"addUser()", -basePaths:["organizations","users"],"class":"btn-success btn-small",awToolTip:"Create a new user"}},fieldActions:{edit:{label:"Edit",ngClick:"editUser({{ user.id }})",icon:"icon-edit","class":"btn-small btn-success",awToolTip:"View/Edit user"},"delete":{label:"Delete",ngClick:"deleteUser({{ user.id }},'{{ user.username }}')",icon:"icon-remove","class":"btn-small btn-danger",awToolTip:"Delete user"}}});angular.module("ApiLoader",["ngCookies"]).factory("LoadBasePaths",["$http","$rootScope","$cookieStore","ProcessErrors",function(l,m,h,g){return function(){l.get("/api/").success(function(c,p,f,e){var k=c.current_version;l.get(k).success(function(a,c,b,e){a.base=k;m.defaultUrls=a;h.remove("api");h.put("api",a)}).error(function(a,c,b,e){m.defaultUrls={status:"error"};g(null,a,c,null,{hdr:"Error",msg:"Failed to read "+k+". GET status: "+c})})}).error(function(c,h,f,e){m.defaultUrls={status:"error"}; -g(null,c,h,null,{hdr:"Error",msg:"Failed to read /api. GET status: "+h})})}}]).factory("GetBasePath",["$rootScope","$cookieStore","LoadBasePaths",function(l,m,h){return function(g){null==l.defaultUrls||void 0==l.defaultUrls?(g=m.get("api")[g],h()):g=l.defaultUrls[g];return g}}]);angular.module("AuthService",["ngCookies"]).factory("Authorization",["$http","$rootScope","$location","$cookieStore",function(l,m,h,g){return{setToken:function(c){var h=new Date;h.setTime(h.getTime()+1E3*$AnsibleConfig.session_timeout);g.remove("token");g.remove("token_expire");g.put("token",c);g.put("token_expire",h.getTime());m.userLoggedIn=!0},isTokenValid:function(){var c=!1;if(g.get("token")&&g.get("token_expire")){var h=g.get("token"),f=new Date(g.get("token_expire"));new DateparseInt(m.attr("max"))){g.$setValidity("max",!1);return}return c}g.$setValidity("integer", -!1)})}}}).directive("awRequiredWhen",function(){return{require:"ngModel",link:function(l,m,h,g){function c(){var c=m.val();validity=!0;l[h.awRequiredWhen]&&(null==m.attr("required")||void 0==m.attr("required"))?$(m).attr("required","required"):l[h.awRequiredWhen]||m.removeAttr("required");if(l[h.awRequiredWhen]&&(void 0==c||null==c||""==c))validity=!1;g.$setValidity("required",validity)}l[h.awRequiredWhen]=h.awrequiredInit;c();l.$watch(h.awRequiredWhen,function(){c()});l.$watch($(m).attr("name"), -function(){c()})}}}).directive("awlookup",["Rest",function(l){return{require:"ngModel",link:function(m,h,g,c){c.$parsers.unshift(function(g){if(""!==g){var f=h.attr("data-url"),f=f.replace(/\:value/,escape(g));m[h.attr("data-source")]=null;l.setUrl(f);l.get().then(function(e){e=e.data.results;if(0parseInt(m.attr("max"))){g.$setValidity("max",!1);return}return c}g.$setValidity("integer", +!1)})}}}).directive("awRequiredWhen",function(){return{require:"ngModel",link:function(k,m,h,g){function c(){var c=m.val();validity=!0;k[h.awRequiredWhen]&&(null==m.attr("required")||void 0==m.attr("required"))?$(m).attr("required","required"):k[h.awRequiredWhen]||m.removeAttr("required");if(k[h.awRequiredWhen]&&(void 0==c||null==c||""==c))validity=!1;g.$setValidity("required",validity)}k[h.awRequiredWhen]=h.awrequiredInit;c();k.$watch(h.awRequiredWhen,function(){c()});k.$watch($(m).attr("name"), +function(){c()})}}}).directive("awlookup",["Rest",function(k){return{require:"ngModel",link:function(m,h,g,c){c.$parsers.unshift(function(g){if(""!==g){var f=h.attr("data-url"),f=f.replace(/\:value/,escape(g));m[h.attr("data-source")]=null;k.setUrl(f);k.get().then(function(e){e=e.data.results;if(0\n");d=d+('\n";b+='
\n";b+="\n"}if("textarea"==a.type&&(!a.readonly||a.readonly&&"edit"==d.mode)){b+='
\n";b+=' ');b+=a.label+"\n";b+='
\n';if("variables"==c||"extra_vars"==c||"inventory_variables"==c)b+='
Parse as:
\n';b+="
\n";if("add"==d.mode&&a.addRequired||"edit"==d.mode&&a.editRequired)b+='A value is required!\n';b+='\n';b+="
\n";b+="
\n"}if("select"==a.type&&(!a.readonly||a.readonly&&"edit"==d.mode)){b+='
\n";b+='\n";b+='
\n';b+="
\n";if("add"==d.mode&&a.addRequired||"edit"==d.mode&&a.editRequired)b+='A value is required!\n';b+='\n';b+="
\n";b+="
\n"}if("number"==a.type&&(!a.readonly||a.readonly&&"edit"==d.mode)){b+='
\n"; +b+='\n";b+='
\n';b+=a.slider?'
\n':"";b+='A value is required!\n';a.integer&&(b+='Must be an integer value\n');if(a.min||a.max)b+='Must be in range '+a.min+" to "+a.max+"\n";b+='\n';b+="
\n";b+="
\n"}if("checkbox"==a.type&&(!a.readonly||a.readonly&&"edit"==d.mode))b+='
\n",b+='
\n', +b+='
\n",b+="
\n";if("radio"==a.type&&(!a.readonly|| +a.readonly&&"edit"==d.mode)){for(var b=b+'
\n",b=b+('\n"),b=b+'
\n',e=0;e",b+='A value is required!

\n';b+='

\n'; +b+="
\n";b+="
\n"}if("hidden"==a.type&&("edit"==d.mode&&a.includeOnEdit||"add"==d.mode&&a.includeOnAdd))b+='';if("lookup"==a.type&&(void 0==a.excludeMode||a.excludeMode!=d.mode)){b+='
\n";b+='\n";b+='
\n';b+='
\n';b+= +'\n';b+='A value is required!\n';b+='Value not found\n';b+='\n';b+="
\n";b+="
\n"}if("custom"==a.type&&(!a.readonly||a.readonly&&"edit"==d.mode))b+='
\n",b+='\n",b+='
\n',b+=a.control,b+="
\n",b+="
\n";return b},build:function(c){var a="";this.modal||(a+='\n");if(!this.modal&&this.form.statusFields){a+='
\n'; +if(this.form.statusActions){var a=a+'
\n',d;for(action in this.form.statusActions)d=this.form.statusActions[action],a+="
\n";a+='
\n'}var a= +a+'
\n',b;for(b in this.form.statusFields)d=this.form.statusFields[b],a+=this.buildField(b,d,c);a+="
\x3c!-- status fields --\x3e\n";a+="
\x3c!-- well --\x3e\n"}if(this.form.fieldsAsHeader){a+='
\n';a+='
\n';for(b in this.form.fields)d=this.form.fields[b],a+=this.headerField(b,d,c);a+="
\n";a+="
\n"}else{this.form.collapse&&this.form.collapseMode== +c.mode&&(a+='
\n",a+="
\n");this.has("well")&&(a+='
\n');a+='
\n';a+='
{{ flashMessage }}
\n'; +if(this.form.twoColumns){a+='
\n';a+='
\n';for(b in this.form.fields)d=this.form.fields[b],1==d.column&&(a+=this.buildField(b,d,c));a+="
\x3c!-- column 1 --\x3e\n";a+='
\n';for(b in this.form.fields)d=this.form.fields[b],2==d.column&&(a+=this.buildField(b,d,c));a+="
\x3c!-- column 2 --\x3e\n";a+="
\x3c!-- inner row --\x3e\n"}else for(b in this.form.fields)d=this.form.fields[b],a+=this.buildField(b,d,c);if(!this.modal){this.has("buttons")&& +(a+=this.form.twoColumns?"
":"",a+='
\n',a+='
\n');for(var e in this.form.buttons)d=this.form.buttons[e],a+="
\n",a+="
\n");a+="
\n"}this.has("well")&&(a+="
\n");this.form.collapse&&this.form.collapseMode==c.mode&&(a+="
\n",a+="
\n")}if(!this.modal&&this.form.items)for(itm in this.form.items){a+='
\n';a+=g({iterator:this.form.items[itm].iterator,template:this.form.items[itm],mini:!1,label:"Filter Events"});a+='
Viewing {{ '+ +this.form.items[itm].iterator+"Page + 1 }} of {{ "+this.form.items[itm].iterator+"Count }}
\n";a+="
\n";a+='\n";a+='
\n';for(b in this.form.items[itm].fields)d=this.form.items[itm].fields[b],a+=this.buildField(b,d,c);a+="
\n";a+='\n";a+="
\x3c!-- well --\x3e\n"}"inventory"==this.form.name&&"edit"==c.mode?a+=this.buildTree(c):!this.modal&&(c.related&&this.form.related)&&(a+=this.buildCollections(c));return a},buildTree:function(f){var a=1,d=this.form;html='
\n';html+="

Inventory Content

\n"; +html+="
\n";for(var b in d.related){if("tree"==d.related[b].type)html+='
',html+='
',html+='',html+='', +html+='',html+="
\n",html+='
\n',html+='
',html+='
\n', +html+="
\n";else{html+='
\n';html+='
\n';html+='

'+d.related[b].title+"

\n";html+=g({iterator:d.related[b].iterator,template:d.related[b],mini:!0});html+='
\n';for(var h in d.related[b].actions)html+='\n";html+="
\n";html+='
\n';html+= +'\n';html+="\n";html+="\n";html+="\n";for(var k in d.related[b].fields)html+='\n";var m=1,p=d.related[b].base?d.related[b].base:b,p=p.replace(/^\//,"");for(k in d.related[b].fields)m++,html+=e({list:d.related[b],fld:k,options:f,base:p});html+='";html+="\n";html+='\n'; +html+='\n';html+="\n";html+='\n';html+='\n';html+="\n";html+="\n";html+="
#"+d.related[b].fields[k].label,html+=' \n';html+="{{ $index + ("+d.related[b].iterator+"Page * "+d.related[b].iterator+"PageSize) + 1 }}.';for(h in d.related[b].fieldActions)html+=' ";html+="
No records matched your search.
Loading...
\n";html+="
\n";html+="
\n";html+=c({set:b,iterator:d.related[b].iterator,mini:!0})}a++}html+="
\n";return html+="
\n"},buildCollections:function(f){var a= +1,d=this.form;html='
\n';for(var b in d.related)if("collection"==d.related[b].type){html+="

"+d.related[b].title+"

\n";html+="
\n";d.related[b].instructions&&(html+='
\n',html+='\n',html+="Hint: "+d.related[b].instructions+"\n",html+="
\n");html+='
\n';html+=g({iterator:d.related[b].iterator, +template:d.related[b],mini:!0});html+='
\n';for(var h in d.related[b].actions){var k=d.related[b].actions[h];html+='\n"}html+="
\n";html+='
\n'; +html+='\n';html+="\n";html+="\n";html+=void 0==d.related[b].index||!1!==d.related[b].index?"\n":"";for(var m in d.related[b].fields)html+='\n";var p=1,k=d.related[b].base?d.related[b].base:b,k=k.replace(/^\//,"");for(m in d.related[b].fields)p++,html+=e({list:d.related[b],fld:m,options:f,base:k});html+='\n';html+="\n";html+='\n';html+='\n';html+="\n";html+="\n";html+="
#"+d.related[b].fields[m].label,html+=' \n';if(void 0==d.related[b].index||!1!==d.related[b].index)html+="{{ $index + ("+d.related[b].iterator+"Page * "+d.related[b].iterator+"PageSize) + 1 }}.'; +for(h in d.related[b].fieldActions)k=d.related[b].fieldActions[h],html+='
No records matched your search.
Loading...
\n";html+="
\n";html+="
\n";html+=c({set:b,iterator:d.related[b].iterator,mini:!0});html+="
\n";a++}html+="

\n";return html+="

\n"}}}]);angular.module("GeneratorHelpers",["GeneratorHelpers"]).factory("Attr",function(){return function(k,m){var h;h="string"===typeof k[m]?k[m].replace(/[\'\"]/g,"""):k[m];switch(m){case "ngClick":h='ng-click="'+h+'" ';break;case "ngOptions":h='ng-options="'+h+'" ';break;case "ngClass":h='ng-class="'+h+'" ';break;case "ngChange":h='ng-change="'+h+'" ';break;case "ngDisabled":h='ng-disabled="'+h+'" ';break;case "ngShow":h='ng-show="'+h+'" ';break;case "ngHide":h='ng-hide="'+h+'" ';break;case "ngBind":h= +'ng-bind="'+h+'" ';break;case "trueValue":h='ng-true-value="'+h+'" ';break;case "falseValue":h='ng-false-value="'+h+'" ';break;case "awToolTip":h='aw-tool-tip="'+h+'" ';break;case "awPopOver":h=' '}}).factory("Column",["Attr", +"Icon",function(k,m){return function(h){var g=h.list,c=h.fld,p=h.options;h=h.base;var f=g.fields[c],e;e="\n";e+=f.ngShow?"":"";g.hasChildren&&f.hasChildren&&(e+=' ");if((f.key||f.link||f.linkTo||f.ngClick)&&"lookup"!=p.mode&&"select"!=p.mode)if(f.linkTo)e+='';else if(f.ngClick)e+='';else if(void 0==f.link||f.link)e+='';f.ngShowIcon?e+=' ':f.icon&&(e+=m(f.icon)+" ");if(void 0==f.showValue||!0==f.showValue)e=f.ngBind?e+("{{ "+f.ngBind+" }}"):e+("{{"+g.iterator+"."+c+"}}"); +f.text&&(e+=f.text);g.hasChildren&&f.hasChildren&&(e+="");if((f.key||f.link||f.linkTo||f.ngClick)&&"lookup"!=p.mode&&"select"!=p.mode)e+="";e+=f.ngShow?"":"";e+=f.appendHTML?'
\n':"";return e+"\n"}}]).factory("SearchWidget",function(){return function(k){var m=k.iterator,h=k.template,g=k.mini;k=k.label?k.label:null;k='
\n'+ +(k?"":"");k+='
\n';k+='
\n';k+='\n";k+='\n";k+="
\n";k+=' 0" ';c+=">Page: {{ "+h+"Page + 1 }} of {{ "+h+"PageCount }}
\n";c+="\n";return c+="
\n"}});angular.module("ListGenerator",["GeneratorHelpers"]).factory("GenerateList",["$location","$compile","$rootScope","SearchWidget","PaginateWidget","Attr","Icon","Column",function(k,m,h,g,c,p,f,e){return{setList:function(c){this.list=c},attr:p,icon:f,has:function(c){return this.form[c]&&null!=this.form[c]&&void 0!=this.form[c]?!0:!1},hide:function(){$("#lookup-modal").modal("hide")},inject:function(c,a){var d="lookup"==a.mode?angular.element(document.getElementById("lookup-modal-body")):a.id?angular.element(document.getElementById(a.id)): angular.element(document.getElementById("htmlTemplate"));this.setList(c);d.html(this.build(a));this.scope=d.scope();m(d)(this.scope);"lookup"==a.mode&&(this.scope.lookupHeader=a.hdr,$("#lookup-modal").modal({backdrop:"static",keyboard:!1}));return this.scope},build:function(f){var a="",d=this.list;if("lookup"!=f.mode&&(void 0==f.breadCrumbs||!0==f.breadCrumbs))a+='\n";"select"==f.mode&&d.selectInstructions?(a+='
\n',a+='\n',a+="Hint: "+d.selectInstructions+"\n",a+="
\n"):"edit"==f.mode&&d.editInstructions&&(a+='
\n',a+='\n', -a+="Hint: "+d.editInstructions+"\n",a+="
\n");if("lookup"!=f.mode&&(void 0==d.well||"true"==d.well))a+='
\n';a="lookup"==f.mode||void 0!=f.id?a+g({iterator:d.iterator,template:d,mini:!0}):a+g({iterator:d.iterator,template:d,mini:!1});if("lookup"!=f.mode){var b=l.path().replace(/^\//,"").split("/")[0],a=a+'
\n';for(action in d.actions)if("all"==d.actions[action].mode||d.actions[action].mode==f.mode)if(void 0==d.actions[action].basePaths|| -d.actions[action].basePaths&&-1"+this.attr(d.actions[action],"icon"),a+=d.actions[action].label?" "+d.actions[action].label:"",a+=" ";if("select"==f.mode&&(void 0==f.selectButton||!0==f.selectButton))a+=' \n'; +a+="Hint: "+d.editInstructions+"\n",a+="
\n");if("lookup"!=f.mode&&(void 0==d.well||"true"==d.well))a+='
\n';a="lookup"==f.mode||void 0!=f.id?a+g({iterator:d.iterator,template:d,mini:!0}):a+g({iterator:d.iterator,template:d,mini:!1});if("lookup"!=f.mode){var b=k.path().replace(/^\//,"").split("/")[0],a=a+'
\n';for(action in d.actions)if("all"==d.actions[action].mode||d.actions[action].mode==f.mode)if(void 0==d.actions[action].basePaths|| +d.actions[action].basePaths&&-1"+this.attr(d.actions[action],"icon"),a+=d.actions[action].label?" "+d.actions[action].label:"",a+=" ";if("select"==f.mode&&(void 0==f.selectButton||!0==f.selectButton))a+=' \n'; a+="
\n"}a+='";a+=d.fields[h].label;if(void 0===d.fields[h].nosort||!0!==d.fields[h].nosort)a+=' Select":"edit"==f.mode&&(a+="\n");a+="\n";a+="\n";a+="\n";a+="\n");var m=2,b=d.base?d.base: d.name,b=b.replace(/^\//,"");for(h in d.fields)if(m++,(void 0==d.fields[h].searchOnly||!1==d.fields[h].searchOnly)&&!("lookup"==f.mode&&void 0!==d.fields[h].excludeModal&&!0==d.fields[h].excludeModal))a+=e({list:d,fld:h,options:f,base:b});if("select"==f.mode)a+='';else if("edit"==f.mode){a+='"}a+="\n";a+='\n';a+='\n';a+="\n";a+='\n';a+='\n';a+="\n";a+="\n";a+="
';for(action in d.fieldActions)a+=' ";a+="
No records matched your search.
Loading...
\n";if("lookup"!=f.mode&&(void 0==d.well||"true"== -d.well))a+="
\n";return a="lookup"==f.mode||f.id&&"form-modal-body"==f.id?a+c({set:d.name,iterator:d.iterator,mini:!0,mode:"lookup"}):a+c({set:d.name,iterator:d.iterator,mini:!0})}}}]);angular.module("PromptDialog",["Utilities"]).factory("Prompt",["Alert",function(l){return function(l){var h=angular.element(document.getElementById("prompt-modal")),g=h.scope();g.promptHeader=l.hdr;g.promptBody=l.body;var c=null==l["class"]||void 0==l["class"]?"btn-danger":l["class"];$("#prompt-action-btn").addClass(c);g.promptAction=l.action;$(h).modal({backdrop:"static",keyboard:!0,show:!0})}}]);angular.module("RestServices",["ngCookies","AuthService"]).factory("Rest",["$http","$rootScope","$cookieStore","Authorization",function(l,m,h,g){return{setUrl:function(c){this.url=c},auth:{Authorization:"Token "+g.getToken()},pReplace:function(){var c,g;for(c in this.params)g=RegExp("\\:"+c,"gm"),g.test(this.url)&&(this.url=this.url.replace(g,this.params[c]),delete this.params[c])},get:function(c){c=c?c:{};this.params=c.params?c.params:null;this.pReplace();return l({method:"GET",url:this.url,headers:this.auth, -params:this.params})},post:function(c){return l({method:"POST",url:this.url,headers:this.auth,data:c})},put:function(c){return l({method:"PUT",url:this.url,headers:this.auth,data:c})},destroy:function(c){return l({method:"DELETE",url:this.url,headers:this.auth,data:c})}}}]);angular.module("Utilities",[]).factory("ClearScope",function(){return function(l){l=document.getElementById(l);angular.element(l).scope().$destroy()}}).factory("ToggleClass",function(){return function(l,m){$(l)&&$(l).hasClass(m)?$(l).removeClass(m):$(l)&&$(l).addClass(m)}}).factory("Alert",["$rootScope","$location",function(l,m){return function(h,g,c,m,f,e){if(f){if(l.alertHeader2=h,l.alertBody2=g,l.alertClass2=c?c:"alert-error",$("#alert-modal2").modal({show:!0,keyboard:!0,backdrop:"static"}),l.disableButtons2= -e?!0:!1,m)$("#alert-modal2").on("hidden",function(){m()})}else if(l.alertHeader=h,l.alertBody=g,l.alertClass=c?c:"alert-error",$("#alert-modal").modal({show:!0,keyboard:!0,backdrop:"static"}),l.disableButtons=e?!0:!1,m)$("#alert-modal").on("hidden",function(){m()})}}]).factory("ProcessErrors",["$log","Alert",function(l,m){return function(h,g,c,l,f){if(403==c)h="The API responded with a 403 Access Denied error. You do not have permission to perform the requested action. ",h=g.detail?h+("Detail: "+ -g.detail):h+"Please contact your system administrator.",m("Access Denied",h);else if(g.non_field_errors)m("Error!",g.non_field_errors);else if(g.detail)m(f.hdr,f.msg+" "+g.detail);else if(g.__all__)m("Error!",g.__all__);else if(l){c=!1;for(var e in l.fields)l.fields[e].realName&&g[l.fields[e].realName]&&(h[e+"_api_error"]=g[l.fields[e]][0],c=!0),l.fields[e].sourceModel?g[e]&&(h[l.fields[e].sourceModel+"_"+l.fields[e].sourceField+"_api_error"]=g[e][0],c=!0):g[e]&&(h[e+"_api_error"]=g[e][0],c=!0);!c&& -f&&m(f.hdr,f.msg)}else m(f.hdr,f.msg)}}]).factory("LoadBreadCrumbs",["$rootScope","$routeParams","$location",function(l,m,h,g){return function(c){if(null!==c&&void 0!==c){for(var g=!1,f=0;f'; - if (field.awPopOver) { - html += " "; - } + html += (field.awPopOver) ? this.attr(field, 'awPopOver') : ""; html += (field.icon) ? this.icon(field.icon) : ""; html += field.label + '' + "\n"; html += "
\n"; @@ -272,13 +266,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies']) html += (field.ngShow) ? this.attr(field,'ngShow') : ""; html += ">\n"; html += "' + "\n"; html += "
\n"; @@ -323,12 +311,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies']) html += (field.ngShow) ? this.attr(field,'ngShow') : ""; html += ">\n"; html += "' + "\n"; html += "
\n"; html += "