diff --git a/application/src/main/java/org/thingsboard/server/controller/BaseController.java b/application/src/main/java/org/thingsboard/server/controller/BaseController.java index 95dcc7c64c..48e528b0d8 100644 --- a/application/src/main/java/org/thingsboard/server/controller/BaseController.java +++ b/application/src/main/java/org/thingsboard/server/controller/BaseController.java @@ -595,11 +595,11 @@ public abstract class BaseController { case ALARM_CLEAR: msgType = DataConstants.ALARM_CLEAR; break; - case SWAPPED_FROM_TENANT: - msgType = DataConstants.ENTITY_SWAPPED_FROM; + case ASSIGNED_FROM_TENANT: + msgType = DataConstants.ENTITY_ASSIGNED_FROM_TENANT; break; - case SWAPPED_TO_TENANT: - msgType = DataConstants.ENTITY_SWAPPED_TO; + case ASSIGNED_TO_TENANT: + msgType = DataConstants.ENTITY_ASSIGNED_TO_TENANT; break; } if (!StringUtils.isEmpty(msgType)) { @@ -620,16 +620,16 @@ public abstract class BaseController { String strCustomerName = extractParameter(String.class, 2, additionalInfo); metaData.putValue("unassignedCustomerId", strCustomerId); metaData.putValue("unassignedCustomerName", strCustomerName); - } else if (actionType == ActionType.SWAPPED_FROM_TENANT) { + } else if (actionType == ActionType.ASSIGNED_FROM_TENANT) { String strTenantId = extractParameter(String.class, 0, additionalInfo); String strTenantName = extractParameter(String.class, 1, additionalInfo); - metaData.putValue("swappedFromTenantId", strTenantId); - metaData.putValue("swappedFromTenantName", strTenantName); - } else if (actionType == ActionType.SWAPPED_TO_TENANT) { + metaData.putValue("assignedFromTenantId", strTenantId); + metaData.putValue("assignedFromTenantName", strTenantName); + } else if (actionType == ActionType.ASSIGNED_TO_TENANT) { String strTenantId = extractParameter(String.class, 0, additionalInfo); String strTenantName = extractParameter(String.class, 1, additionalInfo); - metaData.putValue("swappedToTenantId", strTenantId); - metaData.putValue("swappedToTenantName", strTenantName); + metaData.putValue("assignedToTenantId", strTenantId); + metaData.putValue("assignedToTenantName", strTenantName); } ObjectNode entityNode; if (entity != null) { diff --git a/application/src/main/java/org/thingsboard/server/controller/DeviceController.java b/application/src/main/java/org/thingsboard/server/controller/DeviceController.java index 61505ddc90..4f226d2d4c 100644 --- a/application/src/main/java/org/thingsboard/server/controller/DeviceController.java +++ b/application/src/main/java/org/thingsboard/server/controller/DeviceController.java @@ -491,13 +491,13 @@ public class DeviceController extends BaseController { @PreAuthorize("hasAuthority('TENANT_ADMIN')") @RequestMapping(value = "/tenant/{tenantId}/device/{deviceId}", method = RequestMethod.POST) @ResponseBody - public Device swapDevice(@PathVariable(TENANT_ID) String strTenantId, - @PathVariable(DEVICE_ID) String strDeviceId) throws ThingsboardException { + public Device assignDeviceToTenant(@PathVariable(TENANT_ID) String strTenantId, + @PathVariable(DEVICE_ID) String strDeviceId) throws ThingsboardException { checkParameter(TENANT_ID, strTenantId); checkParameter(DEVICE_ID, strDeviceId); try { DeviceId deviceId = new DeviceId(toUUID(strDeviceId)); - Device device = checkDeviceId(deviceId, Operation.WRITE); + Device device = checkDeviceId(deviceId, Operation.ASSIGN_TO_TENANT); TenantId newTenantId = new TenantId(toUUID(strTenantId)); Tenant newTenant = tenantService.findTenantById(newTenantId); @@ -505,36 +505,36 @@ public class DeviceController extends BaseController { throw new ThingsboardException("Could not find the specified Tenant!", ThingsboardErrorCode.BAD_REQUEST_PARAMS); } - Device swappedDevice = deviceService.swapDevice(newTenantId, device); + Device assignedDevice = deviceService.assignDeviceToTenant(newTenantId, device); - logEntityAction(getCurrentUser(), deviceId, swappedDevice, - swappedDevice.getCustomerId(), - ActionType.SWAPPED_TO_TENANT, null, strTenantId, newTenant.getName()); + logEntityAction(getCurrentUser(), deviceId, assignedDevice, + assignedDevice.getCustomerId(), + ActionType.ASSIGNED_TO_TENANT, null, strTenantId, newTenant.getName()); Tenant currentTenant = tenantService.findTenantById(getTenantId()); - pushSwappedFromNotification(currentTenant, newTenantId, swappedDevice); + pushAssignedFromNotification(currentTenant, newTenantId, assignedDevice); - return swappedDevice; + return assignedDevice; } catch (Exception e) { logEntityAction(getCurrentUser(), emptyId(EntityType.DEVICE), null, null, - ActionType.SWAPPED_TO_TENANT, e, strTenantId); + ActionType.ASSIGNED_TO_TENANT, e, strTenantId); throw handleException(e); } } - private void pushSwappedFromNotification(Tenant currentTenant, TenantId newTenantId, Device swappedDevice) { - String data = entityToStr(swappedDevice); + private void pushAssignedFromNotification(Tenant currentTenant, TenantId newTenantId, Device assignedDevice) { + String data = entityToStr(assignedDevice); if (data != null) { - TbMsg tbMsg = TbMsg.newMsg(DataConstants.ENTITY_SWAPPED_FROM, swappedDevice.getId(), getMetaDataForSwappedFrom(currentTenant), TbMsgDataType.JSON, data); - tbClusterService.pushMsgToRuleEngine(newTenantId, swappedDevice.getId(), tbMsg, null); + TbMsg tbMsg = TbMsg.newMsg(DataConstants.ENTITY_ASSIGNED_FROM_TENANT, assignedDevice.getId(), getMetaDataForAssignedFrom(currentTenant), TbMsgDataType.JSON, data); + tbClusterService.pushMsgToRuleEngine(newTenantId, assignedDevice.getId(), tbMsg, null); } } - private TbMsgMetaData getMetaDataForSwappedFrom(Tenant tenant) { + private TbMsgMetaData getMetaDataForAssignedFrom(Tenant tenant) { TbMsgMetaData metaData = new TbMsgMetaData(); - metaData.putValue("swappedFromTenantId", tenant.getId().getId().toString()); - metaData.putValue("swappedFromTenantName", tenant.getName()); + metaData.putValue("assignedFromTenantId", tenant.getId().getId().toString()); + metaData.putValue("assignedFromTenantName", tenant.getName()); return metaData; } } diff --git a/application/src/main/java/org/thingsboard/server/service/security/permission/Operation.java b/application/src/main/java/org/thingsboard/server/service/security/permission/Operation.java index 0c4f62585d..2334c01102 100644 --- a/application/src/main/java/org/thingsboard/server/service/security/permission/Operation.java +++ b/application/src/main/java/org/thingsboard/server/service/security/permission/Operation.java @@ -18,6 +18,6 @@ package org.thingsboard.server.service.security.permission; public enum Operation { ALL, CREATE, READ, WRITE, DELETE, ASSIGN_TO_CUSTOMER, UNASSIGN_FROM_CUSTOMER, RPC_CALL, - READ_CREDENTIALS, WRITE_CREDENTIALS, READ_ATTRIBUTES, WRITE_ATTRIBUTES, READ_TELEMETRY, WRITE_TELEMETRY, CLAIM_DEVICES + READ_CREDENTIALS, WRITE_CREDENTIALS, READ_ATTRIBUTES, WRITE_ATTRIBUTES, READ_TELEMETRY, WRITE_TELEMETRY, CLAIM_DEVICES, ASSIGN_TO_TENANT } diff --git a/application/src/test/java/org/thingsboard/server/controller/BaseDeviceControllerTest.java b/application/src/test/java/org/thingsboard/server/controller/BaseDeviceControllerTest.java index 48cf397168..99de423086 100644 --- a/application/src/test/java/org/thingsboard/server/controller/BaseDeviceControllerTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/BaseDeviceControllerTest.java @@ -800,7 +800,7 @@ public abstract class BaseDeviceControllerTest extends AbstractControllerTest { } @Test - public void testSwapDeviceFromOneTenantToAnother() throws Exception { + public void testAssignDeviceToTenant() throws Exception { Device device = new Device(); device.setName("My device"); device.setType("default"); @@ -816,7 +816,7 @@ public abstract class BaseDeviceControllerTest extends AbstractControllerTest { relation.setTo(savedAnotherDevice.getId()); relation.setTypeGroup(RelationTypeGroup.COMMON); relation.setType("Contains"); - doPost("/api/relation", relation); + doPost("/api/relation", relation).andExpect(status().isOk()); loginSysAdmin(); Tenant tenant = new Tenant(); @@ -834,13 +834,13 @@ public abstract class BaseDeviceControllerTest extends AbstractControllerTest { createUserAndLogin(user, "testPassword1"); login("tenant2@thingsboard.org", "testPassword1"); - Device swappedDevice = doPost("/api/tenant/" + savedDifferentTenant.getId().getId() + "/device/" + savedDevice.getId().getId(), Device.class); + Device assignedDevice = doPost("/api/tenant/" + savedDifferentTenant.getId().getId() + "/device/" + savedDevice.getId().getId(), Device.class); - doGet("/api/device/" + swappedDevice.getId().getId().toString(), Device.class, status().isNotFound()); + doGet("/api/device/" + assignedDevice.getId().getId().toString(), Device.class, status().isNotFound()); login("tenant9@thingsboard.org", "testPassword1"); - Device foundDevice1 = doGet("/api/device/" + swappedDevice.getId().getId().toString(), Device.class); + Device foundDevice1 = doGet("/api/device/" + assignedDevice.getId().getId().toString(), Device.class); Assert.assertNotNull(foundDevice1); doGet("/api/relation?fromId=" + savedDevice.getId().getId() + "&fromType=DEVICE&relationType=Contains&toId=" + savedAnotherDevice.getId().getId() + "&toType=DEVICE", EntityRelation.class, status().isNotFound()); diff --git a/common/dao-api/src/main/java/org/thingsboard/server/dao/audit/AuditLogService.java b/common/dao-api/src/main/java/org/thingsboard/server/dao/audit/AuditLogService.java index f54cda6681..ef6e62e931 100644 --- a/common/dao-api/src/main/java/org/thingsboard/server/dao/audit/AuditLogService.java +++ b/common/dao-api/src/main/java/org/thingsboard/server/dao/audit/AuditLogService.java @@ -47,6 +47,4 @@ public interface AuditLogService { E entity, ActionType actionType, Exception e, Object... additionalInfo); - - void removeAuditLogs(TenantId tenantId, EntityId entityId); } diff --git a/common/dao-api/src/main/java/org/thingsboard/server/dao/device/DeviceService.java b/common/dao-api/src/main/java/org/thingsboard/server/dao/device/DeviceService.java index 20516be837..1ed9ab9819 100644 --- a/common/dao-api/src/main/java/org/thingsboard/server/dao/device/DeviceService.java +++ b/common/dao-api/src/main/java/org/thingsboard/server/dao/device/DeviceService.java @@ -65,6 +65,6 @@ public interface DeviceService { ListenableFuture> findDeviceTypesByTenantId(TenantId tenantId); - Device swapDevice(TenantId tenantId, Device device); + Device assignDeviceToTenant(TenantId tenantId, Device device); } diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/DataConstants.java b/common/data/src/main/java/org/thingsboard/server/common/data/DataConstants.java index 22b49552c0..e99db672a3 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/DataConstants.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/DataConstants.java @@ -57,8 +57,8 @@ public class DataConstants { public static final String ATTRIBUTES_DELETED = "ATTRIBUTES_DELETED"; public static final String ALARM_ACK = "ALARM_ACK"; public static final String ALARM_CLEAR = "ALARM_CLEAR"; - public static final String ENTITY_SWAPPED_FROM = "ENTITY_SWAPPED_FROM"; - public static final String ENTITY_SWAPPED_TO = "ENTITY_SWAPPED_TO"; + public static final String ENTITY_ASSIGNED_FROM_TENANT = "ENTITY_ASSIGNED_FROM_TENANT"; + public static final String ENTITY_ASSIGNED_TO_TENANT = "ENTITY_ASSIGNED_TO_TENANT"; public static final String RPC_CALL_FROM_SERVER_TO_DEVICE = "RPC_CALL_FROM_SERVER_TO_DEVICE"; diff --git a/common/data/src/main/java/org/thingsboard/server/common/data/audit/ActionType.java b/common/data/src/main/java/org/thingsboard/server/common/data/audit/ActionType.java index 70909dc331..14a38c810c 100644 --- a/common/data/src/main/java/org/thingsboard/server/common/data/audit/ActionType.java +++ b/common/data/src/main/java/org/thingsboard/server/common/data/audit/ActionType.java @@ -41,8 +41,8 @@ public enum ActionType { LOGIN(false), LOGOUT(false), LOCKOUT(false), - SWAPPED_FROM_TENANT(false), - SWAPPED_TO_TENANT(false); + ASSIGNED_FROM_TENANT(false), + ASSIGNED_TO_TENANT(false); private final boolean isRead; diff --git a/dao/src/main/java/org/thingsboard/server/dao/asset/BaseAssetService.java b/dao/src/main/java/org/thingsboard/server/dao/asset/BaseAssetService.java index 0c9024af13..6a71045851 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/asset/BaseAssetService.java +++ b/dao/src/main/java/org/thingsboard/server/dao/asset/BaseAssetService.java @@ -159,7 +159,7 @@ public class BaseAssetService extends AbstractEntityService implements AssetServ try { List entityViews = entityViewService.findEntityViewsByTenantIdAndEntityIdAsync(asset.getTenantId(), assetId).get(); if (entityViews != null && !entityViews.isEmpty()) { - throw new DataValidationException("Can't delete asset that is assigned to entity views!"); + throw new DataValidationException("Can't delete asset that has entity views!"); } } catch (ExecutionException | InterruptedException e) { log.error("Exception while finding entity views for assetId [{}]", assetId, e); diff --git a/dao/src/main/java/org/thingsboard/server/dao/audit/AuditLogServiceImpl.java b/dao/src/main/java/org/thingsboard/server/dao/audit/AuditLogServiceImpl.java index 72b8272c69..0d1c708f68 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/audit/AuditLogServiceImpl.java +++ b/dao/src/main/java/org/thingsboard/server/dao/audit/AuditLogServiceImpl.java @@ -51,8 +51,6 @@ import org.thingsboard.server.dao.service.DataValidator; import java.io.PrintWriter; import java.io.StringWriter; -import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import static org.thingsboard.server.dao.service.Validator.validateEntityId; @@ -158,25 +156,6 @@ public class AuditLogServiceImpl implements AuditLogService { } } - @Override - public void removeAuditLogs(TenantId tenantId, EntityId entityId) { - List auditLogs = new ArrayList<>(); - TimePageData auditLogPageData; - TimePageLink auditLogPageLink = new TimePageLink(1000); - do { - auditLogPageData = findAuditLogsByTenantIdAndEntityId(tenantId, entityId, - new ArrayList<>(Arrays.asList(ActionType.values())), auditLogPageLink); - auditLogs.addAll(auditLogPageData.getData()); - if (auditLogPageData.hasNext()) { - auditLogPageLink = auditLogPageData.getNextPageLink(); - } - } while (auditLogPageData.hasNext()); - - for (AuditLog auditLog : auditLogs) { - auditLogDao.removeById(tenantId, auditLog.getUuidId()); - } - } - private JsonNode constructActionData(I entityId, E entity, ActionType actionType, Object... additionalInfo) { @@ -187,7 +166,7 @@ public class AuditLogServiceImpl implements AuditLogService { case ALARM_ACK: case ALARM_CLEAR: case RELATIONS_DELETED: - case SWAPPED_TO_TENANT: + case ASSIGNED_TO_TENANT: if (entity != null) { ObjectNode entityNode = objectMapper.valueToTree(entity); if (entityId.getEntityType() == EntityType.DASHBOARD) { diff --git a/dao/src/main/java/org/thingsboard/server/dao/audit/DummyAuditLogServiceImpl.java b/dao/src/main/java/org/thingsboard/server/dao/audit/DummyAuditLogServiceImpl.java index c677b4368b..30e28a1bf2 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/audit/DummyAuditLogServiceImpl.java +++ b/dao/src/main/java/org/thingsboard/server/dao/audit/DummyAuditLogServiceImpl.java @@ -58,8 +58,4 @@ public class DummyAuditLogServiceImpl implements AuditLogService { public ListenableFuture> logEntityAction(TenantId tenantId, CustomerId customerId, UserId userId, String userName, I entityId, E entity, ActionType actionType, Exception e, Object... additionalInfo) { return null; } - - @Override - public void removeAuditLogs(TenantId tenantId, EntityId entityId) { - } } diff --git a/dao/src/main/java/org/thingsboard/server/dao/device/DeviceServiceImpl.java b/dao/src/main/java/org/thingsboard/server/dao/device/DeviceServiceImpl.java index 7abcaa73c3..cb6d74cf10 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/device/DeviceServiceImpl.java +++ b/dao/src/main/java/org/thingsboard/server/dao/device/DeviceServiceImpl.java @@ -48,7 +48,6 @@ import org.thingsboard.server.common.data.relation.EntityRelation; import org.thingsboard.server.common.data.relation.EntitySearchDirection; import org.thingsboard.server.common.data.security.DeviceCredentials; import org.thingsboard.server.common.data.security.DeviceCredentialsType; -import org.thingsboard.server.dao.audit.AuditLogService; import org.thingsboard.server.dao.customer.CustomerDao; import org.thingsboard.server.dao.entity.AbstractEntityService; import org.thingsboard.server.dao.entityview.EntityViewService; @@ -104,9 +103,6 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe @Autowired private EventService eventService; - @Autowired - private AuditLogService auditLogService; - @Override public Device findDeviceById(TenantId tenantId, DeviceId deviceId) { log.trace("Executing findDeviceById [{}]", deviceId); @@ -201,7 +197,7 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe try { List entityViews = entityViewService.findEntityViewsByTenantIdAndEntityIdAsync(device.getTenantId(), deviceId).get(); if (entityViews != null && !entityViews.isEmpty()) { - throw new DataValidationException("Can't delete device that is assigned to entity views!"); + throw new DataValidationException("Can't delete device that has entity views!"); } } catch (ExecutionException | InterruptedException e) { log.error("Exception while finding entity views for deviceId [{}]", deviceId, e); @@ -338,13 +334,13 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe @Transactional @CacheEvict(cacheNames = DEVICE_CACHE, key = "{#device.tenantId, #device.name}") @Override - public Device swapDevice(TenantId tenantId, Device device) { - log.trace("Executing swapDevice [{}]", device); + public Device assignDeviceToTenant(TenantId tenantId, Device device) { + log.trace("Executing assignDeviceToTenant [{}][{}]", tenantId, device); try { List entityViews = entityViewService.findEntityViewsByTenantIdAndEntityIdAsync(device.getTenantId(), device.getId()).get(); if (!CollectionUtils.isEmpty(entityViews)) { - throw new DataValidationException("Can't swap device that is assigned to entity views!"); + throw new DataValidationException("Can't assign device that has entity views to another tenant!"); } } catch (ExecutionException | InterruptedException e) { log.error("Exception while finding entity views for deviceId [{}]", device.getId(), e); @@ -355,11 +351,6 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe relationService.removeRelations(device.getTenantId(), device.getId()); - // TODO: 30/07/2020 implement for Cassandra - if (sqlDatabaseUsed) { - auditLogService.removeAuditLogs(device.getTenantId(), device.getId()); - } - device.setTenantId(tenantId); device.setCustomerId(null); return doSaveDevice(device, null); diff --git a/dao/src/main/java/org/thingsboard/server/dao/event/BaseEventService.java b/dao/src/main/java/org/thingsboard/server/dao/event/BaseEventService.java index 50d49e75ad..88e701d3bd 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/event/BaseEventService.java +++ b/dao/src/main/java/org/thingsboard/server/dao/event/BaseEventService.java @@ -28,7 +28,6 @@ import org.thingsboard.server.common.data.page.TimePageLink; import org.thingsboard.server.dao.exception.DataValidationException; import org.thingsboard.server.dao.service.DataValidator; -import java.util.ArrayList; import java.util.List; import java.util.Optional; @@ -97,20 +96,17 @@ public class BaseEventService implements EventService { @Override public void removeEvents(TenantId tenantId, EntityId entityId) { - List events = new ArrayList<>(); TimePageData eventPageData; TimePageLink eventPageLink = new TimePageLink(1000); do { eventPageData = findEvents(tenantId, entityId, eventPageLink); - events.addAll(eventPageData.getData()); + for (Event event : eventPageData.getData()) { + eventDao.removeById(tenantId, event.getUuidId()); + } if (eventPageData.hasNext()) { eventPageLink = eventPageData.getNextPageLink(); } } while (eventPageData.hasNext()); - - for (Event event : events) { - eventDao.removeById(tenantId, event.getUuidId()); - } } private DataValidator eventValidator = diff --git a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbMsgTypeSwitchNode.java b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbMsgTypeSwitchNode.java index 62e75cd72a..c5739e24ff 100644 --- a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbMsgTypeSwitchNode.java +++ b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbMsgTypeSwitchNode.java @@ -35,7 +35,7 @@ import org.thingsboard.server.common.msg.session.SessionMsgType; configClazz = EmptyNodeConfiguration.class, relationTypes = {"Post attributes", "Post telemetry", "RPC Request from Device", "RPC Request to Device", "Activity Event", "Inactivity Event", "Connect Event", "Disconnect Event", "Entity Created", "Entity Updated", "Entity Deleted", "Entity Assigned", - "Entity Unassigned", "Attributes Updated", "Attributes Deleted", "Alarm Acknowledged", "Alarm Cleared", "Other", "Entity Swapped From", "Entity Swapped To"}, + "Entity Unassigned", "Attributes Updated", "Attributes Deleted", "Alarm Acknowledged", "Alarm Cleared", "Other", "Entity Assigned From Tenant", "Entity Assigned To Tenant"}, nodeDescription = "Route incoming messages by Message Type", nodeDetails = "Sends messages with message types \"Post attributes\", \"Post telemetry\", \"RPC Request\" etc. via corresponding chain, otherwise Other chain is used.", uiResources = {"static/rulenode/rulenode-core-config.js"}, @@ -86,10 +86,10 @@ public class TbMsgTypeSwitchNode implements TbNode { relationType = "Alarm Cleared"; } else if (msg.getType().equals(DataConstants.RPC_CALL_FROM_SERVER_TO_DEVICE)) { relationType = "RPC Request to Device"; - } else if (msg.getType().equals(DataConstants.ENTITY_SWAPPED_FROM)) { - relationType = "Entity Swapped From"; - } else if (msg.getType().equals(DataConstants.ENTITY_SWAPPED_TO)) { - relationType = "Entity Swapped To"; + } else if (msg.getType().equals(DataConstants.ENTITY_ASSIGNED_FROM_TENANT)) { + relationType = "Entity Assigned From Tenant"; + } else if (msg.getType().equals(DataConstants.ENTITY_ASSIGNED_TO_TENANT)) { + relationType = "Entity Assigned To Tenant"; } else { relationType = "Other"; } diff --git a/ui/src/app/common/types.constant.js b/ui/src/app/common/types.constant.js index 254313b7a0..da2913bdbd 100644 --- a/ui/src/app/common/types.constant.js +++ b/ui/src/app/common/types.constant.js @@ -223,11 +223,11 @@ export default angular.module('thingsboard.types', []) "LOCKOUT": { name: "audit-log.type-lockout" }, - "SWAPPED_FROM_TENANT": { - name: "audit-log.type-swapped-from-tenant" + "ASSIGNED_FROM_TENANT": { + name: "audit-log.type-assigned-from-tenant" }, - "SWAPPED_TO_TENANT": { - name: "audit-log.type-swapped-to-tenant" + "ASSIGNED_TO_TENANT": { + name: "audit-log.type-assigned-to-tenant" } }, auditLogActionStatus: { diff --git a/ui/src/app/locale/locale.constant-en_US.json b/ui/src/app/locale/locale.constant-en_US.json index 7e81fd1a57..2b21ec44be 100644 --- a/ui/src/app/locale/locale.constant-en_US.json +++ b/ui/src/app/locale/locale.constant-en_US.json @@ -357,8 +357,8 @@ "failure-details": "Failure details", "search": "Search audit logs", "clear-search": "Clear search", - "type-swapped-from-tenant": "Swapped from Tenant", - "type-swapped-to-tenant": "Swapped to Tenant" + "type-assigned-from-tenant": "Assigned from Tenant", + "type-assigned-to-tenant": "Assigned to Tenant" }, "confirm-on-exit": { "message": "You have unsaved changes. Are you sure you want to leave this page?",