Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

29 anms fun dap 002 received reports missing reports #72

Merged
merged 5 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions amp-sql/postgres/Database_Scripts/Views/rpt_view.sql
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ FROM
(((SELECT
ts,
report_id,
str_value,
COALESCE('''' || str_value ||'''', NULL) as str_value,
uint_value,
int_value,
obj_value,
Expand All @@ -155,7 +155,7 @@ FROM
ari_id
FROM
report_definition
INNER JOIN vw_tnvc_entries ON report_definition.tnvc_id = vw_tnvc_entries.tnvc_id order by report_id , order_num) AS sel1
LEFT JOIN vw_tnvc_entries ON report_definition.tnvc_id = vw_tnvc_entries.tnvc_id order by report_id , order_num) AS sel1
INNER JOIN obj_actual_definition ON sel1.ari_id = obj_actual_definition.obj_actual_definition_id)
INNER JOIN vw_obj_metadata ON vw_obj_metadata.obj_metadata_id = obj_actual_definition.obj_metadata_id)
GROUP BY report_id,ts,
Expand Down
4 changes: 3 additions & 1 deletion anms-core/anms/routes/ARIs/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from fastapi_pagination.ext.async_sqlalchemy import paginate
from sqlalchemy import select, and_
from sqlalchemy.engine import Result
import re

from anms.components.schemas import ARIs
from anms.models.relational import get_async_session, get_session
Expand Down Expand Up @@ -159,7 +160,8 @@ async def report_ac(agent_id: str, adm: str, report_name: str):

for entry in entries:
curr_values = []
string_values = entry.string_values.split(',') if entry.string_values else []
string_values = list(filter(None, re.split(r",|'(.*?)'", entry.string_values))) if entry.string_values else []
# string_values = entry.string_values.split('\',\'') if entry.string_values else []
d-linko marked this conversation as resolved.
Show resolved Hide resolved
uint_values = entry.uint_values.split(',') if entry.uint_values else []
int_values = entry.int_values.split(',') if entry.int_values else []
real32_values = entry.real32_values.split(',') if entry.real32_values else []
Expand Down
4 changes: 2 additions & 2 deletions ion/ion-4.1.1-anms-db.patch
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ diff -ur ion-open-source-4.1.1/nm/mgr/nm_mgr_rx.c ion-open-source-4.1.1_postgres
@@ -348,7 +348,7 @@
{
msg_rpt_t *rpt_msg = msg_rpt_deserialize(msg_data, &success);
rx_data_rpt(&meta, rpt_msg);
-#ifdef HAVE_MYSQL
+#if defined(HAVE_MYSQL) || defined(HAVE_POSTGRESQL)
db_insert_msg_rpt_set(incoming_idx, rpt_msg, &db_status);
#endif
msg_rpt_release(rpt_msg, 1);
rx_data_rpt(&meta, rpt_msg);
msg_rpt_release(rpt_msg, 1);
@@ -358,7 +358,7 @@
{
msg_tbl_t *tbl_msg = msg_tbl_deserialize(msg_data, &success);
Expand Down