diff --git a/bigtop-manager-ui/src/api/sse/index.ts b/bigtop-manager-ui/src/api/sse/index.ts index 52ee663e..22975e58 100644 --- a/bigtop-manager-ui/src/api/sse/index.ts +++ b/bigtop-manager-ui/src/api/sse/index.ts @@ -19,12 +19,13 @@ import axios, { type AxiosProgressEvent, type CancelTokenSource } from 'axios' import request from '@/api/request.ts' +import type { LogsRes } from './types' export const getLogs = ( clusterId: number, id: number, func: Function -): { promise: Promise; cancel: () => void } => { +): LogsRes => { const source: CancelTokenSource = axios.CancelToken.source() const promise = request({ diff --git a/bigtop-manager-ui/src/api/sse/types.ts b/bigtop-manager-ui/src/api/sse/types.ts new file mode 100644 index 00000000..6f83d3e5 --- /dev/null +++ b/bigtop-manager-ui/src/api/sse/types.ts @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export interface LogsRes { + promise: Promise + cancel: () => void +} diff --git a/bigtop-manager-ui/src/components/job-info/job.vue b/bigtop-manager-ui/src/components/job-info/job.vue index d2a2b34a..e645c60a 100644 --- a/bigtop-manager-ui/src/components/job-info/job.vue +++ b/bigtop-manager-ui/src/components/job-info/job.vue @@ -18,9 +18,8 @@ -->