Skip to content

Commit 63f4e3e

Browse files
authored
refactor: modify data collection to python implementation (#214)
* feature: LabelStudio jumps without login * refactor: modify data collection to python implementation * refactor: modify data collection to python implementation * refactor: modify data collection to python implementation * refactor: modify data collection to python implementation * refactor: modify data collection to python implementation * refactor: modify data collection to python implementation * fix: remove terrabase dependency * feature: add the collection task executions page and the collection template page * fix: fix the collection task creation * fix: fix the collection task creation
1 parent 80d4dfd commit 63f4e3e

File tree

71 files changed

+1858
-2554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1858
-2554
lines changed

backend/api-gateway/pom.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,6 @@
2727
<groupId>org.springframework.cloud</groupId>
2828
<artifactId>spring-cloud-starter-gateway</artifactId>
2929
</dependency>
30-
<dependency>
31-
<groupId>com.terrabase</groupId>
32-
<artifactId>enterprise-impl-commercial</artifactId>
33-
<version>1.0.0</version>
34-
<exclusions>
35-
<exclusion>
36-
<artifactId>spring-web</artifactId>
37-
<groupId>org.springframework</groupId>
38-
</exclusion>
39-
<exclusion>
40-
<artifactId>spring-boot-starter-web</artifactId>
41-
<groupId>org.springframework.boot</groupId>
42-
</exclusion>
43-
<exclusion>
44-
<artifactId>spring-boot-starter-logging</artifactId>
45-
<groupId>org.springframework.boot</groupId>
46-
</exclusion>
47-
</exclusions>
48-
</dependency>
4930
<!-- Log4j2 API -->
5031
<dependency>
5132
<groupId>org.springframework.boot</groupId>

backend/api-gateway/src/main/java/com/datamate/gateway/ApiGatewayApplication.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
55
import org.springframework.cloud.gateway.route.RouteLocator;
66
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
7-
import org.springframework.cloud.openfeign.EnableFeignClients;
87
import org.springframework.context.annotation.Bean;
9-
import org.springframework.context.annotation.ComponentScan;
108

119
/**
1210
* API Gateway & Auth Service Application
1311
* 统一的API网关和认证授权微服务
1412
* 提供路由、鉴权、限流等功能
1513
*/
1614
@SpringBootApplication
17-
@ComponentScan(basePackages = {"com.datamate.gateway", "com.terrabase"})
18-
@EnableFeignClients(basePackages = {"com.terrabase"})
1915
public class ApiGatewayApplication {
2016

2117
public static void main(String[] args) {
@@ -37,6 +33,10 @@ public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
3733
.route("data-evaluation", r -> r.path("/api/evaluation/**")
3834
.uri("http://datamate-backend-python:18000"))
3935

36+
// 数据归集服务路由
37+
.route("data-collection", r -> r.path("/api/data-collection/**")
38+
.uri("http://datamate-backend-python:18000"))
39+
4040
.route("deer-flow-frontend", r -> r.path("/chat/**")
4141
.uri("http://deer-flow-frontend:3000"))
4242

backend/api-gateway/src/main/java/com/datamate/gateway/filter/UserContextFilter.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package com.datamate.gateway.filter;
22

3-
import com.terrabase.enterprise.api.UserManagementService;
4-
import com.terrabase.enterprise.api.dto.LoginUserDto;
53
import lombok.extern.slf4j.Slf4j;
6-
import org.springframework.beans.factory.annotation.Autowired;
74
import org.springframework.beans.factory.annotation.Value;
85
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
96
import org.springframework.cloud.gateway.filter.GlobalFilter;
@@ -21,16 +18,13 @@ public class UserContextFilter implements GlobalFilter {
2118
@Value("${commercial.switch:false}")
2219
private boolean isCommercial;
2320

24-
@Autowired
25-
private UserManagementService userManagementService;
26-
2721
@Override
2822
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
2923
if (!isCommercial) {
3024
return chain.filter(exchange);
3125
}
3226
try {
33-
LoginUserDto loginUserDto = userManagementService.getCurrentUserInfo().getData().getFirst();
27+
3428
} catch (Exception e) {
3529
log.error("get current user info error", e);
3630
return chain.filter(exchange);

backend/services/data-collection-service/README.md

Lines changed: 0 additions & 229 deletions
This file was deleted.
-78.8 KB
Binary file not shown.
-51.9 KB
Binary file not shown.
-67.3 KB
Binary file not shown.
-107 KB
Binary file not shown.

0 commit comments

Comments
 (0)