Use tabs to organize UI
This commit is contained in:
		
							
								
								
									
										27
									
								
								remote_frontend/src/api/VMApi.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								remote_frontend/src/api/VMApi.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
import { APIClient } from "./ApiClient";
 | 
			
		||||
 | 
			
		||||
export interface VMInfo {
 | 
			
		||||
  uiid: string;
 | 
			
		||||
  name: string;
 | 
			
		||||
  description?: string;
 | 
			
		||||
  architecture: string;
 | 
			
		||||
  memory: number;
 | 
			
		||||
  number_vcpu: number;
 | 
			
		||||
  can_get_state: boolean;
 | 
			
		||||
  can_start: boolean;
 | 
			
		||||
  can_shutdown: boolean;
 | 
			
		||||
  can_kill: boolean;
 | 
			
		||||
  can_reset: boolean;
 | 
			
		||||
  can_suspend: boolean;
 | 
			
		||||
  can_resume: boolean;
 | 
			
		||||
  can_screenshot: boolean;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export class VMApi {
 | 
			
		||||
  /**
 | 
			
		||||
   * Get the list of VM that can be managed by this console
 | 
			
		||||
   */
 | 
			
		||||
  static async GetList(): Promise<VMInfo[]> {
 | 
			
		||||
    return (await APIClient.exec({ method: "GET", uri: "/vm/list" })).data;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user