@openshift-assisted/ui-lib
Version:
React component library for the Assisted Installer UI
20 lines • 1.29 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.selectCurrentClusterPermissionsState = exports.selectIsCurrentClusterSNO = exports.selectCurrentClusterUIState = exports.selectCurrentCluster = exports.selectCurrentClusterState = void 0;
const selectCurrentClusterState = (state) => state.currentCluster;
exports.selectCurrentClusterState = selectCurrentClusterState;
const selectCurrentCluster = (state) => state.currentCluster.data;
exports.selectCurrentCluster = selectCurrentCluster;
const selectCurrentClusterUIState = (state) => state.currentCluster.uiState;
exports.selectCurrentClusterUIState = selectCurrentClusterUIState;
const selectIsCurrentClusterSNO = (state) => { var _a; return ((_a = state.currentCluster.data) === null || _a === void 0 ? void 0 : _a.controlPlaneCount) === 1; };
exports.selectIsCurrentClusterSNO = selectIsCurrentClusterSNO;
const selectCurrentClusterPermissionsState = (state) => {
if (state.currentCluster) {
return state.currentCluster.permissions;
}
// This shouldn't happen, but to be on the safe side, return the default permissions
return { isViewerMode: false };
};
exports.selectCurrentClusterPermissionsState = selectCurrentClusterPermissionsState;
//# sourceMappingURL=selectors.js.map