# SPDX-License-Identifier: GPL-3.0-or-later # Policy for serving the web UI from within mitmproxy. # # This file is part of Hydrilla&Haketilo. # # Copyright (C) 2022 Wojtek Kosior # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # # I, Wojtek Kosior, thereby promise not to sue for violation of this # file's license. Although I request that you do not make use this code # in a proprietary program, I am not going to enforce this in court. """ ..... """ # Enable using with Python 3.7. from __future__ import annotations import dataclasses as dc import typing as t from ...translations import smart_gettext as _ from .. import state from .. import http_messages from .. import web_ui from . import base @dc.dataclass(frozen=True) class WebUIPolicy(base.Policy): """....""" process_request: t.ClassVar[bool] = True priority: t.ClassVar[base.PolicyPriority] = base.PolicyPriority._THREE haketilo_state: state.HaketiloState def consume_request(self, request_info: http_messages.RequestInfo) \ -> http_messages.ProducedResponse: return web_ui.process_request(request_info, self.haketilo_state) @dc.dataclass(frozen=True, unsafe_hash=True) class WebUIPolicyFactory(base.PolicyFactory): """....""" def make_policy(self, haketilo_state: state.HaketiloState) -> WebUIPolicy: return WebUIPolicy(haketilo_state) input type='submit' value='search'/>
path: root/gnu/services/guix.scm
m?id=ced9da901f7e58fced9a822e8cdf44e394bc4d2f'>services: guix-build-coordinator: Include the system profile in PATH....
AgeCommit message (Expand)Author
2020-11-07services: guix: Fix Guix Build Coordinator substitute urls bug....Christopher Baines
2020-11-07services: guix: Remove the Gui
2017-10-06import: Use a 'file://' URL in 'alist->package' test....Ludovic Courtès
2017-09-28import: Add generic data to package converter....Ricardo Wurmus
2016-09-28import: utils: Refactor license->symbol....David Craven
2016-04-03build: Add a Guile custom test driver using SRFI-64....Mathieu Lirzin
2016-01-20tests: Move beatify-description tests to import-tests....Ben Woodcroft
Christopher Baines
2020-10-23services: guix-build-coordinator: Output the start script name....Christopher Baines
2020-10-23services: guix: Fix hooks gexp issue for the Guix Build Coordinator....Christopher Baines
2020-10-20services: guix: Fix coordinator agent....Mathieu Othacehe
2020-10-08services: guix: Don't use normalized codeset for Guix Data Service....Christopher Baines
2020-10-05services: guix: Add guix-build-coordinator-queue-builds-service-type....Christopher Baines
2020-10-05services: guix: Add guix-build-coordinator-agent-service-type....Christopher Baines
2020-10-05services: guix: Add guix-build-coordinator-service-type....Christopher Baines
2020-03-08services: guix-data-service: Allow passing extra options....Christopher Baines
2019-09-25services: Add the Guix Data Service....Christopher Baines