rhmessaging commits: r3860 - in store/trunk/cpp/tests: cluster and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2010-02-26 14:02:26 -0500 (Fri, 26 Feb 2010)
New Revision: 3860
Added:
store/trunk/cpp/tests/cluster/run_cpp_cluster_tests
store/trunk/cpp/tests/cluster/run_long_python_cluster_tests
store/trunk/cpp/tests/cluster/run_python_cluster_tests
Removed:
store/trunk/cpp/tests/cluster/run_cluster_test
store/trunk/cpp/tests/cluster/run_cluster_tests
store/trunk/cpp/tests/cluster/run_long_cluster_tests
Modified:
store/trunk/cpp/tests/cluster/Makefile.am
store/trunk/cpp/tests/run_long_python_tests
Log:
Tidy-up of some cluster test names
Modified: store/trunk/cpp/tests/cluster/Makefile.am
===================================================================
--- store/trunk/cpp/tests/cluster/Makefile.am 2010-02-25 20:55:31 UTC (rev 3859)
+++ store/trunk/cpp/tests/cluster/Makefile.am 2010-02-26 19:02:26 UTC (rev 3860)
@@ -35,9 +35,12 @@
.valgrind.supp: $(top_srcdir)/tests/.valgrind.supp
cp $^ .
-TESTS = run_cluster_tests run_cluster_test
+TESTS = \
+ run_cpp_cluster_tests \
+ run_python_cluster_tests
-LONG_TESTS = run_long_cluster_tests
+LONG_TESTS = \
+ run_long_python_cluster_tests
TESTS_ENVIRONMENT = \
BOOST_TEST_SHOW_PROGRESS=yes \
@@ -51,8 +54,9 @@
EXTRA_DIST = \
cluster_tests_env.sh \
- run_cluster_test \
- run_cluster_tests
+ run_cpp_cluster_tests \
+ run_python_cluster_tests \
+ run_long_python_cluster_tests
check-long:
$(MAKE) check TESTS="$(LONG_TESTS)" SUBDIRS=.
Deleted: store/trunk/cpp/tests/cluster/run_cluster_test
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_test 2010-02-25 20:55:31 UTC (rev 3859)
+++ store/trunk/cpp/tests/cluster/run_cluster_test 2010-02-26 19:02:26 UTC (rev 3860)
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2008, 2009 Red Hat, Inc.
-#
-# This file is part of the Qpid async store library msgstore.so.
-#
-# 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
-#
-# The GNU Lesser General Public License is available in the file COPYING.
-
-. `dirname $0`/cluster_tests_env.sh
-
-if test $COROSYNC; then
- ${CPP_CLUSTER_EXEC}
- RETCODE=$?
-else
- sg ais -c "${CPP_CLUSTER_EXEC}"
- RETCODE=$?
-fi
-
-exit $RETCODE
\ No newline at end of file
Deleted: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2010-02-25 20:55:31 UTC (rev 3859)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2010-02-26 19:02:26 UTC (rev 3860)
@@ -1,53 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2008, 2009 Red Hat, Inc.
-#
-# This file is part of the Qpid async store library msgstore.so.
-#
-# 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
-#
-# The GNU Lesser General Public License is available in the file COPYING.
-
-. `dirname $0`/cluster_tests_env.sh
-
-func_check_qpid_python || exit 0 # A warning, not a failure.
-
-echo "Running Python cluster tests..."
-OUTDIR=brokertest.tmp
-rm -rf $OUTDIR
-# Ignore tests requiring a store by default.
-CLUSTER_TESTS_IGNORE=${CLUSTER_TESTS_IGNORE:-"-I ${CLUSTER_TESTS_FAIL}"}
-CLUSTER_TESTS=${CLUSTER_TESTS:-$*}
-
-TEST_CMD="${QPID_PYTHON_TEST} -m cluster_tests ${CLUSTER_TESTS_IGNORE} ${CLUSTER_TESTS} -DOUTDIR=$OUTDIR"
-if test $COROSYNC; then
- $TEST_CMD
- RETCODE=$?
-else
- sg ais -c "$TEST_CMD"
- RETCODE=$?
-fi
-#sg ais -c "${PYTHON_DIR}/qpid-python-test -m cluster_tests ${CLUSTER_TESTS_IGNORE} ${CLUSTER_TESTS} -DOUTDIR=$OUTDIR"
-#RETCODE=$?
-
-if test x${RETCODE} != x0; then
- exit 1;
-fi
-rm -rf $OUTDIR
-
-../clean.sh
-
-exit 0
Copied: store/trunk/cpp/tests/cluster/run_cpp_cluster_tests (from rev 3859, store/trunk/cpp/tests/cluster/run_cluster_test)
===================================================================
--- store/trunk/cpp/tests/cluster/run_cpp_cluster_tests (rev 0)
+++ store/trunk/cpp/tests/cluster/run_cpp_cluster_tests 2010-02-26 19:02:26 UTC (rev 3860)
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Copyright (c) 2008, 2009 Red Hat, Inc.
+#
+# This file is part of the Qpid async store library msgstore.so.
+#
+# 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
+#
+# The GNU Lesser General Public License is available in the file COPYING.
+
+. `dirname $0`/cluster_tests_env.sh
+
+if test $COROSYNC; then
+ ${CPP_CLUSTER_EXEC}
+ RETCODE=$?
+else
+ sg ais -c "${CPP_CLUSTER_EXEC}"
+ RETCODE=$?
+fi
+
+exit $RETCODE
\ No newline at end of file
Deleted: store/trunk/cpp/tests/cluster/run_long_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_long_cluster_tests 2010-02-25 20:55:31 UTC (rev 3859)
+++ store/trunk/cpp/tests/cluster/run_long_cluster_tests 2010-02-26 19:02:26 UTC (rev 3860)
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2008, 2009 Red Hat, Inc.
-#
-# This file is part of the Qpid async store library msgstore.so.
-#
-# 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
-#
-# The GNU Lesser General Public License is available in the file COPYING.
-
-./run_cluster_tests long_cluster_tests
Copied: store/trunk/cpp/tests/cluster/run_long_python_cluster_tests (from rev 3859, store/trunk/cpp/tests/cluster/run_long_cluster_tests)
===================================================================
--- store/trunk/cpp/tests/cluster/run_long_python_cluster_tests (rev 0)
+++ store/trunk/cpp/tests/cluster/run_long_python_cluster_tests 2010-02-26 19:02:26 UTC (rev 3860)
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# Copyright (c) 2008, 2009 Red Hat, Inc.
+#
+# This file is part of the Qpid async store library msgstore.so.
+#
+# 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
+#
+# The GNU Lesser General Public License is available in the file COPYING.
+
+./run_python_cluster_tests long
Copied: store/trunk/cpp/tests/cluster/run_python_cluster_tests (from rev 3859, store/trunk/cpp/tests/cluster/run_cluster_tests)
===================================================================
--- store/trunk/cpp/tests/cluster/run_python_cluster_tests (rev 0)
+++ store/trunk/cpp/tests/cluster/run_python_cluster_tests 2010-02-26 19:02:26 UTC (rev 3860)
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Copyright (c) 2008, 2009 Red Hat, Inc.
+#
+# This file is part of the Qpid async store library msgstore.so.
+#
+# 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
+#
+# The GNU Lesser General Public License is available in the file COPYING.
+
+. `dirname $0`/cluster_tests_env.sh
+
+func_check_qpid_python || exit 0 # A warning, not a failure.
+
+echo "Running Python cluster tests..."
+OUTDIR=brokertest.tmp
+rm -rf $OUTDIR
+# Ignore tests requiring a store by default.
+CLUSTER_TESTS_IGNORE=${CLUSTER_TESTS_IGNORE:-"-I ${CLUSTER_TESTS_FAIL}"}
+CLUSTER_TESTS=${CLUSTER_TESTS:-$*}
+
+TEST_CMD="${QPID_PYTHON_TEST} -m cluster_tests ${CLUSTER_TESTS_IGNORE} ${CLUSTER_TESTS} -DOUTDIR=$OUTDIR"
+if test $COROSYNC; then
+ $TEST_CMD
+ RETCODE=$?
+else
+ sg ais -c "$TEST_CMD"
+ RETCODE=$?
+fi
+#sg ais -c "${PYTHON_DIR}/qpid-python-test -m cluster_tests ${CLUSTER_TESTS_IGNORE} ${CLUSTER_TESTS} -DOUTDIR=$OUTDIR"
+#RETCODE=$?
+
+if test x${RETCODE} != x0; then
+ exit 1;
+fi
+rm -rf $OUTDIR
+
+../clean.sh
+
+exit 0
Modified: store/trunk/cpp/tests/run_long_python_tests
===================================================================
--- store/trunk/cpp/tests/run_long_python_tests 2010-02-25 20:55:31 UTC (rev 3859)
+++ store/trunk/cpp/tests/run_long_python_tests 2010-02-26 19:02:26 UTC (rev 3860)
@@ -21,4 +21,4 @@
#
# The GNU Lesser General Public License is available in the file COPYING.
-./run_python_tests LONG_TEST
+./run_old_python_tests LONG_TEST
14 years, 10 months
rhmessaging commits: r3859 - store/trunk/cpp/tests/cluster.
by rhmessaging-commits@lists.jboss.org
Author: aconway
Date: 2010-02-25 15:55:31 -0500 (Thu, 25 Feb 2010)
New Revision: 3859
Modified:
store/trunk/cpp/tests/cluster/cluster_tests_env.sh
Log:
Fix test scripts to reflect changes in qpid directory layout.
Modified: store/trunk/cpp/tests/cluster/cluster_tests_env.sh
===================================================================
--- store/trunk/cpp/tests/cluster/cluster_tests_env.sh 2010-02-25 20:54:34 UTC (rev 3858)
+++ store/trunk/cpp/tests/cluster/cluster_tests_env.sh 2010-02-25 20:55:31 UTC (rev 3859)
@@ -130,27 +130,9 @@
if test -z ${QPID_BLD}; then
QPID_BLD="${QPID_DIR}/cpp"
fi
-
- # Paths and dirs
- PYTHON_DIR="${QPID_DIR}/python"
- export PYTHONPATH="${PYTHON_DIR}":"${QPID_DIR}/cpp/src/tests":"${abs_srcdir}"
-
- # Libraries
- export CLUSTER_LIB="${QPID_BLD}/src/.libs/cluster.so"
- export ACL_LIB="${QPID_BLD}/src/.libs/acl.so"
- export TEST_STORE_LIB="${QPID_BLD}/src/tests/.libs/test_store.so"
-
- # Executables
+ source $QPID_BLD/src/tests/test_env.sh
CPP_CLUSTER_EXEC="${QPID_BLD}/src/tests/cluster_test"
PYTHON_CLUSTER_EXEC="${QPID_DIR}/cpp/src/tests/$PYTHON_TESTNAME"
- export QPIDD_EXEC="${QPID_BLD}/src/qpidd"
- export QPID_CONFIG_EXEC="${QPID_DIR}/python/commands/qpid-config"
- export QPID_ROUTE_EXEC="${QPID_DIR}/python/commands/qpid-route"
- export QPID_CLUSTER_EXEC="${QPID_DIR}/python/commands/qpid-cluster"
- export RECEIVER_EXEC="${QPID_BLD}/src/tests/receiver"
- export SENDER_EXEC="${QPID_BLD}/src/tests/sender"
-
- # Test data
CLUSTER_TESTS_FAIL="${QPID_DIR}/cpp/src/tests/cluster_tests.fail"
else
# Set up the environment based on value of ${QPID_PREFIX} for testing against an installed qpid
@@ -312,9 +294,9 @@
FAILING_PYTHON_TESTS="${abs_srcdir}/../failing_python_tests.txt"
if test -z $1; then
- CLUSTER_TEST="${PYTHON_DIR}/qpid-python-test -m cluster_tests -I ${CLUSTER_TESTS_FAIL}"
+ CLUSTER_TEST="${QPID_PYTHON_TEST} -m cluster_tests -I ${CLUSTER_TESTS_FAIL}"
else
- CLUSTER_TEST="${PYTHON_DIR}/qpid-python-test -m cluster_tests -I ${CLUSTER_TESTS_FAIL} cluster_tests.LongTests.*"
+ CLUSTER_TEST="${QPID_PYTHON_TEST} -m cluster_tests -I ${CLUSTER_TESTS_FAIL} cluster_tests.LongTests.*"
LONG_TEST=1
fi
14 years, 10 months
rhmessaging commits: r3858 - store/trunk/cpp/tests/cluster.
by rhmessaging-commits@lists.jboss.org
Author: aconway
Date: 2010-02-25 15:54:34 -0500 (Thu, 25 Feb 2010)
New Revision: 3858
Modified:
store/trunk/cpp/tests/cluster/run_cluster_tests
Log:
Fix test scripts to reflect changes in qpid directory layout.
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2010-02-24 20:46:49 UTC (rev 3857)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2010-02-25 20:54:34 UTC (rev 3858)
@@ -32,7 +32,7 @@
CLUSTER_TESTS_IGNORE=${CLUSTER_TESTS_IGNORE:-"-I ${CLUSTER_TESTS_FAIL}"}
CLUSTER_TESTS=${CLUSTER_TESTS:-$*}
-TEST_CMD="${PYTHON_DIR}/qpid-python-test -m cluster_tests ${CLUSTER_TESTS_IGNORE} ${CLUSTER_TESTS} -DOUTDIR=$OUTDIR"
+TEST_CMD="${QPID_PYTHON_TEST} -m cluster_tests ${CLUSTER_TESTS_IGNORE} ${CLUSTER_TESTS} -DOUTDIR=$OUTDIR"
if test $COROSYNC; then
$TEST_CMD
RETCODE=$?
14 years, 10 months
rhmessaging commits: r3857 - in store/trunk/cpp/tests: new_python_tests and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2010-02-24 15:46:49 -0500 (Wed, 24 Feb 2010)
New Revision: 3857
Modified:
store/trunk/cpp/tests/new_python_tests/client_persistence.py
store/trunk/cpp/tests/tests_env.sh
Log:
Fix for changed python paths (r.910016) which were causing qmf to fail in new_python_tests.
Modified: store/trunk/cpp/tests/new_python_tests/client_persistence.py
===================================================================
--- store/trunk/cpp/tests/new_python_tests/client_persistence.py 2010-02-19 18:52:40 UTC (rev 3856)
+++ store/trunk/cpp/tests/new_python_tests/client_persistence.py 2010-02-24 20:46:49 UTC (rev 3857)
@@ -189,13 +189,13 @@
def testExchange(self):
"""Exchange alternate exchange property persistence test"""
- broker = self.broker(storeArgs(), name="testBroker", expect=EXPECT_EXIT_OK)
+ broker = self.broker(storeArgs(), name="testExchangeBroker", expect=EXPECT_EXIT_OK)
qmf = Qmf(broker)
qmf.addExchange("altExch", "direct", durable=True) # Serves as alternate exchange instance
qmf.addExchange("testExch", "direct", durable=True, altExchangeName="altExch")
broker.terminate()
- broker = self.broker(storeArgs(), name="testBroker")
+ broker = self.broker(storeArgs(), name="testExchangeBroker")
qmf = Qmf(broker)
try: qmf.addExchange("altExch", "direct", passive=True)
except Exception, e: self.fail("Alternate exchange (\"altExch\") instance not recovered: %s" % e)
@@ -205,13 +205,13 @@
def testQueue(self):
"""Queue alternate exchange property persistexchangeNamece test"""
- broker = self.broker(storeArgs(), name="testBroker", expect=EXPECT_EXIT_OK)
+ broker = self.broker(storeArgs(), name="testQueueBroker", expect=EXPECT_EXIT_OK)
qmf = Qmf(broker)
qmf.addExchange("altExch", "direct", durable=True) # Serves as alternate exchange instance
qmf.addQueue("testQueue", durable=True, altExchangeName="altExch")
broker.terminate()
- broker = self.broker(storeArgs(), name="testBroker")
+ broker = self.broker(storeArgs(), name="testQueueBroker")
qmf = Qmf(broker)
try: qmf.addExchange("altExch", "direct", passive=True)
except Exception, e: self.fail("Alternate exchange (\"altExch\") instance not recovered: %s" % e)
@@ -238,4 +238,3 @@
self.assertEqual(mc, rm.content)
self.assertTrue(rm.redelivered)
-
\ No newline at end of file
Modified: store/trunk/cpp/tests/tests_env.sh
===================================================================
--- store/trunk/cpp/tests/tests_env.sh 2010-02-19 18:52:40 UTC (rev 3856)
+++ store/trunk/cpp/tests/tests_env.sh 2010-02-24 20:46:49 UTC (rev 3857)
@@ -92,7 +92,7 @@
# Paths and dirs
PYTHON_DIR="${QPID_DIR}/python"
- export PYTHONPATH="${PYTHON_DIR}":"${QPID_DIR}/cpp/src/tests":"${abs_srcdir}"
+ export PYTHONPATH="${PYTHONPATH}":"${PYTHON_DIR}":"${QPID_DIR}/extras/qmf/src/py":"${QPID_DIR}/tools/src/py":"${QPID_DIR}/cpp/src/tests":"${abs_srcdir}"
# Libraries
14 years, 10 months
rhmessaging commits: r3856 - in mgmt/trunk/rosemary: xml and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-02-19 13:52:40 -0500 (Fri, 19 Feb 2010)
New Revision: 3856
Added:
mgmt/trunk/rosemary/xml/rosemary.xml
Modified:
mgmt/trunk/rosemary/python/rosemary/model.py
mgmt/trunk/rosemary/python/rosemary/sqlmodel.py
mgmt/trunk/rosemary/python/rosemary/sqloperation.py
mgmt/trunk/rosemary/python/rosemary/sqltype.py
Log:
* Add deferred foreign key constraints
* Add python types to the sql type mappings
* Extend query support
* Add __repr__s for better debugging
* Store child schema elements directly on their parent classes as
attributes
* Load extended metadata from rosemary.xml
* Keep track of inbound references to a column
Modified: mgmt/trunk/rosemary/python/rosemary/model.py
===================================================================
--- mgmt/trunk/rosemary/python/rosemary/model.py 2010-02-19 18:47:32 UTC (rev 3855)
+++ mgmt/trunk/rosemary/python/rosemary/model.py 2010-02-19 18:52:40 UTC (rev 3856)
@@ -15,12 +15,23 @@
def load_xml_dir(self, path):
assert os.path.isdir(path)
+ extensions = os.path.join(path, "rosemary.xml")
+
for name in os.listdir(path):
file_path = os.path.join(path, name)
- if file_path.endswith(".xml") and os.path.isfile(file_path):
+ if not os.path.isfile(file_path):
+ continue
+
+ if file_path == extensions:
+ continue
+
+ if file_path.endswith(".xml"):
self.load_xml_file(file_path)
+ if os.path.isfile(extensions):
+ self.load_extensions(extensions)
+
def load_xml_file(self, path):
tree = ElementTree()
file = open(path, "r")
@@ -31,6 +42,16 @@
finally:
file.close()
+ def load_extensions(self, path):
+ tree = ElementTree()
+ file = open(path, "r")
+
+ try:
+ tree.parse(file)
+ self.extend(tree.getroot())
+ finally:
+ file.close()
+
def load(self, elem):
pkg = RosemaryPackage(self, elem.get("package"))
pkg.load(elem)
@@ -52,6 +73,11 @@
self.model.packages.append(self)
self.model.packages_by_name[self.name] = self
+ mangled = self.name.replace(".", "_")
+
+ if not hasattr(self.model, mangled):
+ setattr(self.model, mangled, self)
+
self.classes = list()
self.classes_by_name = dict()
@@ -71,6 +97,10 @@
for cls in self.classes:
cls.init()
+ def __repr__(self):
+ args = (self.__class__.__name__, self.name)
+ return "%s(%s)" % args
+
class RosemaryClass(object):
def __init__(self, package, name):
self.package = package
@@ -79,9 +109,14 @@
self.package.classes.append(self)
self.package.classes_by_name[self.name] = self
+ if not hasattr(self.package, self.name):
+ setattr(self.package, self.name, self)
+
self.references = list()
self.references_by_name = dict()
+ self.inbound_references = list()
+
self.properties = list()
self.properties_by_name = dict()
@@ -93,19 +128,28 @@
self.sql_table = SqlTable(self.package.sql_schema, self.name)
+ name = "%sStats" % self.name
+
+ self.sql_stats_table = SqlTable(self.package.sql_schema, name)
+
+ self.add_qmf_columns()
+ self.add_id_columns()
+
+ self.id = RosemaryAttribute(self, "id")
+ self.id.sql_column = self.sql_table.key_column
+
self.sql_qmf_columns = None
self.sql_select = SqlSelectItem(self.sql_table)
- self.sql_select_by_object_id = SqlSelectItemByObjectId(self.sql_table)
self.sql_insert = SqlInsertItem(self.sql_table)
self.sql_update = SqlUpdateItem(self.sql_table)
self.sql_delete = SqlDeleteItem(self.sql_table)
- name = "%sStats" % self.name
+ self.sql_select_by_object_id = SqlSelectItemByObjectId(self.sql_table)
- self.sql_stats_table = SqlTable(self.package.sql_schema, name)
+ def load(self, elem):
+ log.debug("Loading %s", self)
- def load(self, elem):
for child in elem.findall("property"):
name = child.get("name")
@@ -125,6 +169,8 @@
meth.load(child)
def extend(self, elem):
+ log.debug("Extending %s", self)
+
for child in elem.findall("property"):
prop = self.properties_by_name[child.get("name")]
prop.extend(child)
@@ -138,8 +184,7 @@
meth.extend(child)
def init(self):
- self.add_qmf_columns()
- self.add_id_columns()
+ log.debug("Initializing %s", self)
for ref in self.references:
ref.init()
@@ -169,6 +214,9 @@
parent_col = SqlColumn(self.sql_stats_table, "_parent_id", sql_int8)
parent_col.foreign_key_column = id_col
+ name = "%s_fk" % parent_col.name
+ SqlForeignKeyConstraint(self.sql_stats_table, name, parent_col, id_col)
+
def add_qmf_columns(self):
agent = SqlColumn(self.sql_table, "_qmf_agent_id", sql_text)
object = SqlColumn(self.sql_table, "_qmf_object_id", sql_text)
@@ -208,11 +256,18 @@
self.sql_delete.execute(cursor, (), {"id": object.id})
+ def __repr__(self):
+ args = (self.__class__.__name__, self.package.name, self.name)
+ return "%s(%s,%s)" % args
+
class RosemaryAttribute(object):
def __init__(self, cls, name):
self.cls = cls
self.name = name
+ if not hasattr(self.cls, self.name):
+ setattr(self.cls, self.name, self)
+
self.type = None
self.references = None
self.access = None
@@ -237,6 +292,10 @@
def extend(self, elem):
self.title = elem.findtext("title")
+ def __repr__(self):
+ args = (self.__class__.__name__, self.cls.name, self.name)
+ return "%s(%s,%s)" % args
+
class RosemaryReference(RosemaryAttribute):
def __init__(self, cls, name):
super(RosemaryReference, self).__init__(cls, name)
@@ -249,18 +308,34 @@
def init(self):
assert self.references
+ tokens = self.references.split(":", 1)
+
+ if len(tokens) == 2:
+ pkg = self.cls.package.model.packages_by_name[tokens[0]]
+ cls = tokens[1]
+ else:
+ pkg = self.cls.package
+ cls = tokens[0]
+
try:
- self.that_cls = self.cls.package.classes_by_name[self.references]
+ self.that_cls = pkg.classes_by_name[cls]
+ self.that_cls.inbound_references.append(self)
except KeyError:
- log.warn("Reference to '%s' invalid", self.references)
+ log.error("Reference to '%s' invalid", self.references)
- return
+ raise
name = "_%s_id" % self.name
- self.sql_column = SqlColumn(self.cls.sql_table, name, sql_int4)
- self.sql_column.foreign_key_column = self.that_cls.sql_table.key_column
+ col = SqlColumn(self.cls.sql_table, name, sql_int4)
+ col.foreign_key_column = self.that_cls.sql_table.key_column
+
+ self.sql_column = col
self.sql_column.nullable = self.is_optional
+
+ name = "%s_fk" % col.name
+
+ SqlForeignKeyConstraint(col.table, name, col, col.foreign_key_column)
class RosemaryProperty(RosemaryAttribute):
def __init__(self, cls, name):
Modified: mgmt/trunk/rosemary/python/rosemary/sqlmodel.py
===================================================================
--- mgmt/trunk/rosemary/python/rosemary/sqlmodel.py 2010-02-19 18:47:32 UTC (rev 3855)
+++ mgmt/trunk/rosemary/python/rosemary/sqlmodel.py 2010-02-19 18:52:40 UTC (rev 3856)
@@ -12,6 +12,10 @@
for schema in self.schemas:
schema.write_create_ddl(out)
+ for schema in self.schemas:
+ for table in schema.tables:
+ table.write_alter_dll(out)
+
def write_drop_ddl(self, out):
for schema in self.schemas:
schema.write_drop_ddl(out)
@@ -24,6 +28,11 @@
self.model.schemas.append(self)
self.model.schemas_by_name[self.name] = self
+ mangled = self.name.replace(".", "_")
+
+ if not hasattr(self.model, mangled):
+ setattr(self.model, mangled, self)
+
self.identifier = "\"%s\"" % self.name
self.tables = list()
@@ -46,6 +55,10 @@
def write_drop_ddl(self, out):
out.write("drop schema %s cascade;\n" % self.identifier)
+ def __repr__(self):
+ args = (self.__class__.__name__, self.name)
+ return "%s(%s)" % args
+
class SqlTable(object):
def __init__(self, schema, name):
self.schema = schema
@@ -54,6 +67,9 @@
self.schema.tables.append(self)
self.schema.tables_by_name[self.name] = self
+ if not hasattr(self.schema, self.name):
+ setattr(self.schema, self.name, self)
+
self.identifier = "%s.\"%s\"" % (self.schema.identifier, self.name)
self.key_column = None
@@ -61,7 +77,7 @@
self.columns_by_name = dict()
self.constraints = list()
- self.constraints_by_name = dict()
+ self.deferred_constraints = list()
def write_create_ddl(self, out):
out.write(" create table \"%s\" (" % self.name)
@@ -80,6 +96,22 @@
out.write("\n )\n")
+ def write_alter_dll(self, out):
+ if not self.deferred_constraints:
+ return
+
+ out.write("alter table %s\n " % self.identifier)
+
+ constraints = [x.get_ddl() for x in self.deferred_constraints]
+
+ out.write(",\n ".join(constraints))
+
+ out.write("\n ;\n")
+
+ def __repr__(self):
+ args = (self.__class__.__name__, self.schema.name, self.name)
+ return "%s(%s,%s)" % args
+
class SqlColumn(object):
def __init__(self, table, name, type):
self.table = table
@@ -89,6 +121,9 @@
self.table.columns.append(self)
self.table.columns_by_name[self.name] = self
+ if not hasattr(self.table, self.name):
+ setattr(self.table, self.name, self)
+
self.identifier = "\"%s\".\"%s\"" % (self.table.name, self.name)
self.nullable = False
@@ -103,15 +138,12 @@
if not self.nullable:
tokens.append("not null")
- if self.foreign_key_column:
- table = self.foreign_key_column.table.identifier
- col = self.foreign_key_column.name
- expr = "references %s(\"%s\")"
+ return " ".join(tokens)
- tokens.append(expr % (table, col))
+ def __repr__(self):
+ args = (self.__class__.__name__, self.table.name, self.name)
+ return "%s(%s,%s)" % args
- return " ".join(tokens)
-
class SqlTableConstraint(object):
def __init__(self, table, name, columns):
self.table = table
@@ -119,7 +151,6 @@
self.columns = columns
self.table.constraints.append(self)
- self.table.constraints_by_name[self.name] = name
class SqlPrimaryKeyConstraint(SqlTableConstraint):
def get_ddl(self):
@@ -133,6 +164,27 @@
return "constraint \"%s\" unique (%s)" % (self.name, cols)
+class SqlForeignKeyConstraint(object):
+ def __init__(self, table, name, this_column, that_column):
+ self.table = table
+ self.name = name
+ self.this_column = this_column
+ self.that_column = that_column
+
+ self.table.deferred_constraints.append(self)
+
+ def get_ddl(self):
+ tokens = list()
+
+ tokens.append("add constraint \"%s\"" % self.name)
+ tokens.append("foreign key (\"%s\")" % self.this_column.name)
+ tokens.append("references %s" % self.that_column.table.identifier)
+ tokens.append("(\"%s\")" % self.that_column.name)
+
+ # XXX tokens.append("on delete set null;\n")
+
+ return " ".join(tokens)
+
class SqlIndex(object):
def __init__(self, schema, name, columns):
assert len(set([x.table for x in columns])) == 1
Modified: mgmt/trunk/rosemary/python/rosemary/sqloperation.py
===================================================================
--- mgmt/trunk/rosemary/python/rosemary/sqloperation.py 2010-02-19 18:47:32 UTC (rev 3855)
+++ mgmt/trunk/rosemary/python/rosemary/sqloperation.py 2010-02-19 18:52:40 UTC (rev 3856)
@@ -7,23 +7,23 @@
def __init__(self, table):
self.table = table
- def execute(self, cursor, columns, values):
- text = self.emit(columns)
+ def execute(self, cursor, columns, values, options=None):
+ text = self.emit(columns, options)
- log.debug("Sql text: %s", text)
+ log.debug("Sql text:\n%s", text)
log.debug("Sql values: %s", values)
cursor.execute(text, values)
class SqlSelectItem(SqlOperation):
- def emit(self, columns):
+ def emit(self, columns, options=None):
cols = ", ".join([x.identifier for x in columns])
args = (cols, self.table.identifier)
return "select %s from %s where _id = %%(id)s" % args
class SqlSelectItemByObjectId(SqlOperation):
- def emit(self, columns):
+ def emit(self, columns, options=None):
cols = ", ".join([x.identifier for x in columns])
args = (cols, self.table.identifier)
@@ -31,7 +31,7 @@
% args
class SqlInsertItem(SqlOperation):
- def emit(self, columns):
+ def emit(self, columns, options=None):
names = [x.name for x in columns]
cols = ", ".join(["\"%s\"" % x for x in names])
vals = ", ".join(["%%(%s)s" % x for x in names])
@@ -40,7 +40,7 @@
return "insert into %s (%s) values (%s)" % args
class SqlUpdateItem(SqlOperation):
- def emit(self, columns):
+ def emit(self, columns, options=None):
exprs = ["\"%s\" = %%(%s)s" % (x.name, x.name) for x in columns]
exprs = ", ".join(exprs)
args = (self.table.identifier, exprs)
@@ -48,30 +48,74 @@
return "update %s set %s where _id = %%(id)s" % args
class SqlDeleteItem(SqlOperation):
- def emit(self, columns):
+ def emit(self, columns, options=None):
return "delete from %s where _id = %%(id)s" % self.table.identifier
class SqlQuery(SqlOperation):
def __init__(self, table):
super(SqlQuery, self).__init__(table)
+ self.order_by = self.OrderBy()
+ self.limit = self.Limit()
+
self.joins = list()
- def emit(self, columns, parameters=None):
+ def emit(self, columns, options):
tokens = list()
- cols = ",".join(["\n %s" % x.identifier for x in columns])
- tokens.append("select %s" % cols)
+ cols = list()
+ for column in columns:
+ if isinstance(column, SqlColumn):
+ cols.append(column.identifier)
+ else:
+ cols.append(str(column))
+
+ tokens.append("select %s" % ", ".join(cols))
+
tokens.append("from %s" % self.table.identifier)
for join in self.joins:
tokens.append(join.emit())
+ if options:
+ if options.sort_column:
+ tokens.append(self.order_by.emit(options.sort_column,
+ options.sort_ascending))
+
+ tokens.append(self.limit.emit(options.limit, options.offset))
+
return "%s\n" % "\n".join(tokens)
+
+ class OrderBy(object):
+ def emit(self, column, ascending):
+ if ascending:
+ direction = "asc"
+ else:
+ direction = "desc"
+
+ return "order by %s %s" % (column.identifier, direction)
+
+ class Limit(object):
+ def emit(self, limit, offset):
+ if limit is None:
+ limit = "all"
+
+ return "limit %s offset %i" % (str(limit), offset)
+
+class SqlQueryOptions(object):
+ def __init__(self):
+ self.sort_column = None
+ self.sort_ascending = True
+ self.limit = None
+ self.offset = 0
class SqlQueryJoin(object):
def __init__(self, query, this_column, that_column):
+ assert query
+ assert this_column
+ assert that_column
+
self.query = query
self.this_column = this_column
self.that_column = that_column
Modified: mgmt/trunk/rosemary/python/rosemary/sqltype.py
===================================================================
--- mgmt/trunk/rosemary/python/rosemary/sqltype.py 2010-02-19 18:47:32 UTC (rev 3855)
+++ mgmt/trunk/rosemary/python/rosemary/sqltype.py 2010-02-19 18:52:40 UTC (rev 3856)
@@ -1,11 +1,13 @@
import pickle
+from datetime import datetime
from psycopg2 import TimestampFromTicks
from util import *
class SqlType(object):
- def __init__(self, literal):
+ def __init__(self, literal, python_type):
self.literal = literal
+ self.python_type = python_type
def adapt_value(self, value):
return value
@@ -15,30 +17,30 @@
if value is not None:
return TimestampFromTicks(value / 1000000000)
-class PickleType(SqlType):
+class PickledType(SqlType):
def adapt_value(self, value):
if value is not None:
return pickle.dumps(value)
-class StringType(SqlType):
+class StringIdType(SqlType):
def adapt_value(self, value):
if value is not None:
return str(value)
-sql_bool = SqlType("bool")
-sql_float4 = SqlType("float4")
-sql_float8 = SqlType("float8")
-sql_int2 = SqlType("int2")
-sql_int4 = SqlType("int4")
-sql_int8 = SqlType("int8")
-sql_numeric_19 = SqlType("numeric(19)")
-sql_serial4 = SqlType("serial4")
-sql_serial8 = SqlType("serial8")
-sql_text = SqlType("text")
-sql_timestamp = TimestampType("timestamp")
+sql_bool = SqlType("bool", bool)
+sql_float4 = SqlType("float4", float)
+sql_float8 = SqlType("float8", float)
+sql_int2 = SqlType("int2", long)
+sql_int4 = SqlType("int4", long)
+sql_int8 = SqlType("int8", long)
+sql_uint8 = SqlType("numeric(19)", long)
+sql_serial4 = SqlType("serial4", long)
+sql_serial8 = SqlType("serial8", long)
+sql_text = SqlType("text", str)
+sql_timestamp = TimestampType("timestamp", datetime)
-sql_pickle = PickleType("text")
-sql_string = StringType("text")
+sql_pickled_map = PickledType("text", dict)
+sql_string_id = StringIdType("text", str)
__mappings = (
(sql_bool, 11, "bool"),
@@ -58,18 +60,18 @@
(sql_int8, 3, "hilo32"),
(sql_int8, 3, "mma32"),
(sql_int8, 3, "uint32"),
- (sql_numeric_19, 4, "count64"),
- (sql_numeric_19, 4, "hilo64"),
- (sql_numeric_19, 4, "mma64"),
- (sql_numeric_19, 4, "mmaTime"),
- (sql_numeric_19, 4, "uint64"),
- (sql_numeric_19, 9, "deltaTime"),
- (sql_string, 10, "objId"),
- (sql_string, 14, "uuid"),
- (sql_pickle, 15, "map"),
+ (sql_pickled_map, 15, "map"),
+ (sql_string_id, 10, "objId"),
+ (sql_string_id, 14, "uuid"),
(sql_text, 6, "sstr"),
(sql_text, 7, "lstr"),
(sql_timestamp, 8, "absTime"),
+ (sql_uint8, 4, "count64"),
+ (sql_uint8, 4, "hilo64"),
+ (sql_uint8, 4, "mma64"),
+ (sql_uint8, 4, "mmaTime"),
+ (sql_uint8, 4, "uint64"),
+ (sql_uint8, 9, "deltaTime"),
)
sql_types_by_qmf_type_code = dict([(x[1], x[0]) for x in __mappings])
Added: mgmt/trunk/rosemary/xml/rosemary.xml
===================================================================
--- mgmt/trunk/rosemary/xml/rosemary.xml (rev 0)
+++ mgmt/trunk/rosemary/xml/rosemary.xml 2010-02-19 18:52:40 UTC (rev 3856)
@@ -0,0 +1,13 @@
+<model>
+ <package name="org.apache.qpid.broker">
+ <class name="Connection">
+ <property name="remotePid">
+ <title>Process ID</title>
+ </property>
+
+ <property name="remoteParentPid">
+ <title>Parent PID</title>
+ </property>
+ </class>
+ </package>
+</model>
14 years, 10 months
rhmessaging commits: r3855 - mgmt/trunk/rosemary/xml.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-02-19 13:47:32 -0500 (Fri, 19 Feb 2010)
New Revision: 3855
Modified:
mgmt/trunk/rosemary/xml/condor.xml
mgmt/trunk/rosemary/xml/qpid-cluster.xml
mgmt/trunk/rosemary/xml/qpid-store.xml
Log:
Fix up some broken reference values
Modified: mgmt/trunk/rosemary/xml/condor.xml
===================================================================
--- mgmt/trunk/rosemary/xml/condor.xml 2010-02-19 16:19:40 UTC (rev 3854)
+++ mgmt/trunk/rosemary/xml/condor.xml 2010-02-19 18:47:32 UTC (rev 3855)
@@ -495,7 +495,7 @@
-->
<!--
<class name="Job">
- <property name="schedulerRef" type="objId" parentRef="y" index="y" references="mrg.grid.Scheduler"/>
+ <property name="schedulerRef" type="objId" parentRef="y" index="y" references="mrg.grid:Scheduler"/>
<property name="submitterRef" type="objId" references="mrg.grid.Submitter"/>
<property name="AccountingGroup" type="sstr" optional="y" desc=""/>
@@ -686,7 +686,7 @@
</class>
<class name="Submitter">
- <property name="schedulerRef" type="objId" parentRef="y" index="y" references="mrg.grid.Scheduler"/>
+ <property name="schedulerRef" type="objId" parentRef="y" index="y" references="mrg.grid:Scheduler"/>
<statistic name="HeldJobs" type="uint32"/>
<statistic name="IdleJobs" type="uint32"/>
@@ -856,7 +856,7 @@
</class>
<class name="Submission">
- <property name="schedulerRef" type="objId" parentRef="y" index="y" references="mrg.grid.Scheduler"/>
+ <property name="schedulerRef" type="objId" parentRef="y" index="y" references="mrg.grid:Scheduler"/>
<property name="Name" type="sstr" index="y"/>
<property name="Owner" type="sstr" index="y"/>
Modified: mgmt/trunk/rosemary/xml/qpid-cluster.xml
===================================================================
--- mgmt/trunk/rosemary/xml/qpid-cluster.xml 2010-02-19 16:19:40 UTC (rev 3854)
+++ mgmt/trunk/rosemary/xml/qpid-cluster.xml 2010-02-19 18:47:32 UTC (rev 3855)
@@ -38,7 +38,7 @@
-->
<class name="Cluster">
- <property name="brokerRef" type="objId" references="Broker" access="RC" index="y" parentRef="y"/>
+ <property name="brokerRef" type="objId" references="org.apache.qpid.broker:Broker" access="RC" index="y" parentRef="y"/>
<property name="clusterName" type="sstr" access="RC" desc="Name of cluster this server is a member of"/>
<property name="clusterID" type="sstr" access="RO" desc="Globally unique ID (UUID) for this cluster instance"/>
<property name="memberID" type="sstr" access="RO" desc="ID of this member of the cluster"/>
Modified: mgmt/trunk/rosemary/xml/qpid-store.xml
===================================================================
--- mgmt/trunk/rosemary/xml/qpid-store.xml 2010-02-19 16:19:40 UTC (rev 3854)
+++ mgmt/trunk/rosemary/xml/qpid-store.xml 2010-02-19 18:47:32 UTC (rev 3855)
@@ -24,7 +24,7 @@
-->
<class name="Store">
- <property name="brokerRef" type="objId" access="RO" references="qpid.Broker" index="y" parentRef="y"/>
+ <property name="brokerRef" type="objId" access="RO" references="org.apache.qpid.broker:Broker" index="y" parentRef="y"/>
<property name="location" type="sstr" access="RO" desc="Logical directory on disk"/>
<property name="defaultInitialFileCount" type="uint16" access="RO" unit="file" desc="Default number of files initially allocated to each journal"/>
<property name="defaultDataFileSize" type="uint32" access="RO" unit="RdPg" desc="Default size of each journal data file"/>
@@ -44,7 +44,7 @@
</class>
<class name="Journal">
- <property name="queueRef" type="objId" access="RO" references="qpid.Queue" isGeneralReference="y"/>
+ <property name="queueRef" type="objId" access="RO" references="org.apache.qpid.broker:Queue" isGeneralReference="y"/>
<property name="name" type="sstr" access="RO" index="y"/>
<property name="directory" type="sstr" access="RO" desc="Directory containing journal files"/>
<property name="baseFileName" type="sstr" access="RO" desc="Base filename prefix for journal"/>
14 years, 10 months
rhmessaging commits: r3854 - mgmt/trunk/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-02-19 11:19:40 -0500 (Fri, 19 Feb 2010)
New Revision: 3854
Added:
mgmt/trunk/mint/xml
Log:
Add symlink to rosemary xml
Added: mgmt/trunk/mint/xml
===================================================================
--- mgmt/trunk/mint/xml (rev 0)
+++ mgmt/trunk/mint/xml 2010-02-19 16:19:40 UTC (rev 3854)
@@ -0,0 +1 @@
+link ../rosemary/xml
\ No newline at end of file
Property changes on: mgmt/trunk/mint/xml
___________________________________________________________________
Name: svn:special
+ *
14 years, 10 months
rhmessaging commits: r3853 - mgmt/trunk/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-02-19 11:18:11 -0500 (Fri, 19 Feb 2010)
New Revision: 3853
Removed:
mgmt/trunk/mint/xml/
Log:
This will be replaced by the rosemary xml
14 years, 10 months
rhmessaging commits: r3852 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-02-18 10:37:29 -0500 (Thu, 18 Feb 2010)
New Revision: 3852
Modified:
mgmt/trunk/cumin/resources/slots.swf
Log:
Adjusting label location
Modified: mgmt/trunk/cumin/resources/slots.swf
===================================================================
(Binary files differ)
14 years, 10 months
rhmessaging commits: r3851 - in mgmt/trunk/cumin/python/cumin: grid and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-02-15 15:11:55 -0500 (Mon, 15 Feb 2010)
New Revision: 3851
Modified:
mgmt/trunk/cumin/python/cumin/charts.py
mgmt/trunk/cumin/python/cumin/grid/slot.strings
Log:
Draw squares instead of spheres for png slot vis.
Modified: mgmt/trunk/cumin/python/cumin/charts.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/charts.py 2010-02-11 19:38:10 UTC (rev 3850)
+++ mgmt/trunk/cumin/python/cumin/charts.py 2010-02-15 20:11:55 UTC (rev 3851)
@@ -26,22 +26,12 @@
self.surface = None
def plot_dot(self, interior, width, height):
- pnumbx = (115 / 128.0) * width / 2.5
- pnumby = (102 / 128.0) * width / 2.5
- pnumbr = (14 / 128.0) * width
- shadox = (102 / 128.0) * width
- shadoy = (102 / 128.0) * width
- arc = 0.5 * width
-
surface = ImageSurface(FORMAT_ARGB32, width, height)
cr = Context(surface)
cr.set_line_width(1)
- radial = RadialGradient(pnumbx, pnumby, pnumbr, shadox, shadoy, width)
- radial.add_color_stop_rgba(0, 1, 1, 1, 1)
- radial.add_color_stop_rgb(1, *interior)
- cr.set_source(radial)
- cr.arc(arc, arc, arc, 0, 2.0 * pi)
+ cr.set_source_rgb(*interior)
+ cr.rectangle(0, 0, width - 1, width - 1)
cr.fill()
return surface
@@ -50,12 +40,6 @@
slot_size = self.slot_size(count, zl)
x = 0
y = 0
- pnumbx = (115 / 128.0) * slot_size / 2.5
- pnumby = (102 / 128.0) * slot_size / 2.5
- pnumbr = (14 / 128.0) * slot_size
- shadox = (102 / 128.0) * slot_size
- shadoy = (102 / 128.0) * slot_size
- arc = 0.5 * slot_size
col = 0
self.rows = 1
# the width and height depend on the number of slots
@@ -74,22 +58,9 @@
col = 0
self.rows = self.rows + 1
- # draw dots if they are big enough
- if slot_size >= self.min_sphere_size:
- radial = RadialGradient(x + pnumbx,
- y + pnumby,
- pnumbr, x + shadox,
- y + shadoy, slot_size)
- radial.add_color_stop_rgba(0, 1, 1, 1, 1)
- radial.add_color_stop_rgb(1, *interior)
- cr.set_source(radial)
- cr.arc(x + arc, y + arc, arc, 0, 2.0 * pi)
- cr.fill()
- else:
- # just draw squares
- cr.set_source_rgb(*interior)
- cr.rectangle(x, y, slot_size - 1, slot_size - 1)
- cr.fill()
+ cr.set_source_rgb(*interior)
+ cr.rectangle(x, y, slot_size - 1, slot_size - 1)
+ cr.fill()
# draw the state if the slots are big enough
if state and slot_size >= self.min_font:
Modified: mgmt/trunk/cumin/python/cumin/grid/slot.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.strings 2010-02-11 19:38:10 UTC (rev 3850)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.strings 2010-02-15 20:11:55 UTC (rev 3851)
@@ -897,7 +897,7 @@
z-index: 10;
width: 28px;
height: 28px;
- -moz-border-radius: 50%;
+/* -moz-border-radius: 50%; */
}
div#slot_zooming {
14 years, 10 months