summaryrefslogtreecommitdiff
path: root/app/index.js
diff options
context:
space:
mode:
authorSean Fridman <fridman@mail.sfsu.edu>2015-07-09 16:58:02 -0400
committerSean Fridman <fridman@mail.sfsu.edu>2015-07-09 17:55:50 -0400
commit42fe17f3e52be163a506bf9a3953aa8adb5fd64f (patch)
treee4320eaf5ae38d18299fb4b5b046b8b28ed6401b /app/index.js
parent9be28b4322a629b8fe7c35e8cdc42eb413c6d84a (diff)
Implement groupBy queries + admin interface
Diffstat (limited to 'app/index.js')
-rw-r--r--app/index.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/app/index.js b/app/index.js
index 1c77728..d514f10 100644
--- a/app/index.js
+++ b/app/index.js
@@ -60,6 +60,7 @@ function OKCMS(options) {
'/': { template: 'index' }
};
var serviceConfig = options.services || {};
+ var adminConfig = options.admin || {}
var templateProvider = this._templateProvider = new OKTemplate({
root: templateRoot,
@@ -84,7 +85,7 @@ function OKCMS(options) {
this._createViews(viewConfig, db, meta, resourceCache, templateProvider,
errorHandler);
var adminViews = this._adminViews =
- this._createAdminViews(adminPath, app, express, resourceConfig,
+ this._createAdminViews(adminConfig, adminPath, app, express, resourceConfig,
resourceCache, adminTemplateProvider, adminMeta,
errorHandler);
@@ -194,9 +195,8 @@ OKCMS.prototype._createViews = function(viewConfig, db,
}
};
-OKCMS.prototype._createAdminViews = function(path, app, express,
- resourceConfig, resourceCache, templateProvider, meta,
- errorHandler) {
+OKCMS.prototype._createAdminViews = function(adminConfig, path, app, express,
+ resourceConfig, resourceCache, templateProvider, meta, errorHandler) {
var views = {};
var withTrail = withTrailingSlash(path);
var withoutTrail = withoutTrailingSlash(path);
@@ -221,7 +221,8 @@ OKCMS.prototype._createAdminViews = function(path, app, express,
resourceCache: resourceCache,
templateProvider: templateProvider,
meta: meta,
- errorHandler: errorHandler
+ errorHandler: errorHandler,
+ dashboardConfig: adminConfig.dashboard || {}
});
return views;
};
@@ -243,7 +244,8 @@ OKCMS.prototype._createQueries = function(queryConfig, resourceCache) {
query: query,
as: config.as,
sortBy: config.sortBy,
- descending: config.descending
+ descending: config.descending,
+ groupBy: config.groupBy
});
});
};