mirror of
				https://github.com/arcan1s/ahriman.git
				synced 2025-11-03 23:33:41 +00:00 
			
		
		
		
	fix part of warnings for sphinx
This commit is contained in:
		@ -35,11 +35,11 @@ class JinjaTemplate:
 | 
			
		||||
 | 
			
		||||
    It uses jinja2 templates for report generation, the following variables are allowed:
 | 
			
		||||
 | 
			
		||||
        homepage - link to homepage, string, optional
 | 
			
		||||
        link_path - prefix fo packages to download, string, required
 | 
			
		||||
        has_package_signed - True in case if package sign enabled, False otherwise, required
 | 
			
		||||
        has_repo_signed - True in case if repository database sign enabled, False otherwise, required
 | 
			
		||||
        packages - sorted list of packages properties, required
 | 
			
		||||
        * homepage - link to homepage, string, optional
 | 
			
		||||
        * link_path - prefix fo packages to download, string, required
 | 
			
		||||
        * has_package_signed - True in case if package sign enabled, False otherwise, required
 | 
			
		||||
        * has_repo_signed - True in case if repository database sign enabled, False otherwise, required
 | 
			
		||||
        * packages - sorted list of packages properties, required
 | 
			
		||||
            * architecture, string
 | 
			
		||||
            * archive_size, pretty printed size, string
 | 
			
		||||
            * build_date, pretty printed datetime, string
 | 
			
		||||
@ -52,8 +52,8 @@ class JinjaTemplate:
 | 
			
		||||
            * name, string
 | 
			
		||||
            * url, string
 | 
			
		||||
            * version, string
 | 
			
		||||
        pgp_key - default PGP key ID, string, optional
 | 
			
		||||
        repository - repository name, string, required
 | 
			
		||||
        * pgp_key - default PGP key ID, string, optional
 | 
			
		||||
        * repository - repository name, string, required
 | 
			
		||||
 | 
			
		||||
    Attributes:
 | 
			
		||||
      homepage(Optional[str]): homepage link if any (for footer)
 | 
			
		||||
 | 
			
		||||
@ -34,14 +34,14 @@ class IndexView(BaseView):
 | 
			
		||||
 | 
			
		||||
    It uses jinja2 templates for report generation, the following variables are allowed:
 | 
			
		||||
 | 
			
		||||
        architecture - repository architecture, string, required
 | 
			
		||||
        auth - authorization descriptor, required
 | 
			
		||||
        * architecture - repository architecture, string, required
 | 
			
		||||
        * auth - authorization descriptor, required
 | 
			
		||||
            * authenticated - alias to check if user can see the page, boolean, required
 | 
			
		||||
            * control - HTML to insert for login control, HTML string, required
 | 
			
		||||
            * enabled - whether authorization is enabled by configuration or not, boolean, required
 | 
			
		||||
            * username - authenticated username if any, string, null means not authenticated
 | 
			
		||||
        index_url - url to the repository index, string, optional
 | 
			
		||||
        packages - sorted list of packages properties, required
 | 
			
		||||
        * index_url - url to the repository index, string, optional
 | 
			
		||||
        * packages - sorted list of packages properties, required
 | 
			
		||||
            * base, string
 | 
			
		||||
            * depends, sorted list of strings
 | 
			
		||||
            * groups, sorted list of strings
 | 
			
		||||
@ -52,12 +52,12 @@ class IndexView(BaseView):
 | 
			
		||||
            * timestamp, pretty printed datetime, string
 | 
			
		||||
            * version, string
 | 
			
		||||
            * web_url, string
 | 
			
		||||
        repository - repository name, string, required
 | 
			
		||||
        service - service status properties, required
 | 
			
		||||
        * repository - repository name, string, required
 | 
			
		||||
        * service - service status properties, required
 | 
			
		||||
            * status, string based on enum value
 | 
			
		||||
            * status_color, string based on enum value
 | 
			
		||||
            * timestamp, pretty printed datetime, string
 | 
			
		||||
        version - ahriman version, string, required
 | 
			
		||||
        * version - ahriman version, string, required
 | 
			
		||||
 | 
			
		||||
    Attributes:
 | 
			
		||||
      GET_PERMISSION(UserAccess): (class attribute) get permissions of self
 | 
			
		||||
 | 
			
		||||
@ -38,9 +38,10 @@ class AddView(BaseView):
 | 
			
		||||
        add new package
 | 
			
		||||
 | 
			
		||||
        JSON body must be supplied, the following model is used:
 | 
			
		||||
        {
 | 
			
		||||
            "packages": "ahriman"   # either list of packages or package name as in AUR
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        >>> {
 | 
			
		||||
        >>>     "packages": "ahriman"   # either list of packages or package name as in AUR
 | 
			
		||||
        >>> }
 | 
			
		||||
 | 
			
		||||
        Raises:
 | 
			
		||||
          HTTPBadRequest: if bad data is supplied
 | 
			
		||||
 | 
			
		||||
@ -38,9 +38,10 @@ class RemoveView(BaseView):
 | 
			
		||||
        remove existing packages
 | 
			
		||||
 | 
			
		||||
        JSON body must be supplied, the following model is used:
 | 
			
		||||
        {
 | 
			
		||||
            "packages": "ahriman",   # either list of packages or package name
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        >>> {
 | 
			
		||||
        >>>     "packages": "ahriman",   # either list of packages or package name
 | 
			
		||||
        >>> }
 | 
			
		||||
 | 
			
		||||
        Raises:
 | 
			
		||||
          HTTPBadRequest: if bad data is supplied
 | 
			
		||||
 | 
			
		||||
@ -38,9 +38,10 @@ class RequestView(BaseView):
 | 
			
		||||
        request to add new package
 | 
			
		||||
 | 
			
		||||
        JSON body must be supplied, the following model is used:
 | 
			
		||||
        {
 | 
			
		||||
            "packages": "ahriman"   # either list of packages or package name as in AUR
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        >>> {
 | 
			
		||||
        >>>     "packages": "ahriman"   # either list of packages or package name as in AUR
 | 
			
		||||
        >>> }
 | 
			
		||||
 | 
			
		||||
        Raises:
 | 
			
		||||
          HTTPBadRequest: if bad data is supplied
 | 
			
		||||
 | 
			
		||||
@ -51,9 +51,10 @@ class AhrimanView(BaseView):
 | 
			
		||||
        update service status
 | 
			
		||||
 | 
			
		||||
        JSON body must be supplied, the following model is used:
 | 
			
		||||
        {
 | 
			
		||||
            "status": "unknown",   # service status string, must be valid `BuildStatusEnum`
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        >>> {
 | 
			
		||||
        >>>     "status": "unknown",   # service status string, must be valid `BuildStatusEnum`
 | 
			
		||||
        >>> }
 | 
			
		||||
 | 
			
		||||
        Raises:
 | 
			
		||||
          HTTPBadRequest: if bad data is supplied
 | 
			
		||||
 | 
			
		||||
@ -82,11 +82,12 @@ class PackageView(BaseView):
 | 
			
		||||
        update package build status
 | 
			
		||||
 | 
			
		||||
        JSON body must be supplied, the following model is used:
 | 
			
		||||
        {
 | 
			
		||||
            "status": "unknown",   # package build status string, must be valid `BuildStatusEnum`
 | 
			
		||||
            "package": {}  # package body (use `dataclasses.asdict` to generate one), optional.
 | 
			
		||||
                           # Must be supplied in case if package base is unknown
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        >>> {
 | 
			
		||||
        >>>     "status": "unknown",   # package build status string, must be valid `BuildStatusEnum`
 | 
			
		||||
        >>>     "package": {}  # package body (use `dataclasses.asdict` to generate one), optional.
 | 
			
		||||
        >>>                    # Must be supplied in case if package base is unknown
 | 
			
		||||
        >>> }
 | 
			
		||||
 | 
			
		||||
        Raises:
 | 
			
		||||
          HTTPBadRequest: if bad data is supplied
 | 
			
		||||
 | 
			
		||||
@ -72,10 +72,11 @@ class LoginView(BaseView):
 | 
			
		||||
        login user to service
 | 
			
		||||
 | 
			
		||||
        either JSON body or form data must be supplied the following fields are required:
 | 
			
		||||
        {
 | 
			
		||||
            "username": "username"  # username to use for login
 | 
			
		||||
            "password": "pa55w0rd"  # password to use for login
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        >>> {
 | 
			
		||||
        >>>     "username": "username"  # username to use for login
 | 
			
		||||
        >>>     "password": "pa55w0rd"  # password to use for login
 | 
			
		||||
        >>> }
 | 
			
		||||
 | 
			
		||||
        Raises:
 | 
			
		||||
          HTTPFound: on success response
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user