+
Activity
{{ resultBrowset.activityName }}
-
-
Activity
- {{ resultBrowset.activityName }}
-
-
-
-
Activity
- {{ resultBrowset.activityName }}
-
-
-
-
Activity
- {{ resultBrowset.activityName }}
-
-
Environment
diff --git a/core/src/test/java/io/aiven/klaw/TopicAclControllerIT.java b/core/src/test/java/io/aiven/klaw/TopicAclControllerIT.java
index 58ec689661..b5f51eddaa 100644
--- a/core/src/test/java/io/aiven/klaw/TopicAclControllerIT.java
+++ b/core/src/test/java/io/aiven/klaw/TopicAclControllerIT.java
@@ -21,6 +21,7 @@
import io.aiven.klaw.dao.AclRequests;
import io.aiven.klaw.dao.EnvTag;
import io.aiven.klaw.model.AclInfo;
+import io.aiven.klaw.model.ActivityLogModel;
import io.aiven.klaw.model.ApiResponse;
import io.aiven.klaw.model.KwPropertiesModel;
import io.aiven.klaw.model.ResourceHistory;
@@ -462,6 +463,23 @@ public void approveTopic() throws Exception {
ApiResponse response1 = OBJECT_MAPPER.readValue(response, new TypeReference<>() {});
assertThat(response1.isSuccess()).isTrue();
+
+ response =
+ mvc.perform(
+ MockMvcRequestBuilders.get("/getActivityLogPerEnv")
+ .with(user(user2).password(PASSWORD))
+ .param("env", "1")
+ .param("pageNo", "1")
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON))
+ .andExpect(status().isOk())
+ .andReturn()
+ .getResponse()
+ .getContentAsString();
+
+ List
response2 = OBJECT_MAPPER.readValue(response, new TypeReference<>() {});
+ assertThat(response2.size()).isEqualTo(1);
+ assertThat(response2.get(0).getDetails()).contains(topicName);
}
@Test
diff --git a/core/src/test/java/io/aiven/klaw/UtilMethods.java b/core/src/test/java/io/aiven/klaw/UtilMethods.java
index 20aeb38849..26ea18aa05 100644
--- a/core/src/test/java/io/aiven/klaw/UtilMethods.java
+++ b/core/src/test/java/io/aiven/klaw/UtilMethods.java
@@ -187,6 +187,14 @@ public List getLogs() {
return activityLogs;
}
+ public List getLogModels() {
+ List activityLogs = new ArrayList<>();
+ ActivityLogModel activityLog = new ActivityLogModel();
+ activityLog.setActivityTime(new Timestamp(System.currentTimeMillis()));
+ activityLogs.add(activityLog);
+ return activityLogs;
+ }
+
public Topic getTopic(String topicName) {
Topic topic = new Topic();
topic.setTeamId(3);
diff --git a/core/src/test/java/io/aiven/klaw/controller/UiConfigControllerTest.java b/core/src/test/java/io/aiven/klaw/controller/UiConfigControllerTest.java
index ebfad368cb..c62ca91e5e 100644
--- a/core/src/test/java/io/aiven/klaw/controller/UiConfigControllerTest.java
+++ b/core/src/test/java/io/aiven/klaw/controller/UiConfigControllerTest.java
@@ -9,8 +9,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import io.aiven.klaw.UtilMethods;
-import io.aiven.klaw.dao.ActivityLog;
import io.aiven.klaw.dao.Team;
+import io.aiven.klaw.model.ActivityLogModel;
import io.aiven.klaw.model.ApiResponse;
import io.aiven.klaw.model.enums.ApiResultStatus;
import io.aiven.klaw.model.enums.KafkaClustersType;
@@ -391,7 +391,7 @@ public void getMyProfileInfo() throws Exception {
@Test
@Order(20)
public void showActivityLog() throws Exception {
- List activityLogs = utilMethods.getLogs();
+ List activityLogs = utilMethods.getLogModels();
when(uiConfigControllerService.showActivityLog(anyString(), anyString(), anyString()))
.thenReturn(activityLogs);
diff --git a/core/src/test/java/io/aiven/klaw/service/AclControllerServiceTest.java b/core/src/test/java/io/aiven/klaw/service/AclControllerServiceTest.java
index 33b269ba2e..b06e7658cd 100644
--- a/core/src/test/java/io/aiven/klaw/service/AclControllerServiceTest.java
+++ b/core/src/test/java/io/aiven/klaw/service/AclControllerServiceTest.java
@@ -1101,6 +1101,7 @@ private AclRequests getAclRequestDao() {
aclReq.setReq_no(112);
aclReq.setEnvironment("1");
aclReq.setRequestor("kwuserb");
+ aclReq.setTeamId(1001);
aclReq.setRequestStatus(RequestStatus.CREATED.value);
aclReq.setAcl_ip("1.2.3.4");
aclReq.setAclIpPrincipleType(AclIPPrincipleType.IP_ADDRESS);
diff --git a/core/src/test/java/io/aiven/klaw/service/SchemaRegistryControllerServiceTest.java b/core/src/test/java/io/aiven/klaw/service/SchemaRegistryControllerServiceTest.java
index f4e1ca506d..6c8ae48c5c 100644
--- a/core/src/test/java/io/aiven/klaw/service/SchemaRegistryControllerServiceTest.java
+++ b/core/src/test/java/io/aiven/klaw/service/SchemaRegistryControllerServiceTest.java
@@ -212,6 +212,7 @@ public void execSchemaRequestsSuccess() throws KlawException {
schemaRequest.setRequestor("kwuserb");
schemaRequest.setEnvironment("1");
schemaRequest.setTopicname("topic");
+ schemaRequest.setTeamId(1001);
stubUserInfo();
when(handleDbRequests.getSchemaRequest(anyInt(), anyInt())).thenReturn(schemaRequest);
diff --git a/openapi.yaml b/openapi.yaml
index f441c384a1..68814752ad 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -5268,7 +5268,7 @@
"schema" : {
"type" : "array",
"items" : {
- "$ref" : "#/components/schemas/ActivityLog"
+ "$ref" : "#/components/schemas/ActivityLogModel"
}
}
}
@@ -6865,7 +6865,7 @@
},
"approvalType" : {
"type" : "string",
- "enum" : [ "RESOURCE_TEAM_OWNER", "ACL_TEAM_OWNER", "TEAM" ]
+ "enum" : [ "TOPIC_TEAM_OWNER", "CONNECTOR_TEAM_OWNER", "ACL_TEAM_OWNER", "TEAM" ]
},
"requiredApprover" : {
"type" : "string"
@@ -9403,16 +9403,12 @@
}
}
},
- "ActivityLog" : {
+ "ActivityLogModel" : {
"properties" : {
"req_no" : {
"type" : "integer",
"format" : "int32"
},
- "tenantId" : {
- "type" : "integer",
- "format" : "int32"
- },
"activityName" : {
"type" : "string"
},
@@ -9432,6 +9428,9 @@
"user" : {
"type" : "string"
},
+ "team" : {
+ "type" : "string"
+ },
"teamId" : {
"type" : "integer",
"format" : "int32"
@@ -9439,25 +9438,27 @@
"env" : {
"type" : "string"
},
- "envName" : {
- "type" : "string"
+ "tenantId" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "team" : {
+ "envName" : {
"type" : "string"
},
"totalNoPages" : {
"type" : "string"
},
- "currentPage" : {
- "type" : "string"
- },
"allPageNos" : {
"type" : "array",
"items" : {
"type" : "string"
}
+ },
+ "currentPage" : {
+ "type" : "string"
}
- }
+ },
+ "required" : [ "activityName", "activityTime", "activityTimeString", "activityType", "allPageNos", "currentPage", "details", "env", "envName", "req_no", "team", "teamId", "tenantId", "totalNoPages", "user" ]
},
"AclsCountPerEnv" : {
"properties" : {