From nobody Fri Apr 19 07:13:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) client-ip=66.187.230.42; envelope-from=kimchi-devel-bounces@ovirt.org; helo=lists.ovirt.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) smtp.mailfrom=kimchi-devel-bounces@ovirt.org; Return-Path: Received: from lists.ovirt.org (lists.phx.ovirt.org [66.187.230.42]) by mx.zohomail.com with SMTPS id 1491260413268685.8797574974493; Mon, 3 Apr 2017 16:00:13 -0700 (PDT) Received: from lists.phx.ovirt.org (localhost [127.0.0.1]) by lists.ovirt.org (Postfix) with ESMTP id 4F67B820520; Mon, 3 Apr 2017 23:00:12 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lists.ovirt.org (Postfix) with ESMTPS id B07B38204D7 for ; Mon, 3 Apr 2017 22:59:59 +0000 (UTC) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v33Msmm1071105 for ; Mon, 3 Apr 2017 18:59:59 -0400 Received: from e24smtp03.br.ibm.com (e24smtp03.br.ibm.com [32.104.18.24]) by mx0a-001b2d01.pphosted.com with ESMTP id 29kubnj2cc-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 03 Apr 2017 18:59:58 -0400 Received: from localhost by e24smtp03.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Apr 2017 19:59:57 -0300 Received: from d24relay02.br.ibm.com (9.18.232.42) by e24smtp03.br.ibm.com (10.172.0.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 3 Apr 2017 19:59:55 -0300 Received: from d24av03.br.ibm.com (d24av03.br.ibm.com [9.8.31.95]) by d24relay02.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v33Mxsbi15138830 for ; Mon, 3 Apr 2017 19:59:54 -0300 Received: from d24av03.br.ibm.com (localhost [127.0.0.1]) by d24av03.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v33Mxtgw005330 for ; Mon, 3 Apr 2017 19:59:55 -0300 Received: from alinefm-TP440.ibmmodules.com ([9.85.153.233]) by d24av03.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v33MxqTd005299 for ; Mon, 3 Apr 2017 19:59:54 -0300 X-Original-To: kimchi-devel@ovirt.org From: Aline Manera To: Kimchi Devel Date: Mon, 3 Apr 2017 19:59:51 -0300 X-Mailer: git-send-email 2.9.3 X-TM-AS-MML: disable x-cbid: 17040322-0024-0000-0000-000001665E87 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17040322-0025-0000-0000-0000162D6075 Message-Id: <20170403225951.1853-1-alinefm@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-03_20:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=9 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704030202 Subject: [Kimchi-devel] [PATCH] [Kimchi] Bug fix: Let Wok specify UI configuration on cherrypy settings X-BeenThere: kimchi-devel@ovirt.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: kimchi-devel-bounces@ovirt.org Errors-To: kimchi-devel-bounces@ovirt.org X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Aline Manera Reviewed-by: Daniel Barboza --- config.py.in | 14 +------------- tests/test_config.py.in | 1 + 2 files changed, 2 insertions(+), 13 deletions(-) --- Depends on Wok patch: - [PATCH] [Wok] Bug fix #1109: Specify Content-Type for SVG files --- diff --git a/config.py.in b/config.py.in index a887670..de7024e 100644 --- a/config.py.in +++ b/config.py.in @@ -24,7 +24,7 @@ import platform import threading from cherrypy.lib.reprconf import Parser =20 -from wok.config import CACHEEXPIRES, PluginConfig, PluginPaths +from wok.config import PluginConfig, PluginPaths from wok.xmlutils.utils import xpath_get_text =20 kimchiLock =3D threading.Lock() @@ -172,16 +172,4 @@ class KimchiConfig(PluginConfig): custom_config[uri].update({'tools.staticfile.on': True, 'tools.staticfile.filename': pa= th}) =20 - for dirname in ('css', 'js', 'images'): - custom_config['/' + dirname] =3D { - 'tools.staticdir.on': True, - 'tools.staticdir.dir': os.path.join(kimchiPaths.ui_dir, - dirname), - 'tools.wokauth.on': False, - 'tools.nocache.on': False} - if dirname !=3D 'images': - custom_config['/' + dirname].update({ - 'tools.expires.on': True, - 'tools.expires.secs': CACHEEXPIRES}) - self.update(custom_config) diff --git a/tests/test_config.py.in b/tests/test_config.py.in index 74ea84a..d8110ea 100644 --- a/tests/test_config.py.in +++ b/tests/test_config.py.in @@ -144,6 +144,7 @@ class ConfigTests(unittest.TestCase): 'tools.wokauth.on': False, 'tools.nocache.on': False, 'tools.staticdir.dir': '%s/ui/images' % pluginPrefix, + 'tools.staticdir.content_types': {'svg': 'image/svg+xml'}, 'tools.staticdir.on': True }, '/data/screenshots': { --=20 2.9.3 _______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel