3434
3535import pt .lsts .imc .IMCDefinition ;
3636import pt .lsts .imc .IMCMessage ;
37+ import pt .lsts .imc .PlanDB ;
3738import pt .lsts .neptus .NeptusLog ;
3839import pt .lsts .neptus .comm .IMCSendMessageUtils ;
3940import pt .lsts .neptus .comm .IMCUtils ;
4041import pt .lsts .neptus .comm .manager .imc .ImcId16 ;
4142import pt .lsts .neptus .comm .manager .imc .ImcMsgManager ;
4243import pt .lsts .neptus .comm .manager .imc .ImcSystemsHolder ;
44+ import pt .lsts .neptus .console .notifications .Notification ;
45+ import pt .lsts .neptus .events .NeptusEvents ;
4346import pt .lsts .neptus .i18n .I18n ;
4447import pt .lsts .neptus .messages .listener .MessageInfo ;
4548import pt .lsts .neptus .messages .listener .MessageListener ;
@@ -221,5 +224,20 @@ else if (msg.getString("op").equals("SET")) {
221224 l .dbPlanSent (msg .getAsString ("plan_id" ));
222225 }
223226 }
227+ else if (PlanDB .TYPE .FAILURE .name ().equalsIgnoreCase (msg .getString ("type" ))) {
228+ PlanDB pdb = (PlanDB ) msg ;
229+ String srcName = pdb .getSourceName ();
230+ NeptusEvents .post (Notification .warning (I18n .textf ("PlanDB Warning . %s1" , srcName ),
231+ I18n .textf ("Warning in PlanDB operation: %s1 (%s2) for plan '%s3'" ,
232+ pdb .getOp (), pdb .getInfo (), pdb .getPlanId ()))
233+ .requireHumanAction (true ));
234+ }
235+ else if (PlanDB .TYPE .IN_PROGRESS .name ().equalsIgnoreCase (msg .getString ("type" ))) {
236+ PlanDB pdb = (PlanDB ) msg ;
237+ String srcName = pdb .getSourceName ();
238+ NeptusEvents .post (Notification .info (I18n .textf ("PlanDB In Progress . %s1" , srcName ),
239+ I18n .textf ("PlanDB operation: %s1 (%s2) for plan '%s3' is in progress" ,
240+ pdb .getOp (), pdb .getInfo (), pdb .getPlanId ())));
241+ }
224242 }
225243}
0 commit comments