import { Resource } from '~/models/resource';
-export interface SshKeyCreateFormDialogData {
- publicKey: string;
- name: string;
-}
-
export enum KeyType {
SSH = 'SSH'
}
import { setBreadcrumbs } from '~/store/breadcrumbs/breadcrumbs-actions';
import { ServiceRepository } from "~/services/services";
import { getAuthorizedKeysServiceError, AuthorizedKeysServiceError } from '~/services/authorized-keys-service/authorized-keys-service';
-import { SshKeyCreateFormDialogData, KeyType, SshKeyResource } from '~/models/ssh-key';
+import { KeyType, SshKeyResource } from '~/models/ssh-key';
import { User } from "~/models/user";
export const authActions = unionize({
export const SSH_KEY_CREATE_FORM_NAME = 'sshKeyCreateFormName';
+export interface SshKeyCreateFormDialogData {
+ publicKey: string;
+ name: string;
+}
+
function setAuthorizationHeader(services: ServiceRepository, token: string) {
services.apiClient.defaults.headers.common = {
Authorization: `OAuth2 ${token}`
import { WithDialogProps } from '~/store/dialog/with-dialog';
import { FormDialog } from '~/components/form-dialog/form-dialog';
import { SshKeyPublicField, SshKeyNameField } from '~/views-components/form-fields/ssh-key-form-fields';
-import { SshKeyCreateFormDialogData } from '~/models/ssh-key';
+import { SshKeyCreateFormDialogData } from '~/store/auth/auth-action';
type DialogSshKeyProps = WithDialogProps<{}> & InjectedFormProps<SshKeyCreateFormDialogData>;
import { compose } from "redux";
import { reduxForm } from 'redux-form';
import { withDialog } from "~/store/dialog/with-dialog";
-import { SSH_KEY_CREATE_FORM_NAME, createSshKey } from '~/store/auth/auth-action';
+import { SSH_KEY_CREATE_FORM_NAME, createSshKey, SshKeyCreateFormDialogData } from '~/store/auth/auth-action';
import { DialogSshKeyCreate } from '~/views-components/dialog-create/dialog-ssh-key-create';
-import { SshKeyCreateFormDialogData } from '~/models/ssh-key';
export const CreateSshKeyDialog = compose(
withDialog(SSH_KEY_CREATE_FORM_NAME),