UNPKG

@stolostron/multicluster-sdk

Version:

Provides extensions and APIs that dynamic plugins can use to leverage multicluster capabilities provided by Red Hat Advanced Cluster Management.

19 lines 984 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useIsFleetAvailable = useIsFleetAvailable; /* Copyright Contributors to the Open Cluster Management project */ const dynamic_plugin_sdk_1 = require("@openshift-console/dynamic-plugin-sdk"); const constants_1 = require("./constants"); /** * Hook that determines if the fleet support is available. * * Checks if the feature flag with the name corresponding to the `REQUIRED_PROVIDER_FLAG` constant is enabled. * Red Hat Advanced Cluster Management enables this feature flag in versions that provide all of the dependencies * required by this version of the multicluster SDK. * * @returns `true` if a version of Red Hat Advanced Cluster Management that is compatible with the multicluster SDK is available; `false` otherwise */ function useIsFleetAvailable() { return !!(0, dynamic_plugin_sdk_1.useFlag)(constants_1.REQUIRED_PROVIDER_FLAG); } //# sourceMappingURL=useIsFleetAvailable.js.map