[PATCH v2] [Wok] Externalise missed strings in Wok.
by pkulkark@linux.vnet.ibm.com
From: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
v2:
Included space in title field
v1:
This patch externalises some more static
strings missed in Wok and removes tooltip.
Signed-off-by: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
---
ui/pages/login.html.tmpl | 6 +++---
ui/pages/wok-ui.html.tmpl | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/ui/pages/login.html.tmpl b/ui/pages/login.html.tmpl
index 170f8fe..431806c 100644
--- a/ui/pages/login.html.tmpl
+++ b/ui/pages/login.html.tmpl
@@ -111,12 +111,12 @@
<form id="form-login" class="form-horizontal" method="post">
<div class="form-group">
<label for="username" class="sr-only">$_("User Name")</label>
- <input type="text" class="form-control" id="username" name="username" required="required" placeholder="$_(" User Name ")" autofocus autocomplete="off" />
+ <input type="text" class="form-control" id="username" name="username" required="required" placeholder="$_(" User Name ")" autofocus autocomplete="off" title=" " />
<div id="username-msg" class="msg-required"></div>
</div>
<div class="form-group">
<label for="password" class="sr-only">$_("Password")</label>
- <input type="password" class="form-control" id="password" name="password" required="required" placeholder="$_(" Password ")" autocomplete="off" />
+ <input type="password" class="form-control" id="password" name="password" required="required" placeholder="$_(" Password ")" autocomplete="off" title=" "/>
<div id="password-msg" class="msg-required"></div>
</div>
<div class="form-group">
@@ -322,7 +322,7 @@
</div>
<div class="row">
<div class="col-lg-4 delayed-fadein">
- <p class="text-muted powered hidden">Powered by:</p>
+ <p class="text-muted powered hidden">$_("Powered by:")</p>
<ul id="wok-logos" class="list-inline"></ul>
</div>
</div>
diff --git a/ui/pages/wok-ui.html.tmpl b/ui/pages/wok-ui.html.tmpl
index 22a67e7..9ac7157 100644
--- a/ui/pages/wok-ui.html.tmpl
+++ b/ui/pages/wok-ui.html.tmpl
@@ -168,8 +168,8 @@
</div>
<div id="buildme" style="display:none">
- <div><p>Oops! It looks like I am running from a source tree and you forgot to build!
- Please run the following command from the wok and plugins directories and reload this page:</p>
+ <div><p>$_("Oops! It looks like I am running from a source tree and you forgot to build!")
+ $_("Please run the following command from the wok and plugins directories and reload this page:")</p>
<p><code>make</code></p>
</div>
</div>
@@ -215,10 +215,10 @@
</script>
<footer class="footer">
<div class="container">
- <p class="text-muted powered hidden">$_("Powered by"):</p>
+ <p class="text-muted powered hidden">$_("Powered by:")</p>
<ul id="plugins">
</ul>
- <span class="wok-version">Wok Version: $get_version()</span>
+ <span class="wok-version">$_("Wok Version:") $get_version()</span>
</div>
</footer>
</body>
--
2.1.0
8 years, 1 month
[PATCH] [Kimchi] Issue #1050: Rename template with existing template name
by archus@linux.vnet.ibm.com
From: Archana Singh <archus(a)linux.vnet.ibm.com>
If template name is change to update and the new template name to be
updated already exists then exception is raised stating name already exists.
Signed-off-by: Archana Singh <archus(a)linux.vnet.ibm.com>
---
model/templates.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/model/templates.py b/model/templates.py
index c3e24e1..e5663ad 100644
--- a/model/templates.py
+++ b/model/templates.py
@@ -231,6 +231,14 @@ class TemplateModel(object):
def update(self, name, params):
edit_template = self.lookup(name)
+ # If new name is not same as existing name
+ # and new name already exists: raise exception
+ with self.objstore as session:
+ if name != params['name'] \
+ and params['name'] in session.get_list('template'):
+ raise InvalidOperation("KCHTMPL0001E",
+ {'name': params['name']})
+
# Valid interfaces
interfaces = params.get('interfaces', [])
validate_interfaces(interfaces)
--
2.7.4
8 years, 1 month
[PATCH v3] [Kimchi 0/2] Issue #998 Not all static strings are externalized
by pkulkark@linux.vnet.ibm.com
From: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
v3:
Removed 'fuzzy' messages from .po files
v2:
Rebased to latest master
v1:
This patch set externalizes all the
static string that should be externalized
to support globalization. Also contains
the updated .pot and .po files
Pooja Kulkarni (2):
Issue #998 Not all static strings are externalized
Issue #998 Updated .pot and .po files
po/POTFILES.in | 1 +
po/de_DE.po | 267 +++++++++++++++++++++++++++--
po/en_US.po | 267 +++++++++++++++++++++++++++--
po/es_ES.po | 267 +++++++++++++++++++++++++++--
po/fr_FR.po | 267 +++++++++++++++++++++++++++--
po/it_IT.po | 267 +++++++++++++++++++++++++++--
po/ja_JP.po | 267 +++++++++++++++++++++++++++--
po/kimchi.pot | 267 +++++++++++++++++++++++++++--
po/ko_KR.po | 267 +++++++++++++++++++++++++++--
po/pt_BR.po | 267 +++++++++++++++++++++++++++--
po/ru_RU.po | 267 +++++++++++++++++++++++++++--
po/zh_CN.po | 267 +++++++++++++++++++++++++++--
po/zh_TW.po | 267 +++++++++++++++++++++++++++--
ui/js/src/kimchi.guest_storage_add.main.js | 12 +-
ui/js/src/kimchi.storagepool_add_main.js | 12 +-
ui/pages/guest-edit.html.tmpl | 14 +-
ui/pages/i18n.json.tmpl | 18 ++
17 files changed, 3122 insertions(+), 139 deletions(-)
--
2.1.0
8 years, 1 month
[PATCH] [Wok 0/3] Fix Sample plugin
by Aline Manera
Aline Manera (3):
Bug fix #7: Do not include Sample plugin files on Wok build
Remove unnecessary directories from Sample plugin structure
Bug fix #177: Fix Sample plugin according to latest changes on Wok
.gitignore | 1 -
IBM-license-blacklist | 3 -
configure.ac | 23 --
src/wok/plugins/Makefile.am | 2 -
src/wok/plugins/sample/Makefile.am | 31 --
src/wok/plugins/sample/__init__.py | 80 +----
src/wok/plugins/sample/config.status | 1 -
src/wok/plugins/sample/model.py | 37 +-
src/wok/plugins/sample/po/Makefile.in.in | 391 ---------------------
src/wok/plugins/sample/po/Makevars | 41 ---
src/wok/plugins/sample/po/POTFILES.in | 4 +-
src/wok/plugins/sample/po/en_US.po | 48 ++-
src/wok/plugins/sample/po/gen-pot | 28 --
src/wok/plugins/sample/po/pt_BR.po | 48 ++-
src/wok/plugins/sample/po/sample.pot | 48 ++-
src/wok/plugins/sample/po/update-po | 34 ++
src/wok/plugins/sample/po/zh_CN.po | 48 ++-
src/wok/plugins/sample/root.py | 171 +++++++++
src/wok/plugins/sample/sample.conf | 3 +
src/wok/plugins/sample/sample.conf.in | 27 --
src/wok/plugins/sample/ui/Makefile.am | 22 --
src/wok/plugins/sample/ui/config/Makefile.am | 22 --
src/wok/plugins/sample/ui/config/tab-ext.xml | 13 +-
src/wok/plugins/sample/ui/css/.gitignore | 0
src/wok/plugins/sample/ui/images/.gitignore | 0
src/wok/plugins/sample/ui/images/sample.svg | 45 +++
src/wok/plugins/sample/ui/js/Makefile.am | 22 --
src/wok/plugins/sample/ui/libs/.gitignore | 0
src/wok/plugins/sample/ui/pages/Makefile.am | 22 --
src/wok/plugins/sample/ui/pages/i18n.json.tmpl | 3 +-
.../plugins/sample/ui/pages/sample-tab1.html.tmpl | 32 --
.../plugins/sample/ui/pages/sample-tab2.html.tmpl | 32 --
.../sample/ui/pages/tabs/sample-tab1.html.tmpl | 39 ++
.../sample/ui/pages/tabs/sample-tab2.html.tmpl | 39 ++
34 files changed, 553 insertions(+), 807 deletions(-)
delete mode 100644 src/wok/plugins/sample/Makefile.am
delete mode 120000 src/wok/plugins/sample/config.status
delete mode 100644 src/wok/plugins/sample/po/Makefile.in.in
delete mode 100644 src/wok/plugins/sample/po/Makevars
delete mode 100755 src/wok/plugins/sample/po/gen-pot
create mode 100755 src/wok/plugins/sample/po/update-po
create mode 100644 src/wok/plugins/sample/root.py
create mode 100644 src/wok/plugins/sample/sample.conf
delete mode 100644 src/wok/plugins/sample/sample.conf.in
delete mode 100644 src/wok/plugins/sample/ui/Makefile.am
delete mode 100644 src/wok/plugins/sample/ui/config/Makefile.am
delete mode 100644 src/wok/plugins/sample/ui/css/.gitignore
delete mode 100644 src/wok/plugins/sample/ui/images/.gitignore
create mode 100644 src/wok/plugins/sample/ui/images/sample.svg
delete mode 100644 src/wok/plugins/sample/ui/js/Makefile.am
delete mode 100644 src/wok/plugins/sample/ui/libs/.gitignore
delete mode 100644 src/wok/plugins/sample/ui/pages/Makefile.am
delete mode 100644 src/wok/plugins/sample/ui/pages/sample-tab1.html.tmpl
delete mode 100644 src/wok/plugins/sample/ui/pages/sample-tab2.html.tmpl
create mode 100644 src/wok/plugins/sample/ui/pages/tabs/sample-tab1.html.tmpl
create mode 100644 src/wok/plugins/sample/ui/pages/tabs/sample-tab2.html.tmpl
--
2.7.4
8 years, 1 month
[PATCH][Wok 1/2] Issue #116: Suggestion to check spec guidelines
by Ramon Medeiros
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
Makefile.am | 5 ++++-
check_spec_errors.sh | 36 ++++++++++++++++++++++++++++++++++++
configure.ac | 1 +
docs/fedora-deps.md | 2 +-
docs/opensuse-deps.md | 2 +-
5 files changed, 43 insertions(+), 3 deletions(-)
create mode 100755 check_spec_errors.sh
diff --git a/Makefile.am b/Makefile.am
index 8b3f508..e7549f0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,7 +68,10 @@ check-local:
&& echo "ERROR: Whitespaces found" || echo "Ok"; \
echo "Check IBM license header and copyright date ..." ; \
/bin/bash check-IBM-license-header.sh ; \
- fi
+ fi;
+ @if [ -f $(RPMLINT) ]; then \
+ ./check_spec_errors.sh; \
+ fi;
# Link built mo files in the source tree to enable use of translations from
# within the source tree
diff --git a/check_spec_errors.sh b/check_spec_errors.sh
new file mode 100755
index 0000000..e5f47f4
--- /dev/null
+++ b/check_spec_errors.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2016
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+echo "Checking spec guidelines"
+
+# create links
+cp contrib/wok.spec.fedora contrib/wok_fedora.spec
+cp contrib/wok.spec.suse contrib/wok_suse.spec
+
+# run checking
+rpmlint contrib/wok_fedora.spec
+rpmlint contrib/wok_suse.spec
+
+# remove links
+rm contrib/wok_fedora.spec
+rm contrib/wok_suse.spec
+
+
diff --git a/configure.ac b/configure.ac
index ff41c84..0c27859 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,7 @@ AM_INIT_AUTOMAKE([-Wno-portability])
AM_PATH_PYTHON([2.6])
AC_PATH_PROG([PEP8], [pep8], [/usr/bin/pep8])
AC_PATH_PROG([GIT], [git], [/usr/bin/git])
+AC_PATH_PROG([RPMLINT], [rpmlint], [/usr/bin/rpmlint])
AC_PYTHON_MODULE([unittest])
AC_SUBST([HAVE_PYMOD_UNITTEST])
AC_SUBST([PYTHON_VERSION])
diff --git a/docs/fedora-deps.md b/docs/fedora-deps.md
index e665cdb..260390e 100644
--- a/docs/fedora-deps.md
+++ b/docs/fedora-deps.md
@@ -42,7 +42,7 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo yum install pyflakes python-pep8 python-requests
+ $ sudo yum install pyflakes python-pep8 python-requests rpmlint
# For RHEL systems, install the additional packages:
$ sudo yum install python-unittest2
diff --git a/docs/opensuse-deps.md b/docs/opensuse-deps.md
index 4fe3876..7fe1763 100644
--- a/docs/opensuse-deps.md
+++ b/docs/opensuse-deps.md
@@ -29,4 +29,4 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo zypper install python-pyflakes python-pep8 python-requests
+ $ sudo zypper install python-pyflakes python-pep8 python-requests rpmlint
--
2.7.4
8 years, 1 month
[PATCH][Wok] Issue #139: Do not generate logrotate config file on the fly
by Ramon Medeiros
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
Makefile.am | 2 +-
src/Makefile.am | 1 +
src/wok.conf.in | 8 +++++---
src/wok.logrotate | 9 +++++++++
src/wok/server.py | 28 +---------------------------
5 files changed, 17 insertions(+), 31 deletions(-)
create mode 100644 src/wok.logrotate
diff --git a/Makefile.am b/Makefile.am
index 8b3f508..4deadb1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -155,7 +155,7 @@ install-data-local:
$(INSTALL_DATA) src/dhparams.pem $(DESTDIR)/etc/wok/dhparams.pem
touch $(DESTDIR)/etc/nginx/conf.d/wok.conf
mkdir -p $(DESTDIR)/etc/logrotate.d/
- touch $(DESTDIR)/etc/logrotate.d/wokd
+ $(INSTALL_DATA) $(top_srcdir)/src/wok.logrotate $(DESTDIR)/etc/logrotate.d/wokd
uninstall-local:
@if test -f $(systemdsystemunitdir)/wokd.service; then \
diff --git a/src/Makefile.am b/src/Makefile.am
index f06d755..27e0815 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,6 +24,7 @@ SUBDIRS = wok nginx
EXTRA_DIST = wokd.in \
wok.conf.in \
firewalld.xml \
+ wok.logrotate \
$(NULL)
bin_SCRIPTS = wokd
diff --git a/src/wok.conf.in b/src/wok.conf.in
index 5e04b20..254f786 100644
--- a/src/wok.conf.in
+++ b/src/wok.conf.in
@@ -50,14 +50,16 @@
[logging]
# Log directory
+
+# Be aware that editting logging directory, you must change logrotate
+# configuration file to keep logs being compressed.
+# Look /etc/logrotate.d/wokd
+
#log_dir = @localstatedir@/log/wok
# Logging level: debug, info, warning, error or critical
#log_level = debug
-# Log file size (specify size in K, M or G)
-#log_size = 10M
-
[authentication]
# Authentication method, available option: pam, ldap.
# method = pam
diff --git a/src/wok.logrotate b/src/wok.logrotate
new file mode 100644
index 0000000..505c3e7
--- /dev/null
+++ b/src/wok.logrotate
@@ -0,0 +1,9 @@
+/var/log/wok {
+ daily
+ nomail
+ maxsize 10M
+ rotate 10
+ nomissingok
+ compress
+}
+
diff --git a/src/wok/server.py b/src/wok/server.py
index fecca48..9d864df 100644
--- a/src/wok/server.py
+++ b/src/wok/server.py
@@ -30,7 +30,7 @@ from string import Template
from wok import auth
from wok import config
from wok.config import config as configParser
-from wok.config import paths, PluginConfig, WokConfig
+from wok.config import PluginConfig, WokConfig
from wok.control import sub_nodes
from wok.model import model
from wok.proxy import start_proxy
@@ -45,17 +45,6 @@ LOGGING_LEVEL = {"debug": logging.DEBUG,
"warning": logging.WARNING,
"error": logging.ERROR,
"critical": logging.CRITICAL}
-LOGROTATE_TEMPLATE = """
-${log_dir}/*log {
- daily
- nomail
- maxsize ${log_size}
- rotate 10
- nomissingok
- compress
-}
-"""
-
def set_no_cache():
from time import strftime, gmtime
@@ -147,21 +136,6 @@ class Server(object):
# start request logger
self.reqLogger = RequestLogger()
- # only add logrotate if wok is installed
- if paths.installed:
-
- # redefine logrotate configuration according to wok.conf
- data = Template(LOGROTATE_TEMPLATE)
- data = data.safe_substitute(
- log_dir=configParser.get("logging", "log_dir"),
- log_size=configParser.get("logging", "log_size")
- )
-
- # Write file to be used for nginx.
- config_file = open(os.path.join(paths.logrotate_dir, "wokd"), "w")
- config_file.write(data)
- config_file.close()
-
# Handling running mode
if not dev_env:
cherrypy.config.update({'environment': 'production'})
--
2.7.4
8 years, 1 month
[Wok][RFC] Issue #175: Do not generate nginx conf file on the fly
by Ramon Medeiros
Propose:
Do not regenerate wok.conf at nginx at startup of wok.
Questions:
1) The wok.conf will be generated at make ? And then copied at make rpm?
2) If using make to generate it, how development run (when running from
git), will work? The developer must copy wok.conf to nginx directory?
3) The [server] configuration at wok.conf will be removed? letting to
the user to change parameters?
--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn(a)br.ibm.com
8 years, 1 month
[PATCH] [Wok] Bug fix #176: Assume plugin URI is /plugins/<plugin-name>
by Aline Manera
Today, every plugin configuration file has a 'uri' parameter that can be
changed.
But now, the user can change the Wok base URI so there is no need
to have this kind of configuration on each plugin.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
src/wok/config.py.in | 5 +++++
src/wok/model/plugins.py | 3 ++-
src/wok/server.py | 6 +++---
src/wok/utils.py | 11 +----------
4 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/src/wok/config.py.in b/src/wok/config.py.in
index 46544fa..f1167f4 100644
--- a/src/wok/config.py.in
+++ b/src/wok/config.py.in
@@ -293,5 +293,10 @@ def _get_config():
config = _get_config()
+def get_base_plugin_uri(p_name):
+ return os.path.join("/", config.get("server", "server_root"),
+ "plugins", p_name)
+
+
if __name__ == '__main__':
print paths.prefix
diff --git a/src/wok/model/plugins.py b/src/wok/model/plugins.py
index 4beff44..1b8ec5e 100644
--- a/src/wok/model/plugins.py
+++ b/src/wok/model/plugins.py
@@ -21,6 +21,7 @@
import cherrypy
+from wok.config import get_base_plugin_uri
from wok.utils import get_enabled_plugins
@@ -32,4 +33,4 @@ class PluginsModel(object):
# Will only return plugins that were loaded correctly by WOK and are
# properly configured in cherrypy
return [plugin for (plugin, config) in get_enabled_plugins()
- if config.get('wok').get('uri') in cherrypy.tree.apps.keys()]
+ if get_base_plugin_uri(plugin) in cherrypy.tree.apps.keys()]
diff --git a/src/wok/server.py b/src/wok/server.py
index fecca48..93d28c6 100644
--- a/src/wok/server.py
+++ b/src/wok/server.py
@@ -189,9 +189,7 @@ class Server(object):
plugin_class = ('plugins.%s.%s' %
(plugin_name,
plugin_name[0].upper() + plugin_name[1:]))
- script_name = plugin_config['wok']['uri']
del plugin_config['wok']
-
plugin_config.update(PluginConfig(plugin_name))
except KeyError:
continue
@@ -229,7 +227,9 @@ class Server(object):
"error: %s" % (plugin_class, e.message)
)
- cherrypy.tree.mount(plugin_app, script_name, plugin_config)
+ cherrypy.tree.mount(plugin_app,
+ config.get_base_plugin_uri(plugin_name),
+ plugin_config)
def start(self):
# Subscribe to SignalHandler plugin
diff --git a/src/wok/utils.py b/src/wok/utils.py
index 52f6cea..9a08001 100644
--- a/src/wok/utils.py
+++ b/src/wok/utils.py
@@ -39,7 +39,7 @@ from datetime import datetime, timedelta
from multiprocessing import Process, Queue
from threading import Timer
-from wok.config import config, paths, PluginPaths
+from wok.config import paths, PluginPaths
from wok.exception import InvalidParameter, TimeoutExpired
from wok.stringutils import decode_value
@@ -71,14 +71,6 @@ def _load_plugin_conf(name):
(plugin_conf, e.message))
-def _check_plugin_relative_path(plugin_config):
- rel_path = config.get("server", "server_root")
- plugin_uri = plugin_config['wok']['uri']
- if (rel_path is not "") and (not plugin_uri.startswith(rel_path)):
- plugin_config['wok']['uri'] = rel_path + plugin_uri
- return plugin_config
-
-
def get_enabled_plugins():
plugin_dir = paths.plugins_dir
try:
@@ -90,7 +82,6 @@ def get_enabled_plugins():
plugin_config = _load_plugin_conf(name)
try:
if plugin_config['wok']['enable']:
- plugin_config = _check_plugin_relative_path(plugin_config)
yield (name, plugin_config)
except (TypeError, KeyError):
continue
--
2.7.4
8 years, 1 month
[PATCH] [Kimchi] Remove URI configuration from kimchi.conf file
by Aline Manera
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
This patch depends on Wok patch
- [PATCH] [Wok] Bug fix #176: Assume plugin URI is /plugins/<plugin-name>
---
kimchi.conf | 3 ---
tests/test_config.py.in | 3 +--
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/kimchi.conf b/kimchi.conf
index ede2f15..97a14bd 100644
--- a/kimchi.conf
+++ b/kimchi.conf
@@ -2,9 +2,6 @@
# Enable Kimchi plugin on Wok server (values: True|False)
enable = True
-# Root URI for Kimchi APIs
-uri = '/plugins/kimchi'
-
[kimchi]
# Federation feature: register Wok server on openSLP and discover peers
# in the same network. Check README-federation for more details.
diff --git a/tests/test_config.py.in b/tests/test_config.py.in
index 48f5579..74ea84a 100644
--- a/tests/test_config.py.in
+++ b/tests/test_config.py.in
@@ -77,8 +77,7 @@ class ConfigTests(unittest.TestCase):
pluginPrefix = paths.add_prefix(paths.plugin_dir)
configObj = {
'wok': {
- 'enable': True,
- 'uri': '/plugins/kimchi'
+ 'enable': True
},
'kimchi': {
'federation': False,
--
2.7.4
8 years, 1 month
[PATCH] [Kimchi] Issue #1060: Edit template/Guest for s390x, console drop down shows empty box along with virtio and sclp.
by archus@linux.vnet.ibm.com
From: Archana Singh <archus(a)linux.vnet.ibm.com>
For s390x, console can be either virtio or sclp. Cannot be blank.
Hence this fix will remove empty box for console in edit template
and edit guest UI panels.
Signed-off-by: Archana Singh <archus(a)linux.vnet.ibm.com>
---
ui/pages/guest-edit.html.tmpl | 1 -
ui/pages/template-edit.html.tmpl | 1 -
2 files changed, 2 deletions(-)
diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl
index 88ccb10..0bf17c6 100644
--- a/ui/pages/guest-edit.html.tmpl
+++ b/ui/pages/guest-edit.html.tmpl
@@ -74,7 +74,6 @@
<div class="form-group" id="guest-console-panel" style="display:none;">
<label for="guest-edit-console">$_("Console")</label>
<select id="guest-edit-console" name="console" class="form-control">
- <option value=""></option>
<option value="sclp">$_("sclp")</option>
<option value="virtio">$_("virtio")</option>
</select>
diff --git a/ui/pages/template-edit.html.tmpl b/ui/pages/template-edit.html.tmpl
index 88454dc..e9a479e 100644
--- a/ui/pages/template-edit.html.tmpl
+++ b/ui/pages/template-edit.html.tmpl
@@ -109,7 +109,6 @@
</div>
<div class="template-edit-wrapper-controls console" style="display:none">
<select id="template-edit-console" name="console" class="form-control">
- <option value=""></option>
<option value="sclp">$_("sclp")</option>
<option value="virtio">$_("virtio")</option>
</select>
--
2.7.4
8 years, 1 month