|
|
|
@ -119,7 +119,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; |
|
|
|
@ -148,7 +148,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), |
|
|
|
@ -180,7 +180,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) { |
|
|
|
@ -212,7 +212,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) { |
|
|
|
@ -269,7 +269,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); |
|
|
|
@ -277,7 +277,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; |
|
|
|
} |
|
|
|
@ -321,7 +321,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; |
|
|
|
} |
|
|
|
@ -365,7 +365,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; |
|
|
|
} |
|
|
|
@ -510,7 +510,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) { |
|
|
|
@ -542,7 +542,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) { |
|
|
|
|