summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasplin <qt-info@nokia.com>2010-04-06 16:15:37 +0200
committerjasplin <qt-info@nokia.com>2010-04-06 16:15:37 +0200
commite4adf9f130eeca2f43350ddc006f3659827dd72d (patch)
tree9fe13b15522f2820f8eb6e79628b8af47787fbfb
parent52794b869de86e74052c6a6f3580e8d9c7a10ee4 (diff)
Sort filter values in server.
It is more convenient to let the server sort the filter values instead. Then the combination structure can be based directly on the sorted values.
-rw-r--r--src/bm/bmrequest.cpp11
-rw-r--r--src/bmweb/indexsection.js2
2 files changed, 6 insertions, 7 deletions
diff --git a/src/bm/bmrequest.cpp b/src/bm/bmrequest.cpp
index 8b55714..dbbdf4d 100644
--- a/src/bm/bmrequest.cpp
+++ b/src/bm/bmrequest.cpp
@@ -4277,7 +4277,7 @@ QByteArray BMRequest_GetTCContexts::toReplyBuffer()
// Get all test cases ...
query = createQuery();
- if (!query->exec("SELECT DISTINCT testCase FROM benchmark;")) {
+ if (!query->exec("SELECT DISTINCT testCase FROM benchmark ORDER BY testCase ASC;")) {
reply = errorReply(*query, name(), QString("(exec() failed)"));
deleteQuery(query);
return xmlConvert(reply);
@@ -4295,7 +4295,7 @@ QByteArray BMRequest_GetTCContexts::toReplyBuffer()
// they seem to be of little value when computing the performance index (they are
// typically integers close to (and often at) zero))
query = createQuery();
- if (!query->exec("SELECT id, name FROM metric WHERE name != 'events';")) {
+ if (!query->exec("SELECT id, name FROM metric WHERE name != 'events' ORDER BY name ASC;")) {
reply = errorReply(*query, name(), QString("(exec() failed)"));
deleteQuery(query);
return xmlConvert(reply);
@@ -4310,7 +4310,7 @@ QByteArray BMRequest_GetTCContexts::toReplyBuffer()
// Get all platforms ...
query = createQuery();
- if (!query->exec("SELECT id, name FROM platform;")) {
+ if (!query->exec("SELECT id, name FROM platform ORDER BY name ASC;")) {
reply = errorReply(*query, name(), QString("(exec() failed)"));
deleteQuery(query);
return xmlConvert(reply);
@@ -4325,7 +4325,7 @@ QByteArray BMRequest_GetTCContexts::toReplyBuffer()
// Get all hosts ...
query = createQuery();
- if (!query->exec("SELECT id, name FROM host;")) {
+ if (!query->exec("SELECT id, name FROM host ORDER BY name ASC;")) {
reply = errorReply(*query, name(), QString("(exec() failed)"));
deleteQuery(query);
return xmlConvert(reply);
@@ -4340,7 +4340,8 @@ QByteArray BMRequest_GetTCContexts::toReplyBuffer()
// Get all branches ...
query = createQuery();
- if (!query->exec("SELECT id, gitRepo, gitBranch FROM branch;")) {
+ if (!query->exec(
+ "SELECT id, gitRepo, gitBranch FROM branch ORDER BY gitRepo, gitBranch ASC;")) {
reply = errorReply(*query, name(), QString("(exec() failed)"));
deleteQuery(query);
return xmlConvert(reply);
diff --git a/src/bmweb/indexsection.js b/src/bmweb/indexsection.js
index 6aa59bc..bddccd5 100644
--- a/src/bmweb/indexsection.js
+++ b/src/bmweb/indexsection.js
@@ -132,8 +132,6 @@ function IndexSection()
var rowPos = 0;
-// values.sort();
-
for (i = 0; i < values.length; ++i) {
if (values[i] == skipValue)