Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

For 3.9.0 #69

Merged
merged 5 commits into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/buildah.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Buildah via Dockerfile
on: [push]

jobs:
build:
name: Build image
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Buildah Action
uses: redhat-actions/buildah-build@v2.2
with:
image: caracal-edge
tags: v1 ${{ github.sha }}
dockerfiles: |
./Dockerfile
build-args: |
viewer=develop
47 changes: 28 additions & 19 deletions handlers/dataHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,36 +344,45 @@ Mark.spatial = function(req, res, next) {
};

Mark.multi = function(req, res, next) {
var query = req.query;
if (query.nameList) {
query['provenance.analysis.execution_id'] = {
'$in': JSON.parse(query.nameList),
};
delete query.nameList;
var query = {};

var postQuery = JSON.parse(req.body);

// handle source
if (postQuery.source) {
query['provenance.analysis.source'] = postQuery.source;
}
delete query.token;

// handle notes
if (postQuery.notes) {
query['properties.annotations.notes'] = postQuery.notes;
}

if (postQuery.ids) {
query['provenance.analysis.execution_id'] = {'$in': postQuery.ids};
}

// handle x0, y0, x1, y1, footprint
if (req.query.x0 && req.query.x1) {
if (postQuery.x0 && postQuery.x1) {
query.x = {
'$gt': parseFloat(req.query.x0),
'$lt': parseFloat(req.query.x1),
'$gt': parseFloat(postQuery.x0),
'$lt': parseFloat(postQuery.x1),
};
}
delete query.x0;
delete query.x1;
if (req.query.y0 && req.query.y1) {

if (postQuery.y0 && postQuery.y1) {
query.y = {
'$gt': parseFloat(req.query.y0),
'$lt': parseFloat(req.query.y1),
'$gt': parseFloat(postQuery.y0),
'$lt': parseFloat(postQuery.y1),
};
}
delete query.y0;
delete query.y1;
if (query.footprint) {

if (postQuery.footprint) {
query.footprint = {
'$gt': parseFloat(query.footprint),
'$gt': parseFloat(postQuery.footprint),
};
}

mongoFind('camic', 'mark', query).then((x) => {
req.data = x;
next();
Expand Down