Skip to content

Commit fa36a4e

Browse files
authored
Merge pull request #157 from jumpserver/dev
v4.10.16-lts
2 parents 0da2bba + afae307 commit fa36a4e

4 files changed

Lines changed: 2158 additions & 54 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jumpserver/chen-base:20251114_082449 AS stage-build
1+
FROM jumpserver/chen-base:20260303_090037 AS stage-build
22
ENV LANG=en_US.UTF-8
33

44
WORKDIR /opt/chen/

Dockerfile-base

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN set -ex \
2727
&& chmod 755 /usr/local/bin/check \
2828
&& rm -f check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz
2929

30-
ARG WISP_VERSION=v0.2.8
30+
ARG WISP_VERSION=v0.2.12
3131
RUN set -ex \
3232
&& wget https://github.com/jumpserver/wisp/releases/download/${WISP_VERSION}/wisp-${WISP_VERSION}-linux-${TARGETARCH}.tar.gz \
3333
&& tar -xf wisp-${WISP_VERSION}-linux-${TARGETARCH}.tar.gz -C /usr/local/bin/ --strip-components=1 \
@@ -43,7 +43,7 @@ RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked,id=che
4343
npm install
4444

4545
# Install Maven dependencies
46-
ARG MAVEN_VERSION=3.9.11
46+
ARG MAVEN_VERSION=3.9.12
4747
ARG USER_HOME_DIR="/root"
4848
ARG BASE_URL=https://downloads.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries
4949
ARG MAVEN_MIRROR=https://repo.maven.apache.org/maven2
@@ -69,5 +69,9 @@ RUN set -ex \
6969
&& mkdir -p /opt/chen/frontend/dist \
7070
&& sed -i "s@https://repo.maven.apache.org/maven2@${MAVEN_MIRROR}@g" settings.xml \
7171
&& cp -f settings.xml /root/.m2/ \
72-
&& mvn clean install
72+
&& mvn clean install \
73+
74+
75+
76+
7377

backend/wisp/src/main/java/org/jumpserver/wisp/ServiceGrpc.java

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,37 @@ org.jumpserver.wisp.ServiceOuterClass.AccountDetailResponse> getGetAccountChatMe
759759
return getGetAccountChatMethod;
760760
}
761761

762+
private static volatile io.grpc.MethodDescriptor<org.jumpserver.wisp.ServiceOuterClass.HTTPRequest,
763+
org.jumpserver.wisp.ServiceOuterClass.HTTPResponse> getCallAPIMethod;
764+
765+
@io.grpc.stub.annotations.RpcMethod(
766+
fullMethodName = SERVICE_NAME + '/' + "CallAPI",
767+
requestType = org.jumpserver.wisp.ServiceOuterClass.HTTPRequest.class,
768+
responseType = org.jumpserver.wisp.ServiceOuterClass.HTTPResponse.class,
769+
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
770+
public static io.grpc.MethodDescriptor<org.jumpserver.wisp.ServiceOuterClass.HTTPRequest,
771+
org.jumpserver.wisp.ServiceOuterClass.HTTPResponse> getCallAPIMethod() {
772+
io.grpc.MethodDescriptor<org.jumpserver.wisp.ServiceOuterClass.HTTPRequest, org.jumpserver.wisp.ServiceOuterClass.HTTPResponse> getCallAPIMethod;
773+
if ((getCallAPIMethod = ServiceGrpc.getCallAPIMethod) == null) {
774+
synchronized (ServiceGrpc.class) {
775+
if ((getCallAPIMethod = ServiceGrpc.getCallAPIMethod) == null) {
776+
ServiceGrpc.getCallAPIMethod = getCallAPIMethod =
777+
io.grpc.MethodDescriptor.<org.jumpserver.wisp.ServiceOuterClass.HTTPRequest, org.jumpserver.wisp.ServiceOuterClass.HTTPResponse>newBuilder()
778+
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
779+
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CallAPI"))
780+
.setSampledToLocalTracing(true)
781+
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
782+
org.jumpserver.wisp.ServiceOuterClass.HTTPRequest.getDefaultInstance()))
783+
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
784+
org.jumpserver.wisp.ServiceOuterClass.HTTPResponse.getDefaultInstance()))
785+
.setSchemaDescriptor(new ServiceMethodDescriptorSupplier("CallAPI"))
786+
.build();
787+
}
788+
}
789+
}
790+
return getCallAPIMethod;
791+
}
792+
762793
/**
763794
* Creates a new async stub that supports all call types for the service
764795
*/
@@ -974,6 +1005,13 @@ default void getAccountChat(org.jumpserver.wisp.ServiceOuterClass.Empty request,
9741005
io.grpc.stub.StreamObserver<org.jumpserver.wisp.ServiceOuterClass.AccountDetailResponse> responseObserver) {
9751006
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAccountChatMethod(), responseObserver);
9761007
}
1008+
1009+
/**
1010+
*/
1011+
default void callAPI(org.jumpserver.wisp.ServiceOuterClass.HTTPRequest request,
1012+
io.grpc.stub.StreamObserver<org.jumpserver.wisp.ServiceOuterClass.HTTPResponse> responseObserver) {
1013+
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCallAPIMethod(), responseObserver);
1014+
}
9771015
}
9781016

9791017
/**
@@ -1194,6 +1232,14 @@ public void getAccountChat(org.jumpserver.wisp.ServiceOuterClass.Empty request,
11941232
io.grpc.stub.ClientCalls.asyncUnaryCall(
11951233
getChannel().newCall(getGetAccountChatMethod(), getCallOptions()), request, responseObserver);
11961234
}
1235+
1236+
/**
1237+
*/
1238+
public void callAPI(org.jumpserver.wisp.ServiceOuterClass.HTTPRequest request,
1239+
io.grpc.stub.StreamObserver<org.jumpserver.wisp.ServiceOuterClass.HTTPResponse> responseObserver) {
1240+
io.grpc.stub.ClientCalls.asyncUnaryCall(
1241+
getChannel().newCall(getCallAPIMethod(), getCallOptions()), request, responseObserver);
1242+
}
11971243
}
11981244

11991245
/**
@@ -1372,6 +1418,13 @@ public org.jumpserver.wisp.ServiceOuterClass.AccountDetailResponse getAccountCha
13721418
return io.grpc.stub.ClientCalls.blockingUnaryCall(
13731419
getChannel(), getGetAccountChatMethod(), getCallOptions(), request);
13741420
}
1421+
1422+
/**
1423+
*/
1424+
public org.jumpserver.wisp.ServiceOuterClass.HTTPResponse callAPI(org.jumpserver.wisp.ServiceOuterClass.HTTPRequest request) {
1425+
return io.grpc.stub.ClientCalls.blockingUnaryCall(
1426+
getChannel(), getCallAPIMethod(), getCallOptions(), request);
1427+
}
13751428
}
13761429

13771430
/**
@@ -1573,6 +1626,14 @@ public com.google.common.util.concurrent.ListenableFuture<org.jumpserver.wisp.Se
15731626
return io.grpc.stub.ClientCalls.futureUnaryCall(
15741627
getChannel().newCall(getGetAccountChatMethod(), getCallOptions()), request);
15751628
}
1629+
1630+
/**
1631+
*/
1632+
public com.google.common.util.concurrent.ListenableFuture<org.jumpserver.wisp.ServiceOuterClass.HTTPResponse> callAPI(
1633+
org.jumpserver.wisp.ServiceOuterClass.HTTPRequest request) {
1634+
return io.grpc.stub.ClientCalls.futureUnaryCall(
1635+
getChannel().newCall(getCallAPIMethod(), getCallOptions()), request);
1636+
}
15761637
}
15771638

15781639
private static final int METHODID_GET_TOKEN_AUTH_INFO = 0;
@@ -1598,7 +1659,8 @@ public com.google.common.util.concurrent.ListenableFuture<org.jumpserver.wisp.Se
15981659
private static final int METHODID_FACE_MONITOR_CALLBACK = 20;
15991660
private static final int METHODID_JOIN_FACE_MONITOR = 21;
16001661
private static final int METHODID_GET_ACCOUNT_CHAT = 22;
1601-
private static final int METHODID_DISPATCH_TASK = 23;
1662+
private static final int METHODID_CALL_API = 23;
1663+
private static final int METHODID_DISPATCH_TASK = 24;
16021664

16031665
private static final class MethodHandlers<Req, Resp> implements
16041666
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
@@ -1709,6 +1771,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
17091771
serviceImpl.getAccountChat((org.jumpserver.wisp.ServiceOuterClass.Empty) request,
17101772
(io.grpc.stub.StreamObserver<org.jumpserver.wisp.ServiceOuterClass.AccountDetailResponse>) responseObserver);
17111773
break;
1774+
case METHODID_CALL_API:
1775+
serviceImpl.callAPI((org.jumpserver.wisp.ServiceOuterClass.HTTPRequest) request,
1776+
(io.grpc.stub.StreamObserver<org.jumpserver.wisp.ServiceOuterClass.HTTPResponse>) responseObserver);
1777+
break;
17121778
default:
17131779
throw new AssertionError();
17141780
}
@@ -1898,6 +1964,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser
18981964
org.jumpserver.wisp.ServiceOuterClass.Empty,
18991965
org.jumpserver.wisp.ServiceOuterClass.AccountDetailResponse>(
19001966
service, METHODID_GET_ACCOUNT_CHAT)))
1967+
.addMethod(
1968+
getCallAPIMethod(),
1969+
io.grpc.stub.ServerCalls.asyncUnaryCall(
1970+
new MethodHandlers<
1971+
org.jumpserver.wisp.ServiceOuterClass.HTTPRequest,
1972+
org.jumpserver.wisp.ServiceOuterClass.HTTPResponse>(
1973+
service, METHODID_CALL_API)))
19011974
.build();
19021975
}
19031976

@@ -1970,6 +2043,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
19702043
.addMethod(getFaceMonitorCallbackMethod())
19712044
.addMethod(getJoinFaceMonitorMethod())
19722045
.addMethod(getGetAccountChatMethod())
2046+
.addMethod(getCallAPIMethod())
19732047
.build();
19742048
}
19752049
}

0 commit comments

Comments
 (0)