@openshift-console/dynamic-plugin-sdk
Version:
Provides core APIs, types and utilities used by dynamic plugins at runtime.
27 lines (26 loc) • 910 B
JavaScript
/**
* 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 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;