summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2017-11-08 20:40:27 +0000
committerTed Trask <ttrask01@yahoo.com>2017-11-08 20:40:27 +0000
commit4f6b5c434ac8b7753d7885df70fbd9c281464e59 (patch)
tree149bf3373dab57e8da4ae3f1b6309a80a260e199
parentef01d5946fef445941659496a25ca28a54469c5b (diff)
downloadacf-provisioning-4f6b5c434ac8b7753d7885df70fbd9c281464e59.tar.bz2
acf-provisioning-4f6b5c434ac8b7753d7885df70fbd9c281464e59.tar.xz
Minor cleanup to request sorting / filtering
-rw-r--r--provisioning-model.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/provisioning-model.lua b/provisioning-model.lua
index 09a128e..47f9017 100644
--- a/provisioning-model.lua
+++ b/provisioning-model.lua
@@ -2261,7 +2261,7 @@ mymodule.list_requests = function(self, clientdata)
retval.value.pagesize = cfe({ value=10, label="Page Size", key=true })
retval.value.rowcount = cfe({ value=0, label="Row Count" })
-- orderby must be an array of tables with column name and direction
- retval.value.orderby = cfe({ type="structure", value={{column="date", direction="asc"}}, label="Order By", key=true })
+ retval.value.orderby = cfe({ type="structure", value={{column="date", direction="desc"}}, label="Order By", key=true })
-- filter is a table with a string filter for each column
retval.value.filter = cfe({ type="structure", value={}, label="Filter", key=true })
self.handle_clientdata(retval, clientdata)
@@ -2288,7 +2288,7 @@ mymodule.list_requests = function(self, clientdata)
connected = databaseconnect(true)
local filter = {}
- columns.data = nil -- Cannot regex filter based on date because of the timestamp type
+ columns.date = nil -- Cannot regex filter based on date because of the timestamp type
for c,f in pairs(retval.value.filter.value) do
if columns[c] and f ~= "" then
if c == "device_id" then