|
|
|
@ -118,7 +118,7 @@ public class DashboardController extends BaseController { |
|
|
|
dashboard.getId() == null ? ActionType.ADDED : ActionType.UPDATED, null); |
|
|
|
|
|
|
|
if (dashboard.getId() != null) { |
|
|
|
sendNotificationMsgToEdgeService(savedDashboard.getTenantId(), savedDashboard.getId(), EntityType.DASHBOARD, EdgeEventActionType.UPDATED); |
|
|
|
sendEntityNotificationMsg(savedDashboard.getTenantId(), savedDashboard.getId(), EdgeEventActionType.UPDATED); |
|
|
|
} |
|
|
|
|
|
|
|
return savedDashboard; |
|
|
|
@ -147,7 +147,7 @@ public class DashboardController extends BaseController { |
|
|
|
null, |
|
|
|
ActionType.DELETED, null, strDashboardId); |
|
|
|
|
|
|
|
sendDeleteNotificationMsgToEdgeService(getTenantId(), dashboardId, EntityType.DASHBOARD, relatedEdgeIds); |
|
|
|
sendDeleteNotificationMsg(getTenantId(), dashboardId, relatedEdgeIds); |
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
logEntityAction(emptyId(EntityType.DASHBOARD), |
|
|
|
@ -179,7 +179,7 @@ public class DashboardController extends BaseController { |
|
|
|
customerId, |
|
|
|
ActionType.ASSIGNED_TO_CUSTOMER, null, strDashboardId, strCustomerId, customer.getName()); |
|
|
|
|
|
|
|
sendNotificationMsgToEdgeService(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.ASSIGNED_TO_CUSTOMER); |
|
|
|
sendEntityAssignToCustomerNotificationMsg(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.ASSIGNED_TO_CUSTOMER); |
|
|
|
|
|
|
|
return savedDashboard; |
|
|
|
} catch (Exception e) { |
|
|
|
@ -211,7 +211,7 @@ public class DashboardController extends BaseController { |
|
|
|
customerId, |
|
|
|
ActionType.UNASSIGNED_FROM_CUSTOMER, null, strDashboardId, customer.getId().toString(), customer.getName()); |
|
|
|
|
|
|
|
sendNotificationMsgToEdgeService(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.UNASSIGNED_FROM_CUSTOMER); |
|
|
|
sendEntityAssignToCustomerNotificationMsg(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.UNASSIGNED_FROM_CUSTOMER); |
|
|
|
|
|
|
|
return savedDashboard; |
|
|
|
} catch (Exception e) { |
|
|
|
@ -268,7 +268,7 @@ public class DashboardController extends BaseController { |
|
|
|
logEntityAction(dashboardId, savedDashboard, |
|
|
|
customerId, |
|
|
|
ActionType.ASSIGNED_TO_CUSTOMER, null, strDashboardId, customerId.toString(), customerInfo.getTitle()); |
|
|
|
sendNotificationMsgToEdgeService(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.ASSIGNED_TO_CUSTOMER); |
|
|
|
sendEntityAssignToCustomerNotificationMsg(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.ASSIGNED_TO_CUSTOMER); |
|
|
|
} |
|
|
|
for (CustomerId customerId : removedCustomerIds) { |
|
|
|
ShortCustomerInfo customerInfo = dashboard.getAssignedCustomerInfo(customerId); |
|
|
|
@ -276,7 +276,7 @@ public class DashboardController extends BaseController { |
|
|
|
logEntityAction(dashboardId, dashboard, |
|
|
|
customerId, |
|
|
|
ActionType.UNASSIGNED_FROM_CUSTOMER, null, strDashboardId, customerId.toString(), customerInfo.getTitle()); |
|
|
|
sendNotificationMsgToEdgeService(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.UNASSIGNED_FROM_CUSTOMER); |
|
|
|
sendEntityAssignToCustomerNotificationMsg(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.UNASSIGNED_FROM_CUSTOMER); |
|
|
|
} |
|
|
|
return savedDashboard; |
|
|
|
} |
|
|
|
@ -320,7 +320,7 @@ public class DashboardController extends BaseController { |
|
|
|
logEntityAction(dashboardId, savedDashboard, |
|
|
|
customerId, |
|
|
|
ActionType.ASSIGNED_TO_CUSTOMER, null, strDashboardId, customerId.toString(), customerInfo.getTitle()); |
|
|
|
sendNotificationMsgToEdgeService(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.ASSIGNED_TO_CUSTOMER); |
|
|
|
sendEntityAssignToCustomerNotificationMsg(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.ASSIGNED_TO_CUSTOMER); |
|
|
|
} |
|
|
|
return savedDashboard; |
|
|
|
} |
|
|
|
@ -364,7 +364,7 @@ public class DashboardController extends BaseController { |
|
|
|
logEntityAction(dashboardId, dashboard, |
|
|
|
customerId, |
|
|
|
ActionType.UNASSIGNED_FROM_CUSTOMER, null, strDashboardId, customerId.toString(), customerInfo.getTitle()); |
|
|
|
sendNotificationMsgToEdgeService(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.UNASSIGNED_FROM_CUSTOMER); |
|
|
|
sendEntityAssignToCustomerNotificationMsg(savedDashboard.getTenantId(), savedDashboard.getId(), customerId, EdgeEventActionType.UNASSIGNED_FROM_CUSTOMER); |
|
|
|
} |
|
|
|
return savedDashboard; |
|
|
|
} |
|
|
|
@ -511,7 +511,7 @@ public class DashboardController extends BaseController { |
|
|
|
null, |
|
|
|
ActionType.ASSIGNED_TO_EDGE, null, strDashboardId, strEdgeId, edge.getName()); |
|
|
|
|
|
|
|
sendNotificationMsgToEdgeService(getTenantId(), edgeId, savedDashboard.getId(), EntityType.DASHBOARD, EdgeEventActionType.ASSIGNED_TO_EDGE); |
|
|
|
sendEntityAssignToEdgeNotificationMsg(getTenantId(), edgeId, savedDashboard.getId(), EdgeEventActionType.ASSIGNED_TO_EDGE); |
|
|
|
|
|
|
|
return savedDashboard; |
|
|
|
} catch (Exception e) { |
|
|
|
@ -543,7 +543,7 @@ public class DashboardController extends BaseController { |
|
|
|
null, |
|
|
|
ActionType.UNASSIGNED_FROM_EDGE, null, strDashboardId, strEdgeId, edge.getName()); |
|
|
|
|
|
|
|
sendNotificationMsgToEdgeService(getTenantId(), edgeId, savedDashboard.getId(), EntityType.DASHBOARD, EdgeEventActionType.UNASSIGNED_FROM_EDGE); |
|
|
|
sendEntityAssignToEdgeNotificationMsg(getTenantId(), edgeId, savedDashboard.getId(), EdgeEventActionType.UNASSIGNED_FROM_EDGE); |
|
|
|
|
|
|
|
return savedDashboard; |
|
|
|
} catch (Exception e) { |
|
|
|
|