[PATCH] Old version of ppc64_cpu command doesn't support option --threads-per-core
by thierry@linux.vnet.ibm.com
From: Thierry FAUCK - IBM LTC <thierry(a)linux.vnet.ibm.com>
Old version of ppc64_cpu command doesn't support option
--threads-per-core and raises a start message
ValueError: invalid literal for int() with base 10: 'information)'
Solution is to get info from lscpu which sounds accurate
Remove dependency to qemu-kvm
Signed-off-by: Thierry FAUCK - IBM LTC <thierry(a)linux.vnet.ibm.com>
modified: contrib/DEBIAN/control.in
modified: src/kimchi/model/cpuinfo.py
---
contrib/DEBIAN/control.in | 1 -
src/kimchi/model/cpuinfo.py | 20 +++++++++++++++-----
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/contrib/DEBIAN/control.in b/contrib/DEBIAN/control.in
index 069e14b..776b033 100644
--- a/contrib/DEBIAN/control.in
+++ b/contrib/DEBIAN/control.in
@@ -14,7 +14,6 @@ Depends: python-cherrypy3 (>= 3.2.0),
libvirt-bin,
nfs-common,
python-m2crypto,
- qemu-kvm,
python-pam,
python-parted,
python-psutil (>= 0.6.0),
diff --git a/src/kimchi/model/cpuinfo.py b/src/kimchi/model/cpuinfo.py
index 3411ef5..d43f21f 100644
--- a/src/kimchi/model/cpuinfo.py
+++ b/src/kimchi/model/cpuinfo.py
@@ -80,11 +80,21 @@ class CPUInfoModel(object):
out, error, rc = run_command(['ppc64_cpu', '--cores-on'])
if not rc:
self.cores_available = int(out.split()[-1])
- out, error, rc = run_command(['ppc64_cpu', '--threads-per-core'])
- if not rc:
- self.threads_per_core = int(out.split()[-1])
- self.sockets = self.cores_present/self.threads_per_core
- self.cores_per_socket = self.cores_present/self.sockets
+ try:
+ out, error, rc = run_command(['ppc64_cpu', '--threads-per-core'])
+ if not rc:
+ self.threads_per_core = int(out.split()[-1])
+ self.sockets = self.cores_present/self.threads_per_core
+ self.cores_per_socket = self.cores_present/self.sockets
+ except:
+ out, error, rc = run_command(['sh', '-c', 'lscpu |
+ grep "Thread(s) per core:"'])
+ if not rc:
+ self.cores_present = int(out.split()[-1])
+ out, error, rc = run_command(['sh', '-c', 'lscpu |
+ grep "Core(s) per socket:"'])
+ if not rc:
+ self.cores_available = int(out.split()[-1])
else:
# Intel or AMD
self.guest_threads_enabled = True
--
1.7.9.5
9 years, 10 months
[PATCH] Eliminate name collision for feature tests' VMs
by Christy Perez
If Kimchi's startup is interrupted for some reason, a VM created
during the feature tests may be left defined. When this happens,
the next time Kimchi is started it will fail with an error that
the domain already exists (for example, "libvirtError: operation
failed: domain 'A_SIMPLE_VM' already exists with uuid
e6fccea8-f7ed-4320-a4cb-b85217d23985").
This patch just uses the same uuid-based name scheme as was already
in the user tests (kvmusertests.py). That gives a miniscule chance
for name collision.
Signed-off-by: Christy Perez <christy(a)linux.vnet.ibm.com>
---
src/kimchi/model/featuretests.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/kimchi/model/featuretests.py b/src/kimchi/model/featuretests.py
index 5a45990..aa8d709 100644
--- a/src/kimchi/model/featuretests.py
+++ b/src/kimchi/model/featuretests.py
@@ -24,6 +24,7 @@
import socket
import subprocess
import threading
+import uuid
from lxml.builder import E
@@ -35,7 +36,7 @@
ISO_STREAM_XML = """
<domain type='%(domain)s'>
- <name>ISO_STREAMING</name>
+ <name>'%(name)s'</name>
<memory unit='KiB'>1048576</memory>
<os>
<type arch='%(arch)s'>hvm</type>
@@ -57,7 +58,7 @@
SIMPLE_VM_XML = """
<domain type='%(domain)s'>
- <name>A_SIMPLE_VM</name>
+ <name>'%(name)s'</name>
<memory unit='KiB'>10240</memory>
<os>
<type arch='%(arch)s'>hvm</type>
@@ -105,8 +106,10 @@ def libvirt_supports_iso_stream(conn, protocol):
domain_type = 'test' if conn.getType().lower() == 'test' else 'kvm'
arch = 'ppc64' if platform.machine() == 'ppc64le' \
else platform.machine()
+ vm_uuid = uuid.uuid1()
+ vm_name = "ISO_STREAM_%s" % vm_uuid
xml = ISO_STREAM_XML % {'domain': domain_type, 'protocol': protocol,
- 'arch': arch}
+ 'arch': arch, 'name': vm_name}
try:
FeatureTests.disable_libvirt_error_logging()
dom = conn.defineXML(xml)
@@ -196,8 +199,11 @@ def has_metadata_support(conn):
domain_type = 'test' if conn.getType().lower() == 'test' else 'kvm'
arch = 'ppc64' if platform.machine() == 'ppc64le' \
else platform.machine()
+ vm_uuid = uuid.uuid1()
+ vm_name = "A_SIMPLE_VM_%s" % vm_uuid
dom = conn.defineXML(SIMPLE_VM_XML % {'domain': domain_type,
- 'arch': arch})
+ 'arch': arch,
+ 'name': vm_name})
rollback.prependDefer(dom.undefine)
try:
dom.setMetadata(libvirt.VIR_DOMAIN_METADATA_ELEMENT,
--
1.9.3
9 years, 10 months
Doubt Bug 121401 - LTCTest: Build36: Takes time to list "Device path" for logical pool creation
by Ramon Medeiros
Hi Team,
i was debugging this bug and found that this query is taking so much time:
pvs = subprocess.Popen(
["pvs", "--unbuffered", "--nameprefixes", "--noheadings",
"-o", "vg_name", devNodePath],
devNodePath is a partition or a disk (e.g. /dev/sdc or /dev/mpathe1)
The goal in this command is search the volume group that this partition
belongs to. On machines that has inconsistent volume groups, it takes a
long time to retrieve the information.
Can i cache this information before querying all partitions? Or there is
other way to query this info faster?
--
Ramon Nunes Medeiros
Kimchi Developer
Software Engineer - Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn(a)br.ibm.com
9 years, 10 months
[PATCH] Issue #569: Deactive logical pool cause vm failed to start
by gouzongmei@163.com
From: Zongmei Gou <gouzongmei(a)163.com>
Deactive logical pool cause vm failed to start while storage of the vm is in this logical pool.
Storage pool's "deactive" action call libvirt "StoragePoolDestroy" function which causes different result on different pool type.Once the pool is destroyed, the 'dir' type pool remains its target path and images while the 'logical' type pool deletes its target path and images.
This patch make deactive logical pool action failed while exists vm(s) linked to this pool.
---
src/kimchi/i18n.py | 1 +
src/kimchi/model/storagepools.py | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index 4ab08d1..08bfe38 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -188,6 +188,7 @@ messages = {
"KCHPOOL0035E": _("Unable to delete pool %(name)s as it is associated with some templates"),
"KCHPOOL0036E": _("A volume group named '%(name)s' already exists. Please, choose another name to create the logical pool."),
"KCHPOOL0037E": _("Unable to update database with deep scan information due error: %(err)s"),
+ "KCHPOOL0038E": _("Unable to deactivate pool %(name)s. There are some virtual machines %(vms)s linked to this pool."),
"KCHVOL0001E": _("Storage volume %(name)s already exists"),
"KCHVOL0002E": _("Storage volume %(name)s does not exist in storage pool %(pool)s"),
diff --git a/src/kimchi/model/storagepools.py b/src/kimchi/model/storagepools.py
index b85f3b4..c42b62e 100644
--- a/src/kimchi/model/storagepools.py
+++ b/src/kimchi/model/storagepools.py
@@ -18,6 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import libvirt
+import os
from kimchi.scan import Scanner
from kimchi.exception import InvalidOperation, MissingParameter
@@ -27,6 +28,8 @@ from kimchi.model.host import DeviceModel
from kimchi.model.libvirtstoragepool import StoragePoolDef
from kimchi.utils import add_task, kimchi_log, pool_name_from_uri, run_command
from kimchi.xmlutils.utils import xpath_get_text
+from kimchi.model.vms import VMModel, VMsModel
+from kimchi.xmlutils.disk import get_vm_disk_info, get_vm_disks
ISO_POOL_NAME = u'kimchi_isos'
@@ -230,6 +233,24 @@ class StoragePoolModel(object):
source[key] = res
return source
+ def _get_vms_attach_to_a_storagepool(self, pool_name):
+ # find out vm(s) the vol(s) of this pool attached to.
+ pool = self.get_storagepool(pool_name, self.conn)
+ xml = pool.XMLDesc(0)
+
+ vms = []
+ pool_path = xpath_get_text(xml, "/pool/target/path")[0]
+ vms_list = VMsModel.get_vms(self.conn)
+ for vm in vms_list:
+ dom = VMModel.get_vm(vm, self.conn)
+ storages = get_vm_disks(dom)
+ for disk in storages.keys():
+ d_info = get_vm_disk_info(dom, disk)
+ if pool_path == os.path.split(d_info['path'])[0]:
+ vms.append(vm)
+ break
+ return sorted(vms)
+
def _nfs_status_online(self, pool, poolArgs=None):
if not poolArgs:
xml = pool.XMLDesc(0)
@@ -378,6 +399,13 @@ class StoragePoolModel(object):
raise OperationFailed("KCHPOOL0033E",
{'name': name, 'server': source['addr']})
return
+ elif (pool_type == 'logical' and
+ self._get_storagepool_vols_num(pool) > 0):
+ # can not deactive if vol(s) exists, because destroy
+ # logical pool will cause the vol deleted.
+ vms = self._get_vms_attach_to_a_storagepool(name)
+ raise InvalidOperation('KCHPOOL0038E', {'name': name,
+ 'vms': ', '.join(vms)})
try:
persistent = pool.isPersistent()
pool.destroy()
--
1.8.3.1
9 years, 10 months
[PATCH v2] Kimchi: Old version of ppc64_cpu command doesn't support option --threads-per-core V2 Correct missing \ in kimchi/model/cpuinfo.py V1 Old version of ppc64_cpu command doesn't support option --threads-per-core and raises a start message ValueError: invalid literal for int() with base 10: 'information)' Solution is to get info from lscpu which sounds accurate
by thierry@linux.vnet.ibm.com
From: Thierry FAUCK - IBM LTC <thierry(a)linux.vnet.ibm.com>
Remove dependency to qemu-kvm
Signed-off-by: Thierry FAUCK - IBM LTC <thierry(a)linux.vnet.ibm.com>
modified: contrib/DEBIAN/control.in
modified: src/kimchi/model/cpuinfo.py
---
contrib/DEBIAN/control.in | 1 -
src/kimchi/model/cpuinfo.py | 20 +++++++++++++++-----
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/contrib/DEBIAN/control.in b/contrib/DEBIAN/control.in
index 069e14b..776b033 100644
--- a/contrib/DEBIAN/control.in
+++ b/contrib/DEBIAN/control.in
@@ -14,7 +14,6 @@ Depends: python-cherrypy3 (>= 3.2.0),
libvirt-bin,
nfs-common,
python-m2crypto,
- qemu-kvm,
python-pam,
python-parted,
python-psutil (>= 0.6.0),
diff --git a/src/kimchi/model/cpuinfo.py b/src/kimchi/model/cpuinfo.py
index 3411ef5..d43f21f 100644
--- a/src/kimchi/model/cpuinfo.py
+++ b/src/kimchi/model/cpuinfo.py
@@ -80,11 +80,21 @@ class CPUInfoModel(object):
out, error, rc = run_command(['ppc64_cpu', '--cores-on'])
if not rc:
self.cores_available = int(out.split()[-1])
- out, error, rc = run_command(['ppc64_cpu', '--threads-per-core'])
- if not rc:
- self.threads_per_core = int(out.split()[-1])
- self.sockets = self.cores_present/self.threads_per_core
- self.cores_per_socket = self.cores_present/self.sockets
+ try:
+ out, error, rc = run_command(['ppc64_cpu', '--threads-per-core'])
+ if not rc:
+ self.threads_per_core = int(out.split()[-1])
+ self.sockets = self.cores_present/self.threads_per_core
+ self.cores_per_socket = self.cores_present/self.sockets
+ except:
+ out, error, rc = run_command(['sh', '-c', 'lscpu |
+ grep "Thread(s) per core:"'])
+ if not rc:
+ self.cores_present = int(out.split()[-1])
+ out, error, rc = run_command(['sh', '-c', 'lscpu |
+ grep "Core(s) per socket:"'])
+ if not rc:
+ self.cores_available = int(out.split()[-1])
else:
# Intel or AMD
self.guest_threads_enabled = True
--
1.7.9.5
9 years, 10 months
[PATCH] Make VMs for tests auto-destroy'd and transient
by Christy Perez
If Kimchi's startup is interrupted for some reason, a VM created
during the feature tests may be left defined. When this happens,
the next time Kimchi is started it will fail with an error that
the domain already exists (for example, "libvirtError: operation
failed: domain 'A_SIMPLE_VM' already exists with uuid
e6fccea8-f7ed-4320-a4cb-b85217d23985").
About the new flag:
"If the VIR_DOMAIN_START_AUTODESTROY flag is set, the guest
domain will be automatically destroyed when the virConnectPtr
object is finally released. This will also happen if the
client application crashes / loses its connection to the
libvirtd daemon. Any domains marked for auto destroy will
block attempts at migration, save-to-file, or snapshots."
This patch also changes the memory in the test VMs, due to the fact
that the domain will be started, and some platforms (Power is a known
example) require at least 128M of memory for a guest.
Signed-off-by: Christy Perez <christy(a)linux.vnet.ibm.com>
---
src/kimchi/kvmusertests.py | 5 ++---
src/kimchi/model/featuretests.py | 14 ++++++++------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/kimchi/kvmusertests.py b/src/kimchi/kvmusertests.py
index 408706d..3abf148 100644
--- a/src/kimchi/kvmusertests.py
+++ b/src/kimchi/kvmusertests.py
@@ -54,9 +54,8 @@ def probe_user(cls):
with RollbackContext() as rollback:
conn = libvirt.open(None)
rollback.prependDefer(conn.close)
- dom = conn.defineXML(xml)
- rollback.prependDefer(dom.undefine)
- dom.create()
+ dom = conn.createXML(xml,
+ flags=libvirt.VIR_DOMAIN_START_AUTODESTROY)
rollback.prependDefer(dom.destroy)
with open('/var/run/libvirt/qemu/%s.pid' % vm_name) as f:
pidStr = f.read()
diff --git a/src/kimchi/model/featuretests.py b/src/kimchi/model/featuretests.py
index 5a45990..ef7dcc5 100644
--- a/src/kimchi/model/featuretests.py
+++ b/src/kimchi/model/featuretests.py
@@ -58,7 +58,7 @@
SIMPLE_VM_XML = """
<domain type='%(domain)s'>
<name>A_SIMPLE_VM</name>
- <memory unit='KiB'>10240</memory>
+ <memory unit='KiB'>131072</memory>
<os>
<type arch='%(arch)s'>hvm</type>
<boot dev='hd'/>
@@ -109,8 +109,9 @@ def libvirt_supports_iso_stream(conn, protocol):
'arch': arch}
try:
FeatureTests.disable_libvirt_error_logging()
- dom = conn.defineXML(xml)
- dom.undefine()
+ dom = conn.createXML(xml,
+ flags=libvirt.VIR_DOMAIN_START_AUTODESTROY)
+ dom.destroy()
return True
except libvirt.libvirtError, e:
kimchi_log.error(e.message)
@@ -196,9 +197,10 @@ def has_metadata_support(conn):
domain_type = 'test' if conn.getType().lower() == 'test' else 'kvm'
arch = 'ppc64' if platform.machine() == 'ppc64le' \
else platform.machine()
- dom = conn.defineXML(SIMPLE_VM_XML % {'domain': domain_type,
- 'arch': arch})
- rollback.prependDefer(dom.undefine)
+ dom = conn.createXML(SIMPLE_VM_XML % {'domain': domain_type,
+ 'arch': arch},
+ flags=libvirt.VIR_DOMAIN_START_AUTODESTROY)
+ rollback.prependDefer(dom.destroy)
try:
dom.setMetadata(libvirt.VIR_DOMAIN_METADATA_ELEMENT,
"<metatest/>", KIMCHI_NAMESPACE,
--
1.9.3
9 years, 10 months
[PATCH] Bugfix: Kimchi: Better to list storage pool paths
by Wen Wang
Fix the defect that kimchi could not show the storage path properly when
it's too long.
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
ui/css/theme-default/storage.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/css/theme-default/storage.css b/ui/css/theme-default/storage.css
index e0ab290..b6df3c2 100644
--- a/ui/css/theme-default/storage.css
+++ b/ui/css/theme-default/storage.css
@@ -50,7 +50,7 @@
.storage-text {
font-size: 12px;
- height: 18px;
+ min-height: 18px;
padding: 10px;
color: #999999;
font-weight: bold;
--
2.1.0
9 years, 10 months
[PATCH V2] UI: Add widget messagebar with sample
by Wen Wang
V1 -> V2:
Add a parameter "dismissTime" that allow delay time as well as "never"
for the dismiss time.
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
ui/css/theme-default/messagebar-flat.css | 64 ++++++++++++++++++++
ui/js/widgets/messagebar-flat.js | 71 +++++++++++++++++++++++
ui/js/widgets/samples/messagebar-flat-sample.html | 34 +++++++++++
3 files changed, 169 insertions(+)
create mode 100644 ui/css/theme-default/messagebar-flat.css
create mode 100644 ui/js/widgets/messagebar-flat.js
create mode 100644 ui/js/widgets/samples/messagebar-flat-sample.html
diff --git a/ui/css/theme-default/messagebar-flat.css b/ui/css/theme-default/messagebar-flat.css
new file mode 100644
index 0000000..d5efc8e
--- /dev/null
+++ b/ui/css/theme-default/messagebar-flat.css
@@ -0,0 +1,64 @@
+/*
+ * Project Kimchi
+ *
+ * Copyright IBM, Corp. 2015
+ *
+ * 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.
+ */
+
+.messagebar {
+ height: 30px;
+}
+
+.messagebar .messagebar-text {
+ text-align: left;
+ vertical-align: 50%;
+}
+
+.messagebar .messageHead {
+ display: inline-block;
+ width: 5px;
+ height: 30px;
+}
+
+.messagebar-close {
+ line-height: 30px;
+ vertical-align: middle;
+ margin-right: 10px;
+ cursor: pointer;
+ float: right;
+}
+
+.green {
+ background-color: #DAE6CB;
+}
+
+.dark-green {
+ background-color: #89C53A;
+}
+
+.yellow {
+ background-color: #F1E3C2;
+}
+
+.dark-yellow {
+ background-color: #FDB60D;
+}
+
+.red {
+ background-color: #EAC3C7;
+}
+
+.dark-red {
+ background-color: #D81227;
+}
\ No newline at end of file
diff --git a/ui/js/widgets/messagebar-flat.js b/ui/js/widgets/messagebar-flat.js
new file mode 100644
index 0000000..203d194
--- /dev/null
+++ b/ui/js/widgets/messagebar-flat.js
@@ -0,0 +1,71 @@
+/*
+ * Project Kimchi
+ *
+ * Copyright IBM, Corp. 2015
+ *
+ * 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.
+ */
+
+/*
+* Usage:
+ $(selector).messagebarFlat({
+ content: "Test", //message you want to show in the messagebar
+ color: "red", //Three color supported: "red", "yellow" and "green",
+ dismissTime: 3000 //when set to "never", the messagebar will never disappear.
+ // Or setting it to numbers for the dismiss time you want to delay.
+ });
+*/
+
+(function($) {
+ $.widget("kimchi.messagebarFlat", {
+ options : {
+ content : null,
+ color : "red",
+ dismissTime: 3000
+ },
+
+ _create: function() {
+ var now = this._getTime();
+ var that = this;
+ $("<div class='messagebar'><span class='messageHead'></span>" +
+ "<span class='messagebar-text'> " + this.options.content +": " + now + "</span></div>")
+ .addClass(this.options.color)
+ .appendTo(that.element);
+ $(".messageHead").addClass("dark-" + this.options.color);
+ $("<span class='messagebar-close icon-cancel-circled'></span>").on("click", function() {
+ that.destroy();
+ }).appendTo($(".messagebar"));
+ var dismissDelay = this.options.dismissTime;
+ if (dismissDelay != "never") {
+ setTimeout(function() {
+ that.destroy()
+ }, dismissDelay);
+ }
+ },
+
+ _getTime: function() {
+ var CT = new Date();
+ var currentDate = CT.getDate() + "/" + CT.getMonth()+1 + "/" +CT.getFullYear();
+ var currentTime = CT.getHours() + ":" + CT.getMinutes() + ":" + CT.getSeconds();
+ var now = currentDate + " " + currentTime;
+ return now;
+ },
+
+ destroy: function() {
+ var that = this;
+ that.element.fadeOut("normal", function() {
+ that.element.remove();
+ });
+ }
+ });
+})(jQuery);
\ No newline at end of file
diff --git a/ui/js/widgets/samples/messagebar-flat-sample.html b/ui/js/widgets/samples/messagebar-flat-sample.html
new file mode 100644
index 0000000..5ab4c73
--- /dev/null
+++ b/ui/js/widgets/samples/messagebar-flat-sample.html
@@ -0,0 +1,34 @@
+<!-- For the record if the icon didn't show properly, please copy the whole folder:
+ui/css/fontello/ under current directory and set the link of the css related
+to fontello to proper value. -->
+
+<!--Sample code -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8">
+ <title>Sample of messagebar</title>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
+ <link rel="stylesheet" href="../../../css/fontello/css/fontello.css">
+ <link rel="stylesheet" href="../../../css/fontello/css/animation.css">
+ <link rel="stylesheet" href="../../../libs/themes/base/jquery-ui.min.css">
+ <link rel="stylesheet" href="../../../css/theme-default/messagebar-flat.css">
+ <script src="../../../libs/jquery-1.10.0.min.js"></script>
+ <script src="../../../libs/jquery-ui.min.js"></script>
+ <script src="../messagebar-flat.js"></script>
+ </head>
+ <body>
+ <div class="message"></div>
+ <script>
+ $(document).ready(function() {
+ $(".message").messagebarFlat({
+ content: "This is a test",
+ color: "red",
+ dismissTime: 1000
+ });
+ });
+ </script>
+ </body>
+
+</html>
--
2.1.0
9 years, 10 months
[v3 0/2] UI: Tabs Widget(With Sample)
by huoyuxin@linux.vnet.ibm.com
From: Yu Xin Huo <huoyuxin(a)linux.vnet.ibm.com>
Yu Xin Huo (2):
UI: Customize jQuery UI Tabs Widget
UI: Tabs Widget Sample
ui/css/theme-default/tabs.css | 46 ++++++++++++++++++++++++++
ui/css/theme-default/theme.css | 50 ++++++++++++++++++++++++++++
ui/js/widgets/samples/tabs.html | 68 +++++++++++++++++++++++++++++++++++++++
3 files changed, 164 insertions(+), 0 deletions(-)
create mode 100644 ui/css/theme-default/tabs.css
create mode 100644 ui/css/theme-default/theme.css
create mode 100644 ui/js/widgets/samples/tabs.html
9 years, 10 months
[PATCH 0/2] Dialog widget with sample
by Wen Wang
Dialog widget with sample
Wen Wang (2):
UI; Add widget of dialog
UI: Sample of dialog widget
ui/css/theme-default/dialog-flat.css | 67 +++++++++++++++++++
ui/js/widgets/dialog-flat.js | 120 +++++++++++++++++++++++++++++++++++
ui/js/widgets/samples/dialog.html | 51 +++++++++++++++
3 files changed, 238 insertions(+)
create mode 100644 ui/css/theme-default/dialog-flat.css
create mode 100644 ui/js/widgets/dialog-flat.js
create mode 100644 ui/js/widgets/samples/dialog.html
--
2.1.0
9 years, 10 months