[PATCH][Wok] Bug fix #168: check_ui_code_errors.sh not found by make check on dist tarball (RHEL 7.2)
by Ramon Medeiros
Some files were not being added to dist tar.gz.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 2d55be3..f770043 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,8 @@ EXTRA_DIST = \
CONTRIBUTE.md \
VERSION \
build-aux/pkg-version \
+ check_ui_code_errors.sh \
+ check_spec_errors.sh \
$(NULL)
--
2.7.4
8 years, 1 month
[PATCH][Wok] Bug fix #186: make check-local fails inside tarball
by Ramon Medeiros
I18N_FILES was pointing to i18n.py at plugins, which are not available
when running wok from tar.gz. Switching to i18n present at src/wok, the
code can be run.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
Makefile.am | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index bd7a563..2d55be3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,9 +42,7 @@ PEP8_BLACKLIST = *src/wok/plugins,*src/wok/config.py,*src/wok/i18n.py,*tests/tes
SKIP_PYFLAKES_ERR = "\./src/wok/websocket\.py"
-I18N_FILES = src/wok/plugins/*/i18n.py \
- src/wok/i18n.py \
- $(NULL)
+I18N_FILES = src/wok/i18n.py $(NULL)
check-local:
PYTHONPATH=src contrib/check_i18n.py $(I18N_FILES)
--
2.7.4
8 years, 1 month
[PATCH v2] [WoK] Bug fix #187
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
v2:
- patch reworked with the review comments of v1
Daniel Henrique Barboza (1):
Bug fix #187: wok.main.js: parseTabs does not consider 'none' mode
tabs
ui/js/src/wok.main.js | 144 ++++++++++++++++++++++++++------------------------
1 file changed, 75 insertions(+), 69 deletions(-)
--
2.7.4
8 years, 1 month
[PATCH] [Wok] Issue #190: No activity logging is shown and its break if any one entry in activity log does not have proper key
by archus@linux.vnet.ibm.com
From: Archana Singh <archus(a)linux.vnet.ibm.com>
Currently activity logs breaks in UI, if an error code is
changed with additional parameter. For example an error code does not have
any parameter and its logged in user-requests.data with params as empty.
And however same error code is changed to have a parameter, and hence while parsing
activity log it is expected to have parameter in params.
Due to which parsing fails with KeyError.
This fix handle the KeyError and in case of KeyError the error message will
be shown without replacing the parameter with its value.
Signed-off-by: Archana Singh <archus(a)linux.vnet.ibm.com>
---
src/wok/message.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/wok/message.py b/src/wok/message.py
index ff4cbc9..460d90d 100644
--- a/src/wok/message.py
+++ b/src/wok/message.py
@@ -86,7 +86,10 @@ class WokMessage(object):
def get_text(self, prepend_code=True, translate=True):
msg = self._get_text(translate)
- msg = decode_value(msg) % self.args
+ try:
+ msg = decode_value(msg) % self.args
+ except KeyError:
+ msg = decode_value(msg)
if prepend_code:
return "%s: %s" % (self.code, msg)
--
2.7.4
8 years, 1 month
[PATCH][Wok] Bug fix #185: make rpm fails on CentOS when firewalld isn't installed
by Ramon Medeiros
Add firewalld as build requirement in all distros
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
contrib/wok.spec.fedora.in | 1 +
contrib/wok.spec.suse.in | 1 +
docs/fedora-deps.md | 2 +-
docs/opensuse-deps.md | 2 +-
4 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/contrib/wok.spec.fedora.in b/contrib/wok.spec.fedora.in
index 48492ea..0119381 100644
--- a/contrib/wok.spec.fedora.in
+++ b/contrib/wok.spec.fedora.in
@@ -21,6 +21,7 @@ Requires: fontawesome-fonts
Requires: open-sans-fonts
Requires: logrotate
Requires: openssl
+BuildRequires: firewalld
BuildRequires: gettext-devel
BuildRequires: libxslt
BuildRequires: openssl
diff --git a/contrib/wok.spec.suse.in b/contrib/wok.spec.suse.in
index 11c0464..8bed37a 100644
--- a/contrib/wok.spec.suse.in
+++ b/contrib/wok.spec.suse.in
@@ -22,6 +22,7 @@ Requires: fontawesome-fonts
Requires: google-opensans-fonts
Requires: logrotate
Requires: openssl
+BuildRequires: firewalld
BuildRequires: gettext-tools
BuildRequires: libxslt-tools
BuildRequires: openssl
diff --git a/docs/fedora-deps.md b/docs/fedora-deps.md
index 260390e..fa99f30 100644
--- a/docs/fedora-deps.md
+++ b/docs/fedora-deps.md
@@ -20,7 +20,7 @@ Build Dependencies
--------------------
$ sudo yum install gcc make autoconf automake gettext-devel git rpm-build \
- libxslt
+ libxslt firewalld
Runtime Dependencies
--------------------
diff --git a/docs/opensuse-deps.md b/docs/opensuse-deps.md
index 7fe1763..ad4ed92 100644
--- a/docs/opensuse-deps.md
+++ b/docs/opensuse-deps.md
@@ -10,7 +10,7 @@ Build Dependencies
--------------------
$ sudo zypper install gcc make autoconf automake gettext-tools git \
- rpm-build libxslt-tools
+ rpm-build libxslt-tools firewalld
Runtime Dependencies
--------------------
--
2.7.4
8 years, 1 month
[PATCH] [Wok 0/2] Bug fix #191
by Aline Manera
Aline Manera (2):
Bug fix #191: Add updated lodash.min.js file
Bug fix #191: Break lines content to be smaller than 512 characters
.gitignore | 2 +-
IBM-license-blacklist | 2 +-
ui/js/wok.bootgrid.js | 8 ++-
ui/libs/lodash/lodash.js | 127 ----------------------------------------
ui/libs/lodash/lodash.min.js | 136 +++++++++++++++++++++++++++++++++++++++++++
ui/pages/login.html.tmpl | 2 +-
ui/pages/wok-ui.html.tmpl | 2 +-
7 files changed, 147 insertions(+), 132 deletions(-)
delete mode 100644 ui/libs/lodash/lodash.js
create mode 100644 ui/libs/lodash/lodash.min.js
--
2.7.4
8 years, 1 month
[PATCH] [WoK] Bug fix #187: Fixing redirect with non-root login
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
The 'WoK User Activity Log' tab isn't available when running
as regular (non-root) user. But, at the same time, it is acting
as the default URL when opening WoK.
This patch redirects the default URL when logged as a regular
user as follows:
- if no plug-ins are installed, a warning message is displayed.
- if at least one plug-in is installed, the default URL is redirected
to the first plug-in. Considering the existing WoK plug-ins at the time
this patch was created, it will be redirected to Gingerbase Dashboard.
Signed-off-by: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
---
ui/js/src/wok.main.js | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/ui/js/src/wok.main.js b/ui/js/src/wok.main.js
index 4b36400..260951c 100644
--- a/ui/js/src/wok.main.js
+++ b/ui/js/src/wok.main.js
@@ -209,9 +209,30 @@ wok.main = function() {
* and clear location.hash to jump to home page.
*/
var tab = $('#tabPanel a[href="' + url + '"]');
- if (tab.length === 0 && url != 'wok-empty.html') {
- location.hash = '#';
- return;
+ if (tab.length === 0) {
+ if (url === "tabs/settings.html") {
+ /*
+ * This scenario means that the WoK tab isn't avaiable for the
+ * current user (probably because it's a regular non-sudo user).
+ * If there are other tabs to fall back to, redirect to them. Otherwise,
+ * if running WoK without plug-ins, put an informative message.
+ */
+ if ($('#tabPanel a').length === 0) {
+ var warning_msg = "Unable to access WoK User Activity Log feature as a non-root user.<br>No plugins installed currently. You can download the available plugins <a href='https://github.com/kimchi-project/kimchi'>Kimchi</a> and <a href='https://github.com/kimchi-project/ginger'>Ginger</a> from Github."
+ $('#main').html(warning_msg).addClass('noPluginMessage');
+ } else {
+ location.hash = '#' + $('#tabPanel a').attr('href');
+ var lastIndex = location.hash.lastIndexOf(".html");
+ if (lastIndex != -1) {
+ location.hash = location.hash.substring(0, lastIndex);
+ }
+ }
+ return;
+ }
+ if (url != 'wok-empty.html') {
+ location.hash = '#';
+ return;
+ }
}
//Remove the tab arrow indicator for no plugin
if (url == 'wok-empty.html') {
--
2.7.4
8 years, 1 month
Bizarre behaviour with libvirt on CentOS
by Ramon Medeiros
Hi,
i was looking for root cause of this bug:
"After creating a vepa network and adding it to a guest, the same is
listed in Actions->Edit. If the guest is poweron, the interfaces is not
listed".
When offline, libvirt says vepa interface is "type" (i run a GET on
vm/ifaces, see below): "network". When up, this parameter change to
"macvtap", what is breaking UI:
ui/js/src/kimchi.guest_edit_main.js
456 kimchi.getGuestInterfaces(kimchi.selectedGuest, function(data) {
457 for (var i = 0; i < data.length; i++) {
458 data[i].viewMode = "";
459 data[i].editMode = "hide";
460 data[i].id = i;
461 if (data[i].type == 'network')
462 addItem(data[i]);
463 }
464 });
So, the if at 461 fails and the interface is not added. Need to figure
out why libvirt is changing it.
Here is a get at vms/ifaces:
Poweroff:
{
"source":"eth0",
"mac":"52:54:00:2f:48:f4",
"model":"virtio",
"type":"network",
"mode":"vepa"
}
]
Poweron
{
"source":"eth0",
"mac":"52:54:00:2f:48:f4",
"model":"virtio",
"type":"macvtap",
"mode":"vepa"
}
Anyone know how to proceed? Can i open a bug against libvirt?
--
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] [Kimchi] Bug fix #1015: Rename "Guest Name ID" header to "Guest Name"
by Aline Manera
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
ui/pages/tabs/guests.html.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/pages/tabs/guests.html.tmpl b/ui/pages/tabs/guests.html.tmpl
index 37c9ce2..2ca3ede 100644
--- a/ui/pages/tabs/guests.html.tmpl
+++ b/ui/pages/tabs/guests.html.tmpl
@@ -50,7 +50,7 @@
<ul class="wok-guest-list">
<li class="wok-guest-list-header">
<span class="column-state"><span class="sr-only">$_("State")</span></span><!--
- --><span class="column-name"><span>$_("Guest Name ID")</span></span><!--
+ --><span class="column-name"><span>$_("Guest Name")</span></span><!--
--><span class="column-type"><span>$_("OS Type")</span></span><!--
--><span class="column-vnc"><span>$_("VNC")</span></span><!--
--><span class="column-processors"><span>$_("Processors Utilization")</span></span><!--
--
2.7.4
8 years, 1 month
[PATCH] [Kimchi] Issue #190: No activity logging is shown and its break if any one entry in activity log does not have proper key
by archus@linux.vnet.ibm.com
From: Archana Singh <archus(a)linux.vnet.ibm.com>
Currently activity logs breaks in UI, if an error code is
changed with additional parameter. For example an error code does not have
any parameter and its logged in user-requests.data with params as empty.
And however same error code is changed to have a parameter, and hence while parsing
activity log it is expected to have parameter in params.
Due to which parsing fails with KeyError.
This fix handle the KeyError and in case of KeyError the error message will
be shown without replacing the parameter with its value.
Signed-off-by: Archana Singh <archus(a)linux.vnet.ibm.com>
---
src/wok/message.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/wok/message.py b/src/wok/message.py
index ff4cbc9..460d90d 100644
--- a/src/wok/message.py
+++ b/src/wok/message.py
@@ -86,7 +86,10 @@ class WokMessage(object):
def get_text(self, prepend_code=True, translate=True):
msg = self._get_text(translate)
- msg = decode_value(msg) % self.args
+ try:
+ msg = decode_value(msg) % self.args
+ except KeyError:
+ msg = decode_value(msg)
if prepend_code:
return "%s: %s" % (self.code, msg)
--
2.7.4
8 years, 1 month