Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
3b5c07d
data access skeleton
amrc-za Mar 20, 2026
de4141b
data-access service deployment files
amrc-za Mar 23, 2026
ff04d56
js-rx-client - new method to watch acl with permission
amrc-za Mar 23, 2026
938fe05
dataflow start
amrc-za Mar 23, 2026
01167bb
gitignore
amrc-za Mar 23, 2026
7e95851
acs-config-db package.lock update
amrc-za Mar 23, 2026
0956670
data access helm
amrc-za Mar 23, 2026
b767419
node modules dockerignored
amrc-za Mar 23, 2026
d127366
deploy data access
amrc-za Mar 23, 2026
f7bf6f9
data access fixed keytabs/server not found
amrc-za Mar 24, 2026
0e05293
data access - dataflow build metadata and code clean up
amrc-za Mar 25, 2026
5aae2d3
deploy - fixed git krbs keytabs not being created
amrc-za Mar 25, 2026
029b5ea
data access dataflow - keeping track of datasets with contents not ju…
amrc-za Mar 25, 2026
712ffe8
data access get /metadata api ready
amrc-za Mar 26, 2026
a927e76
data access api created helper method to get list dataset uuids
amrc-za Mar 30, 2026
7614a40
data access dataflow added method to get dataset content by uuid
amrc-za Mar 30, 2026
203e762
data access api structure_uuid
amrc-za Mar 30, 2026
54e4322
data-access space format and comments
amrc-za Mar 31, 2026
0f338a2
data access api method name change
amrc-za Mar 31, 2026
8b1ef9d
data access api.js - passing configDB instance to apiV1
amrc-za Apr 2, 2026
a0e4695
data access - constants - removed structure dataset type uuids
amrc-za Apr 2, 2026
86915cb
data access - flattened dataset definitions map to keys to be dataset…
amrc-za Apr 2, 2026
56b663d
data access api-v1 implemented put structure
amrc-za Apr 2, 2026
48938b2
data access - package json added influx client lib
amrc-za Apr 8, 2026
2441a25
data access - added dataset validity enum
amrc-za Apr 8, 2026
ef6a8fa
data access api and dataflow update to keep track of invalid datasets
amrc-za Apr 8, 2026
f5d48b0
data access - get data from influx partial implementation
amrc-za Apr 9, 2026
8d0950a
deploy data access - added influx vars and secret
amrc-za Apr 13, 2026
cbf9a19
data access updated flux query
amrc-za Apr 13, 2026
9a15d13
data access dataflow watching general info app
amrc-za Apr 15, 2026
cbefea7
data access meta uuid endpoint partially implemented
amrc-za Apr 15, 2026
226452e
data access dataflow watching dataset metadata members and their configs
amrc-za Apr 16, 2026
c4901d7
lib js-service-client - added DataAccess interface
amrc-za Apr 20, 2026
1dafc51
data access dataflow - changed metadata structure and watching functi…
amrc-za Apr 20, 2026
22cc433
data access dataset metadata endpoint returning function
amrc-za Apr 20, 2026
9d2b1db
data access data endpoint added header with filename
amrc-za Apr 20, 2026
0fc0ee7
data access service-client interface metadata and download methods
amrc-za Apr 22, 2026
829b74a
data access api minor fixes
amrc-za Apr 22, 2026
d8f11ac
data access fixed bug with accessing imap items
amrc-za Apr 23, 2026
befaa10
data access interface for js-service-client implemented
amrc-za Apr 23, 2026
59db942
data access implemented download endpoint and fixed minor bugs
amrc-za Apr 24, 2026
d71d562
data access put influx logic to separate script
amrc-za Apr 24, 2026
f1b5d3e
data access influx reader fixed typo
amrc-za Apr 24, 2026
4895101
data access api fixed bug
amrc-za Apr 24, 2026
eb506ef
data-access api adding subclass relationship on create/update
amrc-za Apr 27, 2026
7237821
data access dataflow keeping track of dataset members subclasses as p…
amrc-za Apr 27, 2026
32202b8
data access api returning parts as part of metadata
amrc-za Apr 27, 2026
4e77482
data access api checking for read perm for parts metadata
amrc-za Apr 27, 2026
24ad084
data access api parts minor changes
amrc-za Apr 28, 2026
92875d0
data access metadata endpoint fixed dates
amrc-za Apr 28, 2026
d7a1c54
data access dataflow passing fplus props separately
amrc-za Apr 28, 2026
0fac854
data access api fixed subclass linking logic
amrc-za Apr 29, 2026
031f6ba
data access api metadata removed fail if general info not found
amrc-za Apr 29, 2026
f2bd7e7
data access removed debugging logs
amrc-za Apr 30, 2026
0714734
data access convert to csv fixed char escaping
amrc-za May 6, 2026
aa606c7
data access influx reader fixed range bug
amrc-za May 6, 2026
e95dba2
data access api - moved invalid dataset logic to dataflow
amrc-za May 6, 2026
5477488
data access api structure create and update logic changed
amrc-za May 7, 2026
ebe72d8
data access api PUT structure added ServiceError check
amrc-za May 7, 2026
8ad04db
data service service client - added status to error throw
amrc-za May 7, 2026
92de9c4
data access api removed code duplication for creating subclasses
amrc-za May 7, 2026
2e3a27a
data access dataflow refactored build metadata and datasets
amrc-za May 7, 2026
7e3592d
data access - streaming data download
amrc-za May 11, 2026
76611fd
data access - refactored removed datasetvalidity check
amrc-za May 13, 2026
81c221b
rx-client lib added data-access interface - partially implemented
amrc-za May 1, 2026
eb3f95d
data access metadata uuid api fixed bug with info
amrc-za May 13, 2026
446519a
data access notify service added implementations
amrc-za May 15, 2026
a713d71
rx-client interface for data access added all methods
amrc-za May 15, 2026
5413111
data access installed deep-equal
amrc-za May 20, 2026
c972ba3
data access - fixed notify metadata SEARCH
amrc-za May 20, 2026
bc7df95
data access structure uuid - removed from and to fields from returnin…
amrc-za May 20, 2026
7fc2664
data access package-lock
amrc-za May 20, 2026
3a1afc5
data-access notify structure SEARCH done
amrc-za May 20, 2026
7ae3ef2
data access added test script for rx client
amrc-za May 20, 2026
00a5d21
data-access download data http checking if write is complete
amrc-za May 21, 2026
1fa51da
data access added simple test http endpoints via service client
amrc-za May 21, 2026
2395d80
js-service-client updated data access interface
amrc-za May 21, 2026
5a3eb76
data access package lock
amrc-za May 21, 2026
100c738
data access download http endpoint returns zip with separate csv file…
amrc-za Jun 1, 2026
f04400a
data access js service client download_data handles zip
amrc-za Jun 1, 2026
d251bf7
data access indlux query removed unnecessary cols
amrc-za Jun 1, 2026
3d3bb27
data access removed unnecessary comment
amrc-za Jun 2, 2026
4b09b9a
data access GET /metadata vitest
amrc-za Jun 2, 2026
cf2822e
data access http GET /metadata tests - fixed fplus client cache bug
amrc-za Jun 3, 2026
5e2ffba
data access tests GET /metadata added parent child invalid tests
amrc-za Jun 3, 2026
fa44cde
data access tests GET /metadata added invalid session child test
amrc-za Jun 3, 2026
d074d3d
data access tests GET /metadata removed cache
amrc-za Jun 3, 2026
269c373
data access tests GET /structure
amrc-za Jun 3, 2026
38df7ca
data access webapi added config validation
amrc-za Jun 3, 2026
15774d1
data-access tests structure creaate
amrc-za Jun 4, 2026
ee9e0d3
data access tests temp data
amrc-za Jun 4, 2026
b2c9d93
data access added delete endpoint
amrc-za Jun 4, 2026
49dfd35
data access test create added subclass relationship tests
amrc-za Jun 4, 2026
f54cbce
data access tests update
amrc-za Jun 8, 2026
b941535
data access test scripts
amrc-za Jun 8, 2026
ceb6a89
data access client lib updated empty return formats
amrc-za Jun 8, 2026
d3275e5
ConfigDB removed accidentally pushed package-lock.json
amrc-za Jun 8, 2026
d9ef127
Data Access removed accidentally pushed package-lock.json
amrc-za Jun 8, 2026
f3023ca
OPCUA-Server-Edge removed .dockerignore that has been accidentally cr…
amrc-za Jun 8, 2026
21a980c
deploy services.yaml returned openid
amrc-za Jun 8, 2026
5810d8b
data-access delete endpoint fixed TypeError
amrc-za Jun 8, 2026
6f3bbec
data access fixed another TypeError
amrc-za Jun 8, 2026
dfe264a
data access api fixed TypeError
amrc-za Jun 9, 2026
02131e8
data access updated Express version
amrc-za Jun 9, 2026
1562b6e
data access client library dynamically importing node libraries
amrc-za Jun 9, 2026
9c9ae0a
data access tests added more tests
amrc-za Jun 10, 2026
3d7123b
data access tests download
amrc-za Jun 10, 2026
b23f039
data access passing measurement to download
amrc-za Jun 10, 2026
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
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ jobs:
- acs-admin
- acs-cluster-manager
- acs-cmdesc
- acs-data-access
- acs-edge-sync
- acs-files
- acs-git
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ subdirs+= acs-auth
subdirs+= acs-cluster-manager
subdirs+= acs-cmdesc
subdirs+= acs-configdb
subdirs+= acs-data-access
subdirs+= acs-directory
subdirs+= acs-edge
subdirs+= acs-edge-sync
Expand All @@ -67,4 +68,5 @@ subdirs+= historian-sparkplug
subdirs+= historian-uns
subdirs+= uns-ingester-sparkplug


include ${mk}/acs.subdirs.mk
1 change: 1 addition & 0 deletions acs-data-access/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
3 changes: 3 additions & 0 deletions acs-data-access/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.env
node_modules/
tmp/
32 changes: 32 additions & 0 deletions acs-data-access/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
ARG base_version
ARG base_prefix=ghcr.io/amrc-factoryplus/acs-base

FROM ${base_prefix}-js-build:${base_version} AS build
ARG acs_npm=NO

# Install the node application on the build container where we can
# compile the native modules.
RUN install -d -o node -g node /home/node/app \
&& mkdir /home/node/lib
COPY --from=lib . /home/node/lib/

WORKDIR /home/node/app
USER node
COPY package*.json ./
RUN <<'SHELL'
touch /home/node/.npmrc
npm install --save=false --install-links
SHELL
COPY --chown=node . .
RUN <<'SHELL'
echo "export const GIT_VERSION=\"$revision\";" > ./lib/git-version.js
SHELL

FROM ${base_prefix}-js-run:${base_version}

# Copy across from the build container.
WORKDIR /home/node/app
COPY --from=build --chown=root:root /home/node/app ./

USER node
CMD node bin/api.js
7 changes: 7 additions & 0 deletions acs-data-access/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
top=..
include ${top}/mk/acs.init.mk

repo?=acs-data-access
k8s.deployment?=data-access

include ${mk}/acs.js.mk
95 changes: 95 additions & 0 deletions acs-data-access/bin/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#!/usr/bin/env node

/*
* ACS Data Access Service
* Entry point: api.js
*/

import {InfluxDB, flux} from '@influxdata/influxdb-client';

import { RxClient, UUIDs } from '@amrc-factoryplus/rx-client';
import { WebAPI } from '@amrc-factoryplus/service-api';
import {DataFlow} from '../lib/dataflow.js';
import { APIv1 } from '../lib/api-v1.js';
import {DataAccessNotify} from '../lib/notify.js';
import { InfluxReader } from '../lib/influx-reader.js';

const { env } = process;

const fplus = await new RxClient({
env,
}).init();

const Version = "2.0.0";

const debug = fplus.debug;
debug.log("app", "Starting acs-data-service revision %s");
Comment thread
amrc-za marked this conversation as resolved.

const influxClient = new InfluxDB({
url: env.INFLUXDB_URL,
token: env.INFLUXDB_TOKEN
});


// the dataflow object is full of sequences that does most of the work of this service. Sequence means an RX observable.
const data = new DataFlow({
debug,
cdb: fplus.ConfigDB,
auth: fplus.Auth,
});

const influxReader = new InfluxReader({
debug,
influx_client: influxClient,
influx_org: env.INFLUXDB_ORG,
influx_bucket: env.INFLUXDB_BUCKET,
})

const apiv1 = new APIv1({
data,
debug,
auth: fplus.Auth,
cdb: fplus.ConfigDB,
influxReader
});

const api = await new WebAPI({
debug: fplus.debug,
ping: {
version: Version,
service: UUIDs.Service.DataAccess,
software: {
vendor: 'AMRC',
application: 'acs-data-access',
},
},
realm: env.REALM,
hostname: env.HOSTNAME,
keytab: env.SERVER_KEYTAB,
http_port: env.PORT,
max_age: env.CACHE_MAX_AGE,
routes: app => {
app.use("/v1", apiv1.routes);
}

}).init();


const notify = new DataAccessNotify({
api, data, debug,
auth: fplus.Auth
});

debug.log("app", "Running Data Access DataFlow");
data.run();

debug.log("app", "Running Data Access Notify");
notify.run();

debug.log("app", "Running Data Access WebAPI")
api.run();





Loading
Loading