1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { AxiosInstance } from "axios";
6 import { CommonResourceService } from "services/common-service/common-resource-service";
7 import { VirtualMachineLogins, VirtualMachinesResource } from 'models/virtual-machines';
8 import { ApiActions } from 'services/api/api-actions';
10 export class VirtualMachinesService extends CommonResourceService<VirtualMachinesResource> {
11 constructor(serverApi: AxiosInstance, actions: ApiActions) {
12 super(serverApi, "virtual_machines", actions);
15 getRequestedDate(): string {
16 return localStorage.getItem('requestedDate') || '';
19 saveRequestedDate(date: string) {
20 localStorage.setItem('requestedDate', date);
23 logins(uuid: string): Promise<VirtualMachineLogins> {
24 return CommonResourceService.defaultResponse(
26 .get(`virtual_machines/${uuid}/logins`),
31 getAllLogins(): Promise<VirtualMachineLogins> {
32 return CommonResourceService.defaultResponse(
34 .get('virtual_machines/get_all_logins'),