function addSignalOwnerReadOnly(model){tabSignal.connect("models["+model+"].fields.beforeInit",(fields)=>{if(fields.owner){fields.owner.readOnly=true;}});}
const host_paths=['/host/','/group/{'+path_pk_key+'}/host/','/inventory/{'+path_pk_key+'}/host/','/inventory/{'+path_pk_key+'}/group/{group_id}/host/','/project/{'+path_pk_key+'}/inventory/{inventory_id}/host/',];host_paths.forEach(path=>{tabSignal.connect("views["+path+"].filters.beforeInit",filters=>{for(let key in filters){if(filters.hasOwnProperty(key)){let filter=filters[key];if(filter.name=='type'){filter.type='choices';filter.enum=[''].concat(app.models.Host.fields.type.options.enum);}}}});});['OneHost','OneInventory','GroupCreateMaster'].forEach(addSignalOwnerReadOnly);tabSignal.connect('allViews.inited',obj=>{let views=obj.views;let prefix='/inventory/{'+path_pk_key+'}';let constr=new SubViewWithOutApiPathConstructor(openapi_dictionary,app.models,{prefix:prefix});let group_host_paths=Object.keys(views).filter(path=>path.indexOf("/group/{"+path_pk_key+"}/host/")==0);group_host_paths.forEach(path=>{let new_path=prefix+path.replace('{'+path_pk_key+'}','{group_id}');let new_view=constr.generateSubView(views,path,new_path);views[new_path]=new_view;});});tabSignal.connect('allViews.inited',obj=>{let views=obj.views;let prefix='/project/{'+path_pk_key+'}/inventory/{inventory_id}';let constr=new SubViewWithOutApiPathConstructor(openapi_dictionary,app.models,{prefix:prefix});let group_host_paths=Object.keys(views).filter(path=>path.indexOf("/group/{"+path_pk_key+"}/host/")==0);group_host_paths.forEach(path=>{let new_path=prefix+path.replace('{'+path_pk_key+'}','{group_id}');let new_view=constr.generateSubView(views,path,new_path);views[new_path]=new_view;});});