diff options
author | Sascha Roloff <sascha.roloff@huawei.com> | 2025-05-12 12:59:11 +0200 |
---|---|---|
committer | Sascha Roloff <sascha.roloff@huawei.com> | 2025-05-12 16:52:10 +0200 |
commit | 215b348553ed1b286a143b21e0c1582c71e8230c (patch) | |
tree | dd85bb0df84b6ddd2cddaf7b4b1b6627b7b18a56 /doc | |
parent | 5b3c6136e3e896019acb1bbc117615255c5f924a (diff) | |
download | justbuild-215b348553ed1b286a143b21e0c1582c71e8230c.tar.gz |
Invocation server: add css style file
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/invocations-http-server/server.py | 20 | ||||
-rw-r--r-- | doc/invocations-http-server/static/style.css | 13 | ||||
-rw-r--r-- | doc/invocations-http-server/templates/base.html | 1 | ||||
-rw-r--r-- | doc/invocations-http-server/templates/invocations.html | 2 |
4 files changed, 29 insertions, 7 deletions
diff --git a/doc/invocations-http-server/server.py b/doc/invocations-http-server/server.py index 7121ec75..bb9d2260 100755 --- a/doc/invocations-http-server/server.py +++ b/doc/invocations-http-server/server.py @@ -22,6 +22,7 @@ import werkzeug.routing import werkzeug.utils from werkzeug.wrappers import Request, Response +from werkzeug.middleware.shared_data import SharedDataMiddleware def core_config(conf): new_conf = {} @@ -442,6 +443,13 @@ class InvocationServer: return self.render("invocation.html", params) +def create_app(logsdir, **kwargs): + app = InvocationServer(logsdir, **kwargs) + app = SharedDataMiddleware(app, { + '/static': os.path.join(os.path.dirname(__file__), 'static') + }) + return app + if __name__ == '__main__': import sys from argparse import ArgumentParser @@ -472,10 +480,10 @@ if __name__ == '__main__': print("just-mr argument should be valid json, but %r is not: %s" % (args.just_mr, e), file=sys.stderr) sys.exit(1) - app = InvocationServer(args.DIR, - just_mr=just_mr, - graph=args.graph, - artifacts=args.artifacts, - meta=args.meta, - profile=args.profile) + app = create_app(args.DIR, + just_mr=just_mr, + graph=args.graph, + artifacts=args.artifacts, + meta=args.meta, + profile=args.profile) make_server(args.interface, args.port, app).serve_forever() diff --git a/doc/invocations-http-server/static/style.css b/doc/invocations-http-server/static/style.css new file mode 100644 index 00000000..163cd951 --- /dev/null +++ b/doc/invocations-http-server/static/style.css @@ -0,0 +1,13 @@ +body { + background: #e8eff0; + font-family: "Helvetica"; + font-size: large; +} +a { + color: #11557c; +} +h1, +h2, +h3 { + color: #11557c; +} diff --git a/doc/invocations-http-server/templates/base.html b/doc/invocations-http-server/templates/base.html index cf591652..d7a13f0b 100644 --- a/doc/invocations-http-server/templates/base.html +++ b/doc/invocations-http-server/templates/base.html @@ -4,6 +4,7 @@ <title> {% block heading %}Invocation Browser{% endblock %} </title> + <link rel="stylesheet" type="text/css" href="/static/style.css"> </head> <body> {% block content %} diff --git a/doc/invocations-http-server/templates/invocations.html b/doc/invocations-http-server/templates/invocations.html index a98babae..c5680240 100644 --- a/doc/invocations-http-server/templates/invocations.html +++ b/doc/invocations-http-server/templates/invocations.html @@ -8,7 +8,7 @@ Recent Invocations <h1>Invocations filtered by {{ filter_info | e }}</h1> {% else %} <h1>Recent Invocations</h1> -<b>Filter by:</b> +Filter by: <a href="/filterinvocations/noncached">only not fully cached</a> {% if context_filters %} <details> |