[RFC] Wok / Ginger sidebar
by Samuel Henrique De Oliveira Guimaraes
Hi team,
We currently have an issue with Ginger/Gingerbase navigation bar in small screen resolutions and we also have huge tables in System Services page. Since working on the navigation bar involves editing Wok styles, I'm sending this e-mail to Wok mailing list instead of Ginger group.
I looked for successful combinations of sidebar + horizontal navigation bars and so far I couldn't find any example that would exactly fit with Wok and its plugins. The majority of examples I'm listing below are very good with traditional pages with deep subcategories and the navigation bars can work as sitemaps and replace breadcrumbs:
* http://www.worldwildlife.org/ - https://vimeo.com/166812605
* https://www.theguardian.com/us - https://vimeo.com/166812599
* https://next.ft.com/fastft - https://vimeo.com/166812597
Wok currently has two navigation levels. Kimchi doesn't have multiple sections but Ginger and Gingerbase uses collapsible panel groups to separate sections that could be third level elements on a sidebar. This was already discussed when we moved some features from Ginger to Gingerbase but I think we could achieve a functional sidebar with up to three levels without using a "landing page" for second-level elements.
In the attached screenshots ginger_sidebar1 and ginger_sidebar2 are mockups for an off-canvas menu that would slide the main content and hide itself once an option is clicked. It would also hide the other panel accordions. Here are two off-canvas menu in action:
* http://codepen.io/SitePoint/full/uIemr/
* https://codepen.io/benske/full/cxrta/
Since this would require a change in Wok tabs and ginger/gingerbase tab-ext.xml, I think we could implement something entirely different that would with Wok and all plugins. This site menu only have first-level options on the sidebar but I think we could add collapsible links like a tree-table menu: https://www.sitepoint.com/
In addition to the sidebar, we could put a search/filter input on the top that would allow the user to type the desired option and show its position on the menu. Please take a look at the remaining attached screenshots. I did one variation with the content aligned to the center and another one aligned to the left.
Regards,
Samuel
8 years, 3 months
[Wok] [RFC] Issue #122: Make AsyncTask stoppable.
by Paulo Ricardo Paz Vital
This is an RFC for "Make AsyncTask stoppable" in Wok (and any other plugin). The
main idea is give to user a way to stop a Task that is still running, cleaning
all references and processes and setting the Task status to "killed".
To do this, the Task API need to be modified, by implementing the DELETE method
in Task Resource. Said that, the API will look like:
### Resource: Task
**URI:** /tasks/*:id*
A task represents an asynchronous operation that is being performed by the
server.
**Methods:**
* **GET**: Retrieve the full description of the Task
* id: The Task ID is used to identify this Task in the API.
* status: The current status of the Task
* running: The task is running
* finished: The task has finished successfully
* failed: The task failed
+ * killed: The task was killed by user
* message: Human-readable details about the Task status
* target_uri: Resource URI related to the Task
+* **DELETE**: Delete the Task
* **POST**: *See Task Actions*
**Actions (POST):**
*No actions defined*
Since an AsyncTask is basic a thread running in the system and this thread can
execute a pure Python method or a background command (by using run_command()
from wok.utils), the developer must pass as argument to the add_task() a method
to be executed by the DELETE operation, called here as 'kill_cb'. With this
idea, the add_task() method and also the AsyncTask constructor will be like:
def add_task(target_uri, fn, objstore, kill_cb=None, opaque=None):
class AsyncTask(object):
def __init__(self, id, target_uri, fn, objstore, kill_cb=None, opaque=None):
If none kill_cb is passed, the task will not be able to stopped and an error (or
warning) message will be raised to user if DELETE operation is executed.
Otherwise, the kill_cb method will be executed by kill() method (responsible to
execute the DELETE operation) of AsyncTask class and its status set to 'killed'.
If you have any comments or suggestions, please feel free to reply to ML.
Thanks and bestr regards,
--
Paulo Ricardo Paz Vital
Linux Technology Center, IBM Systems
http://www.ibm.com/linux/ltc/
8 years, 4 months
[RFC] Use javascript libraries from rpms instead of hardcode it inside the git
by Ramon Medeiros
Hi,
i want to use javascript libraries from rpms, but, not all libraries are
available in distro repos. So let's discuss how i can do it:
Fedora case:
Fedora has jquery, lodash, moment, typeahead and es5-shim libraries
available.
Opensuse:
No library available
Ubuntu:
Ubuntu has bootstrap, jquery, jquery-ui e lodash.
As not all libraries are available, i received a suggestion to use a
parameter at configure.ac, like --with-spice, to choose libs from rpm or
from the code. So, what is best:
Use single parameter (--use-js-from-rpms)
I will need to check the distro by code and generate the html templates
with the script tag changed.
Use parameters with distros (--ubuntu-use-js-from-rpms)
Same as above, but distro will not be checked.
--
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, 4 months
[PATCH v2] [Kimchi] Validate passthrough inside the task
by Jose Ricardo Ziviani
- In order to validade if a given PCI is ok to be attached, a heavy
verification has to be done. This commit add such verification
in the task. This will give a faster response to the UI,
improving the user experience.
- Add a small fix for an issue in PCI filter, added by commit eb3864f.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
v2:
- Fix issue in PCI Filter button
model/vmhostdevs.py | 22 ++++++++++++++++-
ui/js/src/kimchi.guest_edit_main.js | 49 ++++++++++++++++++++-----------------
2 files changed, 48 insertions(+), 23 deletions(-)
diff --git a/model/vmhostdevs.py b/model/vmhostdevs.py
index 15b5bec..ef39de3 100644
--- a/model/vmhostdevs.py
+++ b/model/vmhostdevs.py
@@ -89,7 +89,6 @@ class VMHostDevsModel(object):
def create(self, vmid, params):
dev_name = params['name']
- self._passthrough_device_validate(dev_name)
dev_info = self.dev_model.lookup(dev_name)
if dev_info['device_type'] == 'pci':
@@ -216,6 +215,13 @@ class VMHostDevsModel(object):
dev_info = params['dev_info']
lock = params['lock']
+ try:
+ self._passthrough_device_validate(dev_info['name'])
+
+ except InvalidParameter as e:
+ cb(e.message, False)
+ raise
+
with lock:
try:
self._validate_pci_passthrough_env()
@@ -455,6 +461,13 @@ class VMHostDevsModel(object):
dev_info = params['dev_info']
lock = params['lock']
+ try:
+ self._passthrough_device_validate(dev_info['name'])
+
+ except InvalidParameter as e:
+ cb(e.message, False)
+ raise
+
with lock:
dom = VMModel.get_vm(vmid, self.conn)
@@ -501,6 +514,13 @@ class VMHostDevsModel(object):
dom = VMModel.get_vm(vmid, self.conn)
lock = params['lock']
+ try:
+ self._passthrough_device_validate(dev_info['name'])
+
+ except InvalidParameter as e:
+ cb(e.message, False)
+ raise
+
with lock:
with RollbackContext() as rollback:
xmlstr = self._get_usb_device_xml(dev_info)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index c4f39c4..a59d51a 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -534,7 +534,7 @@ kimchi.guest_edit_main = function() {
});
};
var pciDeviceButtonHandler = function() {
- $('button', '#form-guest-edit-pci').on('click', function(event) {
+ $('.btn.btn-link', '#form-guest-edit-pci').on('click', function(event) {
event.preventDefault();
var obj = $(this);
var objIcon = obj.find('i');
@@ -546,9 +546,11 @@ kimchi.guest_edit_main = function() {
wok.message.error(err.responseJSON.reason, '#alert-modal-container');
});
} else {
+ $('html').addClass('in-progress');
+ $('#form-guest-edit-pci > .wok-mask').show();
+ var haveCompanions = false;
+ var pciTitle = i18n['KCHVMED6007M'] + '\n';
kimchi.getPCIDeviceCompanions(id, function(infoData) {
- var pciTitle = i18n['KCHVMED6007M'] + '\n';
- var haveCompanions = false;
for (var p = 0; p < infoData.length; p++) {
if (infoData[p].device_type === 'net') {
haveCompanions = true;
@@ -564,24 +566,19 @@ kimchi.guest_edit_main = function() {
pciTitle += ', ' + i18n['KCHVMED6006M'] + ' ' + infoData[p].model + '\n';
}
}
- var settings = {
- title: i18n['KCHVMED6012M'],
- content: pciTitle,
- confirm: i18n['KCHAPI6002M'],
- cancel: i18n['KCHAPI6003M']
- };
+ });
+ $('#form-guest-edit-pci > .wok-mask').fadeOut(300, function() {});
+ $('html').removeClass('in-progress');
- if (haveCompanions) {
- wok.confirm(settings, function() {
- kimchi.addVMPCIDevice(kimchi.selectedGuest, {
- name: id
- }, function(task) {
- getOngoingAttachingDevices(task);
- }, function(err) {
- wok.message.error(err.responseJSON.reason, '#alert-modal-container');
- });
- });
- } else {
+ var settings = {
+ title: i18n['KCHVMED6012M'],
+ content: pciTitle,
+ confirm: i18n['KCHAPI6002M'],
+ cancel: i18n['KCHAPI6003M']
+ };
+
+ if (haveCompanions) {
+ wok.confirm(settings, function() {
kimchi.addVMPCIDevice(kimchi.selectedGuest, {
name: id
}, function(task) {
@@ -589,8 +586,16 @@ kimchi.guest_edit_main = function() {
}, function(err) {
wok.message.error(err.responseJSON.reason, '#alert-modal-container');
});
- }
- });
+ });
+ } else {
+ kimchi.addVMPCIDevice(kimchi.selectedGuest, {
+ name: id
+ }, function(task) {
+ getOngoingAttachingDevices(task);
+ }, function(err) {
+ wok.message.error(err.responseJSON.reason, '#alert-modal-container');
+ });
+ }
}
});
};
--
2.7.4
8 years, 4 months
[PATCH] [Kimchi 0/2] Improve PCI passthrough experience
by Jose Ricardo Ziviani
This patch has improvements to both PCI tab (Edit Guest) and PCI
Passthrough performances.
Jose Ricardo Ziviani (2):
Improve PCI passthrough performance
Replace device companion check before the passthrough
model/vmhostdevs.py | 34 ++++++++---------
ui/js/src/kimchi.guest_edit_main.js | 74 ++++++++++++++++++++++---------------
ui/pages/i18n.json.tmpl | 1 +
3 files changed, 61 insertions(+), 48 deletions(-)
--
2.7.4
8 years, 4 months
[PATCH][Kimchi 0/2] Issue #467: Feature: Show boot menu for a guest
by Ramon Medeiros
based on "Make Kimchi able to change guest's boot order"
Ramon Medeiros (2):
Allow guest to enable bootmenu on startup
Add test to verify bootmenu and update old tests
API.json | 5 +++++
docs/API.md | 1 +
i18n.py | 1 +
model/vms.py | 30 +++++++++++++++++++++---------
tests/test_mockmodel.py | 2 +-
tests/test_model.py | 8 +++++++-
xmlutils/bootorder.py | 3 +++
7 files changed, 39 insertions(+), 11 deletions(-)
--
2.5.5
8 years, 4 months
[PATCH] [Kimchi] Validate passthrough inside the task
by Jose Ricardo Ziviani
- In order to validade if a given PCI is ok to be attached, a heavy
verification has to be done. This commit add such verification
in the task. This will give a faster response to the UI,
improving the user experience.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
model/vmhostdevs.py | 22 ++++++++++++++++-
ui/js/src/kimchi.guest_edit_main.js | 47 ++++++++++++++++++++-----------------
2 files changed, 47 insertions(+), 22 deletions(-)
diff --git a/model/vmhostdevs.py b/model/vmhostdevs.py
index 15b5bec..ef39de3 100644
--- a/model/vmhostdevs.py
+++ b/model/vmhostdevs.py
@@ -89,7 +89,6 @@ class VMHostDevsModel(object):
def create(self, vmid, params):
dev_name = params['name']
- self._passthrough_device_validate(dev_name)
dev_info = self.dev_model.lookup(dev_name)
if dev_info['device_type'] == 'pci':
@@ -216,6 +215,13 @@ class VMHostDevsModel(object):
dev_info = params['dev_info']
lock = params['lock']
+ try:
+ self._passthrough_device_validate(dev_info['name'])
+
+ except InvalidParameter as e:
+ cb(e.message, False)
+ raise
+
with lock:
try:
self._validate_pci_passthrough_env()
@@ -455,6 +461,13 @@ class VMHostDevsModel(object):
dev_info = params['dev_info']
lock = params['lock']
+ try:
+ self._passthrough_device_validate(dev_info['name'])
+
+ except InvalidParameter as e:
+ cb(e.message, False)
+ raise
+
with lock:
dom = VMModel.get_vm(vmid, self.conn)
@@ -501,6 +514,13 @@ class VMHostDevsModel(object):
dom = VMModel.get_vm(vmid, self.conn)
lock = params['lock']
+ try:
+ self._passthrough_device_validate(dev_info['name'])
+
+ except InvalidParameter as e:
+ cb(e.message, False)
+ raise
+
with lock:
with RollbackContext() as rollback:
xmlstr = self._get_usb_device_xml(dev_info)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index 507ae75..5d91b14 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -546,9 +546,11 @@ kimchi.guest_edit_main = function() {
wok.message.error(err.responseJSON.reason, '#alert-modal-container');
});
} else {
+ $('html').addClass('in-progress');
+ $('#form-guest-edit-pci > .wok-mask').show();
+ var haveCompanions = false;
+ var pciTitle = i18n['KCHVMED6007M'] + '\n';
kimchi.getPCIDeviceCompanions(id, function(infoData) {
- var pciTitle = i18n['KCHVMED6007M'] + '\n';
- var haveCompanions = false;
for (var p = 0; p < infoData.length; p++) {
if (infoData[p].device_type === 'net') {
haveCompanions = true;
@@ -564,24 +566,19 @@ kimchi.guest_edit_main = function() {
pciTitle += ', ' + i18n['KCHVMED6006M'] + ' ' + infoData[p].model + '\n';
}
}
- var settings = {
- title: i18n['KCHVMED6012M'],
- content: pciTitle,
- confirm: i18n['KCHAPI6002M'],
- cancel: i18n['KCHAPI6003M']
- };
+ });
+ $('#form-guest-edit-pci > .wok-mask').fadeOut(300, function() {});
+ $('html').removeClass('in-progress');
- if (haveCompanions) {
- wok.confirm(settings, function() {
- kimchi.addVMPCIDevice(kimchi.selectedGuest, {
- name: id
- }, function(task) {
- getOngoingAttachingDevices(task);
- }, function(err) {
- wok.message.error(err.responseJSON.reason, '#alert-modal-container');
- });
- });
- } else {
+ var settings = {
+ title: i18n['KCHVMED6012M'],
+ content: pciTitle,
+ confirm: i18n['KCHAPI6002M'],
+ cancel: i18n['KCHAPI6003M']
+ };
+
+ if (haveCompanions) {
+ wok.confirm(settings, function() {
kimchi.addVMPCIDevice(kimchi.selectedGuest, {
name: id
}, function(task) {
@@ -589,8 +586,16 @@ kimchi.guest_edit_main = function() {
}, function(err) {
wok.message.error(err.responseJSON.reason, '#alert-modal-container');
});
- }
- });
+ });
+ } else {
+ kimchi.addVMPCIDevice(kimchi.selectedGuest, {
+ name: id
+ }, function(task) {
+ getOngoingAttachingDevices(task);
+ }, function(err) {
+ wok.message.error(err.responseJSON.reason, '#alert-modal-container');
+ });
+ }
}
});
};
--
2.7.4
8 years, 4 months
[PATCH v2] [Kimchi] Disable vm statistics/screenshots in edit guest
by Jose Ricardo Ziviani
- When Edit Guest modal window is opened, Kimchi continues to make
requests to get all VM' statistics and screenshots, that affects
necessary and heavy requests like PCI queries. This commit
disable those poolings when the modal window is opened and
re-enable when the modal is closed.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
v2:
- wrapped the setTimeout in a function to avoid duplication of
hardcoded magic numbers
ui/js/src/kimchi.guest_edit_main.js | 5 +++++
ui/js/src/kimchi.guest_main.js | 11 +++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index 9099f39..c4f39c4 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -20,6 +20,11 @@ kimchi.guest_edit_main = function() {
var formTargetId;
var guestEditForm = $('#form-guest-edit-general');
var saveButton = $('#guest-edit-button-save');
+ clearTimeout(kimchi.vmTimeout);
+
+ $('#modalWindow').on('hidden.bs.modal', function() {
+ kimchi.setListVMAutoTimeout();
+ });
$('#guest-edit-window a[data-toggle="tab"]').on('show.bs.tab', function(tab) {
tab.target; // newly activated tab
diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index ab26fa4..9c1aa54 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -900,8 +900,7 @@ kimchi.listVmsAuto = function() {
$('#guests-root-container > .wok-mask').fadeOut(300, function() {});
}
}
-
- kimchi.vmTimeout = window.setTimeout("kimchi.listVmsAuto();", 5000);
+ kimchi.setListVMAutoTimeout();
},
function(errorResponse, textStatus, errorThrown) {
if (errorResponse.responseJSON && errorResponse.responseJSON.reason) {
@@ -910,11 +909,11 @@ kimchi.listVmsAuto = function() {
$('#guests-root-container > .wok-mask').addClass('hidden');
});
}
- kimchi.vmTimeout = window.setTimeout("kimchi.listVmsAuto();", 5000);
+ kimchi.setListVMAutoTimeout();
});
} else {
clearTimeout(kimchi.vmTimeout);
- kimchi.vmTimeout = window.setTimeout("kimchi.listVmsAuto();", 5000);
+ kimchi.setListVMAutoTimeout();
}
};
@@ -924,3 +923,7 @@ kimchi.editTemplate = function(guestTemplate, oldPopStat) {
}
return guestTemplate;
};
+
+kimchi.setListVMAutoTimeout = function() {
+ kimchi.vmTimeout = window.setTimeout("kimchi.listVmsAuto();", 5000);
+}
--
2.7.4
8 years, 4 months
[PATCH] [Wok] Externalise the tab names and locale list
by pkulkark@linux.vnet.ibm.com
From: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
The tab names (Wok, Host, Virtualization) should be
externalised. Also, the list of locales needs to be
externalised so that it is translatable based on the
language selected.
Signed-off-by: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
---
ui/js/src/wok.main.js | 3 +-
ui/pages/i18n.json.tmpl | 3 +
ui/pages/login.html.tmpl | 344 +++++++++++++++++++++++------------------------
3 files changed, 177 insertions(+), 173 deletions(-)
diff --git a/ui/js/src/wok.main.js b/ui/js/src/wok.main.js
index 1d49c9e..b1828f4 100644
--- a/ui/js/src/wok.main.js
+++ b/ui/js/src/wok.main.js
@@ -35,6 +35,7 @@ wok.main = function() {
var genTabs = function(tabs) {
var tabsHtml = [];
$(tabs).each(function(i, tab) {
+ tab_i18n = i18n[tab] ? i18n[tab] : tab;
var functionality = tab['functionality'];
var title = tab['title'];
var path = tab['path'];
@@ -62,7 +63,7 @@ wok.main = function() {
functionalTabHtml.push(
'<li>',
'<a class="item',' ',tab.toLowerCase(),'Tab','" href="#">',
- tab,
+ tab_i18n,
'</a>',
'</li>'
);
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index 5628479..aca2449 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -24,6 +24,9 @@
#silent _ = t.gettext
#silent _t = t.gettext
{
+ "Host": "$_("Host")",
+ "Virtualization": "$_("Virtualization")",
+ "Wok": "$_("Wok")",
"Settings": "$_("Settings")",
"WOKAPI6005E": "$_("No such data available.")",
diff --git a/ui/pages/login.html.tmpl b/ui/pages/login.html.tmpl
index 6890d9b..170f8fe 100644
--- a/ui/pages/login.html.tmpl
+++ b/ui/pages/login.html.tmpl
@@ -144,178 +144,178 @@
<div class="form-group">
<label for="userLocale">$_("Locale")</label>
<select id="userLocale" class="selectpicker col-md-12 col-lg-12">
- <option value="af-ZA">Afrikaans (South Africa)</option>
- <option value="sq-AL">Albanian (Albania)</option>
- <option value="am-ET">Amharic (Ethiopia)</option>
- <option value="ar-DZ">Arabic (Algeria)</option>
- <option value="ar-BH">Arabic (Bahrain)</option>
- <option value="ar-EG">Arabic (Egypt)</option>
- <option value="ar-IQ">Arabic (Iraq)</option>
- <option value="ar-JO">Arabic (Jordan)</option>
- <option value="ar-KW">Arabic (Kuwait)</option>
- <option value="ar-LB">Arabic (Lebanon)</option>
- <option value="ar-LY">Arabic (Libya)</option>
- <option value="ar-MR">Arabic (Mauritania)</option>
- <option value="ar-MA">Arabic (Morocco)</option>
- <option value="ar-OM">Arabic (Oman)</option>
- <option value="ar-QA">Arabic (Qatar)</option>
- <option value="ar-SA">Arabic (Saudi Arabia)</option>
- <option value="ar-SY">Arabic (Syria)</option>
- <option value="ar-TN">Arabic (Tunisia)</option>
- <option value="ar-AE">Arabic (United Arab Emirates)</option>
- <option value="ar-YE">Arabic (Yemen)</option>
- <option value="hy-AM">Armenian (Armenia)</option>
- <option value="as-IN">Assamese (India)</option>
- <option value="az-AZ">Azerbaijani (Azerbaijan)</option>
- <option value="eu-ES">Basque (Spain)</option>
- <option value="be-BY">Belarusian (Belarus)</option>
- <option value="bn-BD">Bengali (Bangladesh)</option>
- <option value="bn-IN">Bengali (India)</option>
- <option value="bs-BA">Bosnian (Bosnia)</option>
- <option value="bg-BG">Bulgarian (Bulgaria)</option>
- <option value="my-MM">Burmese (Myanmar)</option>
- <option value="ca-ES">Catalan (Spain)</option>
- <option value="zh-CN">Chinese-simplified (China)</option>
- <option value="zh-SG">Chinese-simplified (Singapore)</option>
- <option value="zh-HK">Chinese-traditional (Hong Kong S.A.R. of China)</option>
- <option value="zh-MO">Chinese-traditional (Macao)</option>
- <option value="zh-TW">Chinese-traditional (Taiwan)</option>
- <option value="hr-HR">Croatian (Croatia)</option>
- <option value="cs-CZ">Czech (Czech Republic)</option>
- <option value="da-DK">Danish (Denmark)</option>
- <option value="nl-BE">Dutch (Belgium)</option>
- <option value="nl-NL">Dutch (The Netherlands)</option>
- <option value="en-AU">English (Australia)</option>
- <option value="en-BE">English (Belgium)</option>
- <option value="en-CM">English (Cameroon)</option>
- <option value="en-CA">English (Canada)</option>
- <option value="en-GH">English (Ghana)</option>
- <option value="en-HK">English (Hong Kong S.A.R. of China)</option>
- <option value="en-IN">English (India)</option>
- <option value="en-IE">English (Ireland)</option>
- <option value="en-KE">English (Kenya)</option>
- <option value="en-MU">English (Mauritius)</option>
- <option value="en-NZ">English (New Zealand)</option>
- <option value="en-NG">English (Nigeria)</option>
- <option value="en-PH">English (Philippines)</option>
- <option value="en-SG">English (Singapore)</option>
- <option value="en-ZA">English (South Africa)</option>
- <option value="en-TZ">English (Tanzania)</option>
- <option value="en-GB">English (United Kingdom)</option>
- <option value="en-US">English (United States)</option>
- <option value="en-ZM">English (Zambia)</option>
- <option value="et-EE">Estonian (Estonia)</option>
- <option value="tl-PH">Filipino (Philippines)</option>
- <option value="fi-FI">Finnish (Finland)</option>
- <option value="fr-DZ">French (Algeria)</option>
- <option value="fr-CM">French (Cameroon)</option>
- <option value="fr-CD">French (Democratic Republic of the Congo)</option>
- <option value="fr-BE">French (Belgium)</option>
- <option value="fr-CA">French (Canada)</option>
- <option value="fr-FR">French (France)</option>
- <option value="fr-CI">French (Ivory Coast [Côte d’Ivoire])</option>
- <option value="fr-LU">French (Luxembourg)</option>
- <option value="fr-MR">French (Mauritania)</option>
- <option value="fr-MU">French (Mauritius)</option>
- <option value="fr-MA">French (Morocco)</option>
- <option value="fr-SN">French (Senegal)</option>
- <option value="fr-CH">French (Switzerland)</option>
- <option value="fr-TN">French (Tunisia)</option>
- <option value="gl-ES">Galician (Spain)</option>
- <option value="lg-UG">Ganda (Uganda)</option>
- <option value="ka-GE">Georgian (Georgia)</option>
- <option value="de-AT">German (Austria)</option>
- <option value="de-DE">German (Germany)</option>
- <option value="de-LU">German (Luxembourg)</option>
- <option value="de-CH">German (Switzerland)</option>
- <option value="el-GR">Greek (Greece)</option>
- <option value="gu-IN">Gujarati (India)</option>
- <option value="ha-NG">Hausa (Nigeria)</option>
- <option value="he-IL">Hebrew (Israel)</option>
- <option value="hi-IN">Hindi (India)</option>
- <option value="hu-HU">Hungarian (Hungary)</option>
- <option value="is-IS">Icelandic (Iceland)</option>
- <option value="ig-NG">Igbo (Nigeria)</option>
- <option value="id-ID">Indonesian (Indonesia)</option>
- <option value="it-IT">Italian (Italy)</option>
- <option value="it-CH">Italian (Switzerland)</option>
- <option value="ja-JP">Japanese (Japan)</option>
- <option value="kn-IN">Kannada (India)</option>
- <option value="kk-KZ">Kazakh (Kazakhstan)</option>
- <option value="km-KH">Khmer (Cambodia)</option>
- <option value="rw-RW">Kinyarwanda (Rwanda)</option>
- <option value="kok-IN">Konkani (India)</option>
- <option value="ko-KR">Korean (Korea, South)</option>
- <option value="lo-LA">Lao (Laos)</option>
- <option value="lv-LV">Latvian (Latvia)</option>
- <option value="lt-LT">Lithuanian (Lithuania)</option>
- <option value="mk-MK">Macedonian (Macedonia)</option>
- <option value="ms-MY">Malay-Latin (Malaysia)</option>
- <option value="ml-IN">Malayalam (India)</option>
- <option value="mt-MT">Maltese (Malta)</option>
- <option value="mr-IN">Marathi (India)</option>
- <option value="mn-Cyrl-MN">Mongolian-Cyrillic (Mongolia)</option>
- <option value="ne-IN">Nepali (India)</option>
- <option value="ne-NP">Nepali (Nepal)</option>
- <option value="nb-NO">Norwegian Bokmål (Norway)</option>
- <option value="nn-NO">Norwegian Nynorsk (Norway)</option>
- <option value="or-IN">Oriya [aka, Odia] (India)</option>
- <option value="om-ET">Oromo (Ethiopia)</option>
- <option value="pl-PL">Polish (Poland)</option>
- <option value="pt-AO">Portuguese (Angola)</option>
- <option value="pt-BR">Portuguese (Brazil)</option>
- <option value="pt-MO">Portuguese (Macao)</option>
- <option value="pt-MZ">Portuguese (Mozambique)</option>
- <option value="pt-PT">Portuguese (Portugal)</option>
- <option value="pa-IN">Punjabi (India)</option>
- <option value="ro-RO">Romanian (Romania)</option>
- <option value="ru-RU">Russian (Russia)</option>
- <option value="sr-RS">Serbian-Cyrillic (Serbia)</option>
- <option value="sr-ME">Serbian-Latin (Montenegro)</option>
- <option value="sr-Latn-RS">Serbian-Latin (Serbia)</option>
- <option value="si-LK">Sinhala (Sri Lanka)</option>
- <option value="sk-SK">Slovak (Slovakia)</option>
- <option value="sl-SI">Slovenian (Slovenia)</option>
- <option value="es-AR">Spanish (Argentina)</option>
- <option value="es-BO">Spanish (Bolivia)</option>
- <option value="es-CL">Spanish (Chile)</option>
- <option value="es-CO">Spanish (Colombia)</option>
- <option value="es-CR">Spanish (Costa Rica)</option>
- <option value="es-DO">Spanish (Dominican Republic)</option>
- <option value="es-EC">Spanish (Ecuador)</option>
- <option value="es-SV">Spanish (El Salvador)</option>
- <option value="es-GT">Spanish (Guatemala)</option>
- <option value="es-HN">Spanish (Honduras)</option>
- <option value="es-MX">Spanish (Mexico)</option>
- <option value="es-NI">Spanish (Nicaragua)</option>
- <option value="es-PA">Spanish (Panama)</option>
- <option value="es-PY">Spanish (Paraguay)</option>
- <option value="es-PE">Spanish (Peru)</option>
- <option value="es-PR">Spanish (Puerto Rico)</option>
- <option value="es-ES">Spanish (Spain)</option>
- <option value="es-US">Spanish (United States)</option>
- <option value="es-UY">Spanish (Uruguay)</option>
- <option value="es-VE">Spanish (Venezuela)</option>
- <option value="sw-KE">Swahili (Kenya)</option>
- <option value="sw-TZ">Swahili (Tanzania)</option>
- <option value="sv-SE">Swedish (Sweden)</option>
- <option value="ta-IN">Tamil (India)</option>
- <option value="te-IN">Telugu (India)</option>
- <option value="th-TH">Thai (Thailand)</option>
- <option value="tr-TR">Turkish (Turkey)</option>
- <option value="uk-UA">Ukrainian (Ukraine)</option>
- <option value="ur-IN">Urdu (India)</option>
- <option value="ur-PK">Urdu (Pakistan)</option>
- <option value="uz-Cyrl-UZ">Uzbek-Cyrillic (Uzbekistan)</option>
- <option value="uz-Latn-UZ">Uzbek-Latin (Uzbekistan)</option>
- <option value="vi-VN">Vietnamese (Vietnam)</option>
- <option value="cy-GB">Welsh (United Kingdom)</option>
- <option value="yo-NG">Yoruba (Nigeria)</option>
- <option value="zu-ZA">Zulu (South Africa)</option>
- <option value="az-AZ">Azerbaijani-Latin (Azerbaijan)</option>
- <option value="sr-CS">Serbian-Cyrillic ()</option>
- <option value="sr-Cyrl-CS">Serbian-Cyrillic (Serbia and Montenegro)</option>
- <option value="sr-Latn-CS">Serbian-Latin (Serbia and Montenegro)</option>
+ <option value="af-ZA">$_("Afrikaans (South Africa)")</option>
+ <option value="sq-AL">$_("Albanian (Albania)")</option>
+ <option value="am-ET">$_("Amharic (Ethiopia)")</option>
+ <option value="ar-DZ">$_("Arabic (Algeria)")</option>
+ <option value="ar-BH">$_("Arabic (Bahrain)")</option>
+ <option value="ar-EG">$_("Arabic (Egypt)")</option>
+ <option value="ar-IQ">$_("Arabic (Iraq)")</option>
+ <option value="ar-JO">$_("Arabic (Jordan)")</option>
+ <option value="ar-KW">$_("Arabic (Kuwait)")</option>
+ <option value="ar-LB">$_("Arabic (Lebanon)")</option>
+ <option value="ar-LY">$_("Arabic (Libya)")</option>
+ <option value="ar-MR">$_("Arabic (Mauritania)")</option>
+ <option value="ar-MA">$_("Arabic (Morocco)")</option>
+ <option value="ar-OM">$_("Arabic (Oman)")</option>
+ <option value="ar-QA">$_("Arabic (Qatar)")</option>
+ <option value="ar-SA">$_("Arabic (Saudi Arabia)")</option>
+ <option value="ar-SY">$_("Arabic (Syria)")</option>
+ <option value="ar-TN">$_("Arabic (Tunisia)")</option>
+ <option value="ar-AE">$_("Arabic (United Arab Emirates)")</option>
+ <option value="ar-YE">$_("Arabic (Yemen)")</option>
+ <option value="hy-AM">$_("Armenian (Armenia)")</option>
+ <option value="as-IN">$_("Assamese (India)")</option>
+ <option value="az-AZ">$_("Azerbaijani (Azerbaijan)")</option>
+ <option value="eu-ES">$_("Basque (Spain)")</option>
+ <option value="be-BY">$_("Belarusian (Belarus)")</option>
+ <option value="bn-BD">$_("Bengali (Bangladesh)")</option>
+ <option value="bn-IN">$_("Bengali (India)")</option>
+ <option value="bs-BA">$_("Bosnian (Bosnia)")</option>
+ <option value="bg-BG">$_("Bulgarian (Bulgaria)")</option>
+ <option value="my-MM">$_("Burmese (Myanmar)")</option>
+ <option value="ca-ES">$_("Catalan (Spain)")</option>
+ <option value="zh-CN">$_("Chinese-simplified (China)")</option>
+ <option value="zh-SG">$_("Chinese-simplified (Singapore)")</option>
+ <option value="zh-HK">$_("Chinese-traditional (Hong Kong S.A.R. of China)")</option>
+ <option value="zh-MO">$_("Chinese-traditional (Macao)")</option>
+ <option value="zh-TW">$_("Chinese-traditional (Taiwan)")</option>
+ <option value="hr-HR">$_("Croatian (Croatia)")</option>
+ <option value="cs-CZ">$_("Czech (Czech Republic)")</option>
+ <option value="da-DK">$_("Danish (Denmark)")</option>
+ <option value="nl-BE">$_("Dutch (Belgium)")</option>
+ <option value="nl-NL">$_("Dutch (The Netherlands)")</option>
+ <option value="en-AU">$_("English (Australia)")</option>
+ <option value="en-BE">$_("English (Belgium)")</option>
+ <option value="en-CM">$_("English (Cameroon)")</option>
+ <option value="en-CA">$_("English (Canada)")</option>
+ <option value="en-GH">$_("English (Ghana)")</option>
+ <option value="en-HK">$_("English (Hong Kong S.A.R. of China)")</option>
+ <option value="en-IN">$_("English (India)")</option>
+ <option value="en-IE">$_("English (Ireland)")</option>
+ <option value="en-KE">$_("English (Kenya)")</option>
+ <option value="en-MU">$_("English (Mauritius)")</option>
+ <option value="en-NZ">$_("English (New Zealand)")</option>
+ <option value="en-NG">$_("English (Nigeria)")</option>
+ <option value="en-PH">$_("English (Philippines)")</option>
+ <option value="en-SG">$_("English (Singapore)")</option>
+ <option value="en-ZA">$_("English (South Africa)")</option>
+ <option value="en-TZ">$_("English (Tanzania)")</option>
+ <option value="en-GB">$_("English (United Kingdom)")</option>
+ <option value="en-US">$_("English (United States)")</option>
+ <option value="en-ZM">$_("English (Zambia)")</option>
+ <option value="et-EE">$_("Estonian (Estonia)")</option>
+ <option value="tl-PH">$_("Filipino (Philippines)")</option>
+ <option value="fi-FI">$_("Finnish (Finland)")</option>
+ <option value="fr-DZ">$_("French (Algeria)")</option>
+ <option value="fr-CM">$_("French (Cameroon)")</option>
+ <option value="fr-CD">$_("French (Democratic Republic of the Congo)")</option>
+ <option value="fr-BE">$_("French (Belgium)")</option>
+ <option value="fr-CA">$_("French (Canada)")</option>
+ <option value="fr-FR">$_("French (France)")</option>
+ <option value="fr-CI">$_("French (Ivory Coast [Côte d’Ivoire])")</option>
+ <option value="fr-LU">$_("French (Luxembourg)")</option>
+ <option value="fr-MR">$_("French (Mauritania)")</option>
+ <option value="fr-MU">$_("French (Mauritius)")</option>
+ <option value="fr-MA">$_("French (Morocco)")</option>
+ <option value="fr-SN">$_("French (Senegal)")</option>
+ <option value="fr-CH">$_("French (Switzerland)")</option>
+ <option value="fr-TN">$_("French (Tunisia)")</option>
+ <option value="gl-ES">$_("Galician (Spain)")</option>
+ <option value="lg-UG">$_("Ganda (Uganda)")</option>
+ <option value="ka-GE">$_("Georgian (Georgia)")</option>
+ <option value="de-AT">$_("German (Austria)")</option>
+ <option value="de-DE">$_("German (Germany)")</option>
+ <option value="de-LU">$_("German (Luxembourg)")</option>
+ <option value="de-CH">$_("German (Switzerland)")</option>
+ <option value="el-GR">$_("Greek (Greece)")</option>
+ <option value="gu-IN">$_("Gujarati (India)")</option>
+ <option value="ha-NG">$_("Hausa (Nigeria)")</option>
+ <option value="he-IL">$_("Hebrew (Israel)")</option>
+ <option value="hi-IN">$_("Hindi (India)")</option>
+ <option value="hu-HU">$_("Hungarian (Hungary)")</option>
+ <option value="is-IS">$_("Icelandic (Iceland)")</option>
+ <option value="ig-NG">$_("Igbo (Nigeria)")</option>
+ <option value="id-ID">$_("Indonesian (Indonesia)")</option>
+ <option value="it-IT">$_("Italian (Italy)")</option>
+ <option value="it-CH">$_("Italian (Switzerland)")</option>
+ <option value="ja-JP">$_("Japanese (Japan)")</option>
+ <option value="kn-IN">$_("Kannada (India)")</option>
+ <option value="kk-KZ">$_("Kazakh (Kazakhstan)")</option>
+ <option value="km-KH">$_("Khmer (Cambodia)")</option>
+ <option value="rw-RW">$_("Kinyarwanda (Rwanda)")</option>
+ <option value="kok-IN">$_("Konkani (India)")</option>
+ <option value="ko-KR">$_("Korean (Korea, South)")</option>
+ <option value="lo-LA">$_("Lao (Laos)")</option>
+ <option value="lv-LV">$_("Latvian (Latvia)")</option>
+ <option value="lt-LT">$_("Lithuanian (Lithuania)")</option>
+ <option value="mk-MK">$_("Macedonian (Macedonia)")</option>
+ <option value="ms-MY">$_("Malay-Latin (Malaysia)")</option>
+ <option value="ml-IN">$_("Malayalam (India)")</option>
+ <option value="mt-MT">$_("Maltese (Malta)")</option>
+ <option value="mr-IN">$_("Marathi (India)")</option>
+ <option value="mn-Cyrl-MN">$_("Mongolian-Cyrillic (Mongolia)")</option>
+ <option value="ne-IN">$_("Nepali (India)")</option>
+ <option value="ne-NP">$_("Nepali (Nepal)")</option>
+ <option value="nb-NO">$_("Norwegian Bokmål (Norway)")</option>
+ <option value="nn-NO">$_("Norwegian Nynorsk (Norway)")</option>
+ <option value="or-IN">$_("Oriya [aka, Odia] (India)")</option>
+ <option value="om-ET">$_("Oromo (Ethiopia)")</option>
+ <option value="pl-PL">$_("Polish (Poland)")</option>
+ <option value="pt-AO">$_("Portuguese (Angola)")</option>
+ <option value="pt-BR">$_("Portuguese (Brazil)")</option>
+ <option value="pt-MO">$_("Portuguese (Macao)")</option>
+ <option value="pt-MZ">$_("Portuguese (Mozambique)")</option>
+ <option value="pt-PT">$_("Portuguese (Portugal)")</option>
+ <option value="pa-IN">$_("Punjabi (India)")</option>
+ <option value="ro-RO">$_("Romanian (Romania)")</option>
+ <option value="ru-RU">$_("Russian (Russia)")</option>
+ <option value="sr-RS">$_("Serbian-Cyrillic (Serbia)")</option>
+ <option value="sr-ME">$_("Serbian-Latin (Montenegro)")</option>
+ <option value="sr-Latn-RS">$_("Serbian-Latin (Serbia)")</option>
+ <option value="si-LK">$_("Sinhala (Sri Lanka)")</option>
+ <option value="sk-SK">$_("Slovak (Slovakia)")</option>
+ <option value="sl-SI">$_("Slovenian (Slovenia)")</option>
+ <option value="es-AR">$_("Spanish (Argentina)")</option>
+ <option value="es-BO">$_("Spanish (Bolivia)")</option>
+ <option value="es-CL">$_("Spanish (Chile)")</option>
+ <option value="es-CO">$_("Spanish (Colombia)")</option>
+ <option value="es-CR">$_("Spanish (Costa Rica)")</option>
+ <option value="es-DO">$_("Spanish (Dominican Republic)")</option>
+ <option value="es-EC">$_("Spanish (Ecuador)")</option>
+ <option value="es-SV">$_("Spanish (El Salvador)")</option>
+ <option value="es-GT">$_("Spanish (Guatemala)")</option>
+ <option value="es-HN">$_("Spanish (Honduras)")</option>
+ <option value="es-MX">$_("Spanish (Mexico)")</option>
+ <option value="es-NI">$_("Spanish (Nicaragua)")</option>
+ <option value="es-PA">$_("Spanish (Panama)")</option>
+ <option value="es-PY">$_("Spanish (Paraguay)")</option>
+ <option value="es-PE">$_("Spanish (Peru)")</option>
+ <option value="es-PR">$_("Spanish (Puerto Rico)")</option>
+ <option value="es-ES">$_("Spanish (Spain)")</option>
+ <option value="es-US">$_("Spanish (United States)")</option>
+ <option value="es-UY">$_("Spanish (Uruguay)")</option>
+ <option value="es-VE">$_("Spanish (Venezuela)")</option>
+ <option value="sw-KE">$_("Swahili (Kenya)")</option>
+ <option value="sw-TZ">$_("Swahili (Tanzania)")</option>
+ <option value="sv-SE">$_("Swedish (Sweden)")</option>
+ <option value="ta-IN">$_("Tamil (India)")</option>
+ <option value="te-IN">$_("Telugu (India)")</option>
+ <option value="th-TH">$_("Thai (Thailand)")</option>
+ <option value="tr-TR">$_("Turkish (Turkey)")</option>
+ <option value="uk-UA">$_("Ukrainian (Ukraine)")</option>
+ <option value="ur-IN">$_("Urdu (India)")</option>
+ <option value="ur-PK">$_("Urdu (Pakistan)")</option>
+ <option value="uz-Cyrl-UZ">$_("Uzbek-Cyrillic (Uzbekistan)")</option>
+ <option value="uz-Latn-UZ">$_("Uzbek-Latin (Uzbekistan)")</option>
+ <option value="vi-VN">$_("Vietnamese (Vietnam)")</option>
+ <option value="cy-GB">$_("Welsh (United Kingdom)")</option>
+ <option value="yo-NG">$_("Yoruba (Nigeria)")</option>
+ <option value="zu-ZA">$_("Zulu (South Africa)")</option>
+ <option value="az-AZ">$_("Azerbaijani-Latin (Azerbaijan)")</option>
+ <option value="sr-CS">$_("Serbian-Cyrillic ()")</option>
+ <option value="sr-Cyrl-CS">$_("Serbian-Cyrillic (Serbia and Montenegro)")</option>
+ <option value="sr-Latn-CS">$_("Serbian-Latin (Serbia and Montenegro)")</option>
</select>
</div>
</form>
--
2.1.0
8 years, 4 months
[PATCH] [Wok] Date Calender should be as per locale selected in Advanced search of user-log
by pkulkark@linux.vnet.ibm.com
From: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
The Calender shown when clicking on the date field
in the Advanced search tab of user activity log,
should be displayed as per the locale selected.
Signed-off-by: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
---
ui/js/wok.user-log.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/js/wok.user-log.js b/ui/js/wok.user-log.js
index a46ef07..1606f47 100644
--- a/ui/js/wok.user-log.js
+++ b/ui/js/wok.user-log.js
@@ -166,10 +166,10 @@ wok.initUserLog = function() {
};
wok.initUserLogWindow = function() {
- var currentLang = wok.lang.get();
- currentLang = currentLang.substring(0, currentLang.indexOf('_'));
+ var currentLocale = wok.lang.get_locale();
+ currentLocale = currentLocale.substring(0, currentLocale.indexOf('-'));
$("#request-type").selectpicker();
- $.datepicker.setDefaults($.datepicker.regional[currentLang]);
+ $.datepicker.setDefaults($.datepicker.regional[currentLocale]);
$("#date").datepicker({ dateFormat: 'yy-mm-dd',
onSelect: function(dateText) {
$('#button-search').prop('disabled',false);
--
2.1.0
8 years, 4 months