@@ -91,7 +91,7 @@ sub create {
9191 if ( ref ($object ) eq " Scot::Model::Entry" ) {
9292 $data -> {target } = $object -> target;
9393 }
94- $self -> env-> mq-> send (" scot" ,{
94+ $self -> env-> mq-> send (" /topic/ scot" ,{
9595 action => " created" ,
9696 data => $data ,
9797 });
@@ -142,7 +142,7 @@ sub post_create_process {
142142
143143 if ( ref ($object ) eq " Scot::Model::Sigbody" ) {
144144 $json -> {revision } = $object -> revision;
145- $self -> env-> mq-> send (" scot" , {
145+ $self -> env-> mq-> send (" /topic/ scot" , {
146146 action => " updated" ,
147147 data => {
148148 who => $self -> session(' user' ),
@@ -542,7 +542,9 @@ sub refresh_entity_enrichments {
542542 my ($updated , $data ) = $self -> env-> enrichments-> enrich($entity );
543543
544544 if ( $updated > 0 ) {
545- $entity -> update_set(data => $data );
545+ foreach my $key (keys %$data ) {
546+ $entity -> update_set(" data.$key " => $data -> {$key });
547+ }
546548 }
547549 else {
548550 $self -> env-> log -> debug(' No entity updates' );
@@ -928,7 +930,7 @@ sub promote {
928930 $mongo -> collection(' Alertgroup' )-> refresh_data($object -> alertgroup);
929931 my $entry = $mongo -> collection(' Entry' )
930932 -> create_from_promoted_alert($object , $promotion_obj );
931- $self -> env-> mq-> send (" scot" ,{
933+ $self -> env-> mq-> send (" /topic/ scot" ,{
932934 action => " created" ,
933935 data => {
934936 who => $req -> {user },
@@ -952,7 +954,7 @@ sub promote {
952954 });
953955
954956 # update mq and other bookkeeping
955- $env -> mq-> send (" scot" , {
957+ $env -> mq-> send (" /topic/ scot" , {
956958 action => " created" ,
957959 data => {
958960 who => $user ,
@@ -963,7 +965,7 @@ sub promote {
963965 my $type = $object -> get_collection_name;
964966 my $id = $object -> id;
965967 if ( $type eq " alert" ) {
966- $env -> mq-> send (" scot" , {
968+ $env -> mq-> send (" /topic/ scot" , {
967969 action => " updated" ,
968970 data => {
969971 who => $user ,
@@ -974,7 +976,7 @@ sub promote {
974976 });
975977 }
976978 else {
977- $env -> mq-> send (" scot" , {
979+ $env -> mq-> send (" /topic/ scot" , {
978980 action => " updated" ,
979981 data => {
980982 who => $user ,
@@ -1025,7 +1027,7 @@ sub update_alerts {
10251027 my $status = $col -> update_alerts_in_alertgroup($object , $req );
10261028 if ( scalar (@{$status -> {updated }}) > 0 ) {
10271029 foreach my $aid (@{$status -> {updated }}) {
1028- $self -> env-> mq-> send (" scot" ,{
1030+ $self -> env-> mq-> send (" /topic/ scot" ,{
10291031 action => " updated" ,
10301032 data => {
10311033 who => $self -> session(' user' ),
@@ -1131,7 +1133,7 @@ sub post_update_process {
11311133 data => $mqdata ,
11321134 };
11331135
1134- $env -> mq-> send (" scot" , $mq_msg );
1136+ $env -> mq-> send (" /topic/ scot" , $mq_msg );
11351137
11361138 if ( ref ($object ) eq " Scot::Model::Entry" ) {
11371139 $mq_msg -> {data } = {
@@ -1140,7 +1142,7 @@ sub post_update_process {
11401142 id => $object -> target-> {id }, },
11411143 what => " Entry update" ,
11421144 };
1143- $env -> mq-> send (" scot" , $mq_msg );
1145+ $env -> mq-> send (" /topic/ scot" , $mq_msg );
11441146 $self -> add_history(" updated entry " .$object -> id, $object );
11451147 }
11461148
@@ -1151,7 +1153,7 @@ sub post_update_process {
11511153 id => $object -> {signature_id },
11521154 what => " Signature Update" ,
11531155 };
1154- $env -> mq-> send (" scot" , $mq_msg );
1156+ $env -> mq-> send (" /topic/ scot" , $mq_msg );
11551157 }
11561158 $env -> mongo-> collection(' Stat' )-> put_stat(" $colname updated" , 1);
11571159}
@@ -1451,7 +1453,7 @@ sub post_delete_process {
14511453 object => $object ,
14521454 who => $self -> session(' user' ),
14531455 };
1454- $self -> env-> mq-> send (" scot" ,{
1456+ $self -> env-> mq-> send (" /topic/ scot" ,{
14551457 action => " deleted" ,
14561458 data => $mqdata ,
14571459 });
@@ -1506,7 +1508,7 @@ sub mq_obj_update {
15061508 my $target = shift ;
15071509 my $mq = $self -> env-> mq;
15081510
1509- $mq -> send (" scot" , {
1511+ $mq -> send (" /topic/ scot" , {
15101512 action => " updated" ,
15111513 data => {
15121514 who => $self -> session(' user' ),
@@ -1741,7 +1743,7 @@ sub do_command {
17411743 my $req_href = $self -> get_request_params;
17421744
17431745# TODO
1744- $env -> mq-> send (" scot" , {
1746+ $env -> mq-> send (" /topic/ scot" , {
17451747 action => " message" ,
17461748 data => {
17471749 wall => " "
@@ -1758,7 +1760,7 @@ sub wall {
17581760 my $msg = $self -> param(' msg' );
17591761 my $now = $env -> now;
17601762
1761- $env -> mq-> send (" scot" , {
1763+ $env -> mq-> send (" /topic/ scot" , {
17621764 action => " wall" ,
17631765 data => {
17641766 message => $msg ,
@@ -1922,7 +1924,7 @@ sub undelete {
19221924 if ( ref ($restored ) eq " Scot::Model::Entry" ) {
19231925 $data -> {target } = $restored -> target;
19241926 }
1925- $self -> env-> mq-> send (" scot" ,{
1927+ $self -> env-> mq-> send (" /topic/ scot" ,{
19261928 action => " created" ,
19271929 data => $data ,
19281930 });
0 commit comments