[PATCH] Move resource config's info fetching to model level
by Mark Wu
We should not put the resource specefic information in controller
level. Controller is just used to dispatch request and act a glue
of view and model. We can dynamcially generate the controller code
in future.
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
src/kimchi/control/config.py | 8 +-------
src/kimchi/mockmodel.py | 7 +++++++
src/kimchi/model.py | 7 +++++++
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/kimchi/control/config.py b/src/kimchi/control/config.py
index 16cc384..4750410 100644
--- a/src/kimchi/control/config.py
+++ b/src/kimchi/control/config.py
@@ -22,10 +22,6 @@
# 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 kimchi.config import config
from kimchi.control.base import Collection, Resource
from kimchi.control.utils import UrlSubNode
@@ -39,9 +35,7 @@ class Config(Resource):
@property
def data(self):
- display_proxy_port = config.get('display', 'display_proxy_port')
- return {'http_port': cherrypy.server.socket_port,
- 'display_proxy_port': display_proxy_port}
+ return self.info
class Capabilities(Resource):
diff --git a/src/kimchi/mockmodel.py b/src/kimchi/mockmodel.py
index 0fe69dd..bcc2ae0 100644
--- a/src/kimchi/mockmodel.py
+++ b/src/kimchi/mockmodel.py
@@ -45,6 +45,7 @@ import kimchi.model
from kimchi import config
from kimchi import network as knetwork
from kimchi.asynctask import AsyncTask
+from kimchi.config import config as kconfig
from kimchi.distroloader import DistroLoader
from kimchi.exception import InvalidOperation, InvalidParameter
from kimchi.exception import MissingParameter, NotFoundError, OperationFailed
@@ -658,6 +659,12 @@ class MockModel(object):
% name)
return disks.get_partition_details(name)
+ def config_lookup(self, name):
+ return {'http_port': cherrypy.server.socket_port,
+ 'display_proxy_port':
+ kconfig.get('display', 'display_proxy_port')}
+
+
class MockVMTemplate(VMTemplate):
def __init__(self, args, mockmodel_inst=None):
VMTemplate.__init__(self, args)
diff --git a/src/kimchi/model.py b/src/kimchi/model.py
index 1f98bfa..7a9ebca 100644
--- a/src/kimchi/model.py
+++ b/src/kimchi/model.py
@@ -67,6 +67,7 @@ from kimchi import vnc
from kimchi import xmlutils
from kimchi.asynctask import AsyncTask
from kimchi.distroloader import DistroLoader
+from kimchi.config import config as kconfig
from kimchi.exception import InvalidOperation, InvalidParameter, IsoFormatError
from kimchi.exception import MissingParameter, NotFoundError, OperationFailed, TimeoutExpired
from kimchi.featuretests import FeatureTests
@@ -1583,6 +1584,12 @@ class Model(object):
kimchi_log.info('Host is going to reboot.')
os.system('reboot')
+ def config_lookup(self, name):
+ return {'http_port': cherrypy.server.socket_port,
+ 'display_proxy_port':
+ kconfig.get('display', 'display_proxy_port')}
+
+
class LibvirtVMTemplate(VMTemplate):
def __init__(self, args, scan=False, conn=None):
--
1.8.4.2
10 years, 10 months
[PATCH v5 0/2] Change all CSS files indentation to 4 spaces
by Crístian Viana
This is the difference between this and the previous patchset (v4):
- Rebased to a6a4999.
Crístian Viana (2):
CSS: Do not allow lines longer than 79 characters
CSS: Change all CSS files indentation to 4 spaces
ui/css/theme-default/button.css | 167 ++++++++++++++++++++----------
ui/css/theme-default/error.css | 15 ++-
ui/css/theme-default/grid.css | 36 ++++---
ui/css/theme-default/host.css | 6 +-
ui/css/theme-default/jquery-ui.custom.css | 27 +++--
ui/css/theme-default/line-chart.css | 6 +-
ui/css/theme-default/list.css | 15 ++-
ui/css/theme-default/nav-tree.css | 12 ++-
ui/css/theme-default/network.css | 12 ++-
ui/css/theme-default/popover.css | 39 ++++---
ui/css/theme-default/report-add.css | 3 +-
ui/css/theme-default/reset.css | 8 +-
ui/css/theme-default/storage.css | 18 ++--
ui/css/theme-default/template-edit.css | 9 +-
ui/css/theme-default/template_add.css | 20 ++--
ui/css/theme-default/template_list.css | 24 +++--
ui/css/theme-default/toolbar.css | 6 +-
ui/css/theme-default/topbar.css | 29 ++++--
ui/css/theme-default/window.css | 3 +-
19 files changed, 296 insertions(+), 159 deletions(-)
--
1.8.5.3
10 years, 10 months
[PATCH v2] HTML: Make the form element's labels clickable
by Crístian Viana
This is the difference between this and the previous patchset (v1):
- Attach the checkbox that enables VLAN on the bridged network dialog to
the appropriate label ("Enable VLAN").
Crístian Viana (1):
HTML: Make the form element's labels clickable
ui/pages/storagepool-add.html.tmpl | 6 +++---
ui/pages/tabs/network.html.tmpl | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
--
1.8.5.3
10 years, 10 months
[PATCH] Update README to direct users to the oVirt mailing list
by Adam King
Update README to direct users to the oVirt mailing list
rather than the old google group.
Signed-off-by: Adam King <rak(a)linux.vnet.ibm.com>
---
docs/README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/README.md b/docs/README.md
index a1f02ee..9c7c188 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -136,9 +136,9 @@ environment.
Participating
-------------
-All patches are sent through our mailing list hosted at Google Groups. More
+All patches are sent through our mailing list hosted by oVirt. More
information can be found at:
-https://groups.google.com/forum/#!forum/project-kimchi
+https://github.com/kimchi-project/kimchi/wiki/Communications
-Patches should be sent using git-send-email.
+Patches should be sent using git-send-email to kimchi-devel(a)ovirt.org.
--
1.8.1.4
10 years, 10 months
[PATCH] Use Autoconf macros AC_PROG_MKDIR_P and MKDIR_P
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
configure complains AM_PROG_MKDIR_P and MKDIR_P are obsolete.
configure.ac:44: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and
its use is discouraged.
configure.ac:44: You should use the Autoconf-provided 'AC_PROG_MKDIR_P'
macro instead,
configure.ac:44: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your
Makefile.am files.
Automake manual says:
>From Automake 1.8 to 1.9.6 AM_PROG_MKDIR_P used to define the output variable
mkdir_p to one of mkdir -p, install-sh -d, or mkinstalldirs
Nowadays Autoconf provides a similar functionality with AC_PROG_MKDIR_P.
Automake manual advises to switch ASAP to the more modern Autoconf-provided
interface instead; both the macro and the variable might be removed in a
future major Automake release.
AC_PROG_MKDIR_P will set output variable MKDIR_P.
And kimchi already contains install-sh under build-aux.
REF:
http://www.gnu.org/software/automake/manual/automake.html#Obsolete-Macros
http://www.gnu.org/software/autoconf/manual/autoconf.html#index-AC_005fPR...
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
---
m4/po.m4 | 2 +-
po/Makefile.in.in | 21 +++++++++------------
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/m4/po.m4 b/m4/po.m4
index 47f36a4..8bc921d 100644
--- a/m4/po.m4
+++ b/m4/po.m4
@@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
[
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl defined by autoconf
AC_REQUIRE([AM_NLS])dnl
dnl Release version of the gettext macros. This is used to ensure that
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index c2e9c1b..f7c1611 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -32,17 +32,14 @@ gettextsrcdir = $(datadir)/gettext/po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
-# We use $(mkdir_p).
-# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
-# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
-# @install_sh@ does not start with $(SHELL), so we add it.
-# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
-# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
-# versions, $(mkinstalldirs) and $(install_sh) are unused.
+# We use $(MKDIR_P).
+# This macro uses the 'mkdir -p' command if possible. Otherwise, it falls ba
+# on invoking install-sh with the -d option, so your package should contain
+# install-sh as described under AC_PROG_INSTALL.
mkinstalldirs = $(SHELL) @install_sh@ -d
install_sh = $(SHELL) @install_sh@
MKDIR_P = @MKDIR_P@
-mkdir_p = @mkdir_p@
+MKDIR_P = @MKDIR_P@
GMSGFMT_ = @GMSGFMT@
GMSGFMT_no = @GMSGFMT@
@@ -168,7 +165,7 @@ install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
- $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \
for file in $(DISTFILES.common) Makevars.template; do \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
@@ -186,7 +183,7 @@ install-data-yes: all
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
- $(mkdir_p) $(DESTDIR)$$dir; \
+ $(MKDIR_P) $(DESTDIR)$$dir; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
@@ -226,7 +223,7 @@ installdirs: installdirs-exec installdirs-data
installdirs-exec:
installdirs-data: installdirs-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
- $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \
else \
: ; \
fi
@@ -237,7 +234,7 @@ installdirs-data-yes:
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
- $(mkdir_p) $(DESTDIR)$$dir; \
+ $(MKDIR_P) $(DESTDIR)$$dir; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
--
1.8.4.2
10 years, 10 months
[PATCH] Storage pool support unicode correctly
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
>From unicode, we have handle the incoming text from
kimchi server and outgoing text to kimchi server correctly.
But we do not handle the incoming text from libvirt and outgoing text to
libvirt correctly.
For some variables of storage pool, such as pool name and pool xml do
not follow our principle.
https://github.com/kimchi-project/kimchi/wiki/support-unicode
This patch will improve the follow:
1. Handle storage pool xml and pool name as unicode in kimchi, and decode
them when pass them to libvirt.
2. Decode the pool name from libvirt.
We should guarantee:
All text strings, everywhere should be of type unicode, not str.
If we're handling text, and our variable is a str, it's a bug!
Test this patch:
1. create a pool
$ curl -u <user> -H 'Accept: application/json' -H 'Content-type:
application/json' http://localhost:8000/storagepools/ -X POST -d '
{
"name":"kīмсhī-pool",
"type":"dir",
"path":"/tmp/test"
} '
2. get this pool
$ curl -u <user> -H 'Accept: application/json' -H 'Content-type:
application/json' http://localhost:8000/storagepols/kīмсhī-pool
3. delete this pool
$ curl -u <user> -H 'Accept: application/json' -H 'Content-type:
application/json' http://localhost:8000/storagepols/kīмсhī-pool \
-X DELETE
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
---
src/kimchi/model.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/kimchi/model.py b/src/kimchi/model.py
index 81c1507..55de570 100644
--- a/src/kimchi/model.py
+++ b/src/kimchi/model.py
@@ -1170,7 +1170,7 @@ class Model(object):
task_id = self._do_deep_scan(params)
poolDef = StoragePoolDef.create(params)
poolDef.prepare(conn)
- xml = poolDef.xml
+ xml = poolDef.xml.encode("utf-8")
except KeyError, key:
raise MissingParameter(key)
@@ -1297,14 +1297,14 @@ class Model(object):
conn = self.conn.get()
names = conn.listStoragePools()
names += conn.listDefinedStoragePools()
- return sorted(names)
+ return sorted(map(lambda x: x.decode('utf-8'), names))
except libvirt.libvirtError as e:
raise OperationFailed(e.get_error_message())
def _get_storagepool(self, name):
conn = self.conn.get()
try:
- return conn.storagePoolLookupByName(name)
+ return conn.storagePoolLookupByName(name.encode("utf-8"))
except libvirt.libvirtError as e:
if e.get_error_code() == libvirt.VIR_ERR_NO_STORAGE_POOL:
raise NotFoundError("Storage Pool '%s' not found" % name)
@@ -1594,7 +1594,7 @@ class LibvirtVMTemplate(VMTemplate):
pool_name = pool_name_from_uri(pool_uri)
try:
conn = self.conn.get()
- pool = conn.storagePoolLookupByName(pool_name)
+ pool = conn.storagePoolLookupByName(pool_name.encode("utf-8"))
except libvirt.libvirtError:
raise InvalidParameter('Storage specified by template does not exist')
if not pool.isActive():
@@ -1719,7 +1719,7 @@ class DirPoolDef(StoragePoolDef):
# name:
# type:
# path:
- xml = """
+ xml = u"""
<pool type='dir'>
<name>{name}</name>
<target>
@@ -1775,7 +1775,7 @@ class NetfsPoolDef(StoragePoolDef):
# source[path]:
poolArgs = copy.deepcopy(self.poolArgs)
poolArgs['path'] = self.path
- xml = """
+ xml = u"""
<pool type='netfs'>
<name>{name}</name>
<source>
@@ -1811,7 +1811,7 @@ class LogicalPoolDef(StoragePoolDef):
poolArgs['source']['devices'] = ''.join(devices)
poolArgs['path'] = self.path
- xml = """
+ xml = u"""
<pool type='logical'>
<name>{name}</name>
<source>
@@ -1845,7 +1845,7 @@ class IscsiPoolDef(StoragePoolDef):
virSecret = conn.secretLookupByUsage(
libvirt.VIR_SECRET_USAGE_TYPE_ISCSI, self.poolArgs['name'])
except libvirt.libvirtError:
- xml = '''
+ xml = u'''
<secret ephemeral='no' private='yes'>
<description>Secret for iSCSI storage pool {name}</description>
<auth type='chap' username='{username}'/>
@@ -1871,7 +1871,7 @@ class IscsiPoolDef(StoragePoolDef):
except KeyError:
return ""
- return '''
+ return u'''
<auth type='chap' username='{username}'>
<secret type='iscsi' usage='{name}'/>
</auth>'''.format(name=poolArgs['name'], username=auth['username'])
@@ -1891,7 +1891,7 @@ class IscsiPoolDef(StoragePoolDef):
'auth': self._format_auth(poolArgs)})
poolArgs['path'] = '/dev/disk/by-id'
- xml = """
+ xml = u"""
<pool type='iscsi'>
<name>{name}</name>
<source>
--
1.8.4.2
10 years, 10 months
[PATCH] get vms list by listAllDomains
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
we can get all domains by listAllDomains
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
---
src/kimchi/model.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/kimchi/model.py b/src/kimchi/model.py
index 671af02..4b7df7e 100644
--- a/src/kimchi/model.py
+++ b/src/kimchi/model.py
@@ -646,10 +646,7 @@ class Model(object):
def vms_get_list(self):
conn = self.conn.get()
- ids = conn.listDomainsID()
- names = map(lambda x: conn.lookupByID(x).name(), ids)
- names += conn.listDefinedDomains()
- names = map(lambda x: x.decode('utf-8'), names)
+ names = [dom.name().decode('utf-8') for dom in conn.listAllDomains(0)]
return sorted(names, key=unicode.lower)
def vmscreenshot_lookup(self, name):
--
1.8.4.2
10 years, 10 months
[PATCH V2] GET /plugins failed, fix it
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V1 -> V2
get(self, *args) -> get(self, filter_params)
ShaoHe Feng (1):
GET /plugins failed, fix it
src/kimchi/control/plugins.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
1.8.4.2
10 years, 10 months
[PATCH] bug fix: remove decode for resouce ident when use cherrypy's default dispatcher
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Now there are two kinds of sub-collection/resource dispatchers.
1. Use cherrypy's default dispatcher
Cherrypy will decode the ident automatically
But now in kimchi we decode the ident manually.
This is a bug.
Kimchi can not list the resources with unicode name.
For examle:
create a pool with kīмсhī-pool name
list this pool
$ curl -u shhfeng -H 'Accept: application/json' \
-H 'Content-type: application/json' \
http://localhost:8000/storagepools/kīмсhī-pool
kimchi will throw an UnicodeEncodeError.
This patch fixes this bug.
2. customized dispatcher by overriding the cherrypy dispatcher
We need to decode the ident explicitly.
Now kimchi handles it correctly.
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
---
src/kimchi/control/storagepools.py | 2 +-
src/kimchi/control/vms.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/control/storagepools.py b/src/kimchi/control/storagepools.py
index 3b8ef79..881c61e 100644
--- a/src/kimchi/control/storagepools.py
+++ b/src/kimchi/control/storagepools.py
@@ -85,7 +85,7 @@ class StoragePool(Resource):
self.uri_fmt = "/storagepools/%s"
self.activate = self.generate_action_handler('activate')
self.deactivate = self.generate_action_handler('deactivate')
- self.storagevolumes = StorageVolumes(self.model, ident.decode("utf-8"))
+ self.storagevolumes = StorageVolumes(self.model, ident)
@property
def data(self):
diff --git a/src/kimchi/control/vms.py b/src/kimchi/control/vms.py
index 06c7be3..60fc8ff 100644
--- a/src/kimchi/control/vms.py
+++ b/src/kimchi/control/vms.py
@@ -41,7 +41,7 @@ class VM(Resource):
self.screenshot = VMScreenShot(model, ident)
self.uri_fmt = '/vms/%s'
for ident, node in sub_nodes.items():
- setattr(self, ident, node(model, self.ident.decode("utf-8")))
+ setattr(self, ident, node(model, self.ident))
self.start = self.generate_action_handler('start')
self.stop = self.generate_action_handler('stop')
self.connect = self.generate_action_handler('connect')
--
1.8.4.2
10 years, 10 months
[PATCH] Make guests template handling more robust like host template handling
by Adam King
Change guest tab loading from an ajax request to an inline element
processed by Cheetah at guests.html.tmpl load time. This will eliminate
the potential for error when fetching the guest template, as well as improve
the performance of the flow. Also updated kimchi-ui.html to eliminate
potential race condition as I integrated the new guests load into the main
flow.
Signed-off-by: Adam King <rak(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_main.js | 20 ++------------------
ui/pages/kimchi-ui.html.tmpl | 28 +++++++++++++---------------
ui/pages/tabs/guests.html.tmpl | 18 ++++++++++--------
3 files changed, 25 insertions(+), 41 deletions(-)
diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index 9c45cf5..8467f3f 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -228,27 +228,11 @@ kimchi.guest_main = function() {
$("#vm-add").on("click", function(event) {
kimchi.window.open('guest-add.html');
});
-
- $.ajax({
- headers : {
- Accept : "text/html"
- },
- url : 'guest.html',
- type : 'GET',
- dataType : 'html',
- accepts : 'text/html',
- success : function(response) {
- kimchi.guestTemplate = response;
- kimchi.listVmsAuto()
- },
- error : function() {
- console.error('Could not get guest.html');
- },
- });
-
+ kimchi.guestTemplate = $('#guest-tmpl').html();
$('#guests-root-container').on('remove', function() {
kimchi.vmTimeout && clearTimeout(kimchi.vmTimeout);
});
+ kimchi.listVmsAuto()
};
kimchi.editTemplate = function(guestTemplate, oldPopStat) {
diff --git a/ui/pages/kimchi-ui.html.tmpl b/ui/pages/kimchi-ui.html.tmpl
index 8e234e2..eebe886 100644
--- a/ui/pages/kimchi-ui.html.tmpl
+++ b/ui/pages/kimchi-ui.html.tmpl
@@ -32,9 +32,14 @@
<title>Kimchi</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<link rel="shortcut icon" href="images/logo.ico">
-<link rel="stylesheet" href="$href("libs/themes/base/jquery-ui.min.css")">
-<link rel="stylesheet" href="$href("css/theme-default.min.css")">
-<script src="$href("libs/modernizr.custom.76777.js")"></script>
+<link rel="stylesheet" href="$href('libs/themes/base/jquery-ui.min.css')">
+<link rel="stylesheet" href="$href('css/theme-default.min.css')">
+
+<script src="$href('libs/modernizr.custom.76777.js')"></script>
+<script src="$href('libs/jquery-1.10.0.min.js')"></script>
+<script src="$href('libs/jquery-ui.min.js')"></script>
+<script src="$href('libs/jquery-ui-i18n.min.js')"></script>
+<script src="$href('js/kimchi.min.js')"></script>
<!-- This is used for detecting if the UI needs to be built -->
<style type="text/css">
@@ -62,7 +67,7 @@
}
</style>
</head>
-<body>
+<body onload="kimchi.main()">
<div class="container">
<header class="topbar">
<h1 id="logo"><img alt="Project Kimchi" src="images/theme-default/logo-white.png"></h1>
@@ -89,19 +94,12 @@
</div>
</div>
</div>
-<script src="$href("libs/jquery-1.10.0.min.js")"></script>
-<script src="$href("libs/jquery-ui.min.js")"></script>
-<script src="$href("libs/jquery-ui-i18n.min.js")"></script>
-<script src="$href("js/kimchi.min.js")"></script>
<div id="buildme">
-<div>Oops! It looks like I am running from a source tree and you forgot to build!
-Please run the following command and reload this page:
-<p><code>python setup.py build</code></p>
-</div>
+ <div><p>Oops! It looks like I am running from a source tree and you forgot to build!
+ Please run the following command from the kimchi directory and reload this page:</p>
+ <p><code>make</code></p>
+ </div>
</div>
-<script>
-kimchi.main();
-</script>
</body>
</html>
diff --git a/ui/pages/tabs/guests.html.tmpl b/ui/pages/tabs/guests.html.tmpl
index d73eb39..e2ab173 100644
--- a/ui/pages/tabs/guests.html.tmpl
+++ b/ui/pages/tabs/guests.html.tmpl
@@ -22,13 +22,14 @@
#unicode UTF-8
#import gettext
+#from Cheetah.Template import Template
#from kimchi.cachebust import href
#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang)
#silent _ = t.gettext
#silent _t = t.gettext
-<!DOCTYPE html>
-<html>
-<body>
+
+#silent ht = Template
+
<div id="guests-root-container">
<div class="toolbar">
<div class="tools">
@@ -50,9 +51,10 @@
<div id="noGuests" class="list-no-result" style="display: none;">
$_("No guests found.")
</div>
+ <script id="guest-tmpl" type="kimchi/template">
+ $ht(file="ui/pages/guest.html.tmpl",searchList=[self,{'lang':$lang}])
+ </script>
+ <script type="text/javascript">
+ kimchi.guest_main();
+ </script>
</div>
-<script>
- kimchi.guest_main();
-</script>
-</body>
-</html>
--
1.8.1.4
10 years, 10 months