fix: alignment api
This commit is contained in:
@@ -1,5 +1,25 @@
|
||||
import { StatusMaps } from '@/config';
|
||||
import { StatusType } from '@/config/types';
|
||||
import { icons } from '@gpustack/core-ui';
|
||||
|
||||
export const StoragePhaseValueMap = {
|
||||
Available: 'Available',
|
||||
Unavailable: 'Unavailable',
|
||||
Pending: 'Pending'
|
||||
};
|
||||
|
||||
export const StoragePhaseLabelMap: Record<string, string> = {
|
||||
[StoragePhaseValueMap.Available]: 'Available',
|
||||
[StoragePhaseValueMap.Unavailable]: 'Unavailable',
|
||||
[StoragePhaseValueMap.Pending]: 'Pending'
|
||||
};
|
||||
|
||||
export const status: Record<string, StatusType> = {
|
||||
[StoragePhaseValueMap.Available]: StatusMaps.success,
|
||||
[StoragePhaseValueMap.Unavailable]: StatusMaps.error,
|
||||
[StoragePhaseValueMap.Pending]: StatusMaps.transitioning
|
||||
};
|
||||
|
||||
export const StorageTypeValueMap = {
|
||||
Local: 'local',
|
||||
Shared: 'shared',
|
||||
|
||||
@@ -32,12 +32,23 @@ export interface Metadata {
|
||||
resourceVersion: string;
|
||||
creationTimestamp: string;
|
||||
annotations?: Record<string, string>;
|
||||
finalizers?: string[];
|
||||
managedFields?: ManagedField[];
|
||||
}
|
||||
|
||||
export interface ListItem extends Omit<FormData, 'metadata'> {
|
||||
id: number;
|
||||
export interface ListItem {
|
||||
metadata: Metadata;
|
||||
spec: {
|
||||
type: string;
|
||||
capacity: string;
|
||||
accessMode: AccessModeType;
|
||||
};
|
||||
status: {
|
||||
phase: 'Available' | 'Unavailable' | 'Pending';
|
||||
volume: {
|
||||
name: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface StorageClassItem {
|
||||
|
||||
Reference in New Issue
Block a user