Re: [Kimchi-devel] [PATCH] [Wok 2/2] fix for issue #114
by Suresh Babu Angadi
On 05/18/2016 07:47 AM, Aline Manera wrote:
>
>
> On 05/16/2016 06:11 AM, sureshab(a)linux.vnet.ibm.com wrote:
>> From: Suresh Babu Angadi <sureshab(a)in.ibm.com>
>>
>> added dita-hepl.xsl, css file for help pages and
>> help page for "Settings" tab.
>>
>> Signed-off-by: Suresh Babu Angadi <sureshab(a)in.ibm.com>
>> ---
>> ui/pages/help/dita-help.xsl | 44 ++++++++
>> ui/pages/help/en_US/settings.dita | 43 ++++++++
>> ui/pages/help/wok.css | 208
>> ++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 295 insertions(+)
>> create mode 100644 ui/pages/help/dita-help.xsl
>> create mode 100644 ui/pages/help/en_US/settings.dita
>> create mode 100644 ui/pages/help/wok.css
>>
>> diff --git a/ui/pages/help/dita-help.xsl b/ui/pages/help/dita-help.xsl
>> new file mode 100644
>> index 0000000..fa75bf2
>> --- /dev/null
>> +++ b/ui/pages/help/dita-help.xsl
>> @@ -0,0 +1,44 @@
>> +<?xml version="1.0" encoding="UTF-8"?>
>> +<!--
>> +Project Wok
>> +Copyright IBM Corp, 2016
>> +
>
> Is it a copy of a Kimchi/Ginger file ? If so, please add an
> appropriated note to inform this code was derived from other project.
Yes. will add.
>
>> +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
>> +-->
>> +<xsl:stylesheet version="1.0"
>> + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> + xmlns="http://www.w3.org/1999/xhtml">
>> + <xsl:output method="xml" indent="yes" encoding="UTF-8" />
>> +
>> + <xsl:template match="/">
>> + <html>
>> + <head>
>> + <title><xsl:value-of select="/cshelp/title" /></title>
>> + <meta charset="UTF-8" />
>> + <link rel="shortcut icon"
>> href="../../images/logo.ico" />
>> + <link rel="stylesheet" type="text/css"
>> href="../wok.css" />
>> + </head>
>> + <body>
>> + <xsl:apply-templates select="//cshelp" />
>> + </body>
>> + </html>
>> + </xsl:template>
>> +
>> + <xsl:template match="cshelp">
>> + <h1><xsl:value-of select="title" /></h1>
>> + <p class="shortdesc"><xsl:value-of select="shortdesc" /></p>
>> + <p class="csbody"><xsl:copy-of select="csbody/node()" /></p>
>> + </xsl:template>
>> +</xsl:stylesheet>
>> diff --git a/ui/pages/help/en_US/settings.dita
>> b/ui/pages/help/en_US/settings.dita
>> new file mode 100644
>> index 0000000..e5b8465
>> --- /dev/null
>> +++ b/ui/pages/help/en_US/settings.dita
>> @@ -0,0 +1,43 @@
>> +<?xml version="1.0" encoding="UTF-8"?>
>> +<!--
>> +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
>> +-->
>> +<!--Arbortext, Inc., 1988-2011, v.4002-->
>> +<!DOCTYPE cshelp PUBLIC "-//IBM//DTD DITA CSHelp//EN"
>> + "..\dtd\cshelp.dtd">
>> +<?Pub Sty _display FontColor="red"?>
>> +<?Pub Inc?>
>> +<!--This DITA specialized document type is not supported by the
>> Authoring Tools development team.
>> +Press the F1 key for online help on the tags and see the DITA XML
>> Guide and Reference for how to use this document type.
>> +For support please see:
>> +https://w3.opensource.ibm.com/projects/dita-cshelp/-->
>> +<cshelp id="settings" xml:lang="en-us">
>> +<title>Settings</title>
>> +<csbody>
>> +<dl><dlentry>
>> +<dt>User Activity Log</dt>
>> +<dd>This section is used to display activity log of all users.</dd>
>
> This section displays user log activity on Wok and its plugins.
I would use - This section displays user activity log on Wok and its
plugins.
>
>> +<dd>Supported operations on User activity log:</dd>
>> +<dd>Advanced Search: Use this option to search logs of particular
>> application(such as wok, ginger, gingerbase) or user, or with request
>> type, or within particular time range.</dd>
>
> I'd replace the above 2 lines to something like:
>
> "To get any specific log result, please use the 'Advanced Search'
> option. You can specify a particular application (such as wok, ginger,
> gingerbase, kimchi), an user, request type or even date range."
ok
>
>
>> +<dd>Select "Reset to Default" option to clear the search criteria.</dd>
>> +<dd>Download: Use this option to download user activity log.</dd>
>
> There is an extra space between 'activity' and 'log'
thanks, will remove it.
>
>> +</dlentry>
>> +</dl><?Pub Caret 2101?>
>> +</csbody>
>> +</cshelp>
>> +<?Pub *0000003732?>
>> diff --git a/ui/pages/help/wok.css b/ui/pages/help/wok.css
>> new file mode 100644
>> index 0000000..e98eae8
>> --- /dev/null
>> +++ b/ui/pages/help/wok.css
>> @@ -0,0 +1,208 @@
>> +/*
>> + * Project Wok
>> + *
>> + * Copyright IBM Corp, 2016
>> + *
>
> Is it a copy of a Kimchi/Ginger file ? If so, please add an
> appropriated note to inform this code was derived from other project.
okay
>
>> + * Licensed under the Apache License, Version 2.0 (the "License");
>> + * you may not use this file except in compliance with the License.
>> + * You may obtain a copy of the License at
>> + *
>> + * http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +BODY {
>> + background: #FFFFFF;
>> + margin-bottom: 1em;
>> + margin-left: .5em;
>> +}
>> +
>> +bold {
>> + font-weight: bold;
>> +}
>> +
>> +boldItalic {
>> + font-weight: bold;
>> + font-style: italic;
>> +}
>> +
>> +italic {
>> + font-style: italic;
>> +}
>> +
>> +underlined {
>> + text-decoration: underline;
>> +}
>> +
>> +uicontrol {
>> + font-weight: bold;
>> +}
>> +
>> +filepath {
>> + font-family: monospace, monospace;
>> +}.option {
>> + font-family: monospace, monospace;
>> +}
>> +
>> +cmdname {
>> + font-weight: bold;
>> + font-family: monospace, monospace;
>> +}
>> +
>> +.defparmname {
>> + font-weight: bold;
>> + text-decoration: underline;
>> + font-family: monospace, monospace;
>> +}
>> +
>> +.kwd {
>> + font-weight: bold;
>> +}
>> +
>> +.defkwd {
>> + font-weight: bold;
>> + text-decoration: underline;
>> +}
>> +
>> +var {
>> + font-style : italic;
>> +}
>> +
>> +strongwintitle {
>> + font-weight : bold;
>> +}
>> +
>> +parmname {
>> + font-weight: bold;
>> + font-family: monospace, monospace;
>> + white-space: nowrap;
>> +}
>> +
>> +code {
>> + font-family: monospace, monospace;
>> +}
>> +
>> +pre {
>> + font-family: monospace, monospace;
>> +}
>> +
>> +CITE {
>> + font-style: italic;
>> +}
>> +
>> +EM {
>> + font-style: italic;
>> +}
>> +
>> +STRONG {
>> + font-weight: bold;
>> +}
>> +
>> +VAR {
>> + font-style: italic;
>> +}
>> +
>> +dt {
>> + font-weight: bold;
>> +}
>> +
>> +/***********************************************************
>> + * Basic fonts
>> + ***********************************************************/
>> +body,
>> +td,
>> +th,
>> +caption {
>> + font-family: Verdana, Arial, Helvetica, sans-serif;
>> + font-size: 10pt;
>> +}
>> +
>> +pre, code {
>> + font-family: MS Courier New, Courier, monospace;
>> +}
>> +
>> +h1, h2, h3 {
>> + font-size: 12pt;
>> + font-weight: bold;
>> + color: #336699;
>> +}
>> +
>> +h4 {
>> + font-size: 10pt;
>> + font-weight: bold;
>> + color: #336699;
>> +}
>> +
>> +/***********************************************************
>> + * Basic indents, padding, and margin
>> + ***********************************************************/
>> +body {
>> + color: black;
>> + background-color: white;
>> + margin: 0;
>> + padding-top: 0.2em;
>> + padding-left: 0.6em;
>> + padding-right: 0.2em;
>> + padding-bottom: 1em;
>> +}
>> +
>> +h1,
>> +h2,
>> +h3,
>> +h4,
>> +h5,
>> +h6 {
>> + padding: 0;
>> + margin-top: 1em;
>> + margin-bottom: 0.75em;
>> + margin-left: 0;
>> + margin-right: 0;
>> +}
>> +
>> +address,
>> +dl,
>> +li,
>> +p {
>> + padding: 0;
>> + margin-top: 0.75em;
>> + margin-bottom: 0.75em;
>> + margin-left: 0;
>> + margin-right: 0;
>> + line-height: 125%;
>> +}
>> +
>> +td dl {
>> + margin-left: 2em;
>> +}
>> +
>> +pre {
>> + padding: 0;
>> + margin-top: 0.75em;
>> + margin-bottom: 0.75em;
>> + margin-left: 2em;
>> + margin-right: 0;
>> +}
>> +
>> +ol,
>> +ul {
>> + padding: 0;
>> + margin-top: 0.75em;
>> + margin-bottom: 0.75em;
>> + margin-left: 2.00em;
>> + margin-right: 0;
>> +}
>> +
>> +dd {
>> + margin-left: 3.00em;
>> + margin-top: 0.75em;
>> + margin-bottom: 0.75em;
>> +}
>> +
>> +dt {
>> + margin-left: 1.00em;
>> + margin-top: 0.75em;
>> +}
>
--
Regards,
Suresh Babu Angadi
8 years, 7 months
Re: [Kimchi-devel] [PATCH] [Kimchi] Isolate unit tests execution.
by Aline Manera
On 05/16/2016 11:16 PM, pvital(a)linux.vnet.ibm.com wrote:
> From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
>
> This patch isolates each unit test execution reducing the occurrences of tests
> using data from previous unit tests and making results not reliable.
>
> In addition, it also simplifies the output of tests execution, printing the tags
> PASSED and FAILED and the error/failed banners only when necessary.
>
> Signed-off-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
> ---
> tests/run_tests.sh.in | 53 +++++++++++++++++++++++++++++++++++++++------------
> 1 file changed, 41 insertions(+), 12 deletions(-)
>
> diff --git a/tests/run_tests.sh.in b/tests/run_tests.sh.in
> index 68dfa2e..d9c2661 100644
> --- a/tests/run_tests.sh.in
> +++ b/tests/run_tests.sh.in
> @@ -21,6 +21,10 @@
> HAVE_UNITTEST=@HAVE_PYMOD_UNITTEST@
> PYTHON_VER=@PYTHON_VERSION@
>
> +RED='\033[0;31m'
> +GREEN='\033[0;32m'
> +NC='\033[0m' # No Color
> +
> if [ "$1" = "-v" ]; then
> OPTS="-v"
> shift
> @@ -40,19 +44,44 @@ else
> CMD="python -m unittest"
> fi
>
> -LIST=($ARGS)
> -MODEL_LIST=()
> -MOCK_LIST=()
> -for ((i=0;i<${#LIST[@]};i++)); do
> -
> - if [[ ${LIST[$i]} == test_model* ]]; then
> - MODEL_LIST+=(${LIST[$i]})
> +NUM_TESTS=0
> +TIME=0
> +declare -A FAILED_UT # dict to store failed unit tests and its OUTPUT_FILE
> +for UT in $ARGS; do
> + OUTPUT_FILE=$(mktemp)
> + echo -n "***** Running unit test: $UT... "
> + # ../../../../../ refers to the project root
> + # ../../../../ refers to wok directory
> + # ../../../ refers to plugins directory
> + PYTHONPATH=../../../../../:../../../../:../../../ \
> + PYTHONWARNINGS="ignore:Unverified HTTPS request" \
> + $CMD $OPTS $UT &> $OUTPUT_FILE
You can do:
output=$($CMD $OPTS $UT)
to get the test output. That way we don't need to create multiple
temporary files.
> + RES=$?
> + if [ $RES -ne 0 ]; then
> + # unit test has failed, so keep the OUTPUT_FILE and print the results
> + echo -e "\t ${RED}FAILED${NC}"
> + ERROR_LOG_BEGIN=$(grep -n "^\==*" $OUTPUT_FILE | head -n1 | cut -d":" -f1)
> + ERROR_LOG_END=$(cat $OUTPUT_FILE | wc -l)
> + tail -n $((${ERROR_LOG_END}-${ERROR_LOG_BEGIN}+1)) $OUTPUT_FILE
> + FAILED_UT+=([$UT]=$OUTPUT_FILE)
> + OUTPUT=$(grep "Ran" $OUTPUT_FILE)
Following my suggestion to do not use temporary files, all the above
block will be replace by:
FAILED_UT+=$output
> else
> - MOCK_LIST+=(${LIST[$i]})
> + # unit test has passed, so print the results and delete the OUTPUT_FILE
> + OUTPUT=$(grep "Ran" $OUTPUT_FILE)
> + echo -e "\t ${GREEN}PASSED${NC} - $OUTPUT"
> + rm -rf $OUTPUT_FILE
> fi
> + TES=$(echo $OUTPUT | cut -d" " -f2)
> + NUM_TESTS=$(echo "$NUM_TESTS + $TES" | bc)
> + TES=$(echo $OUTPUT | cut -d" " -f5)
> + TIME=$(echo "$TIME + ${TES:0:-1}" | bc)
> done
>
> -# ../../../../../ refers to the project root
> -# ../../../../ refers to wok directory
> -# ../../../ refers to plugins directory
> -PYTHONPATH=../../../../../:../../../../:../../../ PYTHONWARNINGS="ignore:Unverified HTTPS request" $CMD $OPTS ${MODEL_LIST[@]} ${MOCK_LIST[@]}
> +# Print summary results
> +echo -e "======================================================================"
> +echo -e "===================== Kimchi Unit Tests Summary ======================"
> +echo -e "Ran $NUM_TESTS tests in $TIME seconds."
> +for i in "${!FAILED_UT[@]}"; do
> + FAIL_STATS=$(grep FAILED ${FAILED_UT[$i]} | cut -d" " -f2-4)
> + echo -e "$i FAILED: $FAIL_STATS - log available at ${FAILED_UT[$i]}"
> +done
> --
> 2.5.5
8 years, 7 months
[PATCH v2] [Kimchi 0/3] Adding passthrough forward mode to Macvtap
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
v2:
- used interface now being displayed in UI and backend
- fixed an issue where the newly created network would
appear as 'passthrough' in the UI until a page refresh
This patch set adds a new forward mode called 'passthrough' to
the 'macvtap' network.
Docs, model, test and UI changes included.
Daniel Henrique Barboza (3):
Adding 'passthrough' forward mode to Macvtap: doc changes
Adding 'passthrough' forward mode to Macvtap: model and test changes
Adding 'passthrough' forward mode to Macvtap: UI changes
API.json | 6 ++++++
docs/API.md | 1 +
i18n.py | 1 +
model/networks.py | 5 +++--
tests/test_networkxml.py | 14 ++++++++++++++
ui/js/src/kimchi.network.js | 1 +
ui/js/src/kimchi.network_add_main.js | 12 ++++++++++--
ui/pages/network-add.html.tmpl | 3 ++-
8 files changed, 38 insertions(+), 5 deletions(-)
--
2.5.5
8 years, 7 months
[PATCH] [Wok] Clear search when 'Reset to Default' button is clicked
by Lucio Correia
After a click in 'Reset to Default' button, the file
downloaded through 'Download' button was still relative
to the last 'Advanced search' done. This patch resets
the search to default one (no search parameters).
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
ui/js/wok.user-log.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/js/wok.user-log.js b/ui/js/wok.user-log.js
index dd61748..e787ee6 100644
--- a/ui/js/wok.user-log.js
+++ b/ui/js/wok.user-log.js
@@ -229,6 +229,7 @@ wok.initUserLogWindow = function() {
$("#"+wok.opts_user_log['gridId']).bootgrid("clear");
$("#"+wok.opts_user_log['gridId']).bootgrid("append", result);
$("#reset-button").addClass('hidden');
+ $("#download-button").data('search', '');
}, function(error) {
wok.message.error(error.responseJSON.reason, '#message-container-area');
wok.hideBootgridLoading(wok.opts_user_log);
--
1.9.1
8 years, 7 months
Re: [Kimchi-devel] [PATCH] [Kimchi 0/3] Adding passthrough forward mode to Macvtap
by Daniel Henrique Barboza
On 05/18/2016 12:23 PM, Aline Manera wrote:
>
> Hi Daniel,
>
> The patch set looks good for me.
>
> I'd only recommend to you keep in touch with Socorro as it will impact
> the edit virtual networks UI that she is working on.
Just talked with her. She'll provide her inputs here when she is done
rebasing/testing her work
with the work I've done in this patch set.
>
> Please, send appropriate details on which is needed to edit a macvtap
> passthrough mode if there is any difference from a macvtap bridge
> network.
There is no difference. The only difference is that the previous macvtap
network provides a
bridge to the guests, this new one will passthrough the network device
to it. Usage is
the same.
>
> Thanks,
> Aline Manera
>
> On 05/17/2016 03:08 PM, dhbarboza82(a)gmail.com wrote:
>> From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
>>
>> This patch set adds a new forward mode called 'passthrough' to
>> the 'macvtap' network.
>>
>> Docs, model, test and UI changes included.
>>
>> Daniel Henrique Barboza (3):
>> Adding 'passthrough' forward mode to Macvtap: doc changes
>> Adding 'passthrough' forward mode to Macvtap: model and test changes
>> Adding 'passthrough' forward mode to Macvtap: UI changes
>>
>> API.json | 6 ++++++
>> docs/API.md | 1 +
>> i18n.py | 1 +
>> model/networks.py | 3 ++-
>> tests/test_networkxml.py | 14 ++++++++++++++
>> ui/js/src/kimchi.network.js | 1 +
>> ui/js/src/kimchi.network_add_main.js | 11 +++++++++--
>> ui/pages/network-add.html.tmpl | 3 ++-
>> 8 files changed, 36 insertions(+), 4 deletions(-)
>>
>
8 years, 7 months
[PATCH] [Kimchi 0/3] Adding passthrough forward mode to Macvtap
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
This patch set adds a new forward mode called 'passthrough' to
the 'macvtap' network.
Docs, model, test and UI changes included.
Daniel Henrique Barboza (3):
Adding 'passthrough' forward mode to Macvtap: doc changes
Adding 'passthrough' forward mode to Macvtap: model and test changes
Adding 'passthrough' forward mode to Macvtap: UI changes
API.json | 6 ++++++
docs/API.md | 1 +
i18n.py | 1 +
model/networks.py | 3 ++-
tests/test_networkxml.py | 14 ++++++++++++++
ui/js/src/kimchi.network.js | 1 +
ui/js/src/kimchi.network_add_main.js | 11 +++++++++--
ui/pages/network-add.html.tmpl | 3 ++-
8 files changed, 36 insertions(+), 4 deletions(-)
--
2.5.5
8 years, 7 months
[RFC] All plug-ins: accessibility changes in wok.message
by Daniel Henrique Barboza
Hi everyone,
There is an accessibility issue in WoK concerning all messages launched
by wok.message method:
https://github.com/kimchi-project/wok/issues/79
Problem is that the message may disappear and the user might lose
information.
If we increase the timeout too much then the message becomes an annoyance.
My proposal is to make *all* messages closeable by user interaction. This is
made at this moment by the 'closeable' flag in the method:
wok.message = function(msg, level, node, closeable, onclick)
What I want to do is to get rid of the 'closeable' flag, together with
the code that makes the message fade with timeout. After that,
all WoK messages from all plug-ins would have the "X" icon
to be closed manually.
This will require changes in all plug-ins that instantiate any wok.message.*
method. I am willing to do those changes too.
Thoughts?
8 years, 7 months
[PATCH][Kimchi] Update Fedora iso url to fix test
by Rodrigo Trujillo
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
tests/test_rest.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_rest.py b/tests/test_rest.py
index b395bbb..0cbcc0e 100644
--- a/tests/test_rest.py
+++ b/tests/test_rest.py
@@ -811,8 +811,8 @@ class RestTests(unittest.TestCase):
os.remove('/tmp/attach-volume')
# Change path of storage cdrom
- cdrom = u'http://mirrors.kernel.org/fedora/releases/21/Live/'\
- 'x86_64/Fedora-Live-KDE-x86_64-21-5.iso'
+ cdrom = u'http://mirrors.kernel.org/fedora/releases/23/Live/'\
+ 'x86_64/Fedora-Live-KDE-x86_64-23-10.iso'
req = json.dumps({'path': cdrom})
resp = self.request('/plugins/kimchi/vms/test-vm/storages/' +
cd_dev, req, 'PUT')
--
2.1.0
8 years, 7 months