Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2079673: disable migrated components #11205

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 28 additions & 6 deletions frontend/packages/ceph-storage-plugin/console-extensions.json
Expand Up @@ -70,7 +70,8 @@
}
},
"flags": {
"required": ["MCG"]
"required": ["MCG"],
"disallowed": ["MCG_RESOURCE"]
}
},
/* Activates when RGW is present without MCG */
Expand All @@ -88,7 +89,7 @@
},
"flags": {
"required": ["RGW"],
"disallowed": ["MCG"]
"disallowed": ["MCG", "MCG_RESOURCE"]
}
},
{
Expand All @@ -104,7 +105,8 @@
}
},
"flags": {
"required": ["MCG"]
"required": ["MCG"],
"disallowed": ["MCG_RESOURCE"]
}
},
/* Activates when RGW is present without MCG */
Expand All @@ -122,7 +124,7 @@
},
"flags": {
"required": ["RGW"],
"disallowed": ["MCG"]
"disallowed": ["MCG", "MCG_RESOURCE"]
}
},
{
Expand Down Expand Up @@ -163,7 +165,8 @@
}
},
"flags": {
"required": ["OCS"]
"required": ["OCS"],
"disallowed": ["BLOCK_POOL"]
}
},
{
Expand All @@ -176,7 +179,8 @@
}
},
"flags": {
"required": ["OCS"]
"required": ["OCS"],
"disallowed": ["BLOCK_POOL"]
}
},
{
Expand All @@ -187,6 +191,9 @@
"component": {
"$codeRef": "bsCreate.default"
}
},
"flags": {
"disallowed": ["MCG_RESOURCE"]
}
},
{
Expand All @@ -197,6 +204,9 @@
"component": {
"$codeRef": "nssCreate.default"
}
},
"flags": {
"disallowed": ["MCG_RESOURCE"]
}
},
{
Expand All @@ -207,6 +217,9 @@
"component": {
"$codeRef": "bcCreate.default"
}
},
"flags": {
"disallowed": ["MCG_RESOURCE"]
}
},
{
Expand All @@ -217,6 +230,9 @@
"component": {
"$codeRef": "resourceDetailsPage.GenericDetailsPage"
}
},
"flags": {
"disallowed": ["MCG_RESOURCE"]
}
},
{
Expand All @@ -227,13 +243,19 @@
"component": {
"$codeRef": "odfSystemDashboard.default"
}
},
"flags": {
"disallowed": ["ODF_DASHBOARD"]
}
},
{
"type": "console.action/provider",
"properties": {
"contextId": "csv-actions",
"provider": { "$codeRef": "actions.useCsvActions" }
},
"flags": {
"disallowed": ["COMMON_FLAG"]
}
}
]
10 changes: 10 additions & 0 deletions frontend/packages/ceph-storage-plugin/src/features.ts
Expand Up @@ -56,6 +56,11 @@ export enum FEATURES {
ODF_VAULT_SA_KMS = 'ODF_VAULT_SA_KMS',
SS_LIST = 'ODF_SS_LIST',
ADD_CAPACITY = 'ODF_ADD_CAPACITY',
ODF_WIZARD = 'ODF_WIZARD',
BLOCK_POOL = 'BLOCK_POOL',
MCG_RESOURCE = 'MCG_RESOURCE',
ODF_DASHBOARD = 'ODF_DASHBOARD',
COMMON_FLAG = 'COMMON_FLAG',
}

const OCS_FEATURE_FLAGS = {
Expand All @@ -76,6 +81,11 @@ const OCS_FEATURE_FLAGS = {
export const ODF_BLOCK_FLAG = {
[FEATURES.SS_LIST]: 'ss-list',
[FEATURES.ADD_CAPACITY]: 'add-capacity',
[FEATURES.ODF_WIZARD]: 'install-wizard',
[FEATURES.BLOCK_POOL]: 'block-pool',
[FEATURES.MCG_RESOURCE]: 'mcg-resource',
[FEATURES.ODF_DASHBOARD]: 'odf-dashboard',
[FEATURES.COMMON_FLAG]: 'common',
};

const handleError = (res: any, flags: string[], dispatch: Dispatch, cb: FeatureDetector) => {
Expand Down
38 changes: 37 additions & 1 deletion frontend/packages/ceph-storage-plugin/src/plugin.ts
Expand Up @@ -92,6 +92,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [OCS_MODEL_FLAG],
disallowed: [FEATURES.COMMON_FLAG],
},
},
{
Expand All @@ -101,6 +102,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [OCS_MODEL_FLAG],
disallowed: [FEATURES.ODF_WIZARD],
},
},
{
Expand All @@ -110,6 +112,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [OCS_MODEL_FLAG],
disallowed: [FEATURES.COMMON_FLAG],
},
},
{
Expand All @@ -119,6 +122,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [OCS_MODEL_FLAG],
disallowed: [FEATURES.COMMON_FLAG],
},
},
{
Expand All @@ -128,6 +132,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [ODF_MODEL_FLAG],
disallowed: [FEATURES.COMMON_FLAG],
},
},
{
Expand All @@ -137,6 +142,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [OCS_MODEL_FLAG],
disallowed: [FEATURES.COMMON_FLAG],
},
},
{
Expand All @@ -160,6 +166,9 @@ const plugin: Plugin<ConsumedExtensions> = [
'./components/create-storage-system/create-storage-system' /* webpackChunkName: "create-storage-system" */
).then((m) => m.default),
},
flags: {
disallowed: [FEATURES.ODF_WIZARD],
},
Comment on lines +169 to +171
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

},
{
type: 'Page/Route',
Expand Down Expand Up @@ -248,6 +257,9 @@ const plugin: Plugin<ConsumedExtensions> = [
});
},
},
flags: {
disallowed: [FEATURES.BLOCK_POOL],
},
},
{
type: 'Dashboards/Overview/Activity/Resource',
Expand Down Expand Up @@ -281,6 +293,9 @@ const plugin: Plugin<ConsumedExtensions> = [
(m) => m.default,
),
},
flags: {
disallowed: [FEATURES.MCG_RESOURCE],
},
},
{
type: 'Page/Route',
Expand All @@ -297,6 +312,9 @@ const plugin: Plugin<ConsumedExtensions> = [
'./components/create-backingstore-page/create-bs-page' /* webpackChunkName: "create-bs" */
).then((m) => m.default),
},
flags: {
disallowed: [FEATURES.MCG_RESOURCE],
},
},
{
type: 'Page/Route',
Expand All @@ -313,6 +331,9 @@ const plugin: Plugin<ConsumedExtensions> = [
'./components/namespace-store/create-namespace-store' /* webpackChunkName: "create-namespace-store" */
).then((m) => m.default),
},
flags: {
disallowed: [FEATURES.MCG_RESOURCE],
},
},
{
type: 'Page/Resource/List',
Expand All @@ -325,6 +346,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [OCS_MODEL_FLAG],
disallowed: [FEATURES.MCG_RESOURCE],
},
},
{
Expand All @@ -338,6 +360,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [OCS_MODEL_FLAG],
disallowed: [FEATURES.MCG_RESOURCE],
},
},
{
Expand All @@ -351,6 +374,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [OCS_MODEL_FLAG],
disallowed: [FEATURES.MCG_RESOURCE],
},
},
{
Expand All @@ -364,6 +388,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [OCS_MODEL_FLAG],
disallowed: [FEATURES.MCG_RESOURCE],
},
},
{
Expand All @@ -377,6 +402,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [MCG_FLAG],
disallowed: [FEATURES.MCG_RESOURCE],
},
},
// When RGW is available without MCG
Expand All @@ -391,7 +417,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [RGW_FLAG],
disallowed: [MCG_FLAG],
disallowed: [MCG_FLAG, FEATURES.MCG_RESOURCE],
},
},
{
Expand Down Expand Up @@ -442,6 +468,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [MCG_FLAG],
disallowed: [FEATURES.MCG_RESOURCE],
},
},
{
Expand All @@ -454,6 +481,9 @@ const plugin: Plugin<ConsumedExtensions> = [
'./components/block-pool/create-block-pool' /* webpackChunkName: "create-block-pool" */
).then((m) => m.default),
},
flags: {
disallowed: [FEATURES.BLOCK_POOL],
},
},
{
type: 'ClusterServiceVersion/Action',
Expand All @@ -474,6 +504,9 @@ const plugin: Plugin<ConsumedExtensions> = [
});
},
},
flags: {
disallowed: [FEATURES.BLOCK_POOL],
},
},
{
type: 'ClusterServiceVersion/Action',
Expand Down Expand Up @@ -545,6 +578,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [MCG_FLAG],
disallowed: [FEATURES.MCG_RESOURCE],
},
},
// Adding this Extension because dynamic endpoint is not avbl
Expand All @@ -567,6 +601,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [MCG_FLAG],
disallowed: [FEATURES.MCG_RESOURCE],
},
},
// Adding this Extension because dynamic endpoint is not avbl
Expand All @@ -589,6 +624,7 @@ const plugin: Plugin<ConsumedExtensions> = [
},
flags: {
required: [MCG_FLAG],
disallowed: [FEATURES.MCG_RESOURCE],
},
},
];
Expand Down