[PATCH V2 [Gingerbase 0/2] Bug fix: Let Wok specify UI configuration on cherrypy settings

2 views
Skip to first unread message

Aline Manera

unread,
Apr 4, 2017, 10:22:32 AM4/4/17
to Ginger Devel
V1 - V2:
- Update Copyright date

Depends on Wok patch:
- [PATCH] [Wok] Bug fix #1109: Specify Content-Type for SVG files


Aline Manera (2):
Bug fix: Let Wok specify UI configuration on cherrypy settings
Remove unused icon-vm.png file

config.py.in | 23 ++---------------------
tests/test_config.py.in | 3 ++-
ui/images/Makefile.am | 4 ++--
ui/images/icon-vm.png | Bin 2976 -> 0 bytes
4 files changed, 6 insertions(+), 24 deletions(-)
delete mode 100644 ui/images/icon-vm.png

--
2.9.3

Aline Manera

unread,
Apr 4, 2017, 10:22:33 AM4/4/17
to Ginger Devel
Signed-off-by: Aline Manera <ali...@linux.vnet.ibm.com>
---
config.py.in | 23 ++---------------------
tests/test_config.py.in | 3 ++-
2 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/config.py.in b/config.py.in
index be54f85..52ee96a 100644
--- a/config.py.in
+++ b/config.py.in
@@ -1,7 +1,7 @@
#
# Project Ginger Base
#
-# Copyright IBM Corp, 2015-2016
+# Copyright IBM Corp, 2015-2017
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -22,7 +22,7 @@ import os
import threading
from cherrypy.lib.reprconf import Parser

-from wok.config import CACHEEXPIRES, PluginConfig, PluginPaths
+from wok.config import PluginConfig, PluginPaths

gingerBaseLock = threading.Lock()

@@ -71,26 +71,7 @@ class GingerBaseConfig(PluginConfig):
'tools.staticdir.dir': os.path.join(gingerBasePaths.ui_dir,
'pages/help'),
'tools.nocache.on': True
- },
- '/images': {
- 'tools.staticdir.on': True,
- 'tools.staticdir.dir': os.path.join(gingerBasePaths.ui_dir,
- 'images'),
- 'tools.wokauth.on': False,
- 'tools.nocache.on': False
}
}

- for dirname in ('css', 'js', 'images'):
- custom_config['/' + dirname] = {
- 'tools.staticdir.on': True,
- 'tools.staticdir.dir': os.path.join(gingerBasePaths.ui_dir,
- dirname),
- 'tools.wokauth.on': False,
- 'tools.nocache.on': False}
- if dirname != '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 8f09975..50718c0 100644
--- a/tests/test_config.py.in
+++ b/tests/test_config.py.in
@@ -1,7 +1,7 @@
#
# Project Ginger Base
#
-# Copyright IBM Corp, 2014-2016
+# Copyright IBM Corp, 2014-2017
#
# Code derived from Project Kimchi
#
@@ -123,6 +123,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
},
'/ui/config/tab-ext.xml': {
--
2.9.3

Daniel Henrique Barboza

unread,
Apr 4, 2017, 2:49:44 PM4/4/17
to ginger-...@googlegroups.com
Reviewed-by: Daniel Barboza <dani...@linux.vnet.ibm.com>
Reply all
Reply to author
Forward
0 new messages