UNPKG

@openshift-console/dynamic-plugin-sdk

Version:

Provides core APIs, types and utilities used by dynamic plugins at runtime.

33 lines (32 loc) 1.11 kB
/** * It provides impersonation details from the redux store. * @param state the root state * @returns The the impersonate state. */ export const getImpersonate = (state) => state.sdkCore.impersonate; /** * It provides impersonation details from the redux store as a props object. * @param state the root state * @returns The the impersonation details props object. */ export const impersonateStateToProps = (state) => { return { impersonate: getImpersonate(state) }; }; /** * It provides user details from the redux store. * @param state the root state * @returns The the user state. */ export const getUser = (state) => state.sdkCore.user; /** * It provides user resource details from the redux store. * @param state the root state * @returns The user resource state. */ export const getUserResource = (state) => state.sdkCore.userResource; /** * It provides admission webhook warning data from the redux store. * @param state the root state * @returns The the admissionWebhookWarning state. */ export const getAdmissionWebhookWarnings = (state) => state.sdkCore.admissionWebhookWarnings;