[PATCH v7] [Kimchi] Storage Volume management
by sguimaraes943@gmail.com
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
This patch adds Storage Volume management functions Wipe, Clone, Resize and Delete with multiple selection. It also includes a filter input for each Storage Pool and Gallery View for Storage Volumes.
v1:
- HTML and CSS
v2:
- Delete and Wipe with multi-selection
- Confirm messages with list of selected volumes when wiping or deleting volumes (requires SCSS/CSS patch sent to Wok)
- Filter working
- Removed "Add Volume" link from Storage Pool action button
- Added "Add Volume" to Volume box action button
v3:
- Clone function working with multiple selection
- Progress bar working for clone and create volume
- Temporary volume added to the volumes when cloning
- Seamless refresh on the volumes once each task is finished
- Fixed issue when list wouldn't refresh when all volumes are removed from the storage pool.
v4:
- Prevent scroll when Drop-down in volumes list is clicked
- Dropdown is not clipped from volumes list when there's only one or two items on the list
- Added Media Queries for small screen resolutions
v5:
- Fixed black border in Firefox and IE when switching from List View to Gallery View
- Allocation and % Used in the parent table are now updated when wiping/resizing/deleting/cloning volumes
- Removed success messages / duplicated messages
- Changed scrollbar position in Volumes area
- When applying multiple actions, the checkbox is hidden/disabled and a spinner is shown while the the queue of selected items is being processed
v6:
- Progress-bar hidden in List View
- Fixed MiB text to MB
- Added "Used By" column
v7:
- Removed tooltip when volume is not in use by any guest
Samuel Guimarães (1):
Storage Volume management
model/storagevolumes.py | 2 +-
ui/css/kimchi.css | 436 +++++++++++++++--
ui/css/src/modules/_storage.scss | 406 ++++++++++++++--
ui/js/src/kimchi.api.js | 50 ++
ui/js/src/kimchi.storage_main.js | 515 +++++++++++++++++----
ui/js/src/kimchi.storagepool_add_volume_main.js | 2 +-
ui/js/src/kimchi.storagepool_resize_volume_main.js | 59 +++
ui/pages/i18n.json.tmpl | 5 +
ui/pages/storagepool-resize-volume.html.tmpl | 51 ++
ui/pages/tabs/storage.html.tmpl | 157 ++++---
10 files changed, 1421 insertions(+), 262 deletions(-)
create mode 100644 ui/js/src/kimchi.storagepool_resize_volume_main.js
create mode 100644 ui/pages/storagepool-resize-volume.html.tmpl
--
1.9.3
8 years, 5 months
Re: [Kimchi-devel] [PATCH][Wok 2/5] Creates pluginmanager.py module
by Aline Manera
On 05/31/2016 02:51 PM, Rodrigo Trujillo wrote:
> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
> ---
> src/wok/pluginsmanager.py | 133 ++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 133 insertions(+)
> create mode 100644 src/wok/pluginsmanager.py
>
> diff --git a/src/wok/pluginsmanager.py b/src/wok/pluginsmanager.py
> new file mode 100644
> index 0000000..b7bb92b
> --- /dev/null
> +++ b/src/wok/pluginsmanager.py
> @@ -0,0 +1,133 @@
> +#
> +# Project Wok
> +#
> +# Copyright IBM Corp, 2016
> +#
> +# Code derived from Project Kimchi
> +#
This is a new code, right? So not derived from Kimchi
> +# 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
> +#
> +
> +
> +import cherrypy
> +import copy
> +import os
> +from cherrypy.lib.reprconf import Parser
> +from configobj import ConfigObj
> +
> +
> +from basemodel import Singleton
> +from wok.config import paths, PluginConfig, PluginPaths
> +from wok.exception import OperationFailed
> +
> +
> +wok_log = cherrypy.log.error_log
> +
> +
> +class Plugins():
> + __metaclass__ = Singleton
> +
> + def __init__(self):
> + # { '<PLUGIN_NAME>': {
> + # config: <PLUGIN_CONFIG>,
> + # enabled: <TRUE/FALSE>,
> + # uri: <PLUGIN_URI_FROM_CONFIG>,
> + # plugin_class: <PLUGIN_CLASS_FROM_CONFIG>
plugin_class is not part of plugin config anymore.
> + self._plugins_dict = {}
> + self._init_all_plugins()
> +
> + def _load_plugin_conf(self, name):
> + plugin_conf = PluginPaths(name).conf_file
> + ret = {}
> + if not os.path.exists(plugin_conf):
> + cherrypy.log.error_log.error("Plugin configuration file %s"
> + " doesn't exist." % plugin_conf)
> + else:
> + try:
> + ret = Parser().dict_from_file(plugin_conf)
> + except ValueError as e:
> + msg = "Failed to load plugin conf from %s: %s"
> + cherrypy.log.error_log.error(msg % (plugin_conf, e.message))
> + ret.update(PluginConfig(name))
> + return ret
> +
> + def _init_all_plugins(self):
> + plugin_dir = paths.plugins_dir
> + try:
> + dir_contents = os.listdir(plugin_dir)
> + except OSError:
> + return
> + for name in dir_contents:
> + if os.path.isdir(os.path.join(plugin_dir, name)):
> + wok_log.info("Loading plugin: %s" % name)
> + cfg = self._load_plugin_conf(name)
> + plugin_cls = cfg.get('wok', {}).get('plugin_class', '')
Same I commented above. plugin_class is not used anymore.
> + if plugin_cls == '':
> + plugin_cls = ('plugins.%s.%s' % (name, name[0].upper() +
> + name[1:]))
> + self._plugins_dict[name] = {
> + 'config': cfg,
> + 'enabled': cfg.get('wok', {}).get('enable', False),
> + 'uri': cfg.get('wok', {}).get('uri', ''),
> + 'plugin_class': plugin_cls,
> + 'conf_file': PluginPaths(name).conf_file
> + }
> +
> + if 'wok' in self._plugins_dict[name]['config']:
> + del self._plugins_dict[name]['config']['wok']
> +
Usually the cherrypy configuration for a plugin can not be changed, so
IMO it should not be part of plugin configuration file.
If plugin code is responsible to loads its configuraiton, we don't need
to merge the plugin configuration settings with cherrypy configuration
and the above lines can be removed.
> + def get_all_plugins_info(self):
> + return copy.deepcopy(self._plugins_dict)
> +
> + def get_plugin_info(self, name):
> + return copy.deepcopy(self._plugins_dict.get(name, {}))
> +
> + def get_all_plugins_names(self):
> + ret = self._plugins_dict.keys()
> + ret.sort()
> + return ret
> +
> + def get_enabled_plugins(self):
> + ret = [plugin for plugin in self._plugins_dict.keys() if
> + self._plugins_dict[plugin]['enabled']]
> + ret.sort()
> + return ret
> +
> + def _enable_plugin_conf_file(self, f_conf, enable=True):
> + try:
> + # 'unrepr' makes ConfigObj read and write characters like ("'?)
> + conf = ConfigObj(infile=f_conf, unrepr=True)
> + conf['wok']['enable'] = enable
> + with open(f_conf, 'wb') as f:
> + conf.write(f)
> + except Exception as e:
> + wok_log.error('Error updating plugin conf file. ' + e.message)
> + raise
> +
> + def _change_plugin_state(self, name, enable=True):
> + plugin = self._plugins_dict[name]
> + if plugin['enabled'] == enable:
> + return
> + try:
> + self._enable_plugin_conf_file(plugin['conf_file'], enable)
> + except:
> + raise OperationFailed('WOKPLUG0002E', {'plugin': name})
> + plugin['enabled'] = enable
> +
> + def enable_plugin(self, plugin):
> + self._change_plugin_state(plugin, True)
> +
> + def disable_plugin(self, plugin):
> + self._change_plugin_state(plugin, False)
8 years, 6 months
Re: [Kimchi-devel] [PATCH][Wok 5/5] Change plugins API documentation by pluginsmanager API
by Aline Manera
Please, also add new test cases to cover the API changes.
One question below:
On 05/31/2016 02:51 PM, Rodrigo Trujillo wrote:
> This patch creates the documentation for pluginsmanager API
>
> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
> ---
> docs/API/plugins.md | 13 ----------
> docs/API/pluginsmanager.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 61 insertions(+), 13 deletions(-)
> delete mode 100644 docs/API/plugins.md
> create mode 100644 docs/API/pluginsmanager.md
>
> diff --git a/docs/API/plugins.md b/docs/API/plugins.md
> deleted file mode 100644
> index aaa37b5..0000000
> --- a/docs/API/plugins.md
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -## REST API Specification for Plugins
> -
> -### Collection: Plugins
> -
> -**URI:** /plugins
> -
> -**Methods:**
> -
> -* **GET**: Retrieve a summarized list names of all UI Plugins
> -
> -#### Examples
> -GET /plugins
> -[pluginA, pluginB, pluginC]
> diff --git a/docs/API/pluginsmanager.md b/docs/API/pluginsmanager.md
> new file mode 100644
> index 0000000..23381d3
> --- /dev/null
> +++ b/docs/API/pluginsmanager.md
> @@ -0,0 +1,61 @@
> +## REST API Specification for Plugins Manager
> +
> +### Collection: Plugins
> +
> +**URI:** /pluginsmanager
> +
> +**Methods:**
> +
> +* **GET**: Retrieve a list of all Plugins configured in Wok, showing name and state.
> +
> +#### Examples
> +GET /pluginsmanager
> +[
> + {
> + "enabled":true,
> + "name":"gingerbase"
> + },
> + {
> + "enabled":true,
> + "name":"kimchi"
> + },
> + {
> + "enabled":false,
> + "name":"sample"
> + }
> +]
> +
> +### Resource: Plugin
> +
> +**URI:** /pluginsmanager/*:name*
> +
> +A plugin represents a software that will make use of infrastructure provided
> +by Wok. It should be installed in a directory with its <name> in Wok directory
> +'plugins' and contains an <name>.conf file.
> +Example: "/usr/lib/python2.7/site-packages/wok/plugins/kimchi"
> +
> +**Methods:**
> +
> +* **GET**: Retrieve the full description of the plugin.
> + * name: The plugin name
> + * enabled: State of the plugin. If not enabled, Wok will not load it
> +* **POST**: *See Task Actions*
> +
> +**Actions (POST):**
> +
> +* enable: enable a disabled plugin. Also changes plugin's configuration file
> +
> +* disable: disable a enabled plugin. Also changes plugin's configuration file
> +
Does that mean trying to enable a enabled plugin will raise an error?
And similar to disable a disabled plugin?
> +#### Examples
> +GET /pluginsmanager/sample
> +{
> + "enabled":false,
> + "name":"sample"
> +}
> +
> +POST /pluginsmanager/sample/enable
> +{
> + "enabled":true,
> + "name":"sample"
> +}
8 years, 6 months
[PATCH v6] [Kimchi] Storage Volume management
by sguimaraes943@gmail.com
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
This patch adds Storage Volume management functions Wipe, Clone, Resize and Delete with multiple selection. It also includes a filter input for each Storage Pool and Gallery View for Storage Volumes.
v1:
- HTML and CSS
v2:
- Delete and Wipe with multi-selection
- Confirm messages with list of selected volumes when wiping or deleting volumes (requires SCSS/CSS patch sent to Wok)
- Filter working
- Removed "Add Volume" link from Storage Pool action button
- Added "Add Volume" to Volume box action button
v3:
- Clone function working with multiple selection
- Progress bar working for clone and create volume
- Temporary volume added to the volumes when cloning
- Seamless refresh on the volumes once each task is finished
- Fixed issue when list wouldn't refresh when all volumes are removed from the storage pool.
v4:
- Prevent scroll when Drop-down in volumes list is clicked
- Dropdown is not clipped from volumes list when there's only one or two items on the list
- Added Media Queries for small screen resolutions
v5:
- Fixed black border in Firefox and IE when switching from List View to Gallery View
- Allocation and % Used in the parent table are now updated when wiping/resizing/deleting/cloning volumes
- Removed success messages / duplicated messages
- Changed scrollbar position in Volumes area
- When applying multiple actions, the checkbox is hidden/disabled and a spinner is shown while the the queue of selected items is being processed
v6:
- Progress-bar hidden in List View
- Fixed MiB text to MB
- Added "Used By" column
Samuel Guimarães (1):
Storage Volume management
model/storagevolumes.py | 2 +-
ui/css/kimchi.css | 436 ++++++++++++++++--
ui/css/src/modules/_storage.scss | 406 +++++++++++++++--
ui/js/src/kimchi.api.js | 50 ++
ui/js/src/kimchi.storage_main.js | 506 +++++++++++++++++----
ui/js/src/kimchi.storagepool_add_volume_main.js | 2 +-
ui/js/src/kimchi.storagepool_resize_volume_main.js | 59 +++
ui/pages/i18n.json.tmpl | 5 +
ui/pages/storagepool-resize-volume.html.tmpl | 51 +++
ui/pages/tabs/storage.html.tmpl | 157 ++++---
10 files changed, 1413 insertions(+), 261 deletions(-)
create mode 100644 ui/js/src/kimchi.storagepool_resize_volume_main.js
create mode 100644 ui/pages/storagepool-resize-volume.html.tmpl
--
1.9.3
8 years, 6 months
[RFC] Change guest boot order on REST API
by Daniel Henrique Barboza
-------- Forwarded Message --------
Subject: [ginger-dev-list] [RFC] Change guest boot order on REST API
Date: Wed, 1 Jun 2016 13:49:41 -0300
From: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
To: ginger-dev <ginger-dev-list(a)googlegroups.com>
Propose: Kimchi allow to change boot order ("fd", "hd", "cdrom" or
"network")
hd device can specify which disk will be booted
Rest API will receive answer from
/plugins/kimchi/<VM NAME>/bootorder
{[{"dev": "hd"}]} or a list: {[{"dev": "hd"}, {"dev": "cdrom"}]}
Doubts:
How we can edit the bootloader? Like the list above or a kind of fixed list?
Libvirt provides bootmenu too, which allows users to pick a device in
the beginning. Must have it?
--
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, 6 months
Re: [Kimchi-devel] [PATCH][Wok 4/5] Implements control/model of new plugin API
by Aline Manera
On 05/31/2016 02:51 PM, Rodrigo Trujillo wrote:
> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
> ---
> src/wok/control/plugins.py | 19 ++++++++++++++++---
> src/wok/i18n.py | 3 +++
> src/wok/model/plugins.py | 30 ++++++++++++++++++++++++------
> 3 files changed, 43 insertions(+), 9 deletions(-)
>
> diff --git a/src/wok/control/plugins.py b/src/wok/control/plugins.py
> index 57dfa1b..c7c9554 100644
> --- a/src/wok/control/plugins.py
> +++ b/src/wok/control/plugins.py
> @@ -19,11 +19,24 @@
> # License along with this library; if not, write to the Free Software
> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>
> -from wok.control.base import SimpleCollection
> +from wok.control.base import Collection, Resource
> from wok.control.utils import UrlSubNode
>
>
> -@UrlSubNode("plugins")
> -class Plugins(SimpleCollection):
> +@UrlSubNode("pluginsmanager")
> +class Plugins(Collection):
> def __init__(self, model):
> super(Plugins, self).__init__(model)
> + self.resource = Plugin
> +
> +
> +class Plugin(Resource):
> + def __init__(self, model, id):
> + super(Plugin, self).__init__(model, id)
> + self.uri_fmt = "/pluginsmanager/%s"
> + self.enable = self.generate_action_handler('enable')
> + self.disable = self.generate_action_handler('disable')
> +
> + @property
> + def data(self):
> + return self.info
Please, set admin_methods to avoid any user be able to change the plugin
settings.
And also update test_authorization.py tests to cover that.
> diff --git a/src/wok/i18n.py b/src/wok/i18n.py
> index 4fc21f1..bda3949 100644
> --- a/src/wok/i18n.py
> +++ b/src/wok/i18n.py
> @@ -60,4 +60,7 @@ messages = {
> "WOKRES0001L": _("Request made on resource"),
> "WOKROOT0001L": _("User '%(username)s' logged in"),
> "WOKROOT0002L": _("User '%(username)s' logged out"),
> +
> + "WOKPLUG0001E": _("Plugin '%(plugin_name)s' not found."),
> + "WOKPLUG0002E": _("Error updating configuration file of plugin '%(plugin)s'."),
> }
> diff --git a/src/wok/model/plugins.py b/src/wok/model/plugins.py
> index 4beff44..1842dbc 100644
> --- a/src/wok/model/plugins.py
> +++ b/src/wok/model/plugins.py
> @@ -19,9 +19,9 @@
> # License along with this library; if not, write to the Free Software
> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>
> -import cherrypy
>
> -from wok.utils import get_enabled_plugins
> +from wok.exception import NotFoundError
> +from wok.pluginsmanager import Plugins
>
>
> class PluginsModel(object):
> @@ -29,7 +29,25 @@ class PluginsModel(object):
> pass
>
> def get_list(self):
> - # 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()]
> + return Plugins().get_all_plugins_names()
> +
> +
> +class PluginModel(object):
> + def __init__(self, **kargs):
> + pass
> +
> + def lookup(self, plugin):
> + info = Plugins().get_plugin_info(plugin)
> + if not info:
> + raise NotFoundError('WOKPLUG0001E', {'plugin_name': plugin})
> +
> + return {'name': plugin,
> + 'enabled': info['enabled']}
> +
> + def enable(self, plugin_name):
> + print "Enabling %s" % plugin_name
> + Plugins().enable_plugin(plugin_name)
> +
> + def disable(self, plugin_name):
> + print "Disabling %s" % plugin_name
> + Plugins().disable_plugin(plugin_name)
Please, use wok_log instead of print
8 years, 6 months
[PATCH] [Kimchi 2/2] Update tests to reflect new behavior
by Lucio Correia
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
tests/test_model.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/test_model.py b/tests/test_model.py
index f4a145f..a0fe36f 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -227,14 +227,17 @@ class ModelTests(unittest.TestCase):
# snapshot revert to the first created vm
result = inst.vmsnapshot_revert(u'kimchi-vm-new', params['name'])
- self.assertEquals(result, [u'kimchi-vm', snap['name']])
+ self.assertEquals(result, [u'kimchi-vm-new', snap['name']])
- vm = inst.vm_lookup(u'kimchi-vm')
+ vm = inst.vm_lookup(u'kimchi-vm-new')
self.assertEquals(vm['state'], snap['state'])
- current_snap = inst.currentvmsnapshot_lookup(u'kimchi-vm')
+ current_snap = inst.currentvmsnapshot_lookup(u'kimchi-vm-new')
self.assertEquals(params['name'], current_snap['name'])
+ # rename vm back
+ inst.vm_update('kimchi-vm-new', {'name': u'kimchi-vm'})
+
self.assertRaises(NotFoundError, inst.vmsnapshot_delete,
u'kimchi-vm', u'foobar')
--
1.9.1
8 years, 6 months
[PATCH] [Kimchi 1/2] Always update snapshot XML with new name and UUID
by Lucio Correia
When a guest with snapshots is renamed, and afterwards
guest is reverted to a snapshot created before the name
change, the guest is also renamed back. This patch fixes
this issue by updating snapshot XML when guest is renamed.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
model/vms.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/model/vms.py b/model/vms.py
index b0b4eb2..3b09909 100644
--- a/model/vms.py
+++ b/model/vms.py
@@ -97,6 +97,8 @@ XPATH_DOMAIN_DEV_CPU_ID = '/domain/devices/spapr-cpu-socket/@id'
XPATH_CPU = './cpu'
XPATH_NAME = './name'
XPATH_NUMA_CELL = './cpu/numa/cell'
+XPATH_SNAP_VM_NAME = './domain/name'
+XPATH_SNAP_VM_UUID = './domain/uuid'
XPATH_TOPOLOGY = './cpu/topology'
XPATH_VCPU = './vcpu'
XPATH_MAX_MEMORY = './maxMemory'
@@ -728,7 +730,15 @@ class VMModel(object):
if info['current']:
flags |= libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT
- dom.snapshotCreateXML(info['xml'], flags)
+ # Snapshot XML contains the VM xml from the time it was created.
+ # Thus VM name and uuid must be updated to current ones. Otherwise,
+ # when reverted, the vm name will be inconsistent.
+ xml = info['xml']
+ xml = xml_item_update(xml, XPATH_SNAP_VM_NAME, dom.name(), None)
+ xml = xml_item_update(xml, XPATH_SNAP_VM_UUID, dom.UUIDString(),
+ None)
+
+ dom.snapshotCreateXML(xml, flags)
def _update_metadata_name(self, dom, nonascii_name):
if nonascii_name is not None:
--
1.9.1
8 years, 6 months
[PATCH V2] [Kimchi 0/2] Fix VM name conflicts with snapshot reverts
by Lucio Correia
Changes in V2:
* Fix tests
Lucio Correia (2):
Always update snapshot XML with new name and UUID
Update tests to reflect new behavior
model/vms.py | 12 +++++++++++-
tests/test_model.py | 9 ++++++---
2 files changed, 17 insertions(+), 4 deletions(-)
--
1.9.1
8 years, 6 months
Re: [Kimchi-devel] [PATCH] [Wok] Externlise the size units such as Ki, Mi, Gi, etc.
by Pooja Kulkarni
Hi Aline,
I do not have a good example for this, but I did come across something
while searching around.
French use Ko (kilo-octet) instead of Kb as a unit of size. So this
leads me to believe there could be other such scenarios while dealing
with different locales.
Thanks,
Pooja
On 05/30/2016 08:52 PM, Aline Manera wrote:
>
> Hi Pooja,
>
> Isn't KiB, MiB, GiB, ect international units for computing ?
> Do you have any example on which language they are 'translated' to a
> different unit name?
>
> Thanks,
> Aline Manera
>
> On 05/25/2016 06:55 AM, pkulkark(a)linux.vnet.ibm.com wrote:
>> From: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
>>
>> This patch externalises the size
>> units such as KiB, MiB, GiB, etc
>> that are added in wok.formatMeasurement
>> method, and also updates the .pot
>> and *.po files.
>>
>> Signed-off-by: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
>> ---
>> po/de_DE.po | 32 +++++++++++++++++++++++++++++++-
>> po/en_US.po | 32 +++++++++++++++++++++++++++++++-
>> po/es_ES.po | 32 +++++++++++++++++++++++++++++++-
>> po/fr_FR.po | 32 +++++++++++++++++++++++++++++++-
>> po/it_IT.po | 32 +++++++++++++++++++++++++++++++-
>> po/ja_JP.po | 32 +++++++++++++++++++++++++++++++-
>> po/ko_KR.po | 32 +++++++++++++++++++++++++++++++-
>> po/pt_BR.po | 32 +++++++++++++++++++++++++++++++-
>> po/ru_RU.po | 32 +++++++++++++++++++++++++++++++-
>> po/wok.pot | 32 +++++++++++++++++++++++++++++++-
>> po/zh_CN.po | 32 +++++++++++++++++++++++++++++++-
>> po/zh_TW.po | 32 +++++++++++++++++++++++++++++++-
>> ui/js/src/wok.utils.js | 7 ++++++-
>> ui/pages/i18n.json.tmpl | 13 ++++++++++++-
>> 14 files changed, 390 insertions(+), 14 deletions(-)
>>
>> diff --git a/po/de_DE.po b/po/de_DE.po
>> index 0fb869d..c2b9a0a 100644
>> --- a/po/de_DE.po
>> +++ b/po/de_DE.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac(a)linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -201,6 +201,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "Der Benutzername oder das Kennwort, den bzw. das Sie eingegeben
>> haben, ist "
>> diff --git a/po/en_US.po b/po/en_US.po
>> index 73d7056..b31785b 100644
>> --- a/po/en_US.po
>> +++ b/po/en_US.po
>> @@ -6,7 +6,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac(a)linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -195,6 +195,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>>
>> diff --git a/po/es_ES.po b/po/es_ES.po
>> index 8acb513..d77c60e 100644
>> --- a/po/es_ES.po
>> +++ b/po/es_ES.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac(a)linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -201,6 +201,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "El nombre de usuario o contraseña que ha especificado es
>> incorrecto. Por "
>> diff --git a/po/fr_FR.po b/po/fr_FR.po
>> index 9cc473a..065113b 100644
>> --- a/po/fr_FR.po
>> +++ b/po/fr_FR.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2014-08-27 21:30+0000\n"
>> "Last-Translator: BobSynfig\n"
>> "Language-Team: French
>> (http://www.transifex.com/projects/p/kimchi/language/"
>> @@ -204,6 +204,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "Le nom d'utilisateur ou le mot de passe que vous avez entré est
>> incorrect. "
>> diff --git a/po/it_IT.po b/po/it_IT.po
>> index ef3729d..d871172 100644
>> --- a/po/it_IT.po
>> +++ b/po/it_IT.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac(a)linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -201,6 +201,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "Il nome utente o la password immessi non sono corretti. Ripetere "
>> diff --git a/po/ja_JP.po b/po/ja_JP.po
>> index dc8926f..cde5d87 100644
>> --- a/po/ja_JP.po
>> +++ b/po/ja_JP.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac(a)linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -199,6 +199,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr "入力したユーザー名またはパスワードが誤っています。やり直し
>> てください。"
>>
>> diff --git a/po/ko_KR.po b/po/ko_KR.po
>> index 84b4750..2ef50fb 100644
>> --- a/po/ko_KR.po
>> +++ b/po/ko_KR.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac(a)linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -196,6 +196,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "입력한 사용자 이름 또는 비밀번호가 올바르지 않습니다. 다시 시도하
>> 십시오."
>> diff --git a/po/pt_BR.po b/po/pt_BR.po
>> index a4ae451..75a6c9b 100644
>> --- a/po/pt_BR.po
>> +++ b/po/pt_BR.po
>> @@ -20,7 +20,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 1.0\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2015-03-23 12:57+0000\n"
>> "Last-Translator: Crístian Deives dos Santos Viana
>> <cristiandeives@gmail."
>> "com>\n"
>> @@ -217,6 +217,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>> "O usuário ou senha inseridos estão incorretos. Por favor, tente
>> novamente."
>> diff --git a/po/ru_RU.po b/po/ru_RU.po
>> index 0e81ba4..392be6d 100644
>> --- a/po/ru_RU.po
>> +++ b/po/ru_RU.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2014-08-28 17:32+0000\n"
>> "Last-Translator: Aline Manera <aline.manera(a)gmail.com>\n"
>> "Language-Team: Russian
>> (http://www.transifex.com/projects/p/kimchi/language/"
>> @@ -197,6 +197,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr "Указано неверное имя пользователя или пароль. Введите еще
>> раз."
>>
>> diff --git a/po/wok.pot b/po/wok.pot
>> index 01b8a28..231cd33 100755
>> --- a/po/wok.pot
>> +++ b/po/wok.pot
>> @@ -8,7 +8,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: PACKAGE VERSION\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
>> "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
>> "Language-Team: LANGUAGE <LL(a)li.org>\n"
>> @@ -195,6 +195,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr ""
>>
>> diff --git a/po/zh_CN.po b/po/zh_CN.po
>> index 0a66eec..5d81cc5 100644
>> --- a/po/zh_CN.po
>> +++ b/po/zh_CN.po
>> @@ -20,7 +20,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-06-27 10:48+0000\n"
>> "Last-Translator: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>\n"
>> "Language-Team: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>\n"
>> @@ -212,6 +212,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr "用户名或密码错误,请重新输入。"
>>
>> diff --git a/po/zh_TW.po b/po/zh_TW.po
>> index fd83384..ccd1d48 100644
>> --- a/po/zh_TW.po
>> +++ b/po/zh_TW.po
>> @@ -5,7 +5,7 @@ msgid ""
>> msgstr ""
>> "Project-Id-Version: kimchi 0.1\n"
>> "Report-Msgid-Bugs-To: \n"
>> -"POT-Creation-Date: 2016-05-19 21:30+0530\n"
>> +"POT-Creation-Date: 2016-05-25 15:08+0530\n"
>> "PO-Revision-Date: 2013-07-11 17:32-0400\n"
>> "Last-Translator: Crístian Viana <vianac(a)linux.vnet.ibm.com>\n"
>> "Language-Team: English\n"
>> @@ -196,6 +196,36 @@ msgstr ""
>> msgid "Actions"
>> msgstr ""
>>
>> +msgid "Ki"
>> +msgstr ""
>> +
>> +msgid "Mi"
>> +msgstr ""
>> +
>> +msgid "Gi"
>> +msgstr ""
>> +
>> +msgid "Ti"
>> +msgstr ""
>> +
>> +msgid "Pi"
>> +msgstr ""
>> +
>> +msgid "k"
>> +msgstr ""
>> +
>> +msgid "M"
>> +msgstr ""
>> +
>> +msgid "G"
>> +msgstr ""
>> +
>> +msgid "T"
>> +msgstr ""
>> +
>> +msgid "P"
>> +msgstr ""
>> +
>> msgid "The username or password you entered is incorrect. Please
>> try again."
>> msgstr "您輸入的使用者名稱或密碼不正確。請重試。"
>>
>> diff --git a/ui/js/src/wok.utils.js b/ui/js/src/wok.utils.js
>> index 1fb3c9b..8eb6f08 100644
>> --- a/ui/js/src/wok.utils.js
>> +++ b/ui/js/src/wok.utils.js
>> @@ -150,9 +150,14 @@ wok.changetoProperUnit = function(numOrg,
>> digits, base) {
>> var fixed = settings['fixed'];
>>
>> var unitMapping = unitBaseMapping[base];
>> + var unitmap = { 'Ki': 'WOKFMT2001M', 'Mi': 'WOKFMT2002M',
>> 'Gi': 'WOKFMT2003M',
>> + 'Ti': 'WOKFMT2004M', 'Pi': 'WOKFMT2005M',
>> 'k': 'WOKFMT2006M',
>> + 'M': 'WOKFMT2007M', 'G': 'WOKFMT2008M', 'T':
>> 'WOKFMT2009M',
>> + 'P': 'WOKFMT2010M'}
>> for(var i = unitMapping.length - 1; i >= 0; i--) {
>> var mapping = unitMapping[i];
>> - var suffix = mapping['us'];
>> + var s_key = mapping['us'];
>> + var suffix = i18n[unitmap[s_key]];
>> var startingValue = mapping['v'];
>> if(number < startingValue) {
>> continue;
>> diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
>> index ca7ae4c..94e90ac 100644
>> --- a/ui/pages/i18n.json.tmpl
>> +++ b/ui/pages/i18n.json.tmpl
>> @@ -49,5 +49,16 @@
>> "WOKSETT0009M": "$_("Showing {{ctx.start}} to {{ctx.end}} of
>> {{ctx.total}} entries")",
>> "WOKSETT0010M": "$_("No results found!")",
>> "WOKSETT0011M": "$_("Loading...")",
>> - "WOKSETT0012M": "$_("Actions")"
>> + "WOKSETT0012M": "$_("Actions")",
>> +
>> + "WOKFMT2001M": "$_("Ki")",
>> + "WOKFMT2002M": "$_("Mi")",
>> + "WOKFMT2003M": "$_("Gi")",
>> + "WOKFMT2004M": "$_("Ti")",
>> + "WOKFMT2005M": "$_("Pi")",
>> + "WOKFMT2006M": "$_("k")",
>> + "WOKFMT2007M": "$_("M")",
>> + "WOKFMT2008M": "$_("G")",
>> + "WOKFMT2009M": "$_("T")",
>> + "WOKFMT2010M": "$_("P")"
>> }
>
8 years, 6 months