Fix serving static files
This commit is contained in:
parent
c0157dace5
commit
8de7c629e2
33
fix-serving-static-files.patch
Normal file
33
fix-serving-static-files.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 272009b4e3582f9b7a045c3f4ee867f9e943ee9e Mon Sep 17 00:00:00 2001
|
||||||
|
From: rpm-build <rpm-build>
|
||||||
|
Date: Mon, 27 Nov 2023 09:34:46 +0800
|
||||||
|
Subject: [PATCH] fix serving static files
|
||||||
|
|
||||||
|
---
|
||||||
|
pcs/daemon/app/ui.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pcs/daemon/app/ui.py b/pcs/daemon/app/ui.py
|
||||||
|
index cad6824..11440a0 100644
|
||||||
|
--- a/pcs/daemon/app/ui.py
|
||||||
|
+++ b/pcs/daemon/app/ui.py
|
||||||
|
@@ -67,14 +67,14 @@ class Logout(app_session.Mixin, AjaxMixin, BaseHandler):
|
||||||
|
|
||||||
|
class StaticFileMayBe(StaticFile):
|
||||||
|
# pylint: disable=abstract-method
|
||||||
|
- def get(self, *args, **kwargs):
|
||||||
|
+ async def get(self, *args, **kwargs):
|
||||||
|
# pylint: disable=signature-differs
|
||||||
|
# pylint: disable=invalid-overridden-method
|
||||||
|
if not os.path.isdir(str(self.root)):
|
||||||
|
# spa is probably not installed
|
||||||
|
self.set_status(404, "Not Found")
|
||||||
|
return None
|
||||||
|
- return super().get(*args, **kwargs)
|
||||||
|
+ return await super().get(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
def get_routes(
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
6
pcs.spec
6
pcs.spec
@ -1,6 +1,6 @@
|
|||||||
Name: pcs
|
Name: pcs
|
||||||
Version: 0.11.2
|
Version: 0.11.2
|
||||||
Release: 9
|
Release: 10
|
||||||
License: GPLv2 and BSD-2-Clause and ASL 2.0 and MIT
|
License: GPLv2 and BSD-2-Clause and ASL 2.0 and MIT
|
||||||
URL: https://github.com/ClusterLabs/pcs
|
URL: https://github.com/ClusterLabs/pcs
|
||||||
Summary: Pacemaker Configuration System
|
Summary: Pacemaker Configuration System
|
||||||
@ -49,6 +49,7 @@ Patch8: tests-fix-datetime-race-condition.patch
|
|||||||
Patch9: Fix-CVE-2022-1049.patch
|
Patch9: Fix-CVE-2022-1049.patch
|
||||||
Patch10: Fix-CVE-2022-2735.patch
|
Patch10: Fix-CVE-2022-2735.patch
|
||||||
Patch11: improve-error-messages-in-pcs-resource-move.patch
|
Patch11: improve-error-messages-in-pcs-resource-move.patch
|
||||||
|
Patch12: fix-serving-static-files.patch
|
||||||
# git for patches
|
# git for patches
|
||||||
BuildRequires: git-core
|
BuildRequires: git-core
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
@ -411,6 +412,9 @@ run_all_tests
|
|||||||
%license pyagentx_LICENSE.txt
|
%license pyagentx_LICENSE.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 23 2023 bixiaoyan <bixiaoyan@kylinos.cn> - 0.11.2-10
|
||||||
|
- Fix serving static files
|
||||||
|
|
||||||
* Wed Oct 25 2023 zouzhimin <zouzhimin@kylinos.cn> - 0.11.2-9
|
* Wed Oct 25 2023 zouzhimin <zouzhimin@kylinos.cn> - 0.11.2-9
|
||||||
- improve error messages in pcs resource move
|
- improve error messages in pcs resource move
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user