fix: storage api alignment
This commit is contained in:
@@ -1,26 +1,32 @@
|
||||
export interface PortItem {
|
||||
protocol: 'udp' | 'tcp';
|
||||
value?: number;
|
||||
port: number;
|
||||
}
|
||||
|
||||
export interface EnvItem {
|
||||
name: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface FormData {
|
||||
name: string;
|
||||
image?: string;
|
||||
vendor?: string;
|
||||
image_pull_policy?: string;
|
||||
run_command?: string;
|
||||
boot_disk_size_gb?: number;
|
||||
volume_size_gb?: number;
|
||||
volume_mount_path?: string;
|
||||
ports?: PortItem[];
|
||||
env?: Record<string, any>;
|
||||
image: string;
|
||||
imagePullPolicy: string;
|
||||
imagePullSecret: {
|
||||
name: string;
|
||||
};
|
||||
command: string[];
|
||||
privileged: boolean;
|
||||
ports: PortItem[];
|
||||
env: EnvItem[];
|
||||
volumeMount: string;
|
||||
resources: {
|
||||
cpu: string;
|
||||
ram: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ListItem extends FormData {
|
||||
id: number;
|
||||
description?: string;
|
||||
gpu_count?: number;
|
||||
replicas?: number;
|
||||
status?: string;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
|
||||
@@ -11,7 +11,7 @@ import { FormData } from '../config/types';
|
||||
import Ports from './ports';
|
||||
|
||||
interface BasicProps {
|
||||
page: 'template' | 'instance';
|
||||
page?: 'template' | 'instance';
|
||||
}
|
||||
|
||||
const Basic: React.FC<BasicProps> = ({ page = 'template' }) => {
|
||||
|
||||
@@ -45,7 +45,6 @@ const PortItem: React.FC<PortItemProps> = ({ item, index, onChange }) => {
|
||||
<CInputNumber
|
||||
min={1}
|
||||
max={65535}
|
||||
disabled={index === 0}
|
||||
precision={0}
|
||||
value={item.value}
|
||||
onChange={(value) => {
|
||||
|
||||
Reference in New Issue
Block a user