import { Resource } from '~/models/resource';
-export interface SshKey {
- name: string;
- keyType: KeyType;
- authorizedUserUuid: string;
- publicKey: string;
- expiresAt: string;
-}
-
export interface SshKeyCreateFormDialogData {
publicKey: string;
name: string;
import { AxiosInstance } from "axios";
import { snackbarActions } from '~/store/snackbar/snackbar-actions';
import { dialogActions } from '~/store/dialog/dialog-actions';
-import { SshKeyCreateFormDialogData, SshKey, KeyType } from '~/models/ssh-key';
+import { SshKeyCreateFormDialogData, KeyType, SshKeyResource } from '~/models/ssh-key';
import { setBreadcrumbs } from '../breadcrumbs/breadcrumbs-actions';
export const authActions = unionize({
INIT: ofType<{ user: User, token: string }>(),
USER_DETAILS_REQUEST: {},
USER_DETAILS_SUCCESS: ofType<User>(),
- SET_SSH_KEYS: ofType<SshKey[]>(),
- ADD_SSH_KEY: ofType<SshKey>()
+ SET_SSH_KEYS: ofType<SshKeyResource[]>(),
+ ADD_SSH_KEY: ofType<SshKeyResource>()
});
export const SSH_KEY_CREATE_FORM_NAME = 'sshKeyCreateFormName';
import { authActions, AuthAction } from "./auth-action";
import { User } from "~/models/user";
import { ServiceRepository } from "~/services/services";
-import { SshKey } from '~/models/ssh-key';
+import { SshKeyResource } from '~/models/ssh-key';
export interface AuthState {
user?: User;
apiToken?: string;
- sshKeys?: SshKey[];
+ sshKeys?: SshKeyResource[];
}
const initialState: AuthState = {
USER_DETAILS_SUCCESS: (user: User) => {
return {...state, user};
},
- SET_SSH_KEYS: (sshKeys: SshKey[]) => {
+ SET_SSH_KEYS: (sshKeys: SshKeyResource[]) => {
return {...state, sshKeys};
},
- ADD_SSH_KEY: (sshKey: SshKey) => {
+ ADD_SSH_KEY: (sshKey: SshKeyResource) => {
return { ...state, sshKeys: state.sshKeys!.concat(sshKey) };
},
default: () => state
import * as React from 'react';
import { StyleRulesCallback, WithStyles, withStyles, Card, CardContent, Button, Typography } from '@material-ui/core';
import { ArvadosTheme } from '~/common/custom-theme';
-import { SshKey } from '~/models/ssh-key';
+import { SshKeyResource } from '~/models/ssh-key';
type CssRules = 'root' | 'link';
}
export interface SshKeyPanelRootDataProps {
- sshKeys?: SshKey[];
+ sshKeys?: SshKeyResource[];
}
type SshKeyPanelRootProps = SshKeyPanelRootDataProps & SshKeyPanelRootActionProps & WithStyles<CssRules>;