def __init__(self, component): UIResource.__init__(self, component) self.component = component self.res_paths = component.web_resources.copy() self.res_paths.update({ 'auth_check' : self.res_paths['root'] + '?check=1' })
def __init__(self, ptype, component,capabilities): UIResource.__init__(self, component) self.dm = component.resolve(directorymanager) self.bd = component.resolve(BindingsDirectory) self.required_capabilities = capabilities self.to_remove = [ "start", "count","sort_attr","sort_desc"] self.ptype = ptype self.template_args = {}
def __init__(self, component,capabilities): UIResource.__init__(self, component) # maps from 'subset' param value to the # page and parameter string we need to use for # redirection self.subset_map = { "Host Names" : ("Hosts","name_glob"), "Host IPs" : ("Hosts","nwaddr_glob"), "Host MACs" : ("Hosts","dladdr_glob"), "Host Locations" : ("Hosts","location_name_glob"), "User Names" : ("Users","name_glob"), "Switch Names" : ("Switches","name_glob"), "Location Names" : ("Locations","name_glob") }
def __init__(self, component, res_root): UIResource.__init__(self, component) self.component = component self.res_paths = self.web_resources(res_root) self.resource_handlers = { self.res_paths.auth : self.handle_auth, self.res_paths.check_for_auth : self.handle_check_for_auth, self.res_paths.opening_pu : self.handle_opening_pu, self.res_paths.wait_for_pu : self.handle_wait_for_pu, self.res_paths.auth_status : self.handle_auth_status, self.res_paths.do_login : self.handle_do_login, self.res_paths.do_logout : self.handle_do_logout, self.res_paths.success : self.handle_success, self.res_paths.error : self.handle_error }
def _render_tmpl(self, request, name, *args, **kwargs): """Render mako template with base arguments """ rurl = (request.args.get("rurl") or ('',))[0] or '' proxy_cookie = (request.args.get("proxy_cookie") or ('',))[0] or '' if proxy_cookie == "": proxy_param = "" else: proxy_param = "&proxy_cookie=" + proxy_cookie return UIResource.render_tmpl(self, request, name, p=self.component.get_property, r=self.res_paths, rurl=rurl, proxy_cookie=proxy_cookie, proxy_param=proxy_param, rurl_disp=self._get_url_for_display(rurl), *args, **kwargs)
def _render_tmpl(self, request, name, *args, **kwargs): """Render mako template with base arguments """ rurl = (request.args.get("rurl") or ('', ))[0] or '' proxy_cookie = (request.args.get("proxy_cookie") or ('', ))[0] or '' if proxy_cookie == "": proxy_param = "" else: proxy_param = "&proxy_cookie=" + proxy_cookie return UIResource.render_tmpl( self, request, name, p=self.component.get_property, r=self.res_paths, rurl=rurl, proxy_cookie=proxy_cookie, proxy_param=proxy_param, rurl_disp=self._get_url_for_display(rurl), *args, **kwargs)
def __init__(self, component): UIResource.__init__(self, component)
def __init__(self, component, props_section_id): UIResource.__init__(self, component) self._props = Properties(component.storage, props_section_id) self._props_dirty = True self._registered_resources = {}
def __init__(self, component): UIResource.__init__(self, component) self.last_req_num = 0 self.simple_config = component.resolve(simple_config)
def __init__(self, component, file): UIResource.__init__(self, component) static.File.__init__(self, file)
def render_tmpl(self, request, name, *arg, **data): """Render mako template with componet config and resource paths""" return UIResource.render_tmpl(self, request, name, c=self.component.config, r=self.res_paths, *arg, **data)
def __init__(self, component,capabilities): UIResource.__init__(self, component) self.required_capabilities = capabilities self.vis_ws = component.resolve(visibility_ws) self.policy = component.resolve(PyPolicyComponent)
def __init__(self, component, capabilities): UIResource.__init__(self, component) self.required_capabilities = capabilities self.vis_ws = component.resolve(visibility_ws) self.policy = component.resolve(PyPolicyComponent)
def __init__(self, component): UIResource.__init__(self, component) self.component = component self.res_paths = component.web_resources.copy() self.res_paths.update( {'auth_check': self.res_paths['root'] + '?check=1'})