diff options
author | Koren Lev <korenlev@gmail.com> | 2017-09-29 01:38:18 +0300 |
---|---|---|
committer | Yaron Yogev <yaronyogev@gmail.com> | 2017-10-03 09:46:58 +0000 |
commit | d0adff06bed72f9a0edd7adccfa6a1111784bc8b (patch) | |
tree | 4b5eaf1107e6973b1eac636309a99c83074acbfc /ui/imports/api/scheduled-scans | |
parent | fbbaf20912c79bd99a5c3696850d70c11965f56b (diff) |
release 1.0 calipso for opnfv apex
Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2
Signed-off-by: Koren Lev <korenlev@gmail.com>
(cherry picked from commit d32f75145676bacefde0d08a14680a5984623451)
Diffstat (limited to 'ui/imports/api/scheduled-scans')
-rw-r--r-- | ui/imports/api/scheduled-scans/scheduled-scans.js | 3 | ||||
-rw-r--r-- | ui/imports/api/scheduled-scans/server/publications.js | 16 |
2 files changed, 16 insertions, 3 deletions
diff --git a/ui/imports/api/scheduled-scans/scheduled-scans.js b/ui/imports/api/scheduled-scans/scheduled-scans.js index 54d4565..4d06a33 100644 --- a/ui/imports/api/scheduled-scans/scheduled-scans.js +++ b/ui/imports/api/scheduled-scans/scheduled-scans.js @@ -54,7 +54,6 @@ let schema = new SimpleSchema({ }, scheduled_timestamp: { type: Date, - defaultValue: null, optional: true, } }); @@ -81,3 +80,5 @@ export const subsScheduledScansPageAmountSorted = 'scheduled_scans?page&amount&s export const subsScheduledScansPageAmountSortedCounter = `${subsScheduledScansPageAmountSorted}!counter`; export const subsScheduledScansId = 'scheduled_scans?_id'; + +export const subsScheduledScansEnv = 'scheduled_scans?env'; diff --git a/ui/imports/api/scheduled-scans/server/publications.js b/ui/imports/api/scheduled-scans/server/publications.js index 9359c20..f4c5b9b 100644 --- a/ui/imports/api/scheduled-scans/server/publications.js +++ b/ui/imports/api/scheduled-scans/server/publications.js @@ -2,10 +2,12 @@ import { Meteor } from 'meteor/meteor'; import * as R from 'ramda'; import { Counts } from 'meteor/tmeasday:publish-counts'; -import { ScheduledScans, +import { + ScheduledScans, subsScheduledScansPageAmountSorted, subsScheduledScansPageAmountSortedCounter, subsScheduledScansId, + subsScheduledScansEnv, } from '../scheduled-scans.js'; Meteor.publish(subsScheduledScansPageAmountSorted, function ( @@ -24,7 +26,7 @@ Meteor.publish(subsScheduledScansPageAmountSorted, function ( let sortParams = {}; sortParams = R.ifElse(R.isNil, R.always(sortParams), - R.assoc(R.__, sortDirection, sortParams))(sortField); + R.assoc(R.__, sortDirection, sortParams))(sortField); console.log('sort params:', sortParams); @@ -50,3 +52,13 @@ Meteor.publish(subsScheduledScansId, function (_id) { let query = { _id: _id }; return ScheduledScans.find(query); }); + +Meteor.publish(subsScheduledScansEnv, function (env) { + console.log(`server subscribtion: ${subsScheduledScansEnv}`); + console.log('-env: ', env); + + //let that = this; + + let query = { environment: env }; + return ScheduledScans.find(query); +}); |