Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions lib/cloudapi-client/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3257,6 +3257,26 @@ export interface VirtualMachine {
*/
'id': string;
}
/**
* Web 访问凭证响应
* @export
* @interface TicketResponse
*/
export interface TicketResponse {
/**
* 访问凭证
* @type {string}
* @memberof TicketResponse
*/
'ticket': string;

/**
* 服务器主机地址
* @type {string}
* @memberof TicketResponse
*/
'host': string;
}
/**
*
* @export
Expand Down Expand Up @@ -5885,6 +5905,45 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
options: localVarRequestOptions,
};
},
/**
* 创建 Web 访问凭证
* @summary 创建虚拟机的 Web 访问凭证
* @param {string} vmId 虚拟机 UUID
* @param {*} [options] 可选的 HTTP 请求配置
* @throws {RequiredError}
*/
postVmVmIdTicket: async (vmId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// 确保 vmId 存在
assertParamExists('postVmVmIdTicket', 'vmId', vmId);
const localVarPath = `/vm/{vmId}/ticket`
.replace(`{${"vmId"}}`, encodeURIComponent(String(vmId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}

const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Authorization required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)



localVarHeaderParameter['Content-Type'] = 'application/json';

setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* 对虚拟机进行开关机操作
* @summary 虚拟机开关机
Expand Down Expand Up @@ -7592,6 +7651,17 @@ export const DefaultApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getVmVmId(vmId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* 创建 Web 访问凭证
* @summary 创建虚拟机的 Web 访问凭证
* @param {string} vmId 虚拟机 UUID
* @param {*} [options] 可选的 HTTP 请求配置
* @throws {RequiredError}
*/
async postVmVmIdTicket(vmId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TicketResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.postVmVmIdTicket(vmId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* 获取符合条件的所有虚拟机
* @summary get Virtual Machine list
Expand Down Expand Up @@ -8563,6 +8633,16 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
getVmVmId(vmId: string, options?: any): AxiosPromise<VirtualMachine> {
return localVarFp.getVmVmId(vmId, options).then((request) => request(axios, basePath));
},
/**
* 创建 Web 访问凭证
* @summary 创建虚拟机的 Web 访问凭证
* @param {string} vmId 虚拟机 UUID
* @param {*} [options] 可选的 HTTP 请求配置
* @throws {RequiredError}
*/
postVmVmIdTicket(vmId: string, options?: any): AxiosPromise<TicketResponse> {
return localVarFp.postVmVmIdTicket(vmId, options).then((request) => request(axios, basePath));
},
/**
* 获取符合条件的所有虚拟机
* @summary get Virtual Machine list
Expand Down
2 changes: 1 addition & 1 deletion lib/components/experiments/ExperimentPaaSAdmin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function ExperimentPaaSAdmin(props: Props) {

<Tabs
defaultActiveKey="1"
items={expWfConfigList.map((wfConfig, index) => {
items={expWfConfigList.map((wfConfig: any, index: number) => {
return {
key: String(index + 1),
label: wfConfig.name,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/experiments/ExperimentWorkflowTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export function ExperimentWorkflowTable(props: Props) {

const dataList: DataType[] = thisStudentList
.map((student, index) => {
const workflowResp = workflowRespList.find(wfResp => getWorkflowOwner(wfResp.workflow) === student.id && getWorkflowExpId(wfResp.workflow) === experiment.id)
const workflowResp = workflowRespList.find((wfResp: any) => getWorkflowOwner(wfResp.workflow) === student.id && getWorkflowExpId(wfResp.workflow) === experiment.id)
const workflow = workflowResp?.workflow
return {
key: index,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/experiments/WorkflowDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export function WorkflowDescription(props: Props) {
</ProDescriptions.Item>
<ProDescriptions.Item label="端口号配置">
{
workflow?.spec.deploy?.ports?.map((port, index) => {
workflow?.spec.deploy?.ports?.map((port: any, index: number) => {
return (
<ProDescriptions key={index}>
<ProDescriptions.Item label="端口号" valueType='text'>
Expand Down
2 changes: 1 addition & 1 deletion lib/components/projects/image/ImageListTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const ImageListTable = (props: { project: Project }) => {
name: `${item.digest.substring(0, 15)}`,
pullCommand: item.pullCommand,
tags: item.tags,
size: filesize(item.imageSize) as string,
size: filesize(item.imageSize) as unknown as string,
pushTime: formatTimeStamp(item.pushTime),
pullTime: formatTimeStamp(item.pullTime)
}
Expand Down
Loading