UNPKG

@kinvolk/headlamp-plugin

Version:

The needed infrastructure for building Headlamp plugins.

46 lines (45 loc) 2.36 kB
import type { ApiError } from '../lib/k8s/api/v2/ApiError'; export interface DialogProps { cluster: any; openConfirmDialog: string; setOpenConfirmDialog: (value: string) => void; } export interface MenuItemProps { cluster: any; handleMenuClose: () => void; setOpenConfirmDialog: (value: string) => void; } export interface ClusterStatusProps { cluster: any; error: ApiError | null | undefined; } export type DialogComponent = (props: DialogProps) => React.ReactElement | null; export type MenuItemComponent = (props: MenuItemProps) => React.ReactElement | null; export type ClusterStatusComponent = (props: ClusterStatusProps) => React.ReactElement | null; /** * Information about a cluster provider, that is shown on the add cluster page. */ export interface ClusterProviderInfo { /** The title of the provider. */ title: string; /** An icon component, an imported SVG. */ icon: React.FunctionComponent<React.SVGAttributes<SVGElement>>; /** Description of the provider. Explaining a bit about what it is. */ description: string; /** Url for where the Add button should go to. */ url: string; } export interface ClusterProviderSliceState { /** Dialog components that can be rendered by the application, on the Home. */ dialogs: DialogComponent[]; /** Menu items that can be rendered by the application, on the Home page in the cluster action menu. */ menuItems: MenuItemComponent[]; /** Cluster providers for the Add Cluster page. */ clusterProviders: ClusterProviderInfo[]; /** Cluster statuses for the Home page. */ clusterStatuses: ClusterStatusComponent[]; } export declare const initialState: ClusterProviderSliceState; export declare const addDialog: import("@reduxjs/toolkit").ActionCreatorWithPayload<DialogComponent, "clusterProviderSlice/addDialog">, addMenuItem: import("@reduxjs/toolkit").ActionCreatorWithPayload<MenuItemComponent, "clusterProviderSlice/addMenuItem">, addAddClusterProvider: import("@reduxjs/toolkit").ActionCreatorWithPayload<ClusterProviderInfo, "clusterProviderSlice/addAddClusterProvider">, addClusterStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<ClusterStatusComponent, "clusterProviderSlice/addClusterStatus">; declare const _default: import("redux").Reducer<ClusterProviderSliceState>; export default _default;